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); }
public Tuple <string, IEnumerable <object> > Select(APIExpression expression) { try { throw new NotImplementedException(); // code here // } catch (Exception) { throw; } }
public GetProgramAttributeResponse GetProgramAttributes(GetProgramAttributeRequest request) { try { GetProgramAttributeResponse response = new GetProgramAttributeResponse(); ICollection <SelectExpression> selectExpressions = new List <SelectExpression>(); // PlanElementId SelectExpression patientSelectExpression = new SelectExpression(); patientSelectExpression.FieldName = MEProgramAttribute.PlanElementIdProperty; patientSelectExpression.Type = SelectExpressionType.EQ; patientSelectExpression.Value = request.PlanElementId; patientSelectExpression.ExpressionOrder = 1; patientSelectExpression.GroupID = 1; selectExpressions.Add(patientSelectExpression); APIExpression apiExpression = new APIExpression(); apiExpression.Expressions = selectExpressions; IProgramRepository repo = Factory.GetRepository(request, RepositoryType.PatientProgramAttribute);//.GetProgramAttributesRepository(request); Tuple <string, IEnumerable <object> > result = repo.Select(apiExpression); if (result != null) { List <ProgramAttributeData> pds = result.Item2.Cast <ProgramAttributeData>().ToList(); if (pds.Count > 0) { response.ProgramAttribute = pds.FirstOrDefault(); } } return(response); } catch (Exception ex) { throw new Exception("DD:DataProgramManager:GetProgramAttributes()::" + ex.Message, ex.InnerException); } }
public Tuple <string, IEnumerable <object> > Select(APIExpression expression) { throw new NotImplementedException(); }
Tuple <string, IEnumerable <object> > IRepository.Select(APIExpression expression) { throw new NotImplementedException(); }