Skip to content

Commit

Permalink
HIV-647 : System not to show Antibody test reminder for patients with…
Browse files Browse the repository at this point in the history
… results (AMPATH#1024)
  • Loading branch information
maikofelix47 authored Nov 23, 2020
1 parent 7ab2722 commit 366bbb0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/reporting-framework/json-reports/clinical-reminder-report.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
"table": "etl.flat_hiv_summary_v15b",
"alias": "t1"
},
{
"table": "etl.flat_labs_and_imaging",
"alias": "s",
"join": {
"type": "left",
"joinCondition": "s.person_id = t1.person_id AND s.antibody_screen IS NOT NULL"
}
},
{
"table": "etl.flat_labs_and_imaging",
"alias": "t2",
Expand Down Expand Up @@ -94,7 +102,7 @@
"alias": "overdue_vl_lab_order",
"expressionType": "simple_expression",
"expressionOptions": {
"expression": "case when (timestampdiff(day,vl_order_date, '{referenceDate}') >= 14) and (vl_1_date is null or vl_order_date > vl_1_date) and vl_error <> 1 then timestampdiff(day,vl_order_date, '{referenceDate}') else 0 end"
"expression": "case when (timestampdiff(day,vl_order_date, '{referenceDate}') >= 14) and (vl_1_date is null or vl_order_date > vl_1_date) and t2.vl_error <> 1 then timestampdiff(day,vl_order_date, '{referenceDate}') else 0 end"
}
},
{
Expand Down Expand Up @@ -265,7 +273,7 @@
"alias": "dna_pcr_reminder",
"expressionType": "simple_expression",
"expressionOptions": {
"expression": "case when t9.program_id is not null and timestampdiff(month,t5.birthdate, '{referenceDate}') between 0 and 2 then 1 when t9.program_id is not null and timestampdiff(month,t5.birthdate, '{referenceDate}') = 6 then 2 when t9.program_id is not null and timestampdiff(month,t5.birthdate, '{referenceDate}') = 12 then 3 when t9.program_id is not null and timestampdiff(month,t5.birthdate, '{referenceDate}') between 18 and 24 then 4 else 0 end"
"expression": "case when t9.program_id is not null AND s.antibody_screen is NULL and timestampdiff(month,t5.birthdate, '{referenceDate}') between 0 and 2 then 1 when t9.program_id is not null AND s.antibody_screen is NULL and timestampdiff(month,t5.birthdate, '{referenceDate}') = 6 then 2 when t9.program_id is not null AND s.antibody_screen is NULL and timestampdiff(month,t5.birthdate, '{referenceDate}') = 12 then 3 when t9.program_id is not null AND s.antibody_screen is NULL and timestampdiff(month,t5.birthdate, '{referenceDate}') between 18 and 24 then 4 else 0 end"
}
},
{
Expand Down

0 comments on commit 366bbb0

Please sign in to comment.