From d4e8a1570e67211115fbffec31e896ecff298dbd Mon Sep 17 00:00:00 2001 From: abukhoeruliskandarali Date: Mon, 18 May 2026 17:19:32 +0700 Subject: [PATCH] Add registration relation to emergency transfer --- .idea/.gitignore | 10 ++++++ .idea/codeStyles/Project.xml | 42 +++++++++++++++++++++++ .idea/codeStyles/codeStyleConfig.xml | 5 +++ .idea/entity.iml | 9 +++++ .idea/misc.xml | 6 ++++ .idea/modules.xml | 8 +++++ .idea/vcs.xml | 6 ++++ src/entity/emr/emr_emergency_transfers.ts | 6 ++++ 8 files changed, 92 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/entity.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..30cf57e --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..04391e8 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/entity.iml b/.idea/entity.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/entity.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..07115cd --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..f214e52 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/entity/emr/emr_emergency_transfers.ts b/src/entity/emr/emr_emergency_transfers.ts index a89513a..beae8e2 100644 --- a/src/entity/emr/emr_emergency_transfers.ts +++ b/src/entity/emr/emr_emergency_transfers.ts @@ -9,6 +9,7 @@ import { User } from "../users"; import { EmrDiagnosis } from "./emr_diagnosis"; import { TransferMethodType, TransferRiskType } from "../../types/emr"; import { EmrEmergencyTransferAttachedDevice } from "./emr_emergency_transfer_attached_devices"; +import { EmrRegistration } from "./emr_registration"; @Entity("emr_emergency_transfers", { schema: "emr" }) export class EmrEmergencyTransfer { @@ -16,6 +17,11 @@ export class EmrEmergencyTransfer { @PrimaryGeneratedColumn("uuid") id: string; + // Registrasi emergency yang memiliki transfer antar unit + @ManyToOne(() => EmrRegistration, { onDelete: "NO ACTION", nullable: true }) + @JoinColumn({ name: "registration_id" }) + registration: EmrRegistration; + // Asal ruang rawat @ManyToOne(() => Room, { onDelete: "NO ACTION" }) @JoinColumn()