update conlist for dischargemethod and update its size in encounter

This commit is contained in:
dpurbosakti
2025-10-13 12:15:21 +07:00
parent c832da85c3
commit 378fd93b2d
4 changed files with 18 additions and 10 deletions
@@ -0,0 +1,2 @@
-- Modify "Encounter" table
ALTER TABLE "public"."Encounter" ALTER COLUMN "DischargeMethod_Code" TYPE character varying(16);
+3 -2
View File
@@ -1,4 +1,4 @@
h1:1Md58y00YaMKvxP3SPN5IpMe7XoTocmR8cqgbGthr7g=
h1:0s0nd0srbuZbIdiQHvRt1PALWD+XDaCk7Qg/iAk4wY0=
20250904105930.sql h1:MEM6blCgke9DzWQSTnLzasbPIrcHssNNrJqZpSkEo6k=
20250904141448.sql h1:J8cmYNk4ZrG9fhfbi2Z1IWz7YkfvhFqTzrLFo58BPY0=
20250908062237.sql h1:Pu23yEW/aKkwozHoOuROvHS/GK4ngARJGdO7FB7HZuI=
@@ -37,4 +37,5 @@ h1:1Md58y00YaMKvxP3SPN5IpMe7XoTocmR8cqgbGthr7g=
20251010031743.sql h1:T8IZmx8/btRFKLzTe78MzcBsPJNodnLvB0tby9QkirQ=
20251010070721.sql h1:5NQUk/yOV6sABLCB7swx++YIOyJe6MnU+yt1nRzde5w=
20251010072711.sql h1:ZJNqR2piyu8xJhBvVABSlnGEoKSKae3wuEs+wshPe4k=
20251013044536.sql h1:u0+H4gf+Z36drMXkq/L0r9gBTtTQfhYIm3oj+FqQ/+I=
20251013044536.sql h1:0Xjw8fNILiT8nnfrJDZgQnPf3dntmIoilbapnih8AE4=
20251013051438.sql h1:aREcqpdUTiA2T9/f1HOtfa4BUiPRa50RATZ4ETu1syk=
@@ -30,7 +30,7 @@ type Encounter struct {
Appointment_Doctor *ed.Doctor `json:"appointment_doctor,omitempty" gorm:"foreignKey:Appointment_Doctor_Id;references:Id"`
Responsible_Doctor_Id *uint `json:"responsible_doctor_id"`
Responsible_Doctor *ed.Doctor `json:"responsible_doctor,omitempty" gorm:"foreignKey:Responsible_Doctor_Id;references:Id"`
DischargeMethod_Code *ere.DischargeMethodCode `json:"dischargeMethod_code" gorm:"size:10"`
DischargeMethod_Code *ere.DischargeMethodCode `json:"dischargeMethod_code" gorm:"size:16"`
RefSource_Name *string `json:"refSource_name" gorm:"size:100"`
Appointment_Id *uint `json:"appointment_id"`
Appointment *ea.Appointment `json:"appointment,omitempty" gorm:"foreignKey:Appointment_Id;references:Id"`
@@ -25,13 +25,18 @@ const (
QSCCancel QueueStatusCode = "cancel" // Dibatalkan
QSCSkip QueueStatusCode = "skip" // Dilewati
DMCHome DischargeMethodCode = "home" // Rumah
DMCHomeReq DischargeMethodCode = "home-request" // Rumah (Dibutuhkan)
DMCConsulation DischargeMethodCode = "consulation" // Konsultasi Lanjutan
DMCInpatient DischargeMethodCode = "inpatient" // Inpatient
DMCExtRef DischargeMethodCode = "external-ref" // Rujuk Eksternal
DMCIntRef DischargeMethodCode = "internal-ref" // Rujuk Internal
DMCDeath DischargeMethodCode = "death" // Meninggal
DMCHome DischargeMethodCode = "home" // Pulang
DMCHomeReq DischargeMethodCode = "home-request" // Pulang Atas Permintaan Sendiri
DMCConsulBack DischargeMethodCode = "consul-back" // Konsultasi Balik / Lanjutan
DMCConsulPoly DischargeMethodCode = "consul-poly" // Konsultasi Poliklinik Lain
DMCConsulExecutive DischargeMethodCode = "consul-executive" // Konsultasi Antar Dokter Eksekutif
DMCConsulChDay DischargeMethodCode = "consul-ch-day" // Konsultasi Hari Lain
DMCEmergency DischargeMethodCode = "emergency" // Rujuk IGD
DMCEmergencyCovid DischargeMethodCode = "emergency-covid" // Rujuk IGD Covid
DMCInpatient DischargeMethodCode = "inpatient" // Rujuk Rawat Inap
DMCExtRef DischargeMethodCode = "external" // Rujuk Faskes Lain
DMCDeath DischargeMethodCode = "death" // Meninggal
DMCDeathOnArrival DischargeMethodCode = "death-on-arrival" // Meninggal Saat Tiba
TCAmbulance TransportationCode = "ambulance" // Ambulans
TCCar TransportationCode = "car" // Mobil