///// <summary>
        ///// Example to return a HttpResult object with a decorated response.
        ///// </summary>
        ///// <param name="request">GetPatientUtilizationRequest</param>
        ///// <returns>object</returns>
        //public object Get(GetPatientUtilizationRequest request)
        //{
        //    GetPatientUtilizationResponse response = null;
        //    ValidateTokenResponse result = null;

        //    try
        //    {
        //        request.Token = base.Request.Headers["Token"] as string;
        //        result = Security.IsUserValidated(request.Version, request.Token, request.ContractNumber);
        //        if (result.UserId.Trim() != string.Empty)
        //        {
        //            request.UserId = result.UserId;
        //            response = UtilManager.GetPatientUtilization(request);
        //        }
        //        else
        //            throw new UnauthorizedAccessException();
        //    }
        //    catch (Exception ex)
        //    {
        //        CommonFormatter.FormatExceptionResponse(response, base.Response, ex);
        //        if ((ex is WebServiceException) == false)
        //            UtilManager.LogException(ex);
        //    }
        //    finally
        //    {
        //        List<string> patientIds = new List<string>();

        //        if (response.Utilization != null)
        //            patientIds.Add(response.Utilization.PatientId);

        //        if (result != null)
        //            AuditHelper.LogAuditData(request, result.SQLUserId, patientIds, HttpContext.Current.Request, request.GetType().Name);
        //    }
        //    return new HttpResult(response, HttpStatusCode.OK)
        //    {
        //        StatusDescription = "this is really cool!",
        //        Location = "www.google.com"
        //    };
        //}

        public GetPatientUtilizationResponse Get(GetPatientUtilizationRequest request)
        {
            GetPatientUtilizationResponse response = null;
            ValidateTokenResponse result = null;

            try
            {
                request.Token = base.Request.Headers["Token"] as string;
                result = Security.IsUserValidated(request.Version, request.Token, request.ContractNumber);
                if (result.UserId.Trim() != string.Empty)
                {
                    request.UserId = result.UserId;
                    response = UtilManager.GetPatientUtilization(request);
                }
                else
                    throw new UnauthorizedAccessException();
            }
            catch (Exception ex)
            {
                CommonFormatter.FormatExceptionResponse(response, base.Response, ex);
                if ((ex is WebServiceException) == false)
                    UtilManager.LogException(ex);
            }
            finally
            {
                List<string> patientIds = new List<string>();

                if (response.Utilization != null)
                    patientIds.Add(response.Utilization.PatientId);

                if (result != null)
                    AuditHelper.LogAuditData(request, result.SQLUserId, patientIds, HttpContext.Current.Request, request.GetType().Name);
            }
            return response;
        }