i
merge branch 'migration into feat/vehicle-src-75 .
This commit is contained in:
No files matched your search
@@ -0,0 +1,15 @@
|
||||
package member
|
||||
|
||||
type ReadListDto struct {
|
||||
ReferenceType ReferenceType `json:"-"`
|
||||
PathValue1 string `json:"-"`
|
||||
PathValue2 string `json:"-"`
|
||||
PathValue3 string `json:"-"`
|
||||
}
|
||||
|
||||
type ReferenceType string
|
||||
|
||||
const (
|
||||
RTNik ReferenceType = "nik"
|
||||
RTBpjs ReferenceType = "bpjs"
|
||||
)
|
||||
@@ -0,0 +1,78 @@
|
||||
package member
|
||||
|
||||
type Response struct {
|
||||
MetaData *MetaData `json:"metaData"`
|
||||
Response *BPJSDataRes `json:"response"`
|
||||
}
|
||||
|
||||
type MetaData struct {
|
||||
Code string `json:"code"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type BPJSDataRes struct {
|
||||
Peserta *Peserta `json:"peserta"`
|
||||
}
|
||||
|
||||
type Peserta struct {
|
||||
Cob *COB `json:"cob"`
|
||||
HakKelas *HakKelas `json:"hakKelas"`
|
||||
Informasi *Informasi `json:"informasi"`
|
||||
JenisPeserta *JenisPeserta `json:"jenisPeserta"`
|
||||
Mr *MR `json:"mr"`
|
||||
Nama *string `json:"nama"`
|
||||
Nik *string `json:"nik"`
|
||||
NoKartu *string `json:"noKartu"`
|
||||
Pisa *string `json:"pisa"`
|
||||
ProvUmum *ProvUmum `json:"provUmum"`
|
||||
Sex *string `json:"sex"`
|
||||
StatusPeserta *StatusPeserta `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"`
|
||||
NoAsuransi *string `json:"noAsuransi"`
|
||||
TglTAT *string `json:"tglTAT"`
|
||||
TglTMT *string `json:"tglTMT"`
|
||||
}
|
||||
|
||||
type HakKelas struct {
|
||||
Keterangan *string `json:"keterangan"`
|
||||
Kode *string `json:"kode"`
|
||||
}
|
||||
|
||||
type Informasi struct {
|
||||
Dinsos *string `json:"dinsos"`
|
||||
NoSKTM *string `json:"noSKTM"`
|
||||
ProlanisPRB *string `json:"prolanisPRB"`
|
||||
}
|
||||
|
||||
type JenisPeserta struct {
|
||||
Keterangan *string `json:"keterangan"`
|
||||
Kode *string `json:"kode"`
|
||||
}
|
||||
|
||||
type MR struct {
|
||||
NoMR *string `json:"noMR"`
|
||||
NoTelepon *string `json:"noTelepon"`
|
||||
}
|
||||
|
||||
type ProvUmum struct {
|
||||
KdProvider *string `json:"kdProvider"`
|
||||
NmProvider *string `json:"nmProvider"`
|
||||
}
|
||||
|
||||
type StatusPeserta struct {
|
||||
Keterangan *string `json:"keterangan"`
|
||||
Kode *string `json:"kode"`
|
||||
}
|
||||
|
||||
type Umur struct {
|
||||
UmurSaatPelayanan *string `json:"umurSaatPelayanan"`
|
||||
UmurSekarang *string `json:"umurSekarang"`
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package monitoring
|
||||
|
||||
type ReadListDto struct {
|
||||
ReferenceType ReferenceType `json:"-"`
|
||||
PathValue1 string `json:"-"`
|
||||
PathValue2 string `json:"-"`
|
||||
PathValue3 string `json:"-"`
|
||||
}
|
||||
|
||||
type ReferenceType string
|
||||
|
||||
const (
|
||||
RTVisit ReferenceType = "visit"
|
||||
RTHist ReferenceType = "hist"
|
||||
)
|
||||
@@ -0,0 +1,43 @@
|
||||
package monitoring
|
||||
|
||||
type Response struct {
|
||||
MetaData MetaData `json:"metaData"`
|
||||
Response *BPJSDataRes `json:"response"`
|
||||
}
|
||||
|
||||
type MetaData struct {
|
||||
Code string `json:"code"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type BPJSDataRes struct {
|
||||
Sep []Sep `json:"sep"`
|
||||
Histori []Histori `json:"histori"`
|
||||
}
|
||||
|
||||
type Sep struct {
|
||||
Diagnosa string `json:"diagnosa"`
|
||||
JnsPelayanan string `json:"jnsPelayanan"`
|
||||
KelasRawat string `json:"kelasRawat"`
|
||||
Nama string `json:"nama"`
|
||||
NoKartu string `json:"noKartu"`
|
||||
NoSep string `json:"noSep"`
|
||||
NoRujukan string `json:"noRujukan"`
|
||||
Poli *string `json:"poli"`
|
||||
TglPlgSep string `json:"tglPlgSep"`
|
||||
TglSep string `json:"tglSep"`
|
||||
}
|
||||
|
||||
type Histori struct {
|
||||
Diagnosa string `json:"diagnosa"`
|
||||
JnsPelayanan string `json:"jnsPelayanan"`
|
||||
KelasRawat *string `json:"kelasRawat"`
|
||||
NamaPeserta string `json:"namaPeserta"`
|
||||
NoKartu string `json:"noKartu"`
|
||||
NoSep string `json:"noSep"`
|
||||
NoRujukan string `json:"noRujukan"`
|
||||
Poli string `json:"poli"`
|
||||
PpkPelayanan string `json:"ppkPelayanan"`
|
||||
TglPlgSep string `json:"tglPlgSep"`
|
||||
TglSep string `json:"tglSep"`
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package reference
|
||||
|
||||
type ReadListDto struct {
|
||||
ReferenceType ReferenceType `json:"-"`
|
||||
PathValue1 string `json:"-"`
|
||||
PathValue2 string `json:"-"`
|
||||
PathValue3 string `json:"-"`
|
||||
}
|
||||
|
||||
type ReferenceType string
|
||||
|
||||
const (
|
||||
RTProvince ReferenceType = "province"
|
||||
RTDistrict ReferenceType = "district"
|
||||
RTCities ReferenceType = "cities"
|
||||
RTDiagnose ReferenceType = "diagnose"
|
||||
RTDiagnosePrb ReferenceType = "diagnose-prb"
|
||||
RTMedicinePrb ReferenceType = "medicine-prb"
|
||||
RTUnit ReferenceType = "unit"
|
||||
RTHealthcare ReferenceType = "healthcare"
|
||||
RTDoctor ReferenceType = "doctor"
|
||||
)
|
||||
@@ -0,0 +1,23 @@
|
||||
package reference
|
||||
|
||||
type Response struct {
|
||||
MetaData MetaData `json:"metaData"`
|
||||
Response *CodeNameList `json:"response"` // pointer to handle possible null
|
||||
}
|
||||
|
||||
type MetaData struct {
|
||||
Code string `json:"code"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type CodeNameList struct {
|
||||
List []CodeName `json:"list,omitempty"`
|
||||
Diagnosa []CodeName `json:"diagnosa,omitempty"`
|
||||
Poli []CodeName `json:"poli,omitempty"`
|
||||
Faskes []CodeName `json:"faskes,omitempty"`
|
||||
}
|
||||
|
||||
type CodeName struct {
|
||||
Kode string `json:"kode"`
|
||||
Nama string `json:"nama"`
|
||||
}
|
||||
@@ -1 +1,68 @@
|
||||
package vclaimsephist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
RequestPayload string `json:"requestPayload"`
|
||||
ResponseBody string `json:"responseBody"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
RequestPayload *string `json:"requestPayload"`
|
||||
ResponseBody *string `json:"responseBody"`
|
||||
Message *string `json:"message"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
RequestPayload *string `json:"requestPayload"`
|
||||
ResponseBody *string `json:"responseBody"`
|
||||
Message *string `json:"message"`
|
||||
}
|
||||
|
||||
func (d VclaimSepHist) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
RequestPayload: d.RequestPayload,
|
||||
ResponseBody: d.ResponseBody,
|
||||
Message: d.Message,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []VclaimSepHist) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -1 +1,62 @@
|
||||
package vclaimsepprint
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
VclaimSep_Number *string `json:"vclaimSep_number"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
VclaimSep_Number *string `json:"vclaimSep_number"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
VclaimSep_Number *string `json:"vclaimSep_number"`
|
||||
Counter *uint `json:"counter"`
|
||||
}
|
||||
|
||||
func (d VclaimSepPrint) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
VclaimSep_Number: d.VclaimSep_Number,
|
||||
Counter: d.Counter,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []VclaimSepPrint) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -1 +1,73 @@
|
||||
package vclaimsep
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
evsh "simrs-vx/internal/domain/bpjs-entities/vclaim-sep-hist"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Number *string `json:"number" validate:"maxLength=19"`
|
||||
RequestPayload []byte `json:"requestPayload" validate:"maxLength=1024"`
|
||||
|
||||
VclaimSepHist evsh.CreateDto
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Number *string `json:"number"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
Number *string `json:"number"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
Number *string `json:"number"`
|
||||
}
|
||||
|
||||
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"`
|
||||
Number *string `json:"number"`
|
||||
}
|
||||
|
||||
func (d VclaimSep) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Number: d.Number,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []VclaimSep) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
func (c CreateDto) IsMessageSuccess() bool {
|
||||
return c.VclaimSepHist.Message == "Sukses"
|
||||
}
|
||||
@@ -6,16 +6,18 @@ import (
|
||||
ep "simrs-vx/internal/domain/main-entities/person"
|
||||
eu "simrs-vx/internal/domain/main-entities/user"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
erg "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type Employee struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
User_Id *uint `json:"user_id"`
|
||||
User *eu.User `json:"user,omitempty" gorm:"foreignKey:User_Id;references:Id"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Person *ep.Person `json:"person,omitempty" gorm:"foreignKey:Person_Id;references:Id"`
|
||||
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.ActiveStatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
User_Id *uint `json:"user_id"`
|
||||
User *eu.User `json:"user,omitempty" gorm:"foreignKey:User_Id;references:Id"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Person *ep.Person `json:"person,omitempty" gorm:"foreignKey:Person_Id;references:Id"`
|
||||
Position_Code *erg.EmployeePosisitionCode `json:"position_code" gorm:"size:20"`
|
||||
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.ActiveStatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||
}
|
||||
@@ -4,8 +4,10 @@ import (
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
evs "simrs-vx/internal/domain/bpjs-entities/vclaim-sep"
|
||||
ea "simrs-vx/internal/domain/main-entities/appointment"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
ep "simrs-vx/internal/domain/main-entities/patient"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
@@ -13,6 +15,8 @@ import (
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
|
||||
pa "simrs-vx/pkg/auth-helper"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
@@ -25,10 +29,18 @@ type CreateDto struct {
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
PaymentMethod_Code erc.PaymentMethodCode `json:"paymentMethod_code" gorm:"size:10"`
|
||||
InsuranceCompany_Id *uint `json:"insuranceCompany_id"`
|
||||
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_Id *uint `json:"appointment_doctor_id"`
|
||||
Adm_Employee_Id *uint `json:"-"`
|
||||
Responsible_Doctor_Id *uint `json:"responsible_doctor_id"`
|
||||
RefSource_Name *string `json:"refSource_name" validate:"maxLength=100"`
|
||||
Appointment_Id *uint `json:"appointment_id"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -41,7 +53,7 @@ type FilterDto struct {
|
||||
Patient_Id *uint `json:"patient-id"`
|
||||
Patient *ep.Patient `json:"patient,omitempty"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Class_Code ere.EncounterClassCode `json:"class_code" validate:"maxLength=10"`
|
||||
Class_Code ere.EncounterClassCode `json:"class-code" validate:"maxLength=10"`
|
||||
Unit_Id *uint `json:"unit-id"`
|
||||
Specialist_Id *uint16 `json:"specialist-id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist-id"`
|
||||
@@ -58,7 +70,8 @@ type FilterDto struct {
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint16 `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
@@ -102,10 +115,17 @@ type ResponseDto struct {
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
Appointment_Doctor_Id *uint `json:"assignment_doctor_id"`
|
||||
Appointment_Doctor *ed.Doctor `json:"assignment_doctor,omitempty"`
|
||||
PaymentMethod_Code erc.PaymentMethodCode `json:"paymentMethod_code"`
|
||||
InsuranceCompany_Id *uint `json:"insuranceCompany_id"`
|
||||
Member_Number *string `json:"member_number"`
|
||||
Ref_Number *string `json:"ref_number"`
|
||||
Trx_Number *string `json:"trx_number"`
|
||||
Appointment_Doctor_Id *uint `json:"appointment_doctor_id"`
|
||||
Appointment_Doctor *ed.Doctor `json:"appointment_doctor,omitempty"`
|
||||
Responsible_Doctor_Id *uint `json:"responsible_doctor_id"`
|
||||
Responsible_Doctor *ed.Doctor `json:"responsible_doctor,omitempty"`
|
||||
Adm_Employee_Id *uint `json:"adm_employee_id"`
|
||||
Adm_Employee *ee.Employee `json:"adm_employee,omitempty"`
|
||||
DischargeMethod_Code *ere.DischargeMethodCode `json:"dischargeMethod_code"`
|
||||
RefSource_Name *string `json:"refSource_name"`
|
||||
Appointment_Id *uint `json:"appointment_id"`
|
||||
@@ -115,6 +135,7 @@ type ResponseDto struct {
|
||||
AdmDischargeEducation *string `json:"admDischargeEducation"`
|
||||
DischargeReason *string `json:"dischargeReason"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
VclaimSep *evs.VclaimSep `json:"vclaimSep,omitempty"`
|
||||
}
|
||||
|
||||
func (d Encounter) ToResponse() ResponseDto {
|
||||
@@ -130,8 +151,15 @@ func (d Encounter) ToResponse() ResponseDto {
|
||||
Subspecialist_Id: d.Subspecialist_Id,
|
||||
Subspecialist: d.Subspecialist,
|
||||
VisitDate: d.VisitDate,
|
||||
PaymentMethod_Code: d.PaymentMethod_Code,
|
||||
InsuranceCompany_Id: d.InsuranceCompany_Id,
|
||||
Member_Number: d.Member_Number,
|
||||
Ref_Number: d.Ref_Number,
|
||||
Trx_Number: d.Trx_Number,
|
||||
Appointment_Doctor_Id: d.Appointment_Doctor_Id,
|
||||
Appointment_Doctor: d.Appointment_Doctor,
|
||||
Adm_Employee_Id: d.Adm_Employee_Id,
|
||||
Adm_Employee: d.Adm_Employee,
|
||||
Responsible_Doctor_Id: d.Responsible_Doctor_Id,
|
||||
Responsible_Doctor: d.Responsible_Doctor,
|
||||
DischargeMethod_Code: d.DischargeMethod_Code,
|
||||
@@ -143,6 +171,7 @@ func (d Encounter) ToResponse() ResponseDto {
|
||||
AdmDischargeEducation: d.AdmDischargeEducation,
|
||||
DischargeReason: d.DischargeReason,
|
||||
Status_Code: d.Status_Code,
|
||||
VclaimSep: d.VclaimSep,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -38,8 +38,8 @@ type Encounter struct {
|
||||
Trx_Number *string `json:"trxNumber" gorm:"unique;size:20"`
|
||||
Appointment_Doctor_Id *uint `json:"appointment_doctor_id"`
|
||||
Appointment_Doctor *ed.Doctor `json:"appointment_doctor,omitempty" gorm:"foreignKey:Appointment_Doctor_Id;references:Id"`
|
||||
Adm_Employee_Id *uint `json:"admEmployee_id"`
|
||||
Adm_Employee *ee.Employee `json:"admEmployee,omitempty" gorm:"foreignKey:Adm_Employee_Id;references:Id"`
|
||||
Adm_Employee_Id *uint `json:"adm_employee_id"`
|
||||
Adm_Employee *ee.Employee `json:"adm_employee,omitempty" gorm:"foreignKey:Adm_Employee_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:16"`
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package intern
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ep "simrs-vx/internal/domain/main-entities/person"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/user"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
User_Id *uint `json:"user_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
User_Id *uint `json:"user_id"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
User_Id *uint `json:"user_id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Person *ep.Person `json:"person,omitempty"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty"`
|
||||
User_Id *uint `json:"user_id"`
|
||||
User *eu.User `json:"user,omitempty"`
|
||||
}
|
||||
|
||||
func (d Intern) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Person_Id: d.Person_Id,
|
||||
Person: d.Person,
|
||||
User_Id: d.User_Id,
|
||||
User: d.User,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Intern) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package intern
|
||||
|
||||
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"
|
||||
erg "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type Intern struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Person *ep.Person `json:"person,omitempty" gorm:"foreignKey:Person_Id"`
|
||||
Position_Code *erg.InternPosisitionCode `json:"position_code" gorm:"size:20"`
|
||||
User_Id *uint `json:"user_id"`
|
||||
User *eu.User `json:"user,omitempty" gorm:"foreignKey:User_Id"`
|
||||
}
|
||||
@@ -11,7 +11,7 @@ type Item struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:50"`
|
||||
Name string `json:"name" gorm:"size:100"`
|
||||
ItemGroup_Code ero.ItemGroupCode `json:"itemGroup_code" gorm:"size:10"`
|
||||
ItemGroup_Code ero.ItemGroupCode `json:"itemGroup_code" gorm:"size:15"`
|
||||
Uom_Code *string `json:"uom_code" gorm:"size:10"`
|
||||
Uom *eu.Uom `json:"uom,omitempty" gorm:"foreignKey:Uom_Code;references:Code"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
|
||||
@@ -6,9 +6,10 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Code string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
Type_Code string `json:"type_code" validate:"maxLength=20"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -19,10 +20,11 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Item_Id *uint `json:"item-id"`
|
||||
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Item_Id *uint `json:"item-id"`
|
||||
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
@@ -47,18 +49,20 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
func (d MedicalActionSrc) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Type_Code: d.Type_Code,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -9,6 +9,7 @@ type MedicalActionSrc struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Type_Code string `json:"type_code" gorm:"size:20"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
ep "simrs-vx/internal/domain/main-entities/person"
|
||||
epa "simrs-vx/internal/domain/main-entities/person-address"
|
||||
epc "simrs-vx/internal/domain/main-entities/person-contact"
|
||||
epi "simrs-vx/internal/domain/main-entities/person-insurance"
|
||||
epr "simrs-vx/internal/domain/main-entities/person-relative"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
@@ -15,14 +16,15 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Person_Id *uint `json:"-"`
|
||||
Person *ep.UpdateDto `json:"person"`
|
||||
NewBornStatus bool `json:"newBornStatus"`
|
||||
PersonAddresses []epa.UpdateDto `json:"personAddresses"`
|
||||
PersonContacts []epc.UpdateDto `json:"personContacts"`
|
||||
PersonRelatives []epr.UpdateDto `json:"personRelatives"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Person *ep.UpdateDto `json:"person"`
|
||||
NewBornStatus bool `json:"newBornStatus"`
|
||||
PersonAddresses []epa.UpdateDto `json:"personAddresses"`
|
||||
PersonContacts []epc.UpdateDto `json:"personContacts"`
|
||||
PersonRelatives []epr.UpdateDto `json:"personRelatives"`
|
||||
PersonInsurances []epi.UpdateDto `json:"personInsurances"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -55,7 +57,8 @@ type DeleteDto struct {
|
||||
}
|
||||
|
||||
type SearchDto struct {
|
||||
Search string `json:"search"`
|
||||
Search string `json:"search"`
|
||||
Mode SearchMode `json:"mode"`
|
||||
}
|
||||
|
||||
type UploadDto struct {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package patient
|
||||
|
||||
type SearchMode string
|
||||
|
||||
const (
|
||||
SMNik SearchMode = "resident-identity"
|
||||
SMIdent SearchMode = "identifier"
|
||||
)
|
||||
@@ -1 +1,75 @@
|
||||
package personinsurance
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/insurance-company"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Person_Id uint `json:"person_id"`
|
||||
InsuranceCompany_Id *uint `json:"insurance_id"`
|
||||
Ref_Number *string `json:"ref_number" gorm:"unique;size:20"`
|
||||
DefaultStatus *bool `json:"default_status" gorm:"uniqueIndex:idx_person_insurance"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Person_Id *uint `json:"person-id"`
|
||||
InsuranceCompany_Id *uint `json:"insurance-company-id"`
|
||||
Ref_Number *string `json:"ref-number"`
|
||||
DefaultStatus *bool `json:"default-status"`
|
||||
}
|
||||
|
||||
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
|
||||
Person_Id *uint `json:"person_id"`
|
||||
InsuranceCompany_Id *uint `json:"insuranceCompany_id"`
|
||||
InsuranceCompany *ei.InsuranceCompany `json:"insuranceCompany,omitempty"`
|
||||
Ref_Number *string `json:"ref_number"`
|
||||
DefaultStatus *bool `json:"defaultStatus"`
|
||||
}
|
||||
|
||||
func (d PersonInsurance) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Person_Id: d.Person_Id,
|
||||
InsuranceCompany_Id: d.InsuranceCompany_Id,
|
||||
InsuranceCompany: d.InsuranceCompany,
|
||||
Ref_Number: d.Ref_Number,
|
||||
DefaultStatus: d.DefaultStatus,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []PersonInsurance) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -1,33 +1,33 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ep "simrs-vx/internal/domain/main-entities/person"
|
||||
epa "simrs-vx/internal/domain/main-entities/person-address"
|
||||
epc "simrs-vx/internal/domain/main-entities/person-contact"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
erg "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Name string `json:"name" validate:"maxLength=25"`
|
||||
Password string `json:"password" validate:"maxLength=255"`
|
||||
Status_Code erc.UserStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
Position_Code ero.UserPosisitionCode `json:"position_code" validate:"maxLength=20"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Person *ep.UpdateDto `json:"person"`
|
||||
PersonAddresses []epa.UpdateDto `json:"personAddresses"`
|
||||
PersonContacts []epc.UpdateDto `json:"personContacts"`
|
||||
Employee *EmployeUpdateDto `json:"employee"`
|
||||
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
SIP_Number *string `json:"sip_number" validate:"maxLength=20"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
Name string `json:"name" validate:"maxLength=25"`
|
||||
Password string `json:"password" validate:"maxLength=255"`
|
||||
Status_Code erc.UserStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Person *ep.UpdateDto `json:"person"`
|
||||
PersonAddresses []epa.UpdateDto `json:"personAddresses"`
|
||||
PersonContacts []epc.UpdateDto `json:"personContacts"`
|
||||
Employee *EmployeUpdateDto `json:"employee"`
|
||||
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
SIP_Number *string `json:"sip_number" validate:"maxLength=20"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
ContractPosition_Code erg.ContractPositionCode `json:"contractPosition_code" gorm:"not null;size:20"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -84,12 +84,13 @@ func (d *User) ToResponse() ResponseDto {
|
||||
}
|
||||
|
||||
type EmployeUpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
User_Id *uint `json:"-"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Number *string `json:"number" validate:"maxLength=20"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
Id uint `json:"id"`
|
||||
User_Id *uint `json:"-"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Number *string `json:"number" validate:"maxLength=20"`
|
||||
Position_Code erg.EmployeePosisitionCode `json:"status_code" validate:"maxLength=10"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
}
|
||||
|
||||
func ToResponseList(data []User) []ResponseDto {
|
||||
|
||||
@@ -5,17 +5,17 @@ import (
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
erg "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Name string `json:"name" gorm:"unique;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"`
|
||||
Position_Code ero.UserPosisitionCode `json:"position_code" gorm:"not null;size:20"`
|
||||
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:"unique;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"`
|
||||
ContractPosition_Code erg.ContractPositionCode `json:"contractPosition_code" gorm:"not null;size:20"`
|
||||
FailedLoginCount uint8 `json:"failedLoginCount" gorm:"type:smallint"`
|
||||
LoginAttemptCount int `json:"-"`
|
||||
LastSuccessLogin *time.Time `json:"lastSuccessLogin,omitempty"`
|
||||
LastAllowdLogin *time.Time `json:"lastAllowdLogin,omitempty"`
|
||||
}
|
||||
@@ -1,26 +1,33 @@
|
||||
package organization
|
||||
|
||||
type (
|
||||
UserPosisitionCode string
|
||||
ItemGroupCode string
|
||||
InfraGroupCode string
|
||||
UnitTypeCode string
|
||||
DoctorFeeTypeCode string
|
||||
ContractPositionCode string
|
||||
EmployeePosisitionCode string
|
||||
InternPosisitionCode string
|
||||
ItemGroupCode string
|
||||
InfraGroupCode string
|
||||
UnitTypeCode string
|
||||
DoctorFeeTypeCode string
|
||||
)
|
||||
|
||||
const (
|
||||
UPCReg UserPosisitionCode = "registration" // Admisi/Pendaftaran
|
||||
UPCNur UserPosisitionCode = "nurse" // Perawat
|
||||
UPCDoc UserPosisitionCode = "doctor" // Dokter
|
||||
UPCNut UserPosisitionCode = "nutritionist" // Ahli gizi
|
||||
UPCMwi UserPosisitionCode = "mid-wife" // Bidan
|
||||
UPCLab UserPosisitionCode = "laborant" // Laboran
|
||||
UPCPha UserPosisitionCode = "pharmacy" // Farmasi
|
||||
UPCPay UserPosisitionCode = "payment" // Pembayaran
|
||||
UPCHur UserPosisitionCode = "human-resource" // Sumber Daya Manusia
|
||||
UPCGea UserPosisitionCode = "general-affair" // Bagian Umum
|
||||
UPCInt UserPosisitionCode = "specialist-intern" // PPDS
|
||||
UPCMan UserPosisitionCode = "management" // Manajemen
|
||||
CSCEmp ContractPositionCode = "employee" // Pegawai
|
||||
CSCInt ContractPositionCode = "intern" // PPDS
|
||||
|
||||
EPCReg EmployeePosisitionCode = "registration" // Admisi/Pendaftaran
|
||||
EPCNur EmployeePosisitionCode = "nurse" // Perawat
|
||||
EPCDoc EmployeePosisitionCode = "doctor" // Dokter
|
||||
EPCNut EmployeePosisitionCode = "nutritionist" // Ahli gizi
|
||||
EPCMwi EmployeePosisitionCode = "mid-wife" // Bidan
|
||||
EPCLab EmployeePosisitionCode = "laborant" // Laboran
|
||||
EPCPha EmployeePosisitionCode = "pharmacy" // Farmasi
|
||||
EPCPay EmployeePosisitionCode = "payment" // Pembayaran
|
||||
EPCHur EmployeePosisitionCode = "human-resource" // Sumber Daya Manusia
|
||||
EPCGea EmployeePosisitionCode = "general-affair" // Bagian Umum
|
||||
EPCMan EmployeePosisitionCode = "management" // Manajemen
|
||||
|
||||
IPCSpecialist = "specialist-intern"
|
||||
IPCNurse = "nurse-intern"
|
||||
|
||||
ITGCInfra ItemGroupCode = "infra"
|
||||
ITGCMedicine ItemGroupCode = "medicine"
|
||||
@@ -30,6 +37,7 @@ const (
|
||||
ITGCMCUSub ItemGroupCode = "mcuSub"
|
||||
ITGCEmpFee ItemGroupCode = "employee-fee"
|
||||
ITGCDocFee ItemGroupCode = "doctor-fee"
|
||||
ITGCMedAct ItemGroupCode = "medical-action"
|
||||
|
||||
IFGCBuilding InfraGroupCode = "building" // Bangunan
|
||||
IFGCFloor InfraGroupCode = "floor" // Lantai
|
||||
|
||||
Reference in New Issue
Block a user