fix(physical-exam): fix regis relation

This commit is contained in:
avicenan
2026-03-31 21:14:42 +07:00
parent 1667eedde4
commit 72c1bd5f11

View File

@ -10,8 +10,8 @@ import {
ManyToOne,
} from "typeorm";
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
import { EmrPatient } from "./emr_patient";
import { EmrRegistration } from "./emr_registration";
@Entity("emr_physical_examination", { schema: "emr" })
export class EmrPhysicalExamination {
@ -22,9 +22,9 @@ export class EmrPhysicalExamination {
@JoinColumn()
patient: EmrPatient;
@OneToOne(() => EmrRegistrationOutpatient, { onDelete: "CASCADE" })
@OneToOne(() => EmrRegistration, { onDelete: "CASCADE" })
@JoinColumn()
registration_outpatient: EmrRegistrationOutpatient;
registration: EmrRegistration;
@Column({ nullable: true, type: "text" })
internal_status: string;