public void GetCurrentPatientObservation_Test() { GetCurrentPatientObservationsRequest request = new GetCurrentPatientObservationsRequest { ContractNumber = contract, PatientId = "5323762f231e250d5c0c62a7", UserId = userId, Version = version }; ObservationsManager oManager = new ObservationsManager(); GetCurrentPatientObservationsResponse response = oManager.GetCurrentPatientObservations(request); Assert.IsNotNull(response); }
public GetCurrentPatientObservationsResponse GetCurrentPatientObservations(GetCurrentPatientObservationsRequest request) { try { GetCurrentPatientObservationsResponse response = new GetCurrentPatientObservationsResponse(); List <PatientObservationData> po = (List <PatientObservationData>)ObservationEndpointUtil.GetCurrentPatientObservations(request); response.PatientObservations = ObservationsUtil.GetPatientObservations(po); response.Version = request.Version; return(response); } catch (Exception ex) { throw new Exception("AD:GetStandardObservationsRequest()::" + ex.Message, ex.InnerException); } }
public GetCurrentPatientObservationsResponse Get(GetCurrentPatientObservationsRequest request) { GetCurrentPatientObservationsResponse response = new GetCurrentPatientObservationsResponse(); ObservationsManager om = new ObservationsManager(); 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 = om.GetCurrentPatientObservations(request); } else { throw new UnauthorizedAccessException(); } } catch (Exception ex) { CommonFormatter.FormatExceptionResponse(response, base.Response, ex); if ((ex is WebServiceException) == false) { om.LogException(ex); } } finally { List <string> patientIds = new List <string>(); patientIds.Add(request.PatientId); if (result != null) { AuditHelper.LogAuditData(request, result.SQLUserId, patientIds, System.Web.HttpContext.Current.Request, request.GetType().Name); } } return(response); }