Пример #1
0
 public GetAllowedStatesResponse GetAllowedObservationStates(GetAllowedStatesRequest request)
 {
     try
     {
         GetAllowedStatesResponse response = new GetAllowedStatesResponse();
         response.States  = ObservationEndpointUtil.GetAllowedObservationStates(request);
         response.Version = request.Version;
         return(response);
     }
     catch (Exception ex)
     {
         throw new Exception("AD:GetAllowedObservationStates()::" + ex.Message, ex.InnerException);
     }
 }
Пример #2
0
 public GetAdditionalObservationItemResponse GetAdditionalObservationsRequest(GetAdditionalObservationItemRequest request)
 {
     try
     {
         GetAdditionalObservationItemResponse response = new GetAdditionalObservationItemResponse();
         PatientObservationData po = (PatientObservationData)ObservationEndpointUtil.GetAdditionalObservationItemRequest(request);
         response.PatientObservation = ObservationsUtil.GetAdditionalObservationItemForPatient(request, po);
         response.Version            = request.Version;
         return(response);
     }
     catch (Exception ex)
     {
         throw new Exception("AD:GetAdditionalObservationsRequest()::" + ex.Message, ex.InnerException);
     }
 }
Пример #3
0
 public GetObservationsResponse GetObservations(GetObservationsRequest request)
 {
     try
     {
         GetObservationsResponse response = new GetObservationsResponse();
         List <ObservationData>  po       = (List <ObservationData>)ObservationEndpointUtil.GetObservations(request);
         response.Observations = ObservationsUtil.GetObservations(request, po);
         response.Version      = request.Version;
         return(response);
     }
     catch (Exception ex)
     {
         throw new Exception("AD:GetAdditionalObservationsLibraryRequest()::" + ex.Message, ex.InnerException);
     }
 }
Пример #4
0
 public GetInitializeProblemResponse GetInitializeProblem(GetInitializeProblemRequest request)
 {
     try
     {
         GetInitializeProblemResponse response = new GetInitializeProblemResponse();
         PatientObservationData       po       = ObservationEndpointUtil.GetInitializeProblem(request);
         response.PatientObservation = ObservationsUtil.GetInitializeProblem(request, po);
         response.Version            = request.Version;
         return(response);
     }
     catch (Exception ex)
     {
         throw new Exception("AD:GetAllowedObservationStates()::" + ex.Message, ex.InnerException);
     }
 }
Пример #5
0
 public GetPatientProblemsResponse GetPatientProblemsSummary(GetPatientProblemsRequest request)
 {
     try
     {
         GetPatientProblemsResponse response = new GetPatientProblemsResponse();
         List <PatientObservation>  problems = ObservationEndpointUtil.GetPatientProblemSummary(request);
         response.Problems = problems;
         response.Version  = request.Version;
         return(response);
     }
     catch (Exception ex)
     {
         throw new Exception("AD:GetPatientProblemsSummary()::" + ex.Message, ex.InnerException);
     }
 }
Пример #6
0
        public PostUpdateObservationItemsResponse SavePatientObservations(PostUpdateObservationItemsRequest request)
        {
            try
            {
                PostUpdateObservationItemsResponse response = new PostUpdateObservationItemsResponse();

                List <PatientObservation> obsl = request.PatientObservations;

                //List<string> patientObservationIds = ObservationsUtil.GetPatientObservationIds(obsl);
                List <PatientObservationRecordData> poRecordDataList = new List <PatientObservationRecordData>();
                if (request.PatientObservations != null && request.PatientObservations.Count > 0)
                {
                    foreach (PatientObservation po in obsl)
                    {
                        PatientObservationRecordData pord = null;
                        if (po.Values != null && po.Values.Count > 0) // Labs and Vitals have values
                        {
                            foreach (ObservationValue ov in po.Values)
                            {
                                pord = ObservationsUtil.CreatePatientObservationRecord(po, ov);
                                //ObservationEndpointUtil.UpdatePatientObservation(request, pord);
                                poRecordDataList.Add(pord);
                            }
                        }
                        else // Problem does not have values
                        {
                            pord = ObservationsUtil.CreatePatientObservationRecord(po, null);
                            //ObservationEndpointUtil.UpdatePatientObservation(request, pord);
                            poRecordDataList.Add(pord);
                        }
                    }
                    response = ObservationEndpointUtil.UpdatePatientObservation(request, poRecordDataList);
                }
                response.Version = request.Version;
                return(response);
            }
            catch (Exception ex)
            {
                throw new Exception("AD:SavePatientObservations()::" + ex.Message, ex.InnerException);
            }
        }
Пример #7
0
 public GetStandardObservationItemsResponse GetStandardObservationsRequest(GetStandardObservationItemsRequest request)
 {
     try
     {
         GetStandardObservationItemsResponse response = new GetStandardObservationItemsResponse();
         List <PatientObservationData>       po       = (List <PatientObservationData>)ObservationEndpointUtil.GetStandardObservationsRequest(request);
         response.PatientObservations = ObservationsUtil.GetStandardObservationsForPatient(request, po);
         response.Version             = request.Version;
         return(response);
     }
     catch (Exception ex)
     {
         throw new Exception("AD:GetStandardObservationsRequest()::" + ex.Message, ex.InnerException);
     }
 }