Files
simrsx-be/internal/domain/references/person/person.go
T
2025-08-27 15:38:00 +07:00

276 lines
6.8 KiB
Go

package person
type (
GenderCode string
BloodTypeCode string
MaritalStatusCode string
ReligionCode string
EducationCode string
OcupationCode string
AgeGroupCode string
AgeGroupForMedicineCode string
RelativeCode string
ContactTypeCode string
)
const (
GCMale GenderCode = "male"
GCFemale GenderCode = "female"
GCNotStated GenderCode = "not-stated"
GCUnknown GenderCode = "unknown"
)
const (
BTCAPositive BloodTypeCode = "A+"
BTCANegative BloodTypeCode = "A-"
BTCBPositive BloodTypeCode = "B+"
BTCBNegative BloodTypeCode = "B-"
BTCABPositive BloodTypeCode = "AB+"
BTCABNegative BloodTypeCode = "AB-"
BTCOPositive BloodTypeCode = "O+"
BTCONegative BloodTypeCode = "O-"
)
const (
MSCBelumKawin MaritalStatusCode = "S"
MSCKawin MaritalStatusCode = "M"
MSCCeraiHidup MaritalStatusCode = "D"
MSCCeraiMati MaritalStatusCode = "W"
)
const (
RCIslam ReligionCode = "islam"
RCProtestan ReligionCode = "protestan"
RCKatolik ReligionCode = "katolik"
RCHindu ReligionCode = "hindu"
RCBudha ReligionCode = "budha"
RCKonghucu ReligionCode = "konghucu"
)
const (
ECTidakSekolah EducationCode = "TS"
ECTK EducationCode = "TK"
ECSD EducationCode = "SD"
ECSLTP EducationCode = "SMP"
ECSLTA EducationCode = "SMA"
ECD1 EducationCode = "D1"
ECD2 EducationCode = "D2"
ECD3 EducationCode = "D3"
ECD4 EducationCode = "D4"
ECS1 EducationCode = "S1"
ECS2 EducationCode = "S2"
ECS3 EducationCode = "S3"
)
const (
OCTidakBekerja OcupationCode = "tidak-bekerja"
OCPns OcupationCode = "pns"
OCTniPolisi OcupationCode = "polisi"
OCTni OcupationCode = "tni"
OCGuru OcupationCode = "guru"
OCWiraswasta OcupationCode = "wiraswasta"
OCKarySwasta OcupationCode = "kary-swasta"
OCLainlain OcupationCode = "lainnya"
)
const (
AGCEUnknown AgeGroupCode = "unkown"
AGCLTE5 AgeGroupCode = "LT5"
AGCEU19 AgeGroupCode = "UE19"
AGCEU29 AgeGroupCode = "UE29"
AGCEU39 AgeGroupCode = "UE39"
AGCEU49 AgeGroupCode = "UE49"
AGCEU59 AgeGroupCode = "UE50"
AGCGE60 AgeGroupCode = "E60"
)
const (
AGMCNew AgeGroupForMedicineCode = "new-born"
AGMCInfant AgeGroupForMedicineCode = "infant"
AGMCToddler AgeGroupForMedicineCode = "toddler"
AGMCKid AgeGroupForMedicineCode = "kid"
AGMCAdult AgeGroupForMedicineCode = "adult"
)
const (
RCMSuami RelativeCode = "suami"
RCMIstri RelativeCode = "istri"
RCMAnak RelativeCode = "anak"
RCMMenantu RelativeCode = "menantu"
RCMCucu RelativeCode = "cucu"
RCMOrangTua RelativeCode = "orang-tua"
RCMMertua RelativeCode = "mertua"
RCMAdik RelativeCode = "adik"
RCMKeponakan RelativeCode = "keponakan"
RCMKakak RelativeCode = "kakak"
RCMPaman RelativeCode = "paman"
RCMBibi RelativeCode = "bibi"
RCMPamanKakek RelativeCode = "kakek"
RCMPamanNenek RelativeCode = "nenek"
)
const (
CTPhone ContactTypeCode = "phone"
CTMPhone ContactTypeCode = "m-phone"
CTEmail ContactTypeCode = "email"
CTFax ContactTypeCode = "fax"
)
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 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 GetEducationCodes() map[EducationCode]string {
return map[EducationCode]string{
ECTidakSekolah: "Tidak Sekolah",
ECTK: "TK",
ECSD: "SD",
ECSLTP: "SMP sederajat",
ECSLTA: "SMP sederajat",
ECD1: "D1 sederajat",
ECD2: "D2 sederajat",
ECD3: "D3 sederajat",
ECD4: "D4 sederajat",
ECS1: "S1",
ECS2: "S3",
ECS3: "S3",
}
}
func GetProfessions() 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 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 GetContactTypeCodes() map[ContactTypeCode]string {
return map[ContactTypeCode]string{
CTPhone: "Telepon",
CTMPhone: "Telepon Seluler",
CTEmail: "Email",
CTFax: "Fax",
}
}
func (obj GenderCode) String() string {
return GetGenderCodes()[obj]
}
func (obj BloodTypeCode) String() string {
return GetBloodTypeCodes()[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 OcupationCode) String() string {
return GetProfessions()[obj]
}
func (obj AgeGroupCode) String() string {
return GetAgeGroupCodes()[obj]
}
func (obj RelativeCode) String() string {
return GetRelativeCodes()[obj]
}
func (obj ContactTypeCode) String() string {
return GetContactTypeCodes()[obj]
}