diff --git a/src/entity/emr/emr_laboratory_orders.ts b/src/entity/emr/emr_laboratory_orders.ts index 90dc321..8f6ece2 100644 --- a/src/entity/emr/emr_laboratory_orders.ts +++ b/src/entity/emr/emr_laboratory_orders.ts @@ -16,6 +16,7 @@ import { User } from "../users"; import { Department } from "../department"; import { EmrLaboratoryOrderItem } from "./emr_laboratory_order_items"; import { LaboratoryOrderStatus } from "../../enum/laboratoryOrderStatus"; +import { EmrRegistration } from "./emr_registration"; /** * Laboratory orders entity. @@ -35,6 +36,10 @@ export class EmrLaboratoryOrder { @Column({ type: "text", nullable: true }) notes: string; + @ManyToOne(() => EmrRegistration, { onDelete: "NO ACTION", nullable: true }) + @JoinColumn() + registration: EmrRegistration; + @ManyToOne(() => EmrPatient, { onDelete: "NO ACTION" }) @JoinColumn() patient: EmrPatient;