remove several ids and fix constraint
This commit is contained in:
@@ -47,10 +47,10 @@ func validateRequestCheckout(w http.ResponseWriter, i e.DischargeDto) (valid boo
|
||||
}
|
||||
|
||||
func validateRequestCheckIn(w http.ResponseWriter, i e.CheckinDto) (valid bool) {
|
||||
if i.Responsible_Doctor_Id == nil {
|
||||
if i.Responsible_Doctor_Code == nil {
|
||||
rw.DataResponse(w, nil, d.FieldError{
|
||||
Code: dataValidationFail,
|
||||
Message: "responsible_doctor_id required",
|
||||
Message: "responsible_doctor_code required",
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -68,18 +68,18 @@ func validateRequestSwitchUnit(w http.ResponseWriter, i e.SwitchUnitDto) (valid
|
||||
}
|
||||
|
||||
for _, v := range *i.InternalReferences {
|
||||
if v.Unit_Id == nil {
|
||||
if v.Unit_Code == nil {
|
||||
rw.DataResponse(w, nil, d.FieldError{
|
||||
Code: dataValidationFail,
|
||||
Message: "internalReferences.unit_id required",
|
||||
Message: "internalReferences.unit_code required",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if v.Doctor_Id == nil {
|
||||
if v.Doctor_Code == nil {
|
||||
rw.DataResponse(w, nil, d.FieldError{
|
||||
Code: dataValidationFail,
|
||||
Message: "internalReferences.doctor_id required",
|
||||
Message: "internalReferences.doctor_code required",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user