update diagnosis entity

This commit is contained in:
wayanrivan
2026-02-26 10:02:17 +07:00
parent 0cce9ca70c
commit 3095e2df86

View File

@ -12,6 +12,7 @@ import {
import { EmrDiagnosisType } from "../../enum/emrDiagnosisType";
import { EmrPatient } from "./emr_patient";
import { Diagnosis } from "../diagnosis";
import { User } from "../users";
@Entity("emr_diagnosis", { schema: "emr" })
export class EmrDiagnosis {
@ -22,14 +23,18 @@ export class EmrDiagnosis {
@JoinColumn()
patient: EmrPatient;
@ManyToOne(() => User, { onDelete: "CASCADE" })
@JoinColumn()
doctor: User;
@ManyToOne(() => Diagnosis, { onDelete: "CASCADE", nullable: true })
@JoinColumn()
id_diagnosis: Diagnosis;
@Column({ nullable: true, type: "text" })
@Column({ nullable: true, type: "text" })
diagnosis_code: string;
@Column({ nullable: true, type: "text" })
@Column({ nullable: true, type: "text" })
name: string;
@Column({