sync encounter

This commit is contained in:
vanilia
2025-11-26 18:58:20 +07:00
28 changed files with 935 additions and 107 deletions
@@ -60,6 +60,14 @@ func validateRequestCheckIn(w http.ResponseWriter, i e.CheckinDto) (valid bool)
func validateRequestSwitchUnit(w http.ResponseWriter, i e.SwitchUnitDto) (valid bool) {
// validate poly-switch-code
if i.PolySwitchCode == nil {
rw.DataResponse(w, nil, d.FieldError{
Code: dataValidationFail,
Message: fmt.Sprintf("polySwitchCode required"),
})
return
}
if *i.PolySwitchCode != ere.PSCConsulPoly && *i.PolySwitchCode != ere.PSCConsulExecutive {
rw.DataResponse(w, nil, d.FieldError{
Code: dataValidationFail,