diff --git a/src/entity/emr/emr_external_consultation.ts b/src/entity/emr/emr_external_consultation.ts index 1afb241..6939082 100644 --- a/src/entity/emr/emr_external_consultation.ts +++ b/src/entity/emr/emr_external_consultation.ts @@ -10,6 +10,7 @@ import { ManyToOne, } from "typeorm"; import { RefferalHospital } from "../refferal_hospital"; +import { EmrRegistration } from "./emr_registration"; @Entity("emr_external_consultation", { schema: "emr" }) export class EmrExternalConsultation { @@ -20,6 +21,10 @@ export class EmrExternalConsultation { @JoinColumn() refferalhospital: RefferalHospital; + @OneToOne(() => EmrRegistration, { onDelete: "CASCADE" }) + @JoinColumn() + emrregistration: EmrRegistration; + @Column({ nullable: true, type: "text" }) notes: string;