public HttpResponseMessage GetHardContactLensRxById(string officeNumber, int patientId, int examId, bool isRecheck) { try { PatientHardContactLens patientContactLensRx = this.it2Hard.GetHardContactLensRxById(officeNumber, patientId, examId, isRecheck); return(patientContactLensRx != null ? this.Request.CreateResponse(HttpStatusCode.OK, patientContactLensRx) : this.Request.CreateResponse(HttpStatusCode.NoContent)); } catch (Exception ex) { var error = "GetHardContactLensRxById(examId=" + examId + ", officeNumber=" + officeNumber + ")\n" + ex; return(HandleExceptions.LogExceptions(error, Logger, ex)); } }
public HttpResponseMessage SaveHardContactLensRx(string officeNumber, [FromBody] PatientHardContactLens patientHardContactLensRx) { if (patientHardContactLensRx == null) { return(Request.CreateResponse(HttpStatusCode.NotFound, string.Empty)); } try { AccessControl.VerifyUserAccessToPatient(patientHardContactLensRx.PatientId); var result = this.it2Hard.SaveHardClExam(officeNumber, patientHardContactLensRx); return(Request.CreateResponse(HttpStatusCode.OK, result)); } catch (Exception ex) { var error = string.Format("Put(patientId = {0}, examId = {1} {2} {3} )", patientHardContactLensRx.PatientId, patientHardContactLensRx.ExamId, "\n", ex); return(HandleExceptions.LogExceptions(error, Logger, ex)); } }