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); }