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