update: add relation emr registration in external consultation
This commit is contained in:
@ -10,6 +10,7 @@ import {
|
|||||||
ManyToOne,
|
ManyToOne,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { RefferalHospital } from "../refferal_hospital";
|
import { RefferalHospital } from "../refferal_hospital";
|
||||||
|
import { EmrRegistration } from "./emr_registration";
|
||||||
|
|
||||||
@Entity("emr_external_consultation", { schema: "emr" })
|
@Entity("emr_external_consultation", { schema: "emr" })
|
||||||
export class EmrExternalConsultation {
|
export class EmrExternalConsultation {
|
||||||
@ -20,6 +21,10 @@ export class EmrExternalConsultation {
|
|||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
refferalhospital: RefferalHospital;
|
refferalhospital: RefferalHospital;
|
||||||
|
|
||||||
|
@OneToOne(() => EmrRegistration, { onDelete: "CASCADE" })
|
||||||
|
@JoinColumn()
|
||||||
|
emrregistration: EmrRegistration;
|
||||||
|
|
||||||
@Column({ nullable: true, type: "text" })
|
@Column({ nullable: true, type: "text" })
|
||||||
notes: string;
|
notes: string;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user