Merge branch 'migration-vanilia' of https://github.com/dikstub-rssa/simrs-be into feat/encounter-adjustment-142
This commit is contained in:
@@ -6,8 +6,7 @@ import (
|
||||
)
|
||||
|
||||
type Ambulatory struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Class_Code ere.AmbulatoryClassCode `json:"class_code" gorm:"size:10"`
|
||||
VisitMode_Code ere.VisitModeCode `json:"visitMode_code"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Class_Code ere.AmbulatoryClassCode `json:"class_code" gorm:"size:10"`
|
||||
}
|
||||
|
||||
@@ -68,7 +68,8 @@ type Encounter struct {
|
||||
Ambulatory *eam.Ambulatory `json:"ambulatory,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Emergency *eem.Emergency `json:"emergency,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Inpatient *eip.Inpatient `json:"inpatient,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Rehab *er.Basic `json:"rehab,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Rehab_Adm *er.Basic `json:"rehab_adm,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Rehab_Series *[]er.Basic `json:"rehab_series,omitempty" gorm:"foreignKey:Parent_Encounter_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (d Encounter) IsDone() bool {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package internal_reference
|
||||
|
||||
import (
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
@@ -8,9 +10,10 @@ import (
|
||||
|
||||
type InternalReference struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"`
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"`
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
|
||||
Status_Code *erc.DataApprovalCode `json:"status_code"`
|
||||
}
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
package base
|
||||
|
||||
import (
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
)
|
||||
|
||||
type Basic struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
|
||||
AllocatedVisitCount *int `json:"allocatedVisitCount"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
Parent_Encounter_Id *uint `json:"parent_encounter_id"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
AllocatedVisitCount *int `json:"allocatedVisitCount"`
|
||||
ExpiredAt *time.Time `json:"expiredAt"`
|
||||
VisitMode_Code *ere.VisitModeCode `json:"visitMode_code"`
|
||||
Status_Code *erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (Basic) TableName() string {
|
||||
|
||||
@@ -15,6 +15,7 @@ type (
|
||||
DataAvailabilityCode string
|
||||
DataVerifiedCode string
|
||||
CrudCode string
|
||||
DataApprovalCode string
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -96,6 +97,10 @@ const (
|
||||
CCRead CrudCode = "r" // Read
|
||||
CCUpdate CrudCode = "u" // Update
|
||||
CCDelete CrudCode = "d" // Delete
|
||||
|
||||
DACNew DataApprovalCode = "new"
|
||||
DACApproved DataApprovalCode = "approved"
|
||||
DACRejected DataApprovalCode = "rejected"
|
||||
)
|
||||
|
||||
func GetDayCodes() map[DayCode]string {
|
||||
|
||||
@@ -19,6 +19,7 @@ type (
|
||||
AllPaymentMethodCode string
|
||||
SEPRefTypeCode string
|
||||
VisitModeCode string
|
||||
PolySwitchCode string
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -32,18 +33,18 @@ const (
|
||||
QSCCancel QueueStatusCode = "cancel" // Dibatalkan
|
||||
QSCSkip QueueStatusCode = "skip" // Dilewati
|
||||
|
||||
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
|
||||
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
|
||||
@@ -112,6 +113,9 @@ const (
|
||||
|
||||
VMCAdm VisitModeCode = "adm"
|
||||
VMCSeries VisitModeCode = "series"
|
||||
|
||||
PSCConsulPoly PolySwitchCode = "consul-poly" // Konsultasi Poliklinik Lain
|
||||
PSCConsulExecutive PolySwitchCode = "consul-executive" // Konsultasi Antar Dokter Eksekutif
|
||||
)
|
||||
|
||||
func (ec EncounterClassCode) Code() string {
|
||||
|
||||
Reference in New Issue
Block a user