public ResponsePatient Get(string identification) { ResponsePatient ans = null; try { if (ValidateSecurityAPI()) { ans = PatientModel.GetPatient(identification); } else { ans = new ResponsePatient() { IsSuccessful = false, ResponseMessage = AppManagement.MSG_API_Validation_Failure }; } } catch (Exception ex) { ans = new ResponsePatient() { IsSuccessful = false, ResponseMessage = AppManagement.MSG_GenericExceptionError }; } return(ans); }
public Response SavePatient([FromBody] PatientModel patientModel) { Response ans = null; try { if (ValidateSecurityAPI()) { if (patientModel.IsNotNull()) { ans = PatientModel.SavePatient(patientModel); } } else { ans = new ResponsePatient() { IsSuccessful = false, ResponseMessage = AppManagement.MSG_API_Validation_Failure }; } } catch (Exception ex) { ans = new ResponsePatient() { IsSuccessful = false, ResponseMessage = AppManagement.MSG_SaveTreatment_Duplicate }; } return(ans); }