update compounding.ts and pharmacyorderlist.ts

This commit is contained in:
wayanrivan
2026-03-27 14:23:20 +07:00
parent a6528de1eb
commit e0ff252106
2 changed files with 97 additions and 0 deletions

View File

@ -0,0 +1,96 @@
import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
DeleteDateColumn,
OneToMany,
ManyToOne,
JoinColumn
} from "typeorm";
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
import { EmrCompoundingMedicine } from "./emr_compounding_medicine";
import { EmrPrescriptionOrder } from "./emr_prescription_orders";
import { User } from "../users";
import { PatientGuarantor } from "../patient_guarantor";
import { Room } from "../room";
import { Department } from "../department";
import { EmrRegistration } from "./emr_registration";
@Entity("emr_pharmacy_order_list", { schema: "emr" })
export class EmrPharmacyOrderList {
@PrimaryGeneratedColumn("uuid")
id: string;
@Column({ nullable: true })
order_date: Date;
@Column({ nullable: true, type: "text" })
prescription_number: string;
@Column({ nullable: true, type: "text" })
type: string;
@Column({ nullable: true, type: "text" })
status: string;
@Column({ nullable: true, type: "text", array: true })
prescription_screening: string[];
@ManyToOne(() => EmrRegistrationOutpatient, { onDelete: "CASCADE" })
@JoinColumn()
emrregistrationoutpatient: EmrRegistrationOutpatient;
@ManyToOne(() => EmrCompoundingMedicine, { onDelete: "CASCADE" })
@JoinColumn()
emrcompoundingmedicine: EmrCompoundingMedicine;
@ManyToOne(() => EmrPrescriptionOrder, { onDelete: "CASCADE" })
@JoinColumn()
emrprescriptionorder: EmrPrescriptionOrder;
@ManyToOne(() => User, { onDelete: "CASCADE" })
@JoinColumn()
user: User;
@ManyToOne(() => PatientGuarantor, { onDelete: "CASCADE" })
@JoinColumn()
patientguarantor: PatientGuarantor;
@ManyToOne(() => Room, { onDelete: "CASCADE" })
@JoinColumn()
room: Room;
@ManyToOne(() => Department, { onDelete: "CASCADE" })
@JoinColumn()
department: Department;
@ManyToOne(() => EmrRegistration, { onDelete: "CASCADE" })
@JoinColumn()
emrregistration: EmrRegistration;
@Column()
@CreateDateColumn()
created_at: Date;
@Column({ nullable: true, length: 256 })
created_by: string;
@Column({ nullable: true })
@UpdateDateColumn()
updated_at: Date;
@Column({ nullable: true, length: 256 })
updated_by: string;
@Column({ nullable: true })
@DeleteDateColumn()
deleted_at: Date;
@Column({ nullable: true, length: 256 })
deleted_by: string;
}

View File

@ -23,6 +23,7 @@ export * from "../entity/emr/emr_compounding_medicine";
export * from "../entity/emr/emr_compounding_medicine_item";
export * from "../entity/emr/emr_room_medical_equipment";
export * from "../entity/emr/emr_external_consultation";
export * from "../entity/emr/emr_pharmacy_order_list";
export * from "../types/registration_type";
export * from "../types/registration_status";