on going chemo plan

This commit is contained in:
vanilia
2025-12-12 10:12:53 +07:00
parent e46cdb7835
commit 6daa97459b
2 changed files with 1 additions and 26 deletions

View File

@@ -338,29 +338,3 @@ func (obj myBase) CreateWithPatient(w http.ResponseWriter, r *http.Request) {
res, err := u.CreateWithPatient(dto)
rw.DataResponse(w, res, err)
}
func (obj myBase) CreateWithPatient(w http.ResponseWriter, r *http.Request) {
authInfo, err := pa.GetAuthInfo(r)
if err != nil {
rw.WriteJSON(w, http.StatusUnauthorized, d.IS{"message": err.Error()}, nil)
}
dto := e.CreateWithPatientDto{}
if res := rw.ValidateStructByIOR(w, r.Body, &dto); !res {
return
}
// validate SubClass
if err := verifyClassCode(dto.Encounter); err != nil {
rw.DataResponse(w, nil, d.FieldError{
Code: dataValidationFail,
Message: err.Error(),
})
return
}
dto.Encounter.AuthInfo = *authInfo
dto.Patient.AuthInfo = *authInfo
res, err := u.CreateWithPatient(dto)
rw.DataResponse(w, res, err)
}

View File

@@ -330,6 +330,7 @@ func Verify(input e.VerifyDto) (*d.Data, error) {
})
if err != nil {
return nil, err
}
return &d.Data{