Files
simrsx-be/internal/domain/references/upload/upload.go
T
2025-11-11 11:04:56 +07:00

38 lines
953 B
Go

package upload
type (
UploadCode string
EntityTypeCode string
)
const (
UCPRN UploadCode = "person-resident-number" // Person Resident Number
UCPDL UploadCode = "person-driver-license" // Person Driver License
UCPP UploadCode = "person-passport" // Person Passport
UCPFC UploadCode = "person-family-card" // Person Family Card
UCMIR UploadCode = "mcu-item-result" // Mcu Item Result
UCSEP UploadCode = "vclaim-sep" // SEP
UCSIPP UploadCode = "vclaim-sipp" // SIPP
ETCPerson EntityTypeCode = "person"
ETCEncounter EntityTypeCode = "encounter"
)
var validUploadCodesByEntity = map[EntityTypeCode][]UploadCode{
ETCPerson: {
UCPRN, UCPDL, UCPP, UCPFC, UCMIR,
},
ETCEncounter: {
UCSEP, UCSIPP,
},
}
func IsValidUploadCode(entity EntityTypeCode, code UploadCode) bool {
for _, c := range validUploadCodesByEntity[entity] {
if c == code {
return true
}
}
return false
}