Skip to content

Commit 98d52ac

Browse files
POC-42: Fix covid report monthly screening numbers (#1218)
Co-authored-by: Drizzentic <[email protected]>
1 parent 65827dd commit 98d52ac

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

app/reporting-framework/json-reports/covid-19-summary-report-base.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
"type": "INNER",
1717
"joinCondition": "ce.location_id = l.location_id"
1818
}
19+
},
20+
{
21+
"table": "amrs.person",
22+
"alias": "per",
23+
"join": {
24+
"type": "INNER",
25+
"joinCondition": "ce.person_id = per.person_id"
26+
}
1927
}
2028
],
2129
"columns": [
@@ -97,7 +105,7 @@
97105
"alias": "not_vaccinated_this_month",
98106
"expressionType": "simple_expression",
99107
"expressionOptions": {
100-
"expression": "if(ce.received_covid_19_vaccine = 1066 AND ce.screened_this_month = 1,1,null)"
108+
"expression": "if(ce.received_covid_19_vaccine = 1066 AND ce.vaccination_status_this_month is null AND ce.screened_this_month = 1,1,null)"
101109
}
102110
},
103111
{
@@ -169,6 +177,10 @@
169177
"filterType": "tableColumns",
170178
"conditionExpression": "ce.endDate = ?",
171179
"parameterName": "endingMonth"
180+
},
181+
{
182+
"filterType": "tableColumns",
183+
"conditionExpression": "(EXTRACT(YEAR FROM (FROM_DAYS(DATEDIFF(NOW(), per.birthdate)))) >= 15)"
172184
}
173185
]
174186
},

app/reporting-framework/json-reports/patient-list-with-contacts-template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@
205205
"value": "Partially Vaccinated"
206206
},
207207
{
208-
"condition": "c.person_id IS NULL AND c.second_dose_vaccine_administered IS NULL AND EXTRACT(YEAR FROM (FROM_DAYS(DATEDIFF(NOW(), t1.birthdate)))) >= 15",
208+
"condition": "c.person_id IS NULL AND c.second_dose_vaccine_administered IS NULL AND c.vaccination_status is null AND EXTRACT(YEAR FROM (FROM_DAYS(DATEDIFF(NOW(), t1.birthdate)))) >= 15",
209209
"value": "Unknown Covid 19 Vaccination"
210210
},
211211
{
212-
"condition": "c.received_covid_19_vaccine = 1066 AND EXTRACT(YEAR FROM (FROM_DAYS(DATEDIFF(NOW(), t1.birthdate)))) >= 15",
212+
"condition": "c.received_covid_19_vaccine = 1066 AND c.vaccination_status is null AND EXTRACT(YEAR FROM (FROM_DAYS(DATEDIFF(NOW(), t1.birthdate)))) >= 15",
213213
"value": "Not vaccinated"
214214
}
215215
]

0 commit comments

Comments
 (0)