Пример #1
0
        public PutRegisterPatientObservationResponse PutRegisteredObservation(PutRegisterPatientObservationRequest request)
        {
            try
            {
                PutRegisterPatientObservationResponse response = new PutRegisterPatientObservationResponse();
                IPatientObservationRepository         repo     = Factory.GetRepository(request, RepositoryType.PatientObservation);

                GetInitializeProblemDataRequest req = new GetInitializeProblemDataRequest
                {
                    PatientId      = request.PatientId,
                    ObservationId  = request.Id,
                    Context        = request.Context,
                    ContractNumber = request.ContractNumber,
                    UserId         = request.UserId,
                    Version        = request.Version,
                    Initial        = "false"
                };

                PatientObservationData pod = (PatientObservationData)repo.InitializeProblem(req);

                if (pod != null)
                {
                    response.Outcome = new Outcome {
                        Result = 1, Reason = "Success"
                    };
                    response.PatientObservation = pod;
                }

                return(response);
            }
            catch (Exception ex)
            {
                throw new Exception("DD.DataPatientObservationManager:InitializePatientObservation()::" + ex.Message, ex.InnerException);
            }
        }
Пример #2
0
        public GetInitializeProblemDataResponse GetInitializeProblem(GetInitializeProblemDataRequest request)
        {
            try
            {
                GetInitializeProblemDataResponse response = new GetInitializeProblemDataResponse();
                IPatientObservationRepository    repo     = Factory.GetRepository(request, RepositoryType.PatientObservation);

                PatientObservationData data = (PatientObservationData)repo.InitializeProblem(request);
                response.PatientObservation = data;
                return(response);
            }
            catch (Exception ex)
            {
                throw new Exception("DD.DataPatientObservationManager:GetInitializeProblem()::" + ex.Message, ex.InnerException);
            }
        }