diff --git a/src/entity/emr/emr_registration_outpatient.ts b/src/entity/emr/emr_registration_outpatient.ts index 052347e..f17c64a 100644 --- a/src/entity/emr/emr_registration_outpatient.ts +++ b/src/entity/emr/emr_registration_outpatient.ts @@ -8,6 +8,7 @@ import { ManyToOne, OneToOne, JoinColumn, + OneToMany, } from "typeorm"; import { EmrRegistration } from "./emr_registration"; @@ -71,7 +72,7 @@ export class EmrRegistrationOutpatient { @Column({ nullable: true, length: 256 }) registration_number: string; - @OneToOne(() => EmrInternalConsultation, { onDelete: "SET NULL", nullable: true }) + @ManyToOne(() => EmrInternalConsultation, { onDelete: "SET NULL", nullable: true }) @JoinColumn() ref_consultation: EmrInternalConsultation | null;