fix(emrdiagnosis): use emr registration relation
This commit is contained in:
@ -13,7 +13,7 @@ import { EmrDiagnosisType } from "../../enum/emrDiagnosisType";
|
||||
import { EmrPatient } from "./emr_patient";
|
||||
import { Diagnosis } from "../diagnosis";
|
||||
import { User } from "../users";
|
||||
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
|
||||
import { EmrRegistration } from "./emr_registration";
|
||||
|
||||
@Entity("emr_diagnosis", { schema: "emr" })
|
||||
export class EmrDiagnosis {
|
||||
@ -24,9 +24,9 @@ export class EmrDiagnosis {
|
||||
@JoinColumn()
|
||||
patient: EmrPatient;
|
||||
|
||||
@ManyToOne(() => EmrRegistrationOutpatient, { onDelete: "CASCADE" })
|
||||
@ManyToOne(() => EmrRegistration, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
registration_outpatient: EmrRegistrationOutpatient;
|
||||
registration: EmrRegistration;
|
||||
|
||||
@ManyToOne(() => User, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
@ -34,13 +34,13 @@ export class EmrDiagnosis {
|
||||
|
||||
@ManyToOne(() => Diagnosis, { onDelete: "CASCADE", nullable: true })
|
||||
@JoinColumn()
|
||||
id_diagnosis: Diagnosis;
|
||||
diagnosis: Diagnosis;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
diagnosis_code: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
name: string;
|
||||
diagnosis_name: string;
|
||||
|
||||
@Column({
|
||||
type: "enum",
|
||||
|
||||
Reference in New Issue
Block a user