fix(db): map physical exam to patient
This commit is contained in:
@ -7,15 +7,21 @@ import {
|
||||
DeleteDateColumn,
|
||||
JoinColumn,
|
||||
OneToOne,
|
||||
ManyToOne,
|
||||
} from "typeorm";
|
||||
|
||||
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
|
||||
import { EmrPatient } from "./emr_patient";
|
||||
|
||||
@Entity("emr_physical_examination", { schema: "emr" })
|
||||
export class EmrPhysicalExamination {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@ManyToOne(() => EmrPatient, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
patient: EmrPatient;
|
||||
|
||||
@OneToOne(() => EmrRegistrationOutpatient, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
registration_outpatient: EmrRegistrationOutpatient;
|
||||
|
||||
Reference in New Issue
Block a user