Ejemplo n.º 1
0
        public GetCohortPatientViewResponse GetCohortPatientView(GetCohortPatientViewRequest request)
        {
            IPatientRepository repo = Factory.GetRepository(request, RepositoryType.CohortPatientView);

            GetCohortPatientViewResponse   result            = new GetCohortPatientViewResponse();
            ICollection <SelectExpression> selectExpressions = new List <SelectExpression>();

            // PatientID
            SelectExpression patientSelectExpression = new SelectExpression();

            patientSelectExpression.FieldName       = MECohortPatientView.PatientIDProperty;
            patientSelectExpression.Type            = SelectExpressionType.EQ;
            patientSelectExpression.Value           = request.PatientID;
            patientSelectExpression.ExpressionOrder = 1;
            patientSelectExpression.GroupID         = 1;
            selectExpressions.Add(patientSelectExpression);

            APIExpression apiExpression = new APIExpression();

            apiExpression.Expressions = selectExpressions;

            Tuple <string, IEnumerable <object> > cohortPatientView = repo.Select(apiExpression);

            if (cohortPatientView != null)
            {
                List <CohortPatientViewData> cpd = cohortPatientView.Item2.Cast <CohortPatientViewData>().ToList();
                result.CohortPatientView = cpd[0];
            }

            return(result);
        }
Ejemplo n.º 2
0
        public GetCohortPatientViewResponse Get(GetCohortPatientViewRequest request)
        {
            GetCohortPatientViewResponse response = new GetCohortPatientViewResponse();

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

                response         = PatientManager.GetCohortPatientView(request);
                response.Version = request.Version;
            }
            catch (Exception ex)
            {
                CommonFormatterUtil.FormatExceptionResponse(response, base.Response, ex);

                string aseProcessID = ConfigurationManager.AppSettings.Get("ASEProcessID") ?? "0";
                Helpers.LogException(int.Parse(aseProcessID), ex);
            }
            return(response);
        }
Ejemplo n.º 3
0
 GetCohortPatientViewResponse IPatientDataManager.GetCohortPatientView(GetCohortPatientViewRequest request)
 {
     throw new NotImplementedException();
 }