public void GetPatientObservationByID_Test()
        {
            GetPatientObservationRequest request = new GetPatientObservationRequest
            {
                Context        = "NG",
                ContractNumber = "InHealth001",
                ObservationID  = "533ed16dd4332307bc592baf",
                PatientId      = "5325db5ed6a4850adcbba912",
                UserId         = "000000000000000000000000",
                Version        = 1.0
            };
            GetPatientObservationResponse response = new PatientObservationDataManager().GetPatientObservationByID(request);

            Assert.IsNotNull(response);
        }
Exemple #2
0
        public GetPatientObservationResponse GetPatientObservationByID(GetPatientObservationRequest request)
        {
            try
            {
                GetPatientObservationResponse result = new GetPatientObservationResponse();

                IPatientObservationRepository repo = Factory.GetRepository(request, RepositoryType.PatientObservation);

                PatientObservationData data = repo.FindByObservationID(request.ObservationID, request.PatientId) as PatientObservationData;

                result.PatientObservation = data;

                return(result);
            }
            catch (Exception ex)
            {
                throw new Exception("DD.DataPatientObservationManager:GetPatientObservationByID()::" + ex.Message, ex.InnerException);
            }
        }
        public GetPatientObservationResponse Get(GetPatientObservationRequest request)
        {
            GetPatientObservationResponse response = new GetPatientObservationResponse();

            try
            {
                if (string.IsNullOrEmpty(request.UserId))
                {
                    throw new UnauthorizedAccessException("PatientObservationDD:Get()::Unauthorized Access");
                }

                response         = Omgr.GetPatientObservationByID(request);
                response.Version = request.Version;
            }
            catch (Exception ex)
            {
                CommonFormatter.FormatExceptionResponse(response, base.Response, ex);

                string aseProcessID = ConfigurationManager.AppSettings.Get("ASEProcessID") ?? "0";
                Common.Helper.LogException(int.Parse(aseProcessID), ex);
            }
            return(response);
        }