refactor/unit-dropping: perbaikan
This commit is contained in:
@@ -26,14 +26,15 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code *string `json:"code"`
|
||||
Employee_Id *uint `json:"employee-id"`
|
||||
IHS_Number *string `json:"ihs-number" validate:"maxLength=20"`
|
||||
SIP_Number *string `json:"sip-number" validate:"maxLength=20"`
|
||||
SIP_ExpiredDate *string `json:"sip-expiredDate"`
|
||||
Unit_Code *string `json:"unit-code"`
|
||||
Specialist_Code *string `json:"specialist-code"`
|
||||
Subspecialist_Code *string `json:"subspecialist-code"`
|
||||
Code *string `json:"code"`
|
||||
Employee_Id *uint `json:"employee-id"`
|
||||
IHS_Number *string `json:"ihs-number" validate:"maxLength=20"`
|
||||
SIP_Number *string `json:"sip-number" validate:"maxLength=20"`
|
||||
SIP_ExpiredDate *string `json:"sip-expiredDate"`
|
||||
Unit_Code *string `json:"unit-code"`
|
||||
Specialist_Code *string `json:"specialist-code"`
|
||||
Specialist_Code_Opt *string `json:"specialist-code-opt"`
|
||||
Subspecialist_Code *string `json:"subspecialist-code"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
|
||||
@@ -105,6 +105,7 @@ type FilterDto struct {
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Class_Code ere.EncounterClassCode `json:"class-code" validate:"maxLength=10"`
|
||||
Specialist_Code *string `json:"specialist-code"`
|
||||
Specialist_Code_Opt *string `json:"specialist-code-opt"`
|
||||
Subspecialist_Code *string `json:"subspecialist-code"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
Appoinment_Doctor_Code *string `json:"appointment-doctor-code"`
|
||||
|
||||
@@ -70,7 +70,7 @@ const (
|
||||
OCCHcu OutpatientClassCode = "hcu" // HCU
|
||||
OCCVk OutpatientClassCode = "vk" // Verlos kamer
|
||||
|
||||
ACCReg AmbulatoryClassCode = "reg" // Regular
|
||||
ACCReg AmbulatoryClassCode = "regular" // Regular
|
||||
// ACCRehab ACCRme AmbulatoryClassCode = "rme" // Rehab Medik
|
||||
// ACCCad AmbulatoryClassCode = "chemo-adm" // Chemotherapy
|
||||
// ACCCac AmbulatoryClassCode = "chemo-act" // Chemotherapy
|
||||
|
||||
@@ -83,15 +83,17 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.En
|
||||
tx = tx.Where("\"Encounter\".\"Status_Code\" = ?", *input.Status_Code)
|
||||
}
|
||||
|
||||
if input.Specialist_Code != nil {
|
||||
tx = tx.Where("\"Encounter\".\"Specialist_Code\" = ?", *input.Specialist_Code)
|
||||
}
|
||||
// if input.Specialist_Code != nil {
|
||||
// tx = tx.Where("\"Encounter\".\"Specialist_Code\" = ?", *input.Specialist_Code)
|
||||
// }
|
||||
|
||||
if input.PaymentMethod_Code != nil {
|
||||
tx = tx.Where("\"Encounter\".\"PaymentMethod_Code\" = ?", *input.PaymentMethod_Code)
|
||||
}
|
||||
|
||||
tx = tx.Scopes(gh.Preload(input.Includes)).
|
||||
tx = tx.Debug().
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Scopes(gh.Preload(input.Includes)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
|
||||
Reference in New Issue
Block a user