Skip to content

Commit

Permalink
HIV-873: Add ARV start date under Daily schedule and Monthly Report (A…
Browse files Browse the repository at this point in the history
  • Loading branch information
jecihjoy authored May 17, 2021
1 parent 270c74d commit dcec491
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
"expressionOptions": {
"expression": "if(DATE_FORMAT(t2.scheduled_date, '%Y-%m-%d') = '{startDate}',1,null)"
}
},
{
"type": "simple_column",
"alias": "arv_first_regimen_start_date",
"column": "date_format(fhs.arv_first_regimen_start_date,'%Y-%m-%d')"
}
],
"indexDirectives": [
Expand Down
13 changes: 13 additions & 0 deletions app/reporting-framework/json-reports/daily-attendance-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
"type": "LEFT",
"joinCondition": "pr.program_id = t2.program_id"
}
},
{
"table": "etl.flat_hiv_summary_v15b",
"alias": "fhs",
"join": {
"type": "LEFT",
"joinCondition": "t2.encounter_id = fhs.encounter_id"
}
}
],
"columns": [
Expand Down Expand Up @@ -51,6 +59,11 @@
"expressionOptions": {
"expression": "if(DATE_FORMAT(t2.encounter_datetime, '%Y-%m-%d') = '{startDate}',1,null)"
}
},
{
"type": "simple_column",
"alias": "arv_first_regimen_start_date",
"column": "date_format(fhs.arv_first_regimen_start_date,'%Y-%m-%d')"
}
],
"filters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@
"expressionOptions": {
"expression": "if((date(t2.scheduled_date) = DATE('{startDate}')) and (t2.scheduled_date = t7.latest_rtc_date)AND t2.next_program_clinical_datetime IS NULL, 1, null)"
}
},
{
"type": "simple_column",
"alias": "arv_first_regimen_start_date",
"column": "date_format(t9.arv_first_regimen_start_date,'%Y-%m-%d')"
}
],
"filters": {
Expand Down

0 comments on commit dcec491

Please sign in to comment.