Merge branch 'migration' of https://github.com/dikstub-rssa/simrs-be into migration-vanilia
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package controlplan
|
||||
|
||||
type ReadListDto struct {
|
||||
PathValue1 string `json:"-"` // jenis kontrol
|
||||
PathValue2 string `json:"-"` // kode poli
|
||||
PathValue3 string `json:"-"` // tanggal
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package controlplan
|
||||
|
||||
type Response struct {
|
||||
MetaData MetaData `json:"metaData"`
|
||||
Response *ResponseItems `json:"response"` // nullable
|
||||
}
|
||||
|
||||
type MetaData struct {
|
||||
Code string `json:"code"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type ResponseItems struct {
|
||||
List []DoctorSchedule `json:"list"`
|
||||
}
|
||||
|
||||
type DoctorSchedule struct {
|
||||
JadwalPraktek string `json:"jadwalPraktek"`
|
||||
Kapasitas string `json:"kapasitas"`
|
||||
KodeDokter string `json:"kodeDokter"`
|
||||
NamaDokter string `json:"namaDokter"`
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package referral
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Number *string `json:"number"` // nomor rujukan
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package referral
|
||||
|
||||
type Response struct {
|
||||
MetaData MetaData `json:"metaData"`
|
||||
Response *ReferralDetail `json:"response"` // nullable
|
||||
}
|
||||
|
||||
type MetaData struct {
|
||||
Code string `json:"code"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type ReferralDetail struct {
|
||||
AsalFaskes string `json:"asalFaskes"`
|
||||
Rujukan RujukanDetail `json:"rujukan"`
|
||||
}
|
||||
|
||||
type RujukanDetail struct {
|
||||
Diagnosa Diagnosa `json:"diagnosa"`
|
||||
Keluhan *string `json:"keluhan"` // nullable
|
||||
NoKunjungan string `json:"noKunjungan"`
|
||||
Pelayanan Pelayanan `json:"pelayanan"`
|
||||
Peserta Peserta `json:"peserta"`
|
||||
PoliRujukan Poli `json:"poliRujukan"`
|
||||
ProvPerujuk Provider `json:"provPerujuk"`
|
||||
TglKunjungan string `json:"tglKunjungan"`
|
||||
}
|
||||
|
||||
type Diagnosa struct {
|
||||
Kode string `json:"kode"`
|
||||
Nama string `json:"nama"`
|
||||
}
|
||||
|
||||
type Pelayanan struct {
|
||||
Kode string `json:"kode"`
|
||||
Nama string `json:"nama"`
|
||||
}
|
||||
|
||||
type Peserta struct {
|
||||
Cob Cob `json:"cob"`
|
||||
HakKelas KeteranganKode `json:"hakKelas"`
|
||||
Informasi Informasi `json:"informasi"`
|
||||
JenisPeserta KeteranganKode `json:"jenisPeserta"`
|
||||
Mr Mr `json:"mr"`
|
||||
Nama string `json:"nama"`
|
||||
Nik string `json:"nik"`
|
||||
NoKartu string `json:"noKartu"`
|
||||
Pisa string `json:"pisa"`
|
||||
ProvUmum Provider `json:"provUmum"`
|
||||
Sex string `json:"sex"`
|
||||
StatusPeserta KeteranganKode `json:"statusPeserta"`
|
||||
TglCetakKartu string `json:"tglCetakKartu"`
|
||||
TglLahir string `json:"tglLahir"`
|
||||
TglTAT string `json:"tglTAT"`
|
||||
TglTMT string `json:"tglTMT"`
|
||||
Umur Umur `json:"umur"`
|
||||
}
|
||||
|
||||
type Cob struct {
|
||||
NmAsuransi *string `json:"nmAsuransi"` // nullable
|
||||
NoAsuransi *string `json:"noAsuransi"`
|
||||
TglTAT *string `json:"tglTAT"`
|
||||
TglTMT *string `json:"tglTMT"`
|
||||
}
|
||||
|
||||
type KeteranganKode struct {
|
||||
Keterangan string `json:"keterangan"`
|
||||
Kode string `json:"kode"`
|
||||
}
|
||||
|
||||
type Informasi struct {
|
||||
Dinsos *string `json:"dinsos"`
|
||||
ESep *string `json:"eSEP"`
|
||||
NoSKTM *string `json:"noSKTM"`
|
||||
ProlanisPRB *string `json:"prolanisPRB"`
|
||||
}
|
||||
|
||||
type Mr struct {
|
||||
NoMR string `json:"noMR"`
|
||||
NoTelepon string `json:"noTelepon"`
|
||||
}
|
||||
|
||||
type Provider struct {
|
||||
Kode string `json:"kdProvider" json:"kode"` // API sometimes uses different keys
|
||||
NmProvider string `json:"nmProvider" json:"nama"`
|
||||
}
|
||||
|
||||
type Poli struct {
|
||||
Kode string `json:"kode"`
|
||||
Nama string `json:"nama"`
|
||||
}
|
||||
|
||||
type Umur struct {
|
||||
UmurSaatPelayanan string `json:"umurSaatPelayanan"`
|
||||
UmurSekarang string `json:"umurSekarang"`
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package vclaimsep
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
evsh "simrs-vx/internal/domain/bpjs-entities/vclaim-sep-hist"
|
||||
)
|
||||
@@ -8,7 +9,7 @@ import (
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Number *string `json:"number" validate:"maxLength=19"`
|
||||
RequestPayload []byte `json:"requestPayload" validate:"maxLength=1024"`
|
||||
RequestPayload string `json:"requestPayload" validate:"maxLength=1024"`
|
||||
|
||||
VclaimSepHist evsh.CreateDto
|
||||
}
|
||||
@@ -25,8 +26,9 @@ type FilterDto struct {
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
Number *string `json:"number"`
|
||||
Id uint `json:"id"`
|
||||
Number *string `json:"number"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
@@ -47,14 +49,16 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Number *string `json:"number"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Number *string `json:"number"`
|
||||
Detail *SepDetail `json:"detail,omitempty"`
|
||||
}
|
||||
|
||||
func (d VclaimSep) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Number: d.Number,
|
||||
Detail: d.Detail,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
@@ -71,3 +75,130 @@ func ToResponseList(data []VclaimSep) []ResponseDto {
|
||||
func (c CreateDto) IsMessageSuccess() bool {
|
||||
return c.VclaimSepHist.Message == "Sukses"
|
||||
}
|
||||
|
||||
func (c CreateDto) RequestPayloadIntoJson() ([]byte, error) {
|
||||
payload := map[string]interface{}{}
|
||||
err := json.Unmarshal([]byte(c.RequestPayload), &payload)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return json.Marshal(payload)
|
||||
}
|
||||
|
||||
func (c CreateDto) RequestPayloadWithEncounterId() ([]byte, error) {
|
||||
payload := map[string]interface{}{}
|
||||
|
||||
err := json.Unmarshal([]byte(c.RequestPayload), &payload)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
payload["encounter_id"] = c.Encounter_Id
|
||||
|
||||
return json.Marshal(payload)
|
||||
}
|
||||
|
||||
type SepResponse struct {
|
||||
MetaData MetaData `json:"metaData"`
|
||||
Response *SepDetail `json:"response"`
|
||||
}
|
||||
|
||||
type MetaData struct {
|
||||
Code string `json:"code"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type SepDetail struct {
|
||||
AssestmenPel AssestmenPel `json:"assestmenPel"`
|
||||
Catatan string `json:"catatan"`
|
||||
Cob string `json:"cob"`
|
||||
Diagnosa string `json:"diagnosa"`
|
||||
Dpjp Dpjp `json:"dpjp"`
|
||||
ESep string `json:"eSEP"`
|
||||
FlagProcedure FlagProcedure `json:"flagProcedure"`
|
||||
Informasi any `json:"informasi"` // null = interface{}
|
||||
JnsPelayanan string `json:"jnsPelayanan"`
|
||||
Katarak string `json:"katarak"`
|
||||
KdPenunjang KdPenunjang `json:"kdPenunjang"`
|
||||
KdStatusKecelakaan string `json:"kdStatusKecelakaan"`
|
||||
KelasRawat string `json:"kelasRawat"`
|
||||
KlsRawat KlsRawat `json:"klsRawat"`
|
||||
Kontrol Kontrol `json:"kontrol"`
|
||||
LokasiKejadian LokasiKejadian `json:"lokasiKejadian"`
|
||||
NmStatusKecelakaan string `json:"nmstatusKecelakaan"`
|
||||
NoRujukan string `json:"noRujukan"`
|
||||
NoSep string `json:"noSep"`
|
||||
Penjamin any `json:"penjamin"` // null
|
||||
Peserta Peserta `json:"peserta"`
|
||||
Poli string `json:"poli"`
|
||||
PoliEksekutif string `json:"poliEksekutif"`
|
||||
TglSep string `json:"tglSep"`
|
||||
TujuanKunj TujuanKunj `json:"tujuanKunj"`
|
||||
}
|
||||
|
||||
type AssestmenPel struct {
|
||||
Kode string `json:"kode"`
|
||||
Nama string `json:"nama"`
|
||||
}
|
||||
|
||||
type Dpjp struct {
|
||||
KdDPJP string `json:"kdDPJP"`
|
||||
NmDPJP string `json:"nmDPJP"`
|
||||
}
|
||||
|
||||
type FlagProcedure struct {
|
||||
Kode string `json:"kode"`
|
||||
Nama string `json:"nama"`
|
||||
}
|
||||
|
||||
type KdPenunjang struct {
|
||||
Kode string `json:"kode"`
|
||||
Nama string `json:"nama"`
|
||||
}
|
||||
|
||||
type KlsRawat struct {
|
||||
KlsRawatHak string `json:"klsRawatHak"`
|
||||
KlsRawatNaik *string `json:"klsRawatNaik"` // nullable
|
||||
Pembiayaan *string `json:"pembiayaan"` // nullable
|
||||
PenanggungJawab *string `json:"penanggungJawab"` // nullable
|
||||
}
|
||||
|
||||
type Kontrol struct {
|
||||
KdDokter *string `json:"kdDokter"` // null
|
||||
NmDokter *string `json:"nmDokter"` // null
|
||||
NoSurat *string `json:"noSurat"` // null
|
||||
}
|
||||
|
||||
type LokasiKejadian struct {
|
||||
KdKab *string `json:"kdKab"`
|
||||
KdKec *string `json:"kdKec"`
|
||||
KdProp *string `json:"kdProp"`
|
||||
KetKejadian *string `json:"ketKejadian"`
|
||||
Lokasi *string `json:"lokasi"`
|
||||
TglKejadian *string `json:"tglKejadian"`
|
||||
}
|
||||
|
||||
type Peserta struct {
|
||||
Asuransi any `json:"asuransi"`
|
||||
HakKelas string `json:"hakKelas"`
|
||||
JnsPeserta string `json:"jnsPeserta"`
|
||||
Kelamin string `json:"kelamin"`
|
||||
Nama string `json:"nama"`
|
||||
NoKartu string `json:"noKartu"`
|
||||
NoMR string `json:"noMr"`
|
||||
TglLahir string `json:"tglLahir"`
|
||||
}
|
||||
|
||||
type TujuanKunj struct {
|
||||
Kode string `json:"kode"`
|
||||
Nama string `json:"nama"`
|
||||
}
|
||||
|
||||
type SepDeleteRequest struct {
|
||||
Request struct {
|
||||
TSep struct {
|
||||
NoSep string `json:"noSep"`
|
||||
User string `json:"user"`
|
||||
} `json:"t_sep"`
|
||||
} `json:"request"`
|
||||
}
|
||||
|
||||
@@ -12,4 +12,5 @@ type VclaimSep struct {
|
||||
Number *string `json:"number" gorm:"unique;size:19"`
|
||||
Prints []*evsp.VclaimSepPrint `json:"prints,omitempty" gorm:"foreignKey:VclaimSep_Number;references:Number"`
|
||||
ControlLetters []*evscl.VclaimSepControlLetter `json:"controlLetters,omitempty" gorm:"foreignKey:VclaimSep_Number;references:Number"`
|
||||
Detail *SepDetail `json:"detail,omitempty" gorm:"-"`
|
||||
}
|
||||
|
||||
@@ -24,9 +24,11 @@ type FilterDto struct {
|
||||
AntibioticSrc_Id *uint `json:"mcu-src-id"`
|
||||
Result *string `json:"result"`
|
||||
Status_Code erc.DataStatusCode `json:"status-code"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
|
||||
@@ -15,6 +15,7 @@ type CreateDto struct {
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ep "simrs-vx/internal/domain/main-entities/person"
|
||||
eu "simrs-vx/internal/domain/main-entities/user"
|
||||
"time"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
erg "simrs-vx/internal/domain/references/organization"
|
||||
@@ -55,22 +56,26 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
User_Id *uint `json:"user_id"`
|
||||
User *eu.User `json:"user,omitempty"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Person *ep.Person `json:"person,omitempty"`
|
||||
Number *string `json:"number"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code"`
|
||||
User_Id *uint `json:"user_id"`
|
||||
User *eu.User `json:"user,omitempty"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Person *ep.Person `json:"person,omitempty"`
|
||||
Number *string `json:"number"`
|
||||
Position_Code *erg.EmployeePositionCode `json:"position_code"`
|
||||
Contract_ExpiredDate *time.Time `json:"contract_expiredDate"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d Employee) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
User_Id: d.User_Id,
|
||||
User: d.User,
|
||||
Person_Id: d.Person_Id,
|
||||
Person: d.Person,
|
||||
Number: d.Number,
|
||||
Status_Code: d.Status_Code,
|
||||
User_Id: d.User_Id,
|
||||
User: d.User,
|
||||
Person_Id: d.Person_Id,
|
||||
Person: d.Person,
|
||||
Number: d.Number,
|
||||
Position_Code: d.Position_Code,
|
||||
Contract_ExpiredDate: d.Contract_ExpiredDate,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
package encounter
|
||||
|
||||
import (
|
||||
eam "simrs-vx/internal/domain/main-entities/ambulatory"
|
||||
edc "simrs-vx/internal/domain/main-entities/death-cause"
|
||||
eem "simrs-vx/internal/domain/main-entities/emergency"
|
||||
eed "simrs-vx/internal/domain/main-entities/encounter-document"
|
||||
eip "simrs-vx/internal/domain/main-entities/inpatient"
|
||||
eir "simrs-vx/internal/domain/main-entities/internal-reference"
|
||||
er "simrs-vx/internal/domain/main-entities/rehab/base"
|
||||
|
||||
// std
|
||||
"time"
|
||||
|
||||
@@ -24,37 +16,46 @@ import (
|
||||
|
||||
// internal - domain - main-entities
|
||||
evs "simrs-vx/internal/domain/bpjs-entities/vclaim-sep"
|
||||
eam "simrs-vx/internal/domain/main-entities/ambulatory"
|
||||
ea "simrs-vx/internal/domain/main-entities/appointment"
|
||||
edc "simrs-vx/internal/domain/main-entities/death-cause"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
eem "simrs-vx/internal/domain/main-entities/emergency"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
eed "simrs-vx/internal/domain/main-entities/encounter-document"
|
||||
eip "simrs-vx/internal/domain/main-entities/inpatient"
|
||||
eir "simrs-vx/internal/domain/main-entities/internal-reference"
|
||||
en "simrs-vx/internal/domain/main-entities/nurse"
|
||||
ep "simrs-vx/internal/domain/main-entities/patient"
|
||||
er "simrs-vx/internal/domain/main-entities/rehab/base"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Patient_Id *uint `json:"patient_id"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Class_Code ere.EncounterClassCode `json:"class_code" validate:"maxLength=10"`
|
||||
SubClass_Code *string `json:"subClass_code" validate:"maxLength=10"` // for sub
|
||||
Infra_Code *string `json:"infra_code"` // for inpatient
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
PaymentMethod_Code erc.PaymentMethodCode `json:"paymentMethod_code" gorm:"size:10"`
|
||||
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
|
||||
Member_Number *string `json:"member_number" validate:"maxLength=20"`
|
||||
Ref_Number *string `json:"ref_number" validate:"maxLength=20"`
|
||||
Trx_Number *string `json:"trx_number" validate:"maxLength=20"`
|
||||
Appointment_Doctor_Code *string `json:"appointment_doctor_code"`
|
||||
Adm_Employee_Id *uint `json:"-"`
|
||||
Responsible_Doctor_Code *string `json:"responsible_doctor_code"`
|
||||
RefSource_Name *string `json:"refSource_name" validate:"maxLength=100"`
|
||||
Appointment_Id *uint `json:"appointment_id"`
|
||||
RefTypeCode ere.RefTypeCode `json:"refTypeCode"`
|
||||
NewStatus bool `json:"newStatus"`
|
||||
Patient_Id *uint `json:"patient_id"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Class_Code ere.EncounterClassCode `json:"class_code" validate:"maxLength=10"`
|
||||
SubClass_Code *string `json:"subClass_code" validate:"maxLength=10"` // for sub
|
||||
Infra_Code *string `json:"infra_code"` // for inpatient
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
PaymentMethod_Code ere.AllPaymentMethodCode `json:"paymentMethod_code" gorm:"size:10"`
|
||||
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
|
||||
Member_Number *string `json:"member_number" validate:"maxLength=20"`
|
||||
Ref_Number *string `json:"ref_number" validate:"maxLength=20"`
|
||||
Trx_Number *string `json:"trx_number" validate:"maxLength=20"`
|
||||
Appointment_Doctor_Code *string `json:"appointment_doctor_code"`
|
||||
Adm_Employee_Id *uint `json:"-"`
|
||||
Responsible_Doctor_Code *string `json:"responsible_doctor_code"`
|
||||
RefSource_Name *string `json:"refSource_name" validate:"maxLength=100"`
|
||||
Appointment_Id *uint `json:"appointment_id"`
|
||||
RefTypeCode ere.RefTypeCode `json:"refTypeCode"`
|
||||
NewStatus bool `json:"newStatus"`
|
||||
VclaimReference *TRujukan `json:"vclaimReference"`
|
||||
|
||||
Id uint `json:"-"`
|
||||
RecentEncounterAdm *Encounter `json:"-"` // if subClass_Code is rehab
|
||||
@@ -63,6 +64,18 @@ type CreateDto struct {
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type TRujukan struct {
|
||||
NoSep string `json:"noSep"` // Surat Eligibilitas Peserta
|
||||
TglRujukan string `json:"tglRujukan"`
|
||||
PpkDirujuk string `json:"ppkDirujuk"` // PPK (Provider Pelayanan Kesehatan) -> kode RS tujuan
|
||||
JnsPelayanan string `json:"jnsPelayanan"` // Jenis pelayanan yang dimintakan; 1 = RawatInap; 2 = RawatJalan
|
||||
Catatan string `json:"catatan"`
|
||||
DiagRujukan string `json:"diagRujukan"` // Kode Diagnosa
|
||||
TipeRujukan string `json:"tipeRujukan"` // 0 = Rujukan Penuh; 1 = Rujukan Partial (hanya untuk tindakan tertentu); 2 = Balik (dikembalikan ke faskes asal)
|
||||
PoliRujukan string `json:"poliRujukan"` // Kode Poli Tujuan
|
||||
User string `json:"user"` // user yang membuat rujukan
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
@@ -92,24 +105,24 @@ type FilterDto struct {
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type UpdateStatusDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
StatusCode erc.DataStatusCode `json:"status_code"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
@@ -127,25 +140,36 @@ type DischargeDto struct {
|
||||
AdmDischargeEducation *string `json:"admDischargeEducation"`
|
||||
DischargeReason *string `json:"dischargeReason"`
|
||||
DeathCause *string `json:"deathCause"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type CheckinDto struct {
|
||||
Id uint `json:"id"`
|
||||
Responsible_Doctor_Code *string `json:"responsible_doctor_code"`
|
||||
Adm_Employee_Id *uint `json:"adm_employee_id"`
|
||||
Responsible_Nurse_Code *string `json:"responsible_nurse_code"`
|
||||
StartedAt *time.Time `json:"startedAt"`
|
||||
FinishedAt *time.Time `json:"finishedAt"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type SwitchUnitDto struct {
|
||||
Id uint `json:"id"`
|
||||
PolySwitchCode *ere.PolySwitchCode `json:"polySwitchCode"`
|
||||
InternalReferences *[]eir.CreateDto `json:"internalReferences" validate:"required"`
|
||||
|
||||
Src_Doctor_Code *string `json:"-"`
|
||||
Src_Nurse_Code *string `json:"-"`
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type ApproveUnitDto struct {
|
||||
Id uint `json:"id"`
|
||||
InternalReferences_Id uint16 `json:"internalReferences_id" validate:"required"`
|
||||
type ApproveCancelUnitDto struct {
|
||||
Id uint `json:"id"`
|
||||
InternalReferences_Id uint `json:"internalReferences_id" validate:"required"`
|
||||
Dst_Doctor_Code *string `json:"dst_doctor_code"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
@@ -161,7 +185,7 @@ type ResponseDto struct {
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
PaymentMethod_Code erc.PaymentMethodCode `json:"paymentMethod_code"`
|
||||
PaymentMethod_Code ere.AllPaymentMethodCode `json:"paymentMethod_code"`
|
||||
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
|
||||
Member_Number *string `json:"member_number"`
|
||||
Ref_Number *string `json:"ref_number"`
|
||||
@@ -194,6 +218,8 @@ type ResponseDto struct {
|
||||
Rehab *er.Basic `json:"rehab,omitempty"`
|
||||
RehabChildren *[]er.Basic `json:"rehabChildren,omitempty"`
|
||||
EncounterDocuments *[]eed.EncounterDocument `json:"encounterDocuments,omitempty"`
|
||||
Responsible_Nurse_Code *string `json:"responsible_nurse_code"`
|
||||
Responsible_Nurse *en.Nurse `json:"responsible_nurse,omitempty"`
|
||||
}
|
||||
|
||||
func (d Encounter) ToResponse() ResponseDto {
|
||||
@@ -241,6 +267,8 @@ func (d Encounter) ToResponse() ResponseDto {
|
||||
Rehab: d.Rehab,
|
||||
RehabChildren: d.RehabChildren,
|
||||
EncounterDocuments: d.EncounterDocuments,
|
||||
Responsible_Nurse_Code: d.Responsible_Nurse_Code,
|
||||
Responsible_Nurse: d.Responsible_Nurse,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -43,7 +43,7 @@ type Encounter struct {
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
StartedAt *time.Time `json:"startedAt"`
|
||||
FinishedAt *time.Time `json:"finishedAt"`
|
||||
PaymentMethod_Code erc.PaymentMethodCode `json:"paymentMethod_code" gorm:"size:10"`
|
||||
PaymentMethod_Code ere.AllPaymentMethodCode `json:"paymentMethod_code" gorm:"size:10"`
|
||||
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
|
||||
InsuranceCompany *ei.InsuranceCompany `json:"insuranceCompany,omitempty" gorm:"foreignKey:InsuranceCompany_Code;references:Code"`
|
||||
Member_Number *string `json:"memberNumber" gorm:"unique;size:20"`
|
||||
@@ -85,3 +85,10 @@ type Encounter struct {
|
||||
func (d Encounter) IsDone() bool {
|
||||
return d.Status_Code == erc.DSCDone
|
||||
}
|
||||
|
||||
func (d Encounter) IsSameResponsibleDoctor(input *string) bool {
|
||||
if input == nil {
|
||||
return false
|
||||
}
|
||||
return *d.Responsible_Doctor_Code == *input
|
||||
}
|
||||
|
||||
@@ -9,10 +9,13 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"-"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Status_Code erc.DataApprovalCode `json:"status_code"`
|
||||
Encounter_Id *uint `json:"-"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Nurse_Code *string `json:"nurse_code"`
|
||||
Status_Code erc.DataApprovalCode `json:"status_code"`
|
||||
SrcDoctor_Code *string `json:"srcDoctor_code"`
|
||||
SrcNurse_Code *string `json:"srcNurse_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -29,17 +32,17 @@ type FilterDto struct {
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
|
||||
@@ -17,6 +17,7 @@ import (
|
||||
// internal - domain - main-entities
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
emoib "simrs-vx/internal/domain/main-entities/mcu-order-item/base"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
@@ -85,7 +86,8 @@ type ResponseDto struct {
|
||||
ExaminationDate *time.Time `json:"examinationDate"`
|
||||
Number uint8 `json:"number"`
|
||||
Temperature float64 `json:"temperature"`
|
||||
UrgencyLevel_Code ercl.McuUrgencyLevelCode `json:"urgencyLevel_code""`
|
||||
UrgencyLevel_Code ercl.McuUrgencyLevelCode `json:"urgencyLevel_code"`
|
||||
Items []*emoib.McuOrderItem `json:"items"`
|
||||
}
|
||||
|
||||
func (d McuOrder) ToResponse() ResponseDto {
|
||||
@@ -100,6 +102,7 @@ func (d McuOrder) ToResponse() ResponseDto {
|
||||
Number: d.Number,
|
||||
Temperature: d.Temperature,
|
||||
UrgencyLevel_Code: d.UrgencyLevel_Code,
|
||||
Items: d.Items,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
emoib "simrs-vx/internal/domain/main-entities/mcu-order-item/base"
|
||||
"time"
|
||||
|
||||
ercl "simrs-vx/internal/domain/references/clinical"
|
||||
@@ -23,6 +24,11 @@ type McuOrder struct {
|
||||
Temperature float64 `json:"temperature"`
|
||||
UrgencyLevel_Code ercl.McuUrgencyLevelCode `json:"urgencyLevel_code" gorm:"not null;size:15"`
|
||||
Scope_Code ercl.McuScopeCode `json:"scope_code" gorm:"index;size:10"`
|
||||
Items []*emoib.McuOrderItem `json:"items" gorm:"foreignKey:McuOrder_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (d McuOrder) IsNotNew() bool {
|
||||
return d.Status_Code != erc.DSCNew
|
||||
}
|
||||
|
||||
func (d McuOrder) IsCompleted() bool {
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package personaddress
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
epr "simrs-vx/internal/domain/main-entities/postal-region"
|
||||
ev "simrs-vx/internal/domain/main-entities/village"
|
||||
|
||||
erp "simrs-vx/internal/domain/references/person"
|
||||
)
|
||||
|
||||
type PersonAddress struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Person_Id uint `json:"person_id"`
|
||||
Address string `json:"address" gorm:"size:150"`
|
||||
LocationType_Code erp.AddressLocationTypeCode `json:"locationType_code" gorm:"size:10"`
|
||||
Rt string `json:"rt" gorm:"size:2"`
|
||||
Rw string `json:"rw" gorm:"size:2"`
|
||||
PostalRegion_Code *string `json:"postalRegion_code" gorm:"size:6"`
|
||||
PostalRegion *epr.PostalRegion `json:"postalRegion,omitempty" gorm:"foreignKey:PostalRegion_Code;references:Code"`
|
||||
Village_Code *string `json:"village_code" gorm:"size:10"`
|
||||
Village *ev.Village `json:"village,omitempty" gorm:"foreignKey:Village_Code;references:Code"`
|
||||
}
|
||||
@@ -1,22 +1,9 @@
|
||||
package personaddress
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
epr "simrs-vx/internal/domain/main-entities/postal-region"
|
||||
ev "simrs-vx/internal/domain/main-entities/village"
|
||||
|
||||
erp "simrs-vx/internal/domain/references/person"
|
||||
eb "simrs-vx/internal/domain/main-entities/person-address/base"
|
||||
)
|
||||
|
||||
type PersonAddress struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Person_Id uint `json:"person_id"`
|
||||
Address string `json:"address" gorm:"size:150"`
|
||||
LocationType_Code erp.AddressLocationTypeCode `json:"locationType_code" gorm:"size:10"`
|
||||
Rt string `json:"rt" gorm:"size:2"`
|
||||
Rw string `json:"rw" gorm:"size:2"`
|
||||
PostalRegion_Code *string `json:"postalRegion_code" gorm:"size:6"`
|
||||
PostalRegion *epr.PostalRegion `json:"postalRegion,omitempty" gorm:"foreignKey:PostalRegion_Code;references:Code"`
|
||||
Village_Code *string `json:"village_code" gorm:"size:10"`
|
||||
Village *ev.Village `json:"village,omitempty" gorm:"foreignKey:Village_Code;references:Code"`
|
||||
eb.PersonAddress
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package personcontact
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erp "simrs-vx/internal/domain/references/person"
|
||||
)
|
||||
|
||||
type PersonContact struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Person_Id uint `json:"person_id"`
|
||||
Type_Code erp.ContactTypeCode `json:"type_code" gorm:"size:15"`
|
||||
Value string `json:"value" gorm:"size:100"`
|
||||
}
|
||||
@@ -1,13 +1,9 @@
|
||||
package personcontact
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erp "simrs-vx/internal/domain/references/person"
|
||||
eb "simrs-vx/internal/domain/main-entities/person-contact/base"
|
||||
)
|
||||
|
||||
type PersonContact struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Person_Id uint `json:"person_id"`
|
||||
Type_Code erp.ContactTypeCode `json:"type_code" gorm:"size:15"`
|
||||
Value string `json:"value" gorm:"size:100"`
|
||||
eb.PersonContact
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
epi "simrs-vx/internal/domain/main-entities/person-insurance"
|
||||
epr "simrs-vx/internal/domain/main-entities/person-relative"
|
||||
er "simrs-vx/internal/domain/main-entities/regency"
|
||||
"strings"
|
||||
|
||||
erp "simrs-vx/internal/domain/references/person"
|
||||
|
||||
@@ -58,3 +59,62 @@ func (d Person) IsSameResidentIdentityNumber(input *string) bool {
|
||||
}
|
||||
return d.ResidentIdentityNumber == input
|
||||
}
|
||||
|
||||
func (d Person) GenderString() string {
|
||||
if d.Gender_Code == nil {
|
||||
return ""
|
||||
}
|
||||
switch *d.Gender_Code {
|
||||
case erp.GCMale:
|
||||
return "Laki-laki(L)"
|
||||
case erp.GCFemale:
|
||||
return "Perempuan(P)"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
func (d Person) GetPhoneNumber() string {
|
||||
if d.Contacts == nil {
|
||||
return ""
|
||||
}
|
||||
for _, c := range *d.Contacts {
|
||||
if c.Type_Code == erp.CTPhone || c.Type_Code == erp.CTMPhone {
|
||||
return c.Value
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (d Person) FullName() string {
|
||||
name := strings.TrimSpace(d.Name)
|
||||
if name == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
parts := []string{}
|
||||
|
||||
// Front title (dr., drs., etc)
|
||||
if d.FrontTitle != nil {
|
||||
ft := strings.TrimSpace(*d.FrontTitle)
|
||||
if ft != "" {
|
||||
parts = append(parts, ft)
|
||||
}
|
||||
}
|
||||
|
||||
// Name (always included)
|
||||
parts = append(parts, name)
|
||||
|
||||
// Join front title + name
|
||||
full := strings.Join(parts, " ")
|
||||
|
||||
// End title → attach with comma
|
||||
if d.EndTitle != nil {
|
||||
et := strings.TrimSpace(*d.EndTitle)
|
||||
if et != "" {
|
||||
full = full + ", " + et
|
||||
}
|
||||
}
|
||||
|
||||
return full
|
||||
}
|
||||
|
||||
@@ -2,11 +2,19 @@ package resume
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
"time"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
|
||||
pa "simrs-vx/internal/lib/auth"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Value *string `json:"value"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Value *string `json:"value"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -16,11 +24,13 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
Doctor_Code *string `json:"doctor-code"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
@@ -30,6 +40,8 @@ type UpdateDto struct {
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
@@ -40,16 +52,20 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Value *string `json:"value"`
|
||||
FileUrl *string `json:"fileUrl"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Value *string `json:"value"`
|
||||
FileUrl *string `json:"fileUrl"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d Resume) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Value: d.Value,
|
||||
FileUrl: d.FileUrl,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
@@ -62,3 +78,105 @@ func ToResponseList(data []Resume) []ResponseDto {
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
// ValueDto is for resume value
|
||||
type ValueDto struct {
|
||||
Assessment Assessment `json:"assessment"`
|
||||
Diagnosis Diagnosis `json:"diagnosis"`
|
||||
Action Action `json:"action"`
|
||||
Consultation Consultation `json:"consultation"`
|
||||
Supporting SupportingExaminations `json:"supporting"`
|
||||
Pharmacy PharmacyData `json:"pharmacy"`
|
||||
Discharge DischargeCondition `json:"discharge"`
|
||||
National NationalProgram `json:"national"`
|
||||
Management Management `json:"management"`
|
||||
Medication Medication `json:"medication"`
|
||||
}
|
||||
|
||||
type Assessment struct {
|
||||
StartedAt *time.Time `json:"startedAt`
|
||||
FinishedAt *time.Time `json:"finishedAt`
|
||||
Doctor_Code string `json:"doctor_code`
|
||||
DiagnosisIn string `json:"diagnosisIn`
|
||||
AmbulatoryIndication string `json:"ambulatoryIndication"`
|
||||
MainComplaint string `json:"mainComplaint"`
|
||||
PhysicalExamination string `json:"physicalExamination"`
|
||||
MedicalHistory string `json:"medicalHistory"`
|
||||
MedicalDiagnosis string `json:"medicalDiagnosis"`
|
||||
}
|
||||
|
||||
type Diagnosis struct {
|
||||
PrimaryDiagnosis DiagnosisEntry `json:"primaryDiagnosis"`
|
||||
SecondaryDiagnosis []DiagnosisEntry `json:"secondaryDiagnosis"`
|
||||
}
|
||||
|
||||
type DiagnosisEntry struct {
|
||||
DiagnosisName string `json:"diagnosis"`
|
||||
ICD10 string `json:"icd_10"`
|
||||
Basis string `json:"basis"` // Clinical basis of diagnosis / dasar diagnosa
|
||||
}
|
||||
|
||||
type Action struct {
|
||||
PrimaryAction ActionEntry `json:"primaryAction"`
|
||||
AdditionalActions []ActionEntry `json:"additionalActions"`
|
||||
MedicalActions string `json:"medicalActions"` // free-text: "Tindakan Medis"
|
||||
}
|
||||
|
||||
type ActionEntry struct {
|
||||
Action string `json:"action"` // Tindakan
|
||||
ICD9 string `json:"icd_9"` // ICD-9
|
||||
Basis string `json:"basis"` // Dasar Tindakan
|
||||
}
|
||||
|
||||
type Consultation struct {
|
||||
Consultations []ConsultationEntry `json:"consultations"`
|
||||
}
|
||||
|
||||
type ConsultationEntry struct {
|
||||
Consultation string `json:"consultation"` // Konsultasi
|
||||
ConsultationAnswer string `json:"consultationAnswer"` // Jawaban Konsultasi
|
||||
}
|
||||
|
||||
type SupportingExaminations struct {
|
||||
Notes string `json:"notes"` // Free-text list of lab/imaging results
|
||||
}
|
||||
|
||||
type PharmacyData struct {
|
||||
AllergySpecialConditions string `json:"allergySpecialConditions"` // Kelainan Khusus Alergi
|
||||
OtherConditions string `json:"otherConditions"` // Kelainan Lain
|
||||
TherapyDuringCare string `json:"therapyDuringCare"` // Terapi selama dirawat
|
||||
TherapyAtDischarge string `json:"therapyAtDischarge"` // Terapi waktu pulang
|
||||
FollowUpInstructions string `json:"followUpInstructions"` // Edukasi / Anjuran / Follow-up
|
||||
}
|
||||
|
||||
type DischargeCondition struct {
|
||||
BloodPressureSystolic float64 `json:"bloodPressureSystolic"` // Tekanan Darah Sistol (mmHg)
|
||||
BloodPressureDiastolic float64 `json:"bloodPressureDiastolic"` // Tekanan Darah Diastol (mmHg)
|
||||
RespirationRate float64 `json:"respirationRate"` // Pernafasan (kali/menit)
|
||||
HeartRate float64 `json:"heartRate"` // Denyut Jantung (kali/menit)
|
||||
BodyTemperature float64 `json:"bodyTemperature"` // Suhu Tubuh (°C)
|
||||
|
||||
ConsciousnessLevel string `json:"consciousnessLevel"` // Tingkat Kesadaran
|
||||
PainScale int `json:"painScale"` // Skala Nyeri (0–10)
|
||||
}
|
||||
|
||||
type NationalProgram struct {
|
||||
ProgramService string `json:"programService"` // e.g. "Antenatal Care"
|
||||
ProgramServiceStatus string `json:"programServiceStatus"` // e.g. "Suspected"
|
||||
}
|
||||
|
||||
type Management struct {
|
||||
NationalProgramService string `json:"nationalProgramService"` // e.g. selected program
|
||||
FollowUpManagement string `json:"followUpManagement"` // e.g. further management plan
|
||||
ConditionOnDischarge string `json:"conditionOnDischarge"` // e.g. "Stable"
|
||||
DischargeMethod string `json:"dischargeMethod"` // e.g. "Discharged with Doctor's Approval"
|
||||
}
|
||||
|
||||
type MedicationEntry struct {
|
||||
DuringTreatment string `json:"duringTreatment"`
|
||||
AtDischarge string `json:"atDischarge"`
|
||||
}
|
||||
|
||||
type Medication struct {
|
||||
Medications []MedicationEntry `json:"medications"`
|
||||
}
|
||||
|
||||
@@ -16,3 +16,15 @@ type Resume struct {
|
||||
FileUrl *string `json:"fileUrl" gorm:"size:1024"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code" gorm:"not null;size:10"`
|
||||
}
|
||||
|
||||
func (d Resume) IsNew() bool {
|
||||
return d.Status_Code == erc.DVCNew
|
||||
}
|
||||
|
||||
func (d Resume) IsVerified() bool {
|
||||
return d.Status_Code == erc.DVCVerified
|
||||
}
|
||||
|
||||
func (d Resume) IsValidated() bool {
|
||||
return d.Status_Code == erc.DVCValidated
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
package screening
|
||||
|
||||
import (
|
||||
// std
|
||||
|
||||
// internal - lib
|
||||
pa "simrs-vx/internal/lib/auth"
|
||||
|
||||
// internal - domain - base-entities
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
|
||||
// internal - domain - main-entities
|
||||
eem "simrs-vx/internal/domain/main-entities/employee"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/clinical"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Employee_Id *uint `json:"-"`
|
||||
Type erc.ScreeningFormTypeCode `json:"type"`
|
||||
Value *string `json:"value"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
Employee_Id *uint `json:"employee-id"`
|
||||
Type erc.ScreeningFormTypeCode `json:"type"`
|
||||
Value *string `json:"value"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *eem.Employee `json:"employee,omitempty"`
|
||||
Type erc.ScreeningFormTypeCode `json:"type"`
|
||||
Value *string `json:"value"`
|
||||
}
|
||||
|
||||
func (d Screening) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
Type: d.Type,
|
||||
Value: d.Value,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Screening) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package screening
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
eem "simrs-vx/internal/domain/main-entities/employee"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/clinical"
|
||||
)
|
||||
|
||||
type Screening struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *eem.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
Type erc.ScreeningFormTypeCode `json:"type"`
|
||||
Value *string `json:"value"`
|
||||
}
|
||||
@@ -32,7 +32,7 @@ type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
Employee_Id *uint `json:"employee-id"`
|
||||
Time *time.Time `json:"time"`
|
||||
TypeCode erc.SoapiTypeCode `json:"typeCode"`
|
||||
TypeCode erc.SoapiTypeCode `json:"type-code"`
|
||||
Value *string `json:"value"`
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ type ResponseDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *eem.Employee `json:"employee,omitempty"`
|
||||
Time *time.Time `json:"time"`
|
||||
TypeCode erc.SoapiTypeCode `json:"typeCode"`
|
||||
TypeCode erc.SoapiTypeCode `json:"type-code"`
|
||||
Value *string `json:"value"`
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ type (
|
||||
LearnMethodCode string
|
||||
LangClassCode string
|
||||
TranslatorSrcCode string
|
||||
ScreeningFormTypeCode string
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -187,6 +188,9 @@ const (
|
||||
|
||||
TSCTeam TranslatorSrcCode = "team" // Tim Penerjemah
|
||||
TSCFamily TranslatorSrcCode = "family" // Keluarga
|
||||
|
||||
SFTCA ScreeningFormTypeCode = "form-a" // Formu A
|
||||
SFTCB ScreeningFormTypeCode = "form-b" // Formu B
|
||||
)
|
||||
|
||||
type Soapi struct {
|
||||
|
||||
@@ -95,10 +95,11 @@ const (
|
||||
RTCPrivate RefTypeCode = "private" // Swasta
|
||||
RTCBpjs RefTypeCode = "bpjs" // BPJS
|
||||
|
||||
APMCJkn AllPaymentMethodCode = "jkn" // JKN
|
||||
APMCJkmm AllPaymentMethodCode = "jkmm" // JKMM
|
||||
APMCSpm AllPaymentMethodCode = "spm" // SPM
|
||||
APMCPks AllPaymentMethodCode = "pks" // PKS
|
||||
APMCJkn AllPaymentMethodCode = "jkn" // JKN -> Jaminan Kesehatan Nasional -> BPJS Kesehatan
|
||||
APMCJkmm AllPaymentMethodCode = "jkmm" // JKMM -> Jaminan Kesehatan Masyarakat Miskin -> Dibiayai oleh APBD daerah
|
||||
APMCSpm AllPaymentMethodCode = "spm" // SPM -> Surat Pernyataan Miskin
|
||||
APMCPks AllPaymentMethodCode = "pks" // PKS -> Perjanjian Kerjasama -> Pembayaran melalui instansi atau perusahaan yang memiliki kontrak dengan rumah sakit
|
||||
APMCUmum AllPaymentMethodCode = "umum"
|
||||
|
||||
SRTCInternal SEPRefTypeCode = "internal" // Rujukan Internal
|
||||
SRTCExternal SEPRefTypeCode = "external" // Faskes Lain
|
||||
|
||||
@@ -18,14 +18,16 @@ const (
|
||||
EPCReg EmployeePositionCode = "reg" // Admisi/Pendaftaran
|
||||
EPCNur EmployeePositionCode = "nur" // Perawat
|
||||
EPCDoc EmployeePositionCode = "doc" // Dokter
|
||||
EPCNut EmployeePositionCode = "nut" // Ahli gizi
|
||||
EPCMwi EmployeePositionCode = "miw" // Bidan
|
||||
EPCThr EmployeePositionCode = "thr" // Terapis
|
||||
EPCNut EmployeePositionCode = "nut" // Ahli gizi
|
||||
EPCLab EmployeePositionCode = "lab" // Laboran
|
||||
EPCPha EmployeePositionCode = "pha" // Farmasi
|
||||
EPCPay EmployeePositionCode = "pay" // Pembayaran
|
||||
EPCHur EmployeePositionCode = "hue" // Sumber Daya Manusia
|
||||
EPCGea EmployeePositionCode = "gea" // Bagian Umum
|
||||
EPCMan EmployeePositionCode = "man" // Manajemen
|
||||
EPCNom EmployeePositionCode = "nom" // Non Medic
|
||||
// EPCPay EmployeePositionCode = "pay" // Pembayaran
|
||||
// EPCHur EmployeePositionCode = "hue" // Sumber Daya Manusia
|
||||
// EPCGea EmployeePositionCode = "gea" // Bagian Umum
|
||||
// EPCMan EmployeePositionCode = "man" // Manajemen
|
||||
|
||||
IPCSpecialist = "specialist-intern"
|
||||
IPCNurse = "nurse-intern"
|
||||
|
||||
@@ -112,6 +112,9 @@ const (
|
||||
RCNephew RelationshipCode = "nephew" // Keponakan
|
||||
RCGdChild RelationshipCode = "gd-child" // Cucu
|
||||
RCOther RelationshipCode = "other" // Lainnya
|
||||
RCFriend RelationshipCode = "friend" // Teman
|
||||
RCSpouse RelationshipCode = "spouse" // Pasangan (Suami / Istri)
|
||||
RCSelf RelationshipCode = "self" // Diri Sendiri
|
||||
|
||||
ALTCIdn AddressLocationTypeCode = "identity" // Sesuai Identitas
|
||||
ALTCDom AddressLocationTypeCode = "domicile" // Sesuai Domisili
|
||||
|
||||
@@ -65,7 +65,7 @@ type MPasien struct {
|
||||
NamaIbu string `json:"nama_ibu" gorm:"column:nama_ibu"`
|
||||
PendidikanAyah string `json:"pendidikan_ayah" gorm:"column:pendidikan_ayah"`
|
||||
PendidikanIbu string `json:"pendidikan_ibu" gorm:"column:pendidikan_ibu"`
|
||||
StIdentitasOrtu string `json:"st_identitas_ortu" gorm:"column:st_identitas_ortu"`
|
||||
StIdentitasOrtu uint `json:"st_identitas_ortu" gorm:"column:st_identitas_ortu"`
|
||||
NomrBaru *string `json:"nomr_baru" gorm:"column:nomr_baru"`
|
||||
KtpFile *string `json:"ktp_file" gorm:"column:ktp_file"`
|
||||
KkFile *string `json:"kk_file" gorm:"column:kk_file"`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package division
|
||||
package m_polihfis
|
||||
|
||||
type MPolihfis struct {
|
||||
Id uint `json:"id" gorm:"primaryKey;autoIncrement;column:id"`
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package m_poly
|
||||
|
||||
type MPoly struct {
|
||||
Kode uint `json:"kode" gorm:"primaryKey;autoIncrement;column:kode"`
|
||||
Kode uint `json:"kode" gorm:"primaryKey;column:kode"`
|
||||
Nama string `json:"nama" gorm:"column:nama"`
|
||||
Jenispoly uint `json:"jenispoly" gorm:"column:jenispoly"`
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ type TPendaftaran struct {
|
||||
KeteranganStatus *uint `json:"keterangan_status" gorm:"column:keterangan_status"`
|
||||
Pasienbaru uint `json:"pasienbaru" gorm:"column:pasienbaru"`
|
||||
Nip string `json:"nip" gorm:"column:nip"`
|
||||
Idxdaftar uint `json:"idxdaftar" gorm:"column:idxdaftar"`
|
||||
Idxdaftar uint `json:"idxdaftar" gorm:"primaryKey;autoIncrement;column:idxdaftar"`
|
||||
Masukpoly *time.Time `json:"masukpoly" gorm:"column:masukpoly"`
|
||||
Keluarpoly *time.Time `json:"keluarpoly" gorm:"column:keluarpoly"`
|
||||
Ketrujuk string `json:"ketrujuk" gorm:"column:ketrujuk"`
|
||||
@@ -82,7 +82,6 @@ type TPendaftaran struct {
|
||||
DokterNameHfis *string `json:"dokter_name_hfis" gorm:"column:dokter_name_hfis"`
|
||||
DokterIdHfis *string `json:"dokter_id_hfis" gorm:"column:dokter_id_hfis"`
|
||||
StatusBridging *string `json:"status_bridging" gorm:"column:status_bridging"`
|
||||
NoSpri *string `json:"no_spri" gorm:"column:no_spri"`
|
||||
}
|
||||
|
||||
func (TPendaftaran) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user