Skip to content

Commit

Permalink
Updated concept id for diarhea to waterly diarhea
Browse files Browse the repository at this point in the history
  • Loading branch information
njorocs committed Apr 19, 2024
1 parent 9a6193f commit 7b8ae54
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ public EvaluatedCohort evaluate(CohortDefinition cohortDefinition, EvaluationCon
String qry = "select a.patient_id\n" +
"from (select patient_id, c.visit_date,group_concat(c.complaint) as complaint, c.complaint_date as complaint_date\n" +
" from kenyaemr_etl.etl_allergy_chronic_illness c\n" +
" where c.complaint in (142412,122983)\n" +
" where c.complaint in (161887,122983)\n" +
" and date(c.visit_date) between date(:startDate) and date(:endDate)\n" +
" group by patient_id) a\n" +
" join kenyaemr_etl.etl_patient_demographics d on a.patient_id = d.patient_id\n" +
"where timestampdiff(YEAR,date(d.DOB),coalesce(date(a.complaint_date),date(a.visit_date))) > 2 and FIND_IN_SET(122983, a.complaint) > 0\n" +
" and FIND_IN_SET(142412, a.complaint) > 0;";
" and FIND_IN_SET(161887, a.complaint) > 0;";

SqlQueryBuilder builder = new SqlQueryBuilder();
builder.append(qry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public EvaluatedCohort evaluate(CohortDefinition cohortDefinition, EvaluationCon
" date(t.visit_date) between date(:startDate) and date(:endDate)\n" +
" group by patient_id) a\n" +
"where ((FIND_IN_SET(117671, a.complaint) > 0 AND FIND_IN_SET(142412, a.complaint) > 0)\n" +
" OR (FIND_IN_SET(142412, a.complaint) > 0 AND FIND_IN_SET(122983, a.complaint) > 0 AND\n" +
" OR (FIND_IN_SET(161887, a.complaint) > 0 AND FIND_IN_SET(122983, a.complaint) > 0 AND\n" +
" timestampdiff(YEAR, date(a.DOB), coalesce(date(a.complaint_date), date(a.visit_date))) > 2)\n" +
" OR (FIND_IN_SET(143264, a.complaint) > 0 AND timestampdiff(DAY, date(a.complaint_date), date(a.visit_date)) < 10 AND\n" +
" date(a.visit_date) BETWEEN DATE(:startDate) AND DATE(:endDate) AND a.visit_type_id IN (1, 3) AND\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public CohortDefinition choleraCases() {
String sqlQuery = "select a.patient_id\n" +
"from (select patient_id, c.visit_date,group_concat(c.complaint) as complaint, c.complaint_date as complaint_date\n" +
" from kenyaemr_etl.etl_allergy_chronic_illness c\n" +
" where c.complaint in (142412,122983)\n" +
" where c.complaint in (161887,122983)\n" +
" and date(c.visit_date) between date(:startDate) and date(:endDate)\n" +
" group by patient_id) a\n" +
" join kenyaemr_etl.etl_patient_demographics d on a.patient_id = d.patient_id\n" +
"where timestampdiff(YEAR,date(d.DOB),coalesce(date(a.complaint_date),date(a.visit_date))) > 2 and FIND_IN_SET(122983, a.complaint) > 0\n" +
" and FIND_IN_SET(142412, a.complaint) > 0;";
" and FIND_IN_SET(161887, a.complaint) > 0;";
cd.setName("choleraCases");
cd.setQuery(sqlQuery);
cd.addParameter(new Parameter("startDate", "Start Date", Date.class));
Expand Down

0 comments on commit 7b8ae54

Please sign in to comment.