update: pharmacy order list
This commit is contained in:
@ -12,7 +12,6 @@ import {
|
||||
JoinTable
|
||||
} from "typeorm";
|
||||
|
||||
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
|
||||
import { EmrCompoundingMedicine } from "./emr_compounding_medicine";
|
||||
import { EmrPrescription } from "./emr_prescription";
|
||||
import { User } from "../users";
|
||||
@ -27,6 +26,20 @@ export class EmrPharmacyOrderList {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@ManyToMany(() => EmrCompoundingMedicine)
|
||||
@JoinTable({
|
||||
name: "emr_pharmacy_order_list_compounding", // bebas, tapi konsisten
|
||||
joinColumn: {
|
||||
name: "pharmacy_order_list_id",
|
||||
referencedColumnName: "id",
|
||||
},
|
||||
inverseJoinColumn: {
|
||||
name: "compounding_medicine_id",
|
||||
referencedColumnName: "id",
|
||||
},
|
||||
})
|
||||
emrcompoundingmedicines: EmrCompoundingMedicine[];
|
||||
|
||||
@Column({ nullable: true })
|
||||
order_date: Date;
|
||||
|
||||
@ -42,25 +55,6 @@ export class EmrPharmacyOrderList {
|
||||
@Column({ nullable: true, type: "text", array: true })
|
||||
prescription_screening: string[];
|
||||
|
||||
@ManyToOne(() => EmrRegistrationOutpatient, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
emrregistrationoutpatient: EmrRegistrationOutpatient;
|
||||
|
||||
@Column({
|
||||
type: 'text',
|
||||
nullable: true,
|
||||
array: true,
|
||||
})
|
||||
emrcompoundingmedicine: string[];
|
||||
|
||||
@ManyToMany(() => EmrCompoundingMedicine)
|
||||
@JoinTable({
|
||||
name: "compounding_medicine_order_list",
|
||||
joinColumn: { name: "emr_pharmacy_order_list_id", referencedColumnName: "id" },
|
||||
inverseJoinColumn: { name: "emr_compounding_medicine_id", referencedColumnName: "id" },
|
||||
})
|
||||
emrcompoundingmedicines: EmrCompoundingMedicine[];
|
||||
|
||||
@ManyToOne(() => EmrPrescription, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
emrprescription: EmrPrescription;
|
||||
|
||||
Reference in New Issue
Block a user