From 4be58af3185b4b8dc4656b0264b0ef5a80374da6 Mon Sep 17 00:00:00 2001 From: avicenan Date: Wed, 27 May 2026 11:17:07 +0900 Subject: [PATCH] feat(opd): add appointment id --- src/entity/emr/emr_registration_outpatient.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/entity/emr/emr_registration_outpatient.ts b/src/entity/emr/emr_registration_outpatient.ts index cbb5f1b..ea35f6d 100644 --- a/src/entity/emr/emr_registration_outpatient.ts +++ b/src/entity/emr/emr_registration_outpatient.ts @@ -79,6 +79,10 @@ export class EmrRegistrationOutpatient { @JoinColumn() ref_consultation: EmrInternalConsultation | null; + @ManyToOne(() => EmrRegistration, { onDelete: "SET NULL", nullable: true }) + @JoinColumn({ name: "ref_appointment_id" }) + ref_appointment: EmrRegistration; + @Column({ nullable: true }) queued_at?: Date;