fix reference/constlist

This commit is contained in:
dpurbosakti
2025-08-29 14:27:25 +07:00
parent 579ee573c5
commit 0fa7e8ccde
25 changed files with 281 additions and 360 deletions
+2 -2
View File
@@ -1,2 +1,2 @@
h1:MMNuESyEk0KZHA2z+7AukfG/ATboITROipz2wK3YNPg=
20250828092003.sql h1:Rr221/6KN53t0eoEHK5+sPeMaVsnKjN4322WLulN8AQ=
h1:kBvWq4ulyP8Gz3UPNE/UdpYtWBIpEQskVnanFmaFCRc=
20250828092003.sql h1:ZxYlga6zF0PsTCMisoQo5yUVNwilr0njJQF8mZuVS64=
@@ -4,19 +4,19 @@ import (
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/doctor"
ei "simrs-vx/internal/domain/main-entities/item"
erc "simrs-vx/internal/domain/references/clinical"
ero "simrs-vx/internal/domain/references/organization"
)
type CreateDto struct {
Doctor_Id *uint `json:"doctor_id"`
FeeType_Code *erc.DoctorFeeTypeCode `json:"feeType_code"`
FeeType_Code *ero.DoctorFeeTypeCode `json:"feeType_code"`
Price *float64 `json:"price"`
Item_Id *uint `json:"item_id"`
}
type ReadListDto struct {
Doctor_Id *uint `json:"doctor_id"`
FeeType_Code *erc.DoctorFeeTypeCode `json:"feeType_code"`
FeeType_Code *ero.DoctorFeeTypeCode `json:"feeType_code"`
Price *float64 `json:"price"`
Item_Id *uint `json:"item_id"`
@@ -28,7 +28,7 @@ type ReadListDto struct {
type ReadDetailDto struct {
Id uint16 `json:"id"`
Doctor_Id *uint `json:"doctor_id"`
FeeType_Code *erc.DoctorFeeTypeCode `json:"feeType_code"`
FeeType_Code *ero.DoctorFeeTypeCode `json:"feeType_code"`
Price *float64 `json:"price"`
Item_Id *uint `json:"item_id"`
}
@@ -52,7 +52,7 @@ type ResponseDto struct {
ecore.Main
Doctor_Id *uint `json:"doctor_id"`
Doctor *ed.Doctor `json:"doctor,omitempty"`
FeeType_Code *erc.DoctorFeeTypeCode `json:"feeType_code"`
FeeType_Code *ero.DoctorFeeTypeCode `json:"feeType_code"`
Price *float64 `json:"price"`
Item_Id *uint `json:"item_id"`
Item *ei.Item `json:"item,omitempty"`
@@ -4,14 +4,14 @@ import (
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/doctor"
ei "simrs-vx/internal/domain/main-entities/item"
erc "simrs-vx/internal/domain/references/clinical"
ero "simrs-vx/internal/domain/references/organization"
)
type DoctorFee struct {
ecore.Main // adjust this according to the needs
Doctor_Id *uint `json:"doctor_id"`
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
FeeType_Code *erc.DoctorFeeTypeCode `json:"feeType_code" gorm:"size:11"`
FeeType_Code *ero.DoctorFeeTypeCode `json:"feeType_code" gorm:"size:11"`
Price *float64 `json:"price"`
Item_Id *uint `json:"item_id"`
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
@@ -13,7 +13,7 @@ type CreateDto struct {
Position_Code ero.EmployeePosisitionCode `json:"position_code"`
Division_Code *string `json:"division_code"`
Number *string `json:"number"`
Status_Code erc.StatusCode `json:"status_code"`
Status_Code erc.ActiveStatusCode `json:"status_code"`
}
type ReadListDto struct {
@@ -22,7 +22,7 @@ type ReadListDto struct {
Position_Code ero.EmployeePosisitionCode `json:"position_code"`
Division_Code *string `json:"division_code"`
Number *string `json:"number"`
Status_Code erc.StatusCode `json:"status_code"`
Status_Code erc.ActiveStatusCode `json:"status_code"`
Page int `json:"page"`
PageSize int `json:"page_size"`
@@ -36,7 +36,7 @@ type ReadDetailDto struct {
Position_Code ero.EmployeePosisitionCode `json:"position_code"`
Division_Code *string `json:"division_code"`
Number *string `json:"number"`
Status_Code erc.StatusCode `json:"status_code"`
Status_Code erc.ActiveStatusCode `json:"status_code"`
}
type UpdateDto struct {
@@ -62,7 +62,7 @@ type ResponseDto struct {
Division_Code *string `json:"division_code"`
Division *ed.Division `json:"division,omitempty"`
Number *string `json:"number"`
Status_Code erc.StatusCode `json:"status_code"`
Status_Code erc.ActiveStatusCode `json:"status_code"`
}
func (d Employee) ToResponse() ResponseDto {
@@ -15,5 +15,5 @@ type Employee struct {
Division_Code *string `json:"division_code"`
Division *ed.Division `json:"division,omitempty" gorm:"foreignKey:Division_Code;references:Code"`
Number *string `json:"number" gorm:"size:20"`
Status_Code erc.StatusCode `json:"status_code" gorm:"not null;size:10"`
Status_Code erc.ActiveStatusCode `json:"status_code" gorm:"not null;size:10"`
}
@@ -6,15 +6,15 @@ import (
)
type CreateDto struct {
Code string `json:"code"`
Name string `json:"name"`
EncounterClass_Code ere.EncounterClass `json:"encounterClass_code"`
Code string `json:"code"`
Name string `json:"name"`
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code"`
}
type ReadListDto struct {
Code string `json:"code"`
Name string `json:"name"`
EncounterClass_Code ere.EncounterClass `json:"encounterClass_code"`
Code string `json:"code"`
Name string `json:"name"`
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code"`
Page int `json:"page"`
PageSize int `json:"page_size"`
@@ -22,10 +22,10 @@ type ReadListDto struct {
}
type ReadDetailDto struct {
Id uint16 `json:"id"`
Code string `json:"code"`
Name string `json:"name"`
EncounterClass_Code ere.EncounterClass `json:"encounterClass_code"`
Id uint16 `json:"id"`
Code string `json:"code"`
Name string `json:"name"`
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code"`
}
type UpdateDto struct {
@@ -45,9 +45,9 @@ type MetaDto struct {
type ResponseDto struct {
ecore.SmallMain
Code string `json:"code"`
Name string `json:"name"`
EncounterClass_Code ere.EncounterClass `json:"encounterClass_code"`
Code string `json:"code"`
Name string `json:"name"`
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code"`
}
func (d Installation) ToResponse() ResponseDto {
@@ -6,8 +6,8 @@ import (
)
type Installation struct {
ecore.SmallMain // adjust this according to the needs
Code string `json:"code" gorm:"unique;size:10"`
Name string `json:"name" gorm:"size:50"`
EncounterClass_Code ere.EncounterClass `json:"encounterClass_code" gorm:"size:10"`
ecore.SmallMain // adjust this according to the needs
Code string `json:"code" gorm:"unique;size:10"`
Name string `json:"name" gorm:"size:50"`
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code" gorm:"size:10"`
}
@@ -2,19 +2,19 @@ package division
import (
ecore "simrs-vx/internal/domain/base-entities/core"
erc "simrs-vx/internal/domain/references/clinical"
ere "simrs-vx/internal/domain/references/encounter"
)
type CreateDto struct {
Code string `json:"code"`
Name string `json:"name"`
Scope_Code *erc.CheckupScopeCode `json:"scope_code"`
Scope_Code *ere.CheckupScopeCode `json:"scope_code"`
}
type ReadListDto struct {
Code string `json:"code"`
Name string `json:"name"`
Scope_Code *erc.CheckupScopeCode `json:"scope_code"`
Scope_Code *ere.CheckupScopeCode `json:"scope_code"`
Page int `json:"page"`
PageSize int `json:"page_size"`
@@ -25,7 +25,7 @@ type ReadDetailDto struct {
Id uint16 `json:"id"`
Code string `json:"code"`
Name string `json:"name"`
Scope_Code *erc.CheckupScopeCode `json:"scope_code"`
Scope_Code *ere.CheckupScopeCode `json:"scope_code"`
}
type UpdateDto struct {
@@ -47,7 +47,7 @@ type ResponseDto struct {
ecore.SmallMain
Code string `json:"code"`
Name string `json:"name"`
Scope_Code *erc.CheckupScopeCode `json:"scope_code"`
Scope_Code *ere.CheckupScopeCode `json:"scope_code"`
}
func (d McuSrcCategory) ToResponse() ResponseDto {
@@ -2,12 +2,12 @@ package division
import (
ecore "simrs-vx/internal/domain/base-entities/core"
erc "simrs-vx/internal/domain/references/clinical"
ere "simrs-vx/internal/domain/references/encounter"
)
type McuSrcCategory struct {
ecore.SmallMain // adjust this according to the needs
Code string `json:"code" gorm:"unique;size:20"`
Name string `json:"name" gorm:"size:50"`
Scope_Code *erc.CheckupScopeCode `json:"scope_code" gorm:"size:10"`
Scope_Code *ere.CheckupScopeCode `json:"scope_code" gorm:"size:10"`
}
@@ -2,13 +2,13 @@ package practiceschedule
import (
ecore "simrs-vx/internal/domain/base-entities/core"
erx "simrs-vx/internal/domain/references/xtime"
erc "simrs-vx/internal/domain/references/common"
)
type CreateDto struct {
Doctor_Id *uint `json:"doctor_id"`
Unit_Code *string `json:"unit_code"`
Day_Code *erx.DayCode `json:"day_code"`
Day_Code *erc.DayCode `json:"day_code"`
StartTime *string `json:"startTime"`
EndTime *string `json:"endTime"`
}
@@ -16,7 +16,7 @@ type CreateDto struct {
type ReadListDto struct {
Doctor_Id *uint `json:"doctor_id"`
Unit_Code *string `json:"unit_code"`
Day_Code *erx.DayCode `json:"day_code"`
Day_Code *erc.DayCode `json:"day_code"`
StartTime *string `json:"startTime"`
EndTime *string `json:"endTime"`
@@ -29,7 +29,7 @@ type ReadDetailDto struct {
Id uint16 `json:"id"`
Doctor_Id *uint `json:"doctor_id"`
Unit_Code *string `json:"unit_code"`
Day_Code *erx.DayCode `json:"day_code"`
Day_Code *erc.DayCode `json:"day_code"`
StartTime *string `json:"startTime"`
EndTime *string `json:"endTime"`
}
@@ -53,7 +53,7 @@ type ResponseDto struct {
ecore.Main
Doctor_Id *uint `json:"doctor_id"`
Unit_Code *string `json:"unit_code"`
Day_Code *erx.DayCode `json:"day_code"`
Day_Code *erc.DayCode `json:"day_code"`
StartTime *string `json:"startTime"`
EndTime *string `json:"endTime"`
}
@@ -4,7 +4,7 @@ import (
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/doctor"
eu "simrs-vx/internal/domain/main-entities/unit"
erx "simrs-vx/internal/domain/references/xtime"
erc "simrs-vx/internal/domain/references/common"
)
type PracticeSchedule struct {
@@ -13,7 +13,7 @@ type PracticeSchedule struct {
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
Unit_Code *string `json:"unit_code"`
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
Day_Code *erx.DayCode `json:"day_code"`
Day_Code *erc.DayCode `json:"day_code"`
StartTime *string `json:"startTime" gorm:"size:5"`
EndTime *string `json:"endTime" gorm:"size:5"`
}
+10 -10
View File
@@ -7,14 +7,14 @@ import (
)
type CreateDto struct {
Name string `json:"name"`
Password string `json:"password"`
Status_Code erc.StatusCode `json:"status_code"`
Name string `json:"name"`
Password string `json:"password"`
Status_Code erc.UserStatusCode `json:"status_code"`
}
type ReadListDto struct {
Name string `json:"name"`
Status_Code erc.StatusCode `json:"status_code"`
Name string `json:"name"`
Status_Code erc.UserStatusCode `json:"status_code"`
Page int `json:"page"`
PageSize int `json:"page_size"`
@@ -49,11 +49,11 @@ type LoginDto struct {
type ResponseDto struct {
ecore.Main
Name string `json:"name"`
Status_Code erc.StatusCode `json:"status_code"`
FailedLoginCount uint8 `json:"failedLoginCount"`
LastSuccessLogin *time.Time `json:"lastSuccessLogin,omitempty"`
LastAllowdLogin *time.Time `json:"lastAllowdLogin,omitempty"`
Name string `json:"name"`
Status_Code erc.UserStatusCode `json:"status_code"`
FailedLoginCount uint8 `json:"failedLoginCount"`
LastSuccessLogin *time.Time `json:"lastSuccessLogin,omitempty"`
LastAllowdLogin *time.Time `json:"lastAllowdLogin,omitempty"`
}
func (d *User) ToResponse() ResponseDto {
+8 -8
View File
@@ -7,12 +7,12 @@ import (
)
type User struct {
ecore.Main // adjust this according to the needs
Name string `json:"name" gorm:"not null;size:25"`
Password string `json:"password" gorm:"not null;size:255"`
Status_Code erc.StatusCode `json:"status_code" gorm:"not null;size:10"`
FailedLoginCount uint8 `json:"failedLoginCount" gorm:"type:smallint"`
LoginAttemptCount int `json:"-"`
LastSuccessLogin *time.Time `json:"lastSuccessLogin,omitempty"`
LastAllowdLogin *time.Time `json:"lastAllowdLogin,omitempty"`
ecore.Main // adjust this according to the needs
Name string `json:"name" gorm:"not null;size:25"`
Password string `json:"password" gorm:"not null;size:255"`
Status_Code erc.UserStatusCode `json:"status_code" gorm:"not null;size:10"`
FailedLoginCount uint8 `json:"failedLoginCount" gorm:"type:smallint"`
LoginAttemptCount int `json:"-"`
LastSuccessLogin *time.Time `json:"lastSuccessLogin,omitempty"`
LastAllowdLogin *time.Time `json:"lastAllowdLogin,omitempty"`
}
+30 -10
View File
@@ -1,18 +1,38 @@
package clinical
type (
CheckupScopeCode string
DoctorFeeTypeCode string
SubjectCode string
ObjectCode string
AssessmentCode string
InstructionCode string
)
const (
CSCLab CheckupScopeCode = "lab" // Laboratorium
CSCMLab CheckupScopeCode = "mic-lab" // Microbacterial Laboratorium
CSCPLab CheckupScopeCode = "pa-lab" // Patology Anatomy Laboratorium
CSCRad CheckupScopeCode = "radiology" // Radiology
SCPrimaryComplaint SubjectCode = "pri-compl" // Keluhan Utama
SCSecComplaint SubjectCode = "sec-compl" // Secondary Complaint
SCCurrentDiseaseHistory SubjectCode = "cur-disea-hist" // Current Disease History
SCPastDiseaseHistory SubjectCode = "pas-disea-hist" // Past Disease History
SCFamilyDiseaseHistory SubjectCode = "fam-disea-hist" // Family Disease History
SCAllergyHistory SubjectCode = "alg-hist" // Allergic History
SCAllergyReaction SubjectCode = "alg-react" // Allergic Reaction
SCMedicationHistory SubjectCode = "med-hist" // Medication History
DFTCOut DoctorFeeTypeCode = "outpatient" // Rawat Jalan
DFTCInp DoctorFeeTypeCode = "inpatient" // Rawat Inap
DFTCEme DoctorFeeTypeCode = "emergency" // Darurat
DFTCReh DoctorFeeTypeCode = "medic-rehab" // Rehab Medik
OCConsciousnessLevel ObjectCode = "consc-level" // Tingkat Kesadaran
OCConsciousnessLevelDet ObjectCode = "consc-level-det" // Detail Tingkat Kesadaran
OCSystolicBloodPressure ObjectCode = "syst-bp" // Tekanan Darah Systolic
OCDiastolicBloodPressure ObjectCode = "diast-bp" // Tekanan Darah Diastolic
OCHeartRate ObjectCode = "hear-rt" // Detak Jantung
OCTemperature ObjectCode = "temp" // Suhu
OCSpO2 ObjectCode = "spo2" // SpO2
OCWeight ObjectCode = "weight" // Berat Badan
OCHeight ObjectCode = "height" // Tinggi Badan
ACEarlyDiag AssessmentCode = "early-diag" // Diagnosis Awal
ACLateDiag AssessmentCode = "late-diag" // Diagnosis Akhir
ACSecDiag AssessmentCode = "sec-diag" // Diagnosis Sekunder
ICDetail InstructionCode = "detail" // Detail instruksi
ICMedAct InstructionCode = "med-act" // Tindakan medis
ICMedication InstructionCode = "medication" // Obat
ICMaterial InstructionCode = "material" // BMHP
)
+68 -11
View File
@@ -1,12 +1,17 @@
package common
type (
YaTidakCode byte
SudahBelumCode byte
AktifSimpelCode byte
AktifAdvanceCode byte
TersediaCode byte
StatusCode string
YaTidakCode byte
SudahBelumCode byte
AktifSimpelCode byte
AktifAdvanceCode byte
TersediaCode byte
DayCode byte
ActiveStatusCode string
DataStatusCode string
UserStatusCode string
TimeUnitCode string
PaymentMethodCode string
)
const (
@@ -35,9 +40,61 @@ const (
)
const (
SCNew StatusCode = "new"
SCActive StatusCode = "active"
SCInactive StatusCode = "inactive"
SCBlocked StatusCode = "blocked"
SCSuspended StatusCode = "suspended"
DCMinggu DayCode = iota
DCSenin
DCSelasa
DCRabu
DCKamis
DCJumat
DCSabtu
)
const (
SCActive ActiveStatusCode = "active" // Aktif
SCInactive ActiveStatusCode = "inactive" // Tidak aktif
DSCNew DataStatusCode = "new" // Baru
DSCReview DataStatusCode = "review" // Review
DSCProcess DataStatusCode = "process" // Proses
DSCDone DataStatusCode = "done" // Selesai
DSCCancel DataStatusCode = "cancel" // Dibatalkan
DSCRejected DataStatusCode = "rejected" // Ditolak
DSCSkipped DataStatusCode = "skipped" // Dilewati
USCNew UserStatusCode = "new" // Baru
USCActive UserStatusCode = "active" // Aktif
USCInactive UserStatusCode = "inactive" // Tidak aktif
USCBlocked UserStatusCode = "blocked" // Diblokir
USCSuspended UserStatusCode = "suspended" // Dibekukan
TUCSec TimeUnitCode = "sec" // Detik
TUCMin TimeUnitCode = "min" // Menit
TUCHour TimeUnitCode = "hour" // Jam
TUCDay TimeUnitCode = "day" // Hari
TUCWeek TimeUnitCode = "week" // Minggu
TUCMonth TimeUnitCode = "month" // Bulan
TUCYear TimeUnitCode = "year" // Tahun
PMCCash PaymentMethodCode = "cash" // Tunai
PMCDebit PaymentMethodCode = "debit" // Debet
PMCCredit PaymentMethodCode = "credit" // Kredit
PMCInsurance PaymentMethodCode = "insurance" // Asuransi
PMCMembership PaymentMethodCode = "membership" // Member
)
func GetDayCodes() map[DayCode]string {
return map[DayCode]string{
DCMinggu: "Minggu",
DCSenin: "Senin",
DCSelasa: "Selasa",
DCRabu: "Rabu",
DCKamis: "Kamis",
DCJumat: "Jumat",
DCSabtu: "Sabtu",
}
}
func (obj DayCode) String() string {
return GetDayCodes()[obj]
}
@@ -1,26 +0,0 @@
package digitalsignature
type (
RMEType string
SignType string
)
const (
// modules
RMETypePrescription RMEType = "prescription"
RMETypeExamination RMEType = "examination"
RMETypeRadiology RMEType = "radiology"
RMETypeSick RMEType = "sick"
RMETypeReferral RMEType = "referral"
RMETypeEndOfLife RMEType = "endoflife"
RMETypeChangeDpjp RMEType = "changedpjp"
// employee
SignTypeEmployee SignType = "employee"
// doctor
SignTypeDoctor SignType = "doctor"
// patient
SignTypePatient SignType = "patient"
)
@@ -1,32 +1,63 @@
package encounter
type (
EncounterStatus string
EncounterClass string
EmergencyClass string
InpatientClass string
EncounterClassCode string
QueueStatusCode string
DischargeMethodCode string
TransportationCode string
PersonConditionCode string
EmergencyClassCode string
OutpatientClassCode string
CheckupScopeCode string
)
const (
EncounterStatusNew EncounterStatus = "new"
EncounterStatusNurse EncounterStatus = "nurse assessment"
EncounterStatusDoctor EncounterStatus = "doctor assessment"
EncounterStatusDone EncounterStatus = "done"
EncounterStatusCancel EncounterStatus = "canceled"
)
const (
IGD EmergencyClass = "igd"
Ponek EmergencyClass = "ponek"
)
const (
ECAmbulatory EncounterClass = "ambulatory"
ECOutpatient EncounterClass = "outpatient"
ECInpatient EncounterClass = "inpatient"
ECEmergency EncounterClass = "emergency"
ECRadiology EncounterClass = "radiology"
ECOutpatient EncounterClassCode = "outpatient"
ECAmbulatory EncounterClassCode = "ambulatory"
ECEmergency EncounterClassCode = "emergency"
ECInpatient EncounterClassCode = "inpatient"
ECDraft EncounterClassCode = "draft"
ECDone EncounterClassCode = "done"
ECCancel EncounterClassCode = "cancel"
ECSkip EncounterClassCode = "skip"
QSCWait QueueStatusCode = "wait" // Tunggu
QSCProc QueueStatusCode = "proc" // Proses
QSCDone QueueStatusCode = "done" // Selesai
QSCCancel QueueStatusCode = "cancel" // Dibatalkan
QSCSkip QueueStatusCode = "skip" // Dilewati
DMCHome DischargeMethodCode = "home" // Rumah
DMCHomeReq DischargeMethodCode = "home-request" // Rumah (Dibutuhkan)
TCAmbulance TransportationCode = "ambulance"
TCCar TransportationCode = "car"
TCMotorCycle TransportationCode = "motor-cycle"
TCOther TransportationCode = "other"
PCCRes PersonConditionCode = "res" // Resutiasi
PCCEmg PersonConditionCode = "emg" // Darurat
PCCUrg PersonConditionCode = "urg" // Mendesak
PCCLurg PersonConditionCode = "lurg" // Kurang mendesak
PCCNurg PersonConditionCode = "nurg" //
PCCDoa PersonConditionCode = "doa" // Meninggal saat tiba
ECCEmg EmergencyClassCode = "emg" // Darurat/Emergency biasa
ECCEon EmergencyClassCode = "eon" // Ponek/Emergency obstetri neonatal
OCCOp OutpatientClassCode = "op" // Rawat Jalan
OCCIcu OutpatientClassCode = "icu" // ICU
OCCHcu OutpatientClassCode = "hcu" // HCU
OCCVk OutpatientClassCode = "vk" // Verlos kamer
CSCLab CheckupScopeCode = "lab" // Laboratorium
CSCMLab CheckupScopeCode = "mic-lab" // Microbacterial Laboratorium
CSCPLab CheckupScopeCode = "pa-lab" // Patology Anatomy Laboratorium
CSCRad CheckupScopeCode = "radiology" // Radiology
)
func (ec EncounterClass) Code() string {
func (ec EncounterClassCode) Code() string {
switch ec {
case ECAmbulatory, ECOutpatient:
return "AMB"
@@ -38,8 +69,3 @@ func (ec EncounterClass) Code() string {
return "UNKNOWN"
}
}
const (
ICU InpatientClass = "ICU"
NonICU InpatientClass = "non ICU"
)
@@ -1,67 +0,0 @@
package finance
type (
PaymentMethodCode string
TaxCode string
PaymentStatusCode string
ServiceType string
)
const (
PMCCash PaymentMethodCode = "cash"
PMCBPJS PaymentMethodCode = "bpjs"
PMCInsurance PaymentMethodCode = "insurance"
PMCMembership PaymentMethodCode = "membership"
PMCDebit PaymentMethodCode = "debit"
PMCCredit PaymentMethodCode = "credit"
PMCOther PaymentMethodCode = "other"
)
const (
TCCountry TaxCode = "country"
)
const (
PaymentStatusNew PaymentStatusCode = "new"
PaymentStatusUnpaid PaymentStatusCode = "unpaid"
PaymentStatusPaid PaymentStatusCode = "paid"
PaymentStatusCancel PaymentStatusCode = "cancel"
PaymentStatusFailed PaymentStatusCode = "failed"
)
func GetTaxeCodes() map[TaxCode]float32 {
return map[TaxCode]float32{
TCCountry: 0.11,
}
}
var NonInsurancePaymentMethods = map[PaymentMethodCode]bool{
PMCCash: true,
PMCDebit: true,
PMCCredit: true,
}
func (p PaymentMethodCode) IsInsurance() bool {
switch p {
case PMCCash, PMCDebit, PMCCredit, PMCBPJS:
return true
default:
return false
}
}
const (
STInpatient = "Rawat Inap"
STAmbulatory = "Rawat Jalan"
STEmergency = "IGD"
STPonek = "PONEK"
STLab = "Laboratorium"
STRadiology = "Radiologi"
)
const (
AdminEmergencyFee = "Biaya Administrasi IGD"
DoctorEmergencyFee = "Biaya Dokter IGD"
AdminPediatricInternalFee = "Biaya Administrasi Poli Anak/Penyakit Dalam"
AdminGeneralPolyFee = "Biaya Administrasi Poli"
)
@@ -2,15 +2,45 @@ package organization
type (
EmployeePosisitionCode string
ItemGroupCoode string
InfraGroupCode string
UnitTypeCode string
DoctorFeeTypeCode string
)
const (
EPCDoc EmployeePosisitionCode = "doctor"
EPCNur EmployeePosisitionCode = "nurse"
EPCNut EmployeePosisitionCode = "nutritionist"
EPCLab EmployeePosisitionCode = "laborant"
EPCPha EmployeePosisitionCode = "pharmacy"
EPCPay EmployeePosisitionCode = "payment"
EPCPav EmployeePosisitionCode = "payment-verificator"
EPCMan EmployeePosisitionCode = "management"
EPCDoc EmployeePosisitionCode = "doctor" // Dokter
EPCNur EmployeePosisitionCode = "nurse" // Perawat
EPCNut EmployeePosisitionCode = "nutritionist" // Ahli gizi
EPCLab EmployeePosisitionCode = "laborant" // Laboran
EPCPha EmployeePosisitionCode = "pharmacy" // Farmasi
EPCPay EmployeePosisitionCode = "payment" // Pembayaran
EPCPav EmployeePosisitionCode = "payment-verificator" // Konfirmasi pembayaran
EPCMan EmployeePosisitionCode = "management" // Manajemen
ITGCInfra ItemGroupCoode = "infra"
ITGCMedicine ItemGroupCoode = "medicine"
ITGCDevice ItemGroupCoode = "device"
ITGCMaterial ItemGroupCoode = "material"
ITGCEmpFee ItemGroupCoode = "employee-fee"
ITGCDocFee ItemGroupCoode = "doctor-fee"
IFGCBuilding InfraGroupCode = "building"
IFGCFloor InfraGroupCode = "floor"
IFGCRoom InfraGroupCode = "room"
IFGCChamber InfraGroupCode = "chamber"
IFGCBed InfraGroupCode = "bed"
IFGCWarehouse InfraGroupCode = "warehouse"
UTCReg UnitTypeCode = "reg" // Registrasi
UTCExa UnitTypeCode = "exa" // Pemeriksaan
UTCPay UnitTypeCode = "pay" // Pembayaran
UTCPha UnitTypeCode = "pha" // Farmasi
UTCLab UnitTypeCode = "lab" // Laboratorium
UTCRad UnitTypeCode = "rad" // Radiologi
DFTCOut DoctorFeeTypeCode = "outpatient" // Rawat Jalan
DFTCInp DoctorFeeTypeCode = "inpatient" // Rawat Inap
DFTCEme DoctorFeeTypeCode = "emergency" // Darurat
DFTCReh DoctorFeeTypeCode = "medic-rehab" // Rehab Medik
)
@@ -1,85 +0,0 @@
package patient
type (
ConsciousLevelCode string
StatusCode string
PaymentMethodCode string
EndAssessmentCode string
VisitTypeJknCode uint8
)
const (
CLCAlert ConsciousLevelCode = "alert"
CLCVoice ConsciousLevelCode = "voice"
CLCPain ConsciousLevelCode = "pain"
CLCUnresponsive ConsciousLevelCode = "unresponsive"
CLCAnxious ConsciousLevelCode = "anxious"
CLCAcuteConfusional ConsciousLevelCode = "acute-confuncional"
PMCCash PaymentMethodCode = "cash"
PMCDebit PaymentMethodCode = "debit"
PMCCredit PaymentMethodCode = "credit"
PMCBpjs PaymentMethodCode = "bpjs"
PMCMembership PaymentMethodCode = "membership"
PMCInsurance PaymentMethodCode = "insurance"
SCDraft StatusCode = "draft"
SCActive StatusCode = "active"
SCInactive StatusCode = "inactive"
SCBlocked StatusCode = "blocked"
SCDead StatusCode = "dead"
EACHomeRecom EndAssessmentCode = "home recommendation"
EACHomeReq EndAssessmentCode = "home request"
EACOtherPoly EndAssessmentCode = "others poly"
EACRefInt EndAssessmentCode = "referral internal"
EACRefExt EndAssessmentCode = "referral external"
EACDecease EndAssessmentCode = "decease"
VTJCReference VisitTypeJknCode = 1
VTJCInternalReference VisitTypeJknCode = 2
VTJCControl VisitTypeJknCode = 3
VTJCExternalReference VisitTypeJknCode = 4
)
func GetStatusCodes() map[StatusCode]string {
return map[StatusCode]string{
SCDraft: "Draft",
SCActive: "Aktif",
SCInactive: "Tidak Aktif",
SCBlocked: "Diblokir",
SCDead: "Meninggal",
}
}
func GetConsciousLevelCodes() map[ConsciousLevelCode]string {
return map[ConsciousLevelCode]string{
CLCAlert: "Sadar Baik / Alert",
CLCVoice: "Berespon dengan kata-kata / Voice",
CLCPain: "Hanya beresponse jika dirangsang nyeri / pain",
CLCUnresponsive: "Pasien tidak sadar / unresponsive",
CLCAnxious: "Gelisah atau bingung",
CLCAcuteConfusional: "Acute Confusional States",
}
}
func GetPaymentMethodCodes() map[PaymentMethodCode]string {
return map[PaymentMethodCode]string{
PMCCash: "cash",
PMCDebit: "debit",
PMCCredit: "credit",
PMCBpjs: "bpjs",
PMCMembership: "membership",
PMCInsurance: "insurance"}
}
func GetEndAssessments() map[EndAssessmentCode]string {
return map[EndAssessmentCode]string{
EACHomeRecom: "home-recommendation",
EACHomeReq: "home-request",
EACOtherPoly: "other-poly",
EACRefInt: "referral-internal",
EACRefExt: "referral-external",
EACDecease: "decease",
}
}
+26 -26
View File
@@ -48,18 +48,18 @@ const (
)
const (
ECTidakSekolah EducationCode = "TS"
ECTK EducationCode = "TK"
ECSD EducationCode = "SD"
ECSLTP EducationCode = "SMP"
ECSLTA EducationCode = "SMA"
ECD1 EducationCode = "D1"
ECD2 EducationCode = "D2"
ECD3 EducationCode = "D3"
ECD4 EducationCode = "D4"
ECS1 EducationCode = "S1"
ECS2 EducationCode = "S2"
ECS3 EducationCode = "S3"
ECTS EducationCode = "TS"
ECTK EducationCode = "TK"
ECSD EducationCode = "SD"
ECSLTP EducationCode = "SMP"
ECSLTA EducationCode = "SMA"
ECD1 EducationCode = "D1"
ECD2 EducationCode = "D2"
ECD3 EducationCode = "D3"
ECD4 EducationCode = "D4"
ECS1 EducationCode = "S1"
ECS2 EducationCode = "S2"
ECS3 EducationCode = "S3"
)
const (
@@ -160,22 +160,22 @@ func GetReligionCodes() map[ReligionCode]string {
func GetEducationCodes() map[EducationCode]string {
return map[EducationCode]string{
ECTidakSekolah: "Tidak Sekolah",
ECTK: "TK",
ECSD: "SD",
ECSLTP: "SMP sederajat",
ECSLTA: "SMP sederajat",
ECD1: "D1 sederajat",
ECD2: "D2 sederajat",
ECD3: "D3 sederajat",
ECD4: "D4 sederajat",
ECS1: "S1",
ECS2: "S3",
ECS3: "S3",
ECTS: "Tidak Sekolah",
ECTK: "TK",
ECSD: "SD",
ECSLTP: "SMP sederajat",
ECSLTA: "SMP sederajat",
ECD1: "D1 sederajat",
ECD2: "D2 sederajat",
ECD3: "D3 sederajat",
ECD4: "D4 sederajat",
ECS1: "S1",
ECS2: "S3",
ECS3: "S3",
}
}
func GetProfessions() map[OcupationCode]string {
func GetOcupationCodes() map[OcupationCode]string {
return map[OcupationCode]string{
OCTidakBekerja: "Tidak Bekerja",
OCPns: "PNS",
@@ -259,7 +259,7 @@ func (obj EducationCode) String() string {
}
func (obj OcupationCode) String() string {
return GetProfessions()[obj]
return GetOcupationCodes()[obj]
}
func (obj AgeGroupCode) String() string {
@@ -1,3 +0,0 @@
package queue
const QueueName = "SABBI-QUEUE-"
-31
View File
@@ -1,31 +0,0 @@
package xtime
type (
DayCode byte
)
const (
DCMinggu DayCode = iota
DCSenin
DCSelasa
DCRabu
DCKamis
DCJumat
DCSabtu
)
func GetDayCodes() map[DayCode]string {
return map[DayCode]string{
DCMinggu: "Minggu",
DCSenin: "Senin",
DCSelasa: "Selasa",
DCRabu: "Rabu",
DCKamis: "Kamis",
DCJumat: "Jumat",
DCSabtu: "Sabtu",
}
}
func (obj DayCode) String() string {
return GetDayCodes()[obj]
}
@@ -65,9 +65,9 @@ func GenToken(input mu.LoginDto) (*d.Data, error) {
user.LoginAttemptCount++
dg.I.Save(&user)
return nil, d.FieldErrors{"authentication": d.FieldError{Code: "auth-login-incorrect", Message: el.GenMessage("auth-login-incorrect")}}
} else if user.Status_Code == erc.SCBlocked {
} else if user.Status_Code == erc.USCBlocked {
return nil, d.FieldErrors{"authentication": d.FieldError{Code: "auth-login-blocked", Message: el.GenMessage("auth-login-blocked")}}
} else if user.Status_Code == erc.SCNew {
} else if user.Status_Code == erc.USCNew {
return nil, d.FieldErrors{"authentication": d.FieldError{Code: "auth-login-unverified", Message: el.GenMessage("auth-login-unverified")}}
}
+2 -2
View File
@@ -297,7 +297,7 @@ func Block(input e.ReadDetailDto) (*d.Data, error) {
if data != nil {
pl.SetLogInfo(&event, rdDto, "started", "DBUpdate")
data.Status_Code = erc.SCBlocked
data.Status_Code = erc.USCBlocked
if err := tx.Save(&data).Error; err != nil {
return err
}
@@ -343,7 +343,7 @@ func Active(input e.ReadDetailDto) (*d.Data, error) {
if data != nil {
pl.SetLogInfo(&event, rdDto, "started", "DBUpdate")
data.Status_Code = erc.SCActive
data.Status_Code = erc.USCActive
if err := tx.Save(&data).Error; err != nil {
return err
}