wip
This commit is contained in:
No files matched your search
@@ -3,14 +3,18 @@ package doctor
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
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 {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
SIP_Number *string `json:"sip_number"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
SIP_Number *string `json:"sip_number"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -20,10 +24,12 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
SIP_Number *string `json:"sip_number" validate:"maxLength=20"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
SIP_Number *string `json:"sip_number" validate:"maxLength=20"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -54,22 +60,30 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
SIP_Number *string `json:"sip_number"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
SIP_Number *string `json:"sip_number"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,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"`
|
||||
}
|
||||
|
||||
func (d Doctor) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
IHS_Number: d.IHS_Number,
|
||||
SIP_Number: d.SIP_Number,
|
||||
Unit_Id: d.Unit_Id,
|
||||
Unit: d.Unit,
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
IHS_Number: d.IHS_Number,
|
||||
SIP_Number: d.SIP_Number,
|
||||
Unit_Id: d.Unit_Id,
|
||||
Unit: d.Unit,
|
||||
Specialist_Id: d.Specialist_Id,
|
||||
Specialist: d.Specialist,
|
||||
Subspecialist_Id: d.Subspecialist_Id,
|
||||
Subspecialist: d.Subspecialist,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -3,15 +3,21 @@ package doctor
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
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 Doctor struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
|
||||
SIP_Number *string `json:"sip_number" gorm:"size:20"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
|
||||
SIP_Number *string `json:"sip_number" gorm:"size:20"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id"`
|
||||
}
|
||||
@@ -4,27 +4,16 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/division"
|
||||
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"
|
||||
eu "simrs-vx/internal/domain/main-entities/user"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
User_Id *uint `json:"user_id"`
|
||||
User *eu.CreateDto `json:"user"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Person *ep.UpdateDto `json:"person"`
|
||||
PersonAddresses []epa.UpdateDto `json:"personAddresses"`
|
||||
PersonContacts []epc.UpdateDto `json:"personContacts"`
|
||||
Position_Code ero.EmployeePosisitionCode `json:"position_code" validate:"maxLength=20"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Number *string `json:"number" validate:"maxLength=20"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
SIP_Number *string `json:"sip_number"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
User_Id *uint `json:"user_id"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Number *string `json:"number" validate:"maxLength=20"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -34,12 +23,11 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
User_Id *uint `json:"user_id"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Position_Code ero.EmployeePosisitionCode `json:"position_code"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Number *string `json:"number"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code"`
|
||||
User_Id *uint `json:"user_id"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Number *string `json:"number"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -70,15 +58,14 @@ 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"`
|
||||
Position_Code ero.EmployeePosisitionCode `json:"position_code"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Division *ed.Division `json:"division,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"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Division *ed.Division `json:"division,omitempty"`
|
||||
Number *string `json:"number"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d Employee) ToResponse() ResponseDto {
|
||||
@@ -87,7 +74,6 @@ func (d Employee) ToResponse() ResponseDto {
|
||||
User: d.User,
|
||||
Person_Id: d.Person_Id,
|
||||
Person: d.Person,
|
||||
Position_Code: d.Position_Code,
|
||||
Division_Code: d.Division_Code,
|
||||
Division: d.Division,
|
||||
Number: d.Number,
|
||||
@@ -104,9 +90,3 @@ func ToResponseList(data []Employee) []ResponseDto {
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
func (c CreateDto) Sanitize() CreateDto {
|
||||
sanitized := c
|
||||
sanitized.User.Password = "[REDACTED]"
|
||||
return sanitized
|
||||
}
|
||||
@@ -6,18 +6,16 @@ import (
|
||||
ep "simrs-vx/internal/domain/main-entities/person"
|
||||
eu "simrs-vx/internal/domain/main-entities/user"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ero "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"`
|
||||
Position_Code ero.EmployeePosisitionCode `json:"position_code" gorm:"not null;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"`
|
||||
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"`
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ep "simrs-vx/internal/domain/main-entities/patient"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
"time"
|
||||
@@ -15,6 +17,8 @@ type CreateDto struct {
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
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"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
Assignment_Doctor_Id *uint `json:"assignment_doctor_id"`
|
||||
Responsible_Doctor_Id *uint `json:"responsible_doctor_id"`
|
||||
@@ -23,9 +27,24 @@ type CreateDto struct {
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Parent_Id *int16 `json:"parent_id"`
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
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"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
Assignment_Doctor_Id *uint `json:"assignment_doctor_id"`
|
||||
Responsible_Doctor_Id *uint `json:"responsible_doctor_id"`
|
||||
DischardeMethod_Code ere.DischargeMethodCode `json:"dischardeMethod_code" validate:"maxLength=10"`
|
||||
RefSource_Name *string `json:"refSource_name" validate:"maxLength=100"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -61,6 +80,10 @@ type ResponseDto struct {
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Class_Code ere.EncounterClassCode `json:"class_code"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
Assignment_Doctor_Id *uint `json:"assignment_doctor_id"`
|
||||
@@ -79,6 +102,10 @@ func (d Encounter) ToResponse() ResponseDto {
|
||||
Class_Code: d.Class_Code,
|
||||
Unit_Id: d.Unit_Id,
|
||||
Unit: d.Unit,
|
||||
Specialist_Id: d.Specialist_Id,
|
||||
Specialist: d.Specialist,
|
||||
Subspecialist_Id: d.Subspecialist_Id,
|
||||
Subspecialist: d.Subspecialist,
|
||||
VisitDate: d.VisitDate,
|
||||
Assignment_Doctor_Id: d.Assignment_Doctor_Id,
|
||||
Assignment_Doctor: d.Assignment_Doctor,
|
||||
|
||||
@@ -4,6 +4,8 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ep "simrs-vx/internal/domain/main-entities/patient"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
"time"
|
||||
@@ -17,6 +19,10 @@ type Encounter struct {
|
||||
Class_Code ere.EncounterClassCode `json:"class_code" gorm:"not null;size:10"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id;references:Id"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
Assignment_Doctor_Id *uint `json:"assignment_doctor_id"`
|
||||
Assignment_Doctor *ed.Doctor `json:"assignment_doctor,omitempty" gorm:"foreignKey:Assignment_Doctor_Id;references:Id"`
|
||||
|
||||
@@ -8,11 +8,15 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" validate:"maxLength=10"`
|
||||
Parent_Id *uint16 `json:"parent_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" validate:"maxLength=10"`
|
||||
Parent_Id *uint16 `json:"parent_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
Infra_Id *uint16 `json:"-"` // for room
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
|
||||
@@ -3,6 +3,7 @@ package nurse
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
ei "simrs-vx/internal/domain/main-entities/infra"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
@@ -10,6 +11,7 @@ type CreateDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -22,6 +24,7 @@ type FilterDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -55,6 +58,8 @@ type ResponseDto struct {
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Infra *ei.Infra `json:"infra,omitempty"`
|
||||
}
|
||||
|
||||
func (d Nurse) ToResponse() ResponseDto {
|
||||
@@ -64,6 +69,8 @@ func (d Nurse) ToResponse() ResponseDto {
|
||||
IHS_Number: d.IHS_Number,
|
||||
Unit_Id: d.Unit_Id,
|
||||
Unit: d.Unit,
|
||||
Infra_Id: d.Infra_Id,
|
||||
Infra: d.Infra,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -3,6 +3,7 @@ package nurse
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
ei "simrs-vx/internal/domain/main-entities/infra"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
@@ -13,4 +14,6 @@ type Nurse struct {
|
||||
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Infra *ei.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Id;references:Id"`
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
epc "simrs-vx/internal/domain/main-entities/person-contact"
|
||||
epr "simrs-vx/internal/domain/main-entities/person-relative"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -28,12 +27,10 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Position_Code ero.EmployeePosisitionCode `json:"position_code"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code"`
|
||||
Number *string `json:"number"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code"`
|
||||
Number *string `json:"number"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
package room
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/infra"
|
||||
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 {
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
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.SmallMain
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Infra *ei.Infra `json:"infra,omitempty"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,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"`
|
||||
}
|
||||
|
||||
func (d Room) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Infra_Id: d.Infra_Id,
|
||||
Infra: d.Infra,
|
||||
Unit_Id: d.Unit_Id,
|
||||
Unit: d.Unit,
|
||||
Specialist_Id: d.Specialist_Id,
|
||||
Specialist: d.Specialist,
|
||||
Subspecialist_Id: d.Subspecialist_Id,
|
||||
Subspecialist: d.Subspecialist,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Room) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package room
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/infra"
|
||||
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 Room struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Infra *ei.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Id"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id"`
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package specialistintern
|
||||
|
||||
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:"-"`
|
||||
}
|
||||
|
||||
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"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
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 SpecialistIntern) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Person_Id: d.Person_Id,
|
||||
Person: d.Person,
|
||||
Specialist_Id: d.Specialist_Id,
|
||||
Specialist: d.Specialist,
|
||||
Subspecialist_Id: d.Subspecialist_Id,
|
||||
Subspecialist: d.Subspecialist,
|
||||
User_Id: d.User_Id,
|
||||
User: d.User,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []SpecialistIntern) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package specialistintern
|
||||
|
||||
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 SpecialistIntern 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"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id"`
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id"`
|
||||
User_Id *uint `json:"user_id"`
|
||||
User *eu.User `json:"user,omitempty" gorm:"foreignKey:User_Id"`
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package specialist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
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.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
}
|
||||
|
||||
func (d Specialist) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Unit_Id: d.Unit_Id,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Specialist) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package specialist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type Specialist struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id"`
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package subspecialist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code *string `json:"code"`
|
||||
Name *string `json:"name"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
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.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
}
|
||||
|
||||
func (d Subspecialist) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Specialist_Id: d.Specialist_Id,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Subspecialist) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package subspecialist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
)
|
||||
|
||||
type Subspecialist struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id"`
|
||||
}
|
||||
@@ -3,12 +3,14 @@ package unit
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/installation"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type Unit struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Installation_Id *uint16 `json:"installation_id"`
|
||||
Installation *ei.Installation `json:"installation" gorm:"foreignKey:Installation_Id"`
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Installation_Id *uint16 `json:"installation_id"`
|
||||
Installation *ei.Installation `json:"installation" gorm:"foreignKey:Installation_Id"`
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Type_Code *ero.UnitTypeCode `json:"type_code"`
|
||||
}
|
||||
@@ -2,14 +2,30 @@ package user
|
||||
|
||||
import (
|
||||
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"
|
||||
"time"
|
||||
)
|
||||
|
||||
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"`
|
||||
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"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -68,6 +84,15 @@ func (d *User) ToResponse() ResponseDto {
|
||||
return resp
|
||||
}
|
||||
|
||||
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"`
|
||||
}
|
||||
|
||||
func ToResponseList(data []User) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
|
||||
@@ -3,16 +3,18 @@ package user
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
"time"
|
||||
)
|
||||
|
||||
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"`
|
||||
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"`
|
||||
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"`
|
||||
}
|
||||
@@ -1,22 +1,23 @@
|
||||
package organization
|
||||
|
||||
type (
|
||||
EmployeePosisitionCode string
|
||||
ItemGroupCode string
|
||||
InfraGroupCode string
|
||||
UnitTypeCode string
|
||||
DoctorFeeTypeCode string
|
||||
UserPosisitionCode string
|
||||
ItemGroupCode string
|
||||
InfraGroupCode string
|
||||
UnitTypeCode string
|
||||
DoctorFeeTypeCode string
|
||||
)
|
||||
|
||||
const (
|
||||
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
|
||||
UPCDoc UserPosisitionCode = "doctor" // Dokter
|
||||
UPCNur UserPosisitionCode = "nurse" // Perawat
|
||||
UPCNut UserPosisitionCode = "nutritionist" // Ahli gizi
|
||||
UPCLab UserPosisitionCode = "laborant" // Laboran
|
||||
UPCPha UserPosisitionCode = "pharmacy" // Farmasi
|
||||
UPCPay UserPosisitionCode = "payment" // Pembayaran
|
||||
UPCPav UserPosisitionCode = "payment-verificator" // Konfirmasi pembayaran
|
||||
UPCMan UserPosisitionCode = "management" // Manajemen
|
||||
UPCInt UserPosisitionCode = "specialist-intern" // PPDS
|
||||
|
||||
ITGCInfra ItemGroupCode = "infra"
|
||||
ITGCMedicine ItemGroupCode = "medicine"
|
||||
|
||||
@@ -111,180 +111,180 @@ const (
|
||||
RCOther RelationshipCode = "other" // Lainnya
|
||||
)
|
||||
|
||||
func GetGenderCodes() map[GenderCode]string {
|
||||
return map[GenderCode]string{
|
||||
GCMale: "Laki-laki",
|
||||
GCFemale: "Perempuan",
|
||||
GCNotStated: "Tidak disebutkan",
|
||||
GCUnknown: "Tidak diketahui",
|
||||
}
|
||||
}
|
||||
// func GetGenderCodes() map[GenderCode]string {
|
||||
// return map[GenderCode]string{
|
||||
// GCMale: "Laki-laki",
|
||||
// GCFemale: "Perempuan",
|
||||
// GCNotStated: "Tidak disebutkan",
|
||||
// GCUnknown: "Tidak diketahui",
|
||||
// }
|
||||
// }
|
||||
|
||||
func GetBloodTypeCodes() map[BloodTypeCode]string {
|
||||
return map[BloodTypeCode]string{
|
||||
BTCAPositive: "A Positive",
|
||||
BTCANegative: "A Negative",
|
||||
BTCABPositive: "AB Positive",
|
||||
BTCABNegative: "AB Negative",
|
||||
BTCBPositive: "B Positive",
|
||||
BTCBNegative: "B Negative",
|
||||
BTCOPositive: "O Positive",
|
||||
BTCONegative: "O Negative",
|
||||
}
|
||||
}
|
||||
// func GetBloodTypeCodes() map[BloodTypeCode]string {
|
||||
// return map[BloodTypeCode]string{
|
||||
// BTCAPositive: "A Positive",
|
||||
// BTCANegative: "A Negative",
|
||||
// BTCABPositive: "AB Positive",
|
||||
// BTCABNegative: "AB Negative",
|
||||
// BTCBPositive: "B Positive",
|
||||
// BTCBNegative: "B Negative",
|
||||
// BTCOPositive: "O Positive",
|
||||
// BTCONegative: "O Negative",
|
||||
// }
|
||||
// }
|
||||
|
||||
func GetMaritalStatusCodes() map[MaritalStatusCode]string {
|
||||
return map[MaritalStatusCode]string{
|
||||
MSCBelumKawin: "Belum Kawin",
|
||||
MSCKawin: "Kawin",
|
||||
MSCCeraiHidup: "Cerai Hidup",
|
||||
MSCCeraiMati: "Cerai Mati",
|
||||
}
|
||||
}
|
||||
// func GetMaritalStatusCodes() map[MaritalStatusCode]string {
|
||||
// return map[MaritalStatusCode]string{
|
||||
// MSCBelumKawin: "Belum Kawin",
|
||||
// MSCKawin: "Kawin",
|
||||
// MSCCeraiHidup: "Cerai Hidup",
|
||||
// MSCCeraiMati: "Cerai Mati",
|
||||
// }
|
||||
// }
|
||||
|
||||
func GetReligionCodes() map[ReligionCode]string {
|
||||
return map[ReligionCode]string{
|
||||
RCIslam: "Islam",
|
||||
RCProtestan: "Kristen (Protestan)",
|
||||
RCKatolik: "Katolik",
|
||||
RCHindu: "Hindu",
|
||||
RCBudha: "Budha",
|
||||
RCKonghucu: "Konghucu",
|
||||
}
|
||||
}
|
||||
// func GetReligionCodes() map[ReligionCode]string {
|
||||
// return map[ReligionCode]string{
|
||||
// RCIslam: "Islam",
|
||||
// RCProtestan: "Kristen (Protestan)",
|
||||
// RCKatolik: "Katolik",
|
||||
// RCHindu: "Hindu",
|
||||
// RCBudha: "Budha",
|
||||
// RCKonghucu: "Konghucu",
|
||||
// }
|
||||
// }
|
||||
|
||||
func GetEducationCodes() map[EducationCode]string {
|
||||
return map[EducationCode]string{
|
||||
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 GetEducationCodes() map[EducationCode]string {
|
||||
// return map[EducationCode]string{
|
||||
// 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 GetOcupationCodes() map[OcupationCode]string {
|
||||
return map[OcupationCode]string{
|
||||
OCTidakBekerja: "Tidak Bekerja",
|
||||
OCPns: "PNS",
|
||||
OCTniPolisi: "Polisi",
|
||||
OCTni: "TNI",
|
||||
OCGuru: "Guru",
|
||||
OCWiraswasta: "Wiraswasta",
|
||||
OCKarySwasta: "Kary Swasta",
|
||||
OCLainlain: "Lain-lain",
|
||||
}
|
||||
}
|
||||
// func GetOcupationCodes() map[OcupationCode]string {
|
||||
// return map[OcupationCode]string{
|
||||
// OCTidakBekerja: "Tidak Bekerja",
|
||||
// OCPns: "PNS",
|
||||
// OCTniPolisi: "Polisi",
|
||||
// OCTni: "TNI",
|
||||
// OCGuru: "Guru",
|
||||
// OCWiraswasta: "Wiraswasta",
|
||||
// OCKarySwasta: "Kary Swasta",
|
||||
// OCLainlain: "Lain-lain",
|
||||
// }
|
||||
// }
|
||||
|
||||
func GetAgeGroupCodes() map[AgeGroupCode]string {
|
||||
return map[AgeGroupCode]string{
|
||||
AGCEUnknown: "unknown",
|
||||
AGCLTE5: "<=5",
|
||||
AGCEU19: "6-19",
|
||||
AGCEU29: "20-29",
|
||||
AGCEU39: "30-39",
|
||||
AGCEU49: "40-49",
|
||||
AGCEU59: "50-59",
|
||||
AGCGE60: ">=60",
|
||||
}
|
||||
}
|
||||
// func GetAgeGroupCodes() map[AgeGroupCode]string {
|
||||
// return map[AgeGroupCode]string{
|
||||
// AGCEUnknown: "unknown",
|
||||
// AGCLTE5: "<=5",
|
||||
// AGCEU19: "6-19",
|
||||
// AGCEU29: "20-29",
|
||||
// AGCEU39: "30-39",
|
||||
// AGCEU49: "40-49",
|
||||
// AGCEU59: "50-59",
|
||||
// AGCGE60: ">=60",
|
||||
// }
|
||||
// }
|
||||
|
||||
func GetAgeGroupForMedicineCodes() map[AgeGroupForMedicineCode]string {
|
||||
return map[AgeGroupForMedicineCode]string{
|
||||
AGMCNew: "new-born",
|
||||
AGMCInfant: "infant",
|
||||
AGMCToddler: "toddler",
|
||||
AGMCKid: "kid",
|
||||
AGMCAdult: "adult",
|
||||
}
|
||||
}
|
||||
// func GetAgeGroupForMedicineCodes() map[AgeGroupForMedicineCode]string {
|
||||
// return map[AgeGroupForMedicineCode]string{
|
||||
// AGMCNew: "new-born",
|
||||
// AGMCInfant: "infant",
|
||||
// AGMCToddler: "toddler",
|
||||
// AGMCKid: "kid",
|
||||
// AGMCAdult: "adult",
|
||||
// }
|
||||
// }
|
||||
|
||||
func GetRelativeCodes() map[RelativeCode]string {
|
||||
return map[RelativeCode]string{
|
||||
RCMSuami: "Suami",
|
||||
RCMIstri: "Istri",
|
||||
RCMAnak: "Anak",
|
||||
RCMMenantu: "Menantu",
|
||||
RCMCucu: "Cucu",
|
||||
RCMOrangTua: "Orang Tua",
|
||||
RCMMertua: "Mertua",
|
||||
RCMAdik: "Adik",
|
||||
RCMKeponakan: "Keponakan",
|
||||
RCMKakak: "Kakak",
|
||||
RCMPaman: "Paman",
|
||||
RCMBibi: "Bibi",
|
||||
RCMPamanKakek: "Kakek",
|
||||
RCMPamanNenek: "Nenek",
|
||||
}
|
||||
}
|
||||
// func GetRelativeCodes() map[RelativeCode]string {
|
||||
// return map[RelativeCode]string{
|
||||
// RCMSuami: "Suami",
|
||||
// RCMIstri: "Istri",
|
||||
// RCMAnak: "Anak",
|
||||
// RCMMenantu: "Menantu",
|
||||
// RCMCucu: "Cucu",
|
||||
// RCMOrangTua: "Orang Tua",
|
||||
// RCMMertua: "Mertua",
|
||||
// RCMAdik: "Adik",
|
||||
// RCMKeponakan: "Keponakan",
|
||||
// RCMKakak: "Kakak",
|
||||
// RCMPaman: "Paman",
|
||||
// RCMBibi: "Bibi",
|
||||
// RCMPamanKakek: "Kakek",
|
||||
// RCMPamanNenek: "Nenek",
|
||||
// }
|
||||
// }
|
||||
|
||||
func GetContactTypeCodes() map[ContactTypeCode]string {
|
||||
return map[ContactTypeCode]string{
|
||||
CTPhone: "Telepon",
|
||||
CTMPhone: "Telepon Seluler",
|
||||
CTEmail: "Email",
|
||||
CTFax: "Fax",
|
||||
}
|
||||
}
|
||||
// func GetContactTypeCodes() map[ContactTypeCode]string {
|
||||
// return map[ContactTypeCode]string{
|
||||
// CTPhone: "Telepon",
|
||||
// CTMPhone: "Telepon Seluler",
|
||||
// CTEmail: "Email",
|
||||
// CTFax: "Fax",
|
||||
// }
|
||||
// }
|
||||
|
||||
func GetRelationshipCodes() map[RelationshipCode]string {
|
||||
return map[RelationshipCode]string{
|
||||
RCMother: "Ibu",
|
||||
RCFather: "Ayah",
|
||||
RCUncle: "Paman",
|
||||
RCAunt: "Bibi",
|
||||
RCSibling: "Saudara",
|
||||
RCGdMother: "Nenek",
|
||||
RCGdFather: "Kakek",
|
||||
RCChild: "Anak",
|
||||
RCNephew: "Keponakan",
|
||||
RCGdChild: "Cucu",
|
||||
RCOther: "Lainnya",
|
||||
}
|
||||
}
|
||||
// func GetRelationshipCodes() map[RelationshipCode]string {
|
||||
// return map[RelationshipCode]string{
|
||||
// RCMother: "Ibu",
|
||||
// RCFather: "Ayah",
|
||||
// RCUncle: "Paman",
|
||||
// RCAunt: "Bibi",
|
||||
// RCSibling: "Saudara",
|
||||
// RCGdMother: "Nenek",
|
||||
// RCGdFather: "Kakek",
|
||||
// RCChild: "Anak",
|
||||
// RCNephew: "Keponakan",
|
||||
// RCGdChild: "Cucu",
|
||||
// RCOther: "Lainnya",
|
||||
// }
|
||||
// }
|
||||
|
||||
func (obj GenderCode) String() string {
|
||||
return GetGenderCodes()[obj]
|
||||
}
|
||||
// func (obj GenderCode) String() string {
|
||||
// return GetGenderCodes()[obj]
|
||||
// }
|
||||
|
||||
func (obj BloodTypeCode) String() string {
|
||||
return GetBloodTypeCodes()[obj]
|
||||
}
|
||||
// func (obj BloodTypeCode) String() string {
|
||||
// return GetBloodTypeCodes()[obj]
|
||||
// }
|
||||
|
||||
func (obj MaritalStatusCode) String() string {
|
||||
return GetMaritalStatusCodes()[obj]
|
||||
}
|
||||
// func (obj MaritalStatusCode) String() string {
|
||||
// return GetMaritalStatusCodes()[obj]
|
||||
// }
|
||||
|
||||
func (obj ReligionCode) String() string {
|
||||
return GetReligionCodes()[obj]
|
||||
}
|
||||
func (obj EducationCode) String() string {
|
||||
return GetEducationCodes()[obj]
|
||||
}
|
||||
// func (obj ReligionCode) String() string {
|
||||
// return GetReligionCodes()[obj]
|
||||
// }
|
||||
// func (obj EducationCode) String() string {
|
||||
// return GetEducationCodes()[obj]
|
||||
// }
|
||||
|
||||
func (obj OcupationCode) String() string {
|
||||
return GetOcupationCodes()[obj]
|
||||
}
|
||||
// func (obj OcupationCode) String() string {
|
||||
// return GetOcupationCodes()[obj]
|
||||
// }
|
||||
|
||||
func (obj AgeGroupCode) String() string {
|
||||
return GetAgeGroupCodes()[obj]
|
||||
}
|
||||
// func (obj AgeGroupCode) String() string {
|
||||
// return GetAgeGroupCodes()[obj]
|
||||
// }
|
||||
|
||||
func (obj RelativeCode) String() string {
|
||||
return GetRelativeCodes()[obj]
|
||||
}
|
||||
// func (obj RelativeCode) String() string {
|
||||
// return GetRelativeCodes()[obj]
|
||||
// }
|
||||
|
||||
func (obj ContactTypeCode) String() string {
|
||||
return GetContactTypeCodes()[obj]
|
||||
}
|
||||
// func (obj ContactTypeCode) String() string {
|
||||
// return GetContactTypeCodes()[obj]
|
||||
// }
|
||||
|
||||
func (obj RelationshipCode) String() string {
|
||||
return GetRelationshipCodes()[obj]
|
||||
}
|
||||
// func (obj RelationshipCode) String() string {
|
||||
// return GetRelationshipCodes()[obj]
|
||||
// }
|
||||
Reference in New Issue
Block a user