update: order for compounding medicine, now ir can be ordered different compounding
This commit is contained in:
@ -7,7 +7,9 @@ import {
|
|||||||
DeleteDateColumn,
|
DeleteDateColumn,
|
||||||
OneToMany,
|
OneToMany,
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
JoinColumn
|
JoinColumn,
|
||||||
|
ManyToMany,
|
||||||
|
JoinTable
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
|
|
||||||
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
|
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
|
||||||
@ -44,9 +46,20 @@ export class EmrPharmacyOrderList {
|
|||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
emrregistrationoutpatient: EmrRegistrationOutpatient;
|
emrregistrationoutpatient: EmrRegistrationOutpatient;
|
||||||
|
|
||||||
@ManyToOne(() => EmrCompoundingMedicine, { onDelete: "CASCADE" })
|
@Column({
|
||||||
@JoinColumn()
|
type: 'text',
|
||||||
emrcompoundingmedicine: EmrCompoundingMedicine;
|
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" })
|
@ManyToOne(() => EmrPrescription, { onDelete: "CASCADE" })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
|
|||||||
Reference in New Issue
Block a user