public HttpResponseMessage GetContactLensRxById(string officeNumber, int patientId, int examId, bool isRecheck)
        {
            try
            {
                AccessControl.VerifyUserAccessToPatient(patientId);
                PatientContactLensRxLite patientContactLensRx = this.it2Soft.GetContactLensRxById(
                    officeNumber,
                    patientId,
                    examId,
                    isRecheck);

                if (patientContactLensRx != null)
                {
                    var requestMessage = new List <KeyValuePair <int, DateTime> > {
                        new KeyValuePair <int, DateTime>(examId, DateTime.UtcNow)
                    };
                    MessageTracking.SignalAlSupportTracking(requestMessage, "Viewed");
                }

                return(patientContactLensRx != null?this.Request.CreateResponse(HttpStatusCode.OK, patientContactLensRx) : this.Request.CreateResponse(HttpStatusCode.NoContent));
            }
            catch (Exception ex)
            {
                var error = "GetContactLensRxById(examId=" + examId + ", patientId=" + patientId + ")\n" + ex;
                return(HandleExceptions.LogExceptions(error, Logger, ex));
            }
        }
        /// <summary>
        /// The put.
        /// </summary>
        /// <param name="officeNumber">
        /// The office number.
        /// </param>
        /// <param name="patientContactLensRx">
        /// The patient contact lens rx.
        /// </param>
        /// <returns>
        /// The <see cref="string"/>.
        /// </returns>
        public HttpResponseMessage Put(string officeNumber, [FromBody] PatientContactLensRxLite patientContactLensRx)
        {
            if (patientContactLensRx == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NotFound, string.Empty));
            }

            try
            {
                AccessControl.VerifyUserAccessToPatient(patientContactLensRx.PatientId);
                var result = this.it2Soft.SaveExam(officeNumber, patientContactLensRx);
                return(Request.CreateResponse(HttpStatusCode.OK, result));
            }
            catch (Exception ex)
            {
                var error = string.Format("Put(patientId = {0}, examId = {1} {2} {3} )", patientContactLensRx.PatientId, patientContactLensRx.ExamId, "\n", ex);
                return(HandleExceptions.LogExceptions(error, Logger, ex));
            }
        }