diff --git a/src/entity/emr/emr_registration.ts b/src/entity/emr/emr_registration.ts index c427e18..5f3e2d0 100644 --- a/src/entity/emr/emr_registration.ts +++ b/src/entity/emr/emr_registration.ts @@ -7,12 +7,14 @@ import { DeleteDateColumn, ManyToOne, JoinColumn, + OneToOne } from "typeorm"; import { RegistrationType } from "../../types/registration_type"; import { RegistrationStatus } from "../../types/registration_status"; import { EmrPatient } from "./emr_patient"; import { PatientGuarantor } from "../patient_guarantor"; +import { EmrRegistrationOutpatient } from "./emr_registration_outpatient"; /** * Registrasi base: data umum untuk semua tipe (rawat jalan, rawat inap, emergency, hemodialysis). @@ -24,6 +26,9 @@ export class EmrRegistration { @PrimaryGeneratedColumn("uuid") id: string; + @OneToOne(() => EmrRegistrationOutpatient, (out) => out.registration) + outpatient: EmrRegistrationOutpatient; + @ManyToOne(() => EmrPatient, { onDelete: "NO ACTION" }) @JoinColumn() patient: EmrPatient;