-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
POC-544-v2: Added Prettier Complience
1 parent
4858d6e
commit 9b622ab
Showing
28 changed files
with
3,205 additions
and
3,234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
183 changes: 91 additions & 92 deletions
183
...eports/plhiv-ncd-v2-reports/disaggregations/mental-health-disorder/anxiety-aggregate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,99 @@ | ||
{ | ||
"name": "anxPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "anxPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "anxPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_anx_mh_f", | ||
"column": "sum(b.nw_anx_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_anx_mh_m", | ||
"column": "sum(b.nw_anx_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_anx_mh", | ||
"column": "sum(b.tot_nw_anx_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_anx_mh_f", | ||
"column": "sum(b.ct_anx_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_anx_mh_m", | ||
"column": "sum(b.ct_anx_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_anx_mh", | ||
"column": "sum(b.tot_ct_anx_mh)" | ||
"name": "anxPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "anxPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "anxPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_anx_mh_f", | ||
"column": "sum(b.nw_anx_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_anx_mh_m", | ||
"column": "sum(b.nw_anx_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_anx_mh", | ||
"column": "sum(b.tot_nw_anx_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_anx_mh_f", | ||
"column": "sum(b.ct_anx_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_anx_mh_m", | ||
"column": "sum(b.ct_anx_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_anx_mh", | ||
"column": "sum(b.tot_ct_anx_mh)" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
183 changes: 91 additions & 92 deletions
183
...d-v2-reports/disaggregations/mental-health-disorder/bipolar-and-related-mh-aggregate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,99 @@ | ||
{ | ||
"name": "bipPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "bipPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "bipPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_bip_mh_f", | ||
"column": "sum(b.nw_bip_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_bip_mh_m", | ||
"column": "sum(b.nw_bip_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_bip_mh", | ||
"column": "sum(b.tot_nw_bip_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_bip_mh_f", | ||
"column": "sum(b.ct_bip_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_bip_mh_m", | ||
"column": "sum(b.ct_bip_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_bip_mh", | ||
"column": "sum(b.tot_ct_bip_mh)" | ||
"name": "bipPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "bipPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "bipPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_bip_mh_f", | ||
"column": "sum(b.nw_bip_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_bip_mh_m", | ||
"column": "sum(b.nw_bip_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_bip_mh", | ||
"column": "sum(b.tot_nw_bip_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_bip_mh_f", | ||
"column": "sum(b.ct_bip_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_bip_mh_m", | ||
"column": "sum(b.ct_bip_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_bip_mh", | ||
"column": "sum(b.tot_ct_bip_mh)" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
} | ||
} | ||
} | ||
} |
317 changes: 158 additions & 159 deletions
317
...iv-ncd-v2-reports/disaggregations/mental-health-disorder/bipolar-and-related-mh-base.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,170 +1,169 @@ | ||
{ | ||
"name": "bipPlhivBase", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [], | ||
"sources": [ | ||
{ | ||
"table": "etl.ncd_monthly_report_dataset", | ||
"alias": "nmrd" | ||
}, | ||
{ | ||
"table": "etl.hiv_monthly_report_dataset_v1_2", | ||
"alias": "hmrd", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = hmrd.person_id AND hmrd.status = 'active'" | ||
} | ||
}, | ||
{ | ||
"table": "etl.flat_patient_identifiers_v1", | ||
"alias": "fi", | ||
"join": { | ||
"type": "LEFT", | ||
"joinCondition": "nmrd.person_id = fi.patient_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.location", | ||
"alias": "l", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.location_id = l.location_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.person", | ||
"alias": "per", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = per.person_id" | ||
} | ||
"name": "bipPlhivBase", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [], | ||
"sources": [ | ||
{ | ||
"table": "etl.ncd_monthly_report_dataset", | ||
"alias": "nmrd" | ||
}, | ||
{ | ||
"table": "etl.hiv_monthly_report_dataset_v1_2", | ||
"alias": "hmrd", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = hmrd.person_id AND hmrd.status = 'active'" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "nmrd.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "person_id", | ||
"column": "nmrd.person_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ccc_number", | ||
"column": "fi.ccc" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ovcid_id", | ||
"column": "fi.ovcid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "upi_number", | ||
"column": "fi.nupi" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "age", | ||
"column": "nmrd.age" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "nmrd.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "nmrd.clinic" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_bip_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_bipolar_and_related_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_bip_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_bipolar_and_related_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
}, | ||
{ | ||
"table": "etl.flat_patient_identifiers_v1", | ||
"alias": "fi", | ||
"join": { | ||
"type": "LEFT", | ||
"joinCondition": "nmrd.person_id = fi.patient_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.location", | ||
"alias": "l", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.location_id = l.location_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.person", | ||
"alias": "per", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = per.person_id" | ||
} | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "nmrd.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "person_id", | ||
"column": "nmrd.person_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ccc_number", | ||
"column": "fi.ccc" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ovcid_id", | ||
"column": "fi.ovcid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "upi_number", | ||
"column": "fi.nupi" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "age", | ||
"column": "nmrd.age" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "nmrd.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "nmrd.clinic" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_bip_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_bipolar_and_related_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_bip_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_bipolar_and_related_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_nw_bip_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_bipolar_and_related_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_bip_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_bipolar_and_related_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_bip_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_bipolar_and_related_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_ct_bip_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_bipolar_and_related_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
} | ||
], | ||
"filters": { | ||
"conditionJoinOperator": "and", | ||
"conditions": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_nw_bip_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_bipolar_and_related_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.location_id in ?", | ||
"parameterName": "locations" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_bip_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_bipolar_and_related_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate >= ?", | ||
"parameterName": "startDate" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_bip_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_bipolar_and_related_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate <= ?", | ||
"parameterName": "endDate" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_ct_bip_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_bipolar_and_related_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.visit_this_month in ?", | ||
"parameterName": "visitState" | ||
} | ||
], | ||
"filters": { | ||
"conditionJoinOperator": "and", | ||
"conditions": [ | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.location_id in ?", | ||
"parameterName": "locations" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate >= ?", | ||
"parameterName": "startDate" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate <= ?", | ||
"parameterName": "endDate" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.visit_this_month in ?", | ||
"parameterName": "visitState" | ||
} | ||
] | ||
}, | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["nmrd.person_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"paging": { | ||
"offSetParam": "offSetParam", | ||
"limitParam": "limitParam" | ||
} | ||
] | ||
}, | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["nmrd.person_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"paging": { | ||
"offSetParam": "offSetParam", | ||
"limitParam": "limitParam" | ||
} | ||
} |
183 changes: 91 additions & 92 deletions
183
...rts/plhiv-ncd-v2-reports/disaggregations/mental-health-disorder/depressive-aggregate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,99 @@ | ||
{ | ||
"name": "depPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "depPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "depPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_dp_mh_f", | ||
"column": "sum(b.nw_dp_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_dp_mh_m", | ||
"column": "sum(b.nw_dp_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_dp_mh", | ||
"column": "sum(b.tot_nw_dp_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_dp_mh_f", | ||
"column": "sum(b.ct_dp_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_dp_mh_m", | ||
"column": "sum(b.ct_dp_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_dp_mh", | ||
"column": "sum(b.tot_ct_dp_mh)" | ||
"name": "depPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "depPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "depPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_dp_mh_f", | ||
"column": "sum(b.nw_dp_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_dp_mh_m", | ||
"column": "sum(b.nw_dp_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_dp_mh", | ||
"column": "sum(b.tot_nw_dp_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_dp_mh_f", | ||
"column": "sum(b.ct_dp_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_dp_mh_m", | ||
"column": "sum(b.ct_dp_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_dp_mh", | ||
"column": "sum(b.tot_ct_dp_mh)" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
} | ||
} | ||
} | ||
} |
183 changes: 91 additions & 92 deletions
183
...cd-v2-reports/disaggregations/mental-health-disorder/feeding-and-eating-mh-aggregate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,99 @@ | ||
{ | ||
"name": "fedPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "fedPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "fedPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_fe_mh_f", | ||
"column": "sum(b.nw_fe_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_fe_mh_m", | ||
"column": "sum(b.nw_fe_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_fe_mh", | ||
"column": "sum(b.tot_nw_fe_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_fe_mh_f", | ||
"column": "sum(b.ct_fe_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_fe_mh_m", | ||
"column": "sum(b.ct_fe_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_fe_mh", | ||
"column": "sum(b.tot_ct_fe_mh)" | ||
"name": "fedPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "fedPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "fedPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_fe_mh_f", | ||
"column": "sum(b.nw_fe_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_fe_mh_m", | ||
"column": "sum(b.nw_fe_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_fe_mh", | ||
"column": "sum(b.tot_nw_fe_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_fe_mh_f", | ||
"column": "sum(b.ct_fe_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_fe_mh_m", | ||
"column": "sum(b.ct_fe_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_fe_mh", | ||
"column": "sum(b.tot_ct_fe_mh)" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
} | ||
} | ||
} | ||
} |
317 changes: 158 additions & 159 deletions
317
...hiv-ncd-v2-reports/disaggregations/mental-health-disorder/feeding-and-eating-mh-base.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,170 +1,169 @@ | ||
{ | ||
"name": "fedPlhivBase", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [], | ||
"sources": [ | ||
{ | ||
"table": "etl.ncd_monthly_report_dataset", | ||
"alias": "nmrd" | ||
}, | ||
{ | ||
"table": "etl.hiv_monthly_report_dataset_v1_2", | ||
"alias": "hmrd", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = hmrd.person_id AND hmrd.status = 'active'" | ||
} | ||
}, | ||
{ | ||
"table": "etl.flat_patient_identifiers_v1", | ||
"alias": "fi", | ||
"join": { | ||
"type": "LEFT", | ||
"joinCondition": "nmrd.person_id = fi.patient_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.location", | ||
"alias": "l", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.location_id = l.location_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.person", | ||
"alias": "per", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = per.person_id" | ||
} | ||
"name": "fedPlhivBase", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [], | ||
"sources": [ | ||
{ | ||
"table": "etl.ncd_monthly_report_dataset", | ||
"alias": "nmrd" | ||
}, | ||
{ | ||
"table": "etl.hiv_monthly_report_dataset_v1_2", | ||
"alias": "hmrd", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = hmrd.person_id AND hmrd.status = 'active'" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "nmrd.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "person_id", | ||
"column": "nmrd.person_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ccc_number", | ||
"column": "fi.ccc" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ovcid_id", | ||
"column": "fi.ovcid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "upi_number", | ||
"column": "fi.nupi" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "age", | ||
"column": "nmrd.age" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "nmrd.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "nmrd.clinic" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_fe_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_feeding_and_eating_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_fe_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_feeding_and_eating_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
}, | ||
{ | ||
"table": "etl.flat_patient_identifiers_v1", | ||
"alias": "fi", | ||
"join": { | ||
"type": "LEFT", | ||
"joinCondition": "nmrd.person_id = fi.patient_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.location", | ||
"alias": "l", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.location_id = l.location_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.person", | ||
"alias": "per", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = per.person_id" | ||
} | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "nmrd.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "person_id", | ||
"column": "nmrd.person_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ccc_number", | ||
"column": "fi.ccc" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ovcid_id", | ||
"column": "fi.ovcid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "upi_number", | ||
"column": "fi.nupi" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "age", | ||
"column": "nmrd.age" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "nmrd.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "nmrd.clinic" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_fe_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_feeding_and_eating_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_fe_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_feeding_and_eating_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_nw_fe_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_feeding_and_eating_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_fe_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_feeding_and_eating_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_fe_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_feeding_and_eating_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_ct_fe_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_feeding_and_eating_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
} | ||
], | ||
"filters": { | ||
"conditionJoinOperator": "and", | ||
"conditions": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_nw_fe_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_feeding_and_eating_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.location_id in ?", | ||
"parameterName": "locations" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_fe_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_feeding_and_eating_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate >= ?", | ||
"parameterName": "startDate" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_fe_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_feeding_and_eating_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate <= ?", | ||
"parameterName": "endDate" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_ct_fe_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_feeding_and_eating_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.visit_this_month in ?", | ||
"parameterName": "visitState" | ||
} | ||
], | ||
"filters": { | ||
"conditionJoinOperator": "and", | ||
"conditions": [ | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.location_id in ?", | ||
"parameterName": "locations" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate >= ?", | ||
"parameterName": "startDate" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate <= ?", | ||
"parameterName": "endDate" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.visit_this_month in ?", | ||
"parameterName": "visitState" | ||
} | ||
] | ||
}, | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["nmrd.person_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"paging": { | ||
"offSetParam": "offSetParam", | ||
"limitParam": "limitParam" | ||
} | ||
] | ||
}, | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["nmrd.person_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"paging": { | ||
"offSetParam": "offSetParam", | ||
"limitParam": "limitParam" | ||
} | ||
} |
183 changes: 91 additions & 92 deletions
183
...-v2-reports/disaggregations/mental-health-disorder/general-mental-disorder-aggregate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,99 @@ | ||
{ | ||
"name": "genMDPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "genMDPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "genMDPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_mh_f", | ||
"column": "sum(b.nw_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_mh_m", | ||
"column": "sum(b.nw_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_mh", | ||
"column": "sum(b.nw_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_mh_f", | ||
"column": "sum(b.ct_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_mh_m", | ||
"column": "sum(b.ct_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_mh", | ||
"column": "sum(b.ct_mh)" | ||
"name": "genMDPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "genMDPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "genMDPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_mh_f", | ||
"column": "sum(b.nw_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_mh_m", | ||
"column": "sum(b.nw_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_mh", | ||
"column": "sum(b.nw_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_mh_f", | ||
"column": "sum(b.ct_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_mh_m", | ||
"column": "sum(b.ct_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_mh", | ||
"column": "sum(b.ct_mh)" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
} | ||
} | ||
} | ||
} |
317 changes: 158 additions & 159 deletions
317
...v-ncd-v2-reports/disaggregations/mental-health-disorder/general-mental-disorder-base.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,170 +1,169 @@ | ||
{ | ||
"name": "genMDPlhivBase", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [], | ||
"sources": [ | ||
{ | ||
"table": "etl.ncd_monthly_report_dataset", | ||
"alias": "nmrd" | ||
}, | ||
{ | ||
"table": "etl.hiv_monthly_report_dataset_v1_2", | ||
"alias": "hmrd", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = hmrd.person_id AND hmrd.status = 'active'" | ||
} | ||
}, | ||
{ | ||
"table": "etl.flat_patient_identifiers_v1", | ||
"alias": "fi", | ||
"join": { | ||
"type": "LEFT", | ||
"joinCondition": "nmrd.person_id = fi.patient_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.location", | ||
"alias": "l", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.location_id = l.location_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.person", | ||
"alias": "per", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = per.person_id" | ||
} | ||
"name": "genMDPlhivBase", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [], | ||
"sources": [ | ||
{ | ||
"table": "etl.ncd_monthly_report_dataset", | ||
"alias": "nmrd" | ||
}, | ||
{ | ||
"table": "etl.hiv_monthly_report_dataset_v1_2", | ||
"alias": "hmrd", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = hmrd.person_id AND hmrd.status = 'active'" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "nmrd.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "person_id", | ||
"column": "nmrd.person_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ccc_number", | ||
"column": "fi.ccc" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ovcid_id", | ||
"column": "fi.ovcid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "upi_number", | ||
"column": "fi.nupi" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "age", | ||
"column": "nmrd.age" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "nmrd.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "nmrd.clinic" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.has_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.has_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
}, | ||
{ | ||
"table": "etl.flat_patient_identifiers_v1", | ||
"alias": "fi", | ||
"join": { | ||
"type": "LEFT", | ||
"joinCondition": "nmrd.person_id = fi.patient_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.location", | ||
"alias": "l", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.location_id = l.location_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.person", | ||
"alias": "per", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = per.person_id" | ||
} | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "nmrd.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "person_id", | ||
"column": "nmrd.person_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ccc_number", | ||
"column": "fi.ccc" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ovcid_id", | ||
"column": "fi.ovcid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "upi_number", | ||
"column": "fi.nupi" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "age", | ||
"column": "nmrd.age" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "nmrd.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "nmrd.clinic" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.has_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.has_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.has_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.has_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.has_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.has_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
} | ||
], | ||
"filters": { | ||
"conditionJoinOperator": "and", | ||
"conditions": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.has_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.location_id in ?", | ||
"parameterName": "locations" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.has_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate >= ?", | ||
"parameterName": "startDate" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.has_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate <= ?", | ||
"parameterName": "endDate" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.has_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.visit_this_month in ?", | ||
"parameterName": "visitState" | ||
} | ||
], | ||
"filters": { | ||
"conditionJoinOperator": "and", | ||
"conditions": [ | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.location_id in ?", | ||
"parameterName": "locations" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate >= ?", | ||
"parameterName": "startDate" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate <= ?", | ||
"parameterName": "endDate" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.visit_this_month in ?", | ||
"parameterName": "visitState" | ||
} | ||
] | ||
}, | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["nmrd.person_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"paging": { | ||
"offSetParam": "offSetParam", | ||
"limitParam": "limitParam" | ||
} | ||
] | ||
}, | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["nmrd.person_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"paging": { | ||
"offSetParam": "offSetParam", | ||
"limitParam": "limitParam" | ||
} | ||
} |
577 changes: 288 additions & 289 deletions
577
...son-reports/plhiv-ncd-v2-reports/disaggregations/mental-health-disorder/mh-aggregate.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
183 changes: 91 additions & 92 deletions
183
...on-reports/plhiv-ncd-v2-reports/disaggregations/mental-health-disorder/ocd-aggregate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,99 @@ | ||
{ | ||
"name": "ocdPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "ocdPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "ocdPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_obs_mh_f", | ||
"column": "sum(b.nw_obs_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_obs_mh_m", | ||
"column": "sum(b.nw_obs_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_obs_mh", | ||
"column": "sum(b.tot_nw_obs_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_obs_mh_f", | ||
"column": "sum(b.ct_obs_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_obs_mh_m", | ||
"column": "sum(b.ct_obs_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_obs_mh", | ||
"column": "sum(b.tot_ct_obs_mh)" | ||
"name": "ocdPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "ocdPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "ocdPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_obs_mh_f", | ||
"column": "sum(b.nw_obs_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_obs_mh_m", | ||
"column": "sum(b.nw_obs_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_obs_mh", | ||
"column": "sum(b.tot_nw_obs_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_obs_mh_f", | ||
"column": "sum(b.ct_obs_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_obs_mh_m", | ||
"column": "sum(b.ct_obs_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_obs_mh", | ||
"column": "sum(b.tot_ct_obs_mh)" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
} | ||
} | ||
} | ||
} |
317 changes: 158 additions & 159 deletions
317
...rk/json-reports/plhiv-ncd-v2-reports/disaggregations/mental-health-disorder/ocd-base.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,170 +1,169 @@ | ||
{ | ||
"name": "ocdPlhivBase", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [], | ||
"sources": [ | ||
{ | ||
"table": "etl.ncd_monthly_report_dataset", | ||
"alias": "nmrd" | ||
}, | ||
{ | ||
"table": "etl.hiv_monthly_report_dataset_v1_2", | ||
"alias": "hmrd", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = hmrd.person_id AND hmrd.status = 'active'" | ||
} | ||
}, | ||
{ | ||
"table": "etl.flat_patient_identifiers_v1", | ||
"alias": "fi", | ||
"join": { | ||
"type": "LEFT", | ||
"joinCondition": "nmrd.person_id = fi.patient_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.location", | ||
"alias": "l", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.location_id = l.location_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.person", | ||
"alias": "per", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = per.person_id" | ||
} | ||
"name": "ocdPlhivBase", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [], | ||
"sources": [ | ||
{ | ||
"table": "etl.ncd_monthly_report_dataset", | ||
"alias": "nmrd" | ||
}, | ||
{ | ||
"table": "etl.hiv_monthly_report_dataset_v1_2", | ||
"alias": "hmrd", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = hmrd.person_id AND hmrd.status = 'active'" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "nmrd.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "person_id", | ||
"column": "nmrd.person_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ccc_number", | ||
"column": "fi.ccc" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ovcid_id", | ||
"column": "fi.ovcid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "upi_number", | ||
"column": "fi.nupi" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "age", | ||
"column": "nmrd.age" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "nmrd.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "nmrd.clinic" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_obs_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_ocd_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_obs_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_ocd_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
}, | ||
{ | ||
"table": "etl.flat_patient_identifiers_v1", | ||
"alias": "fi", | ||
"join": { | ||
"type": "LEFT", | ||
"joinCondition": "nmrd.person_id = fi.patient_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.location", | ||
"alias": "l", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.location_id = l.location_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.person", | ||
"alias": "per", | ||
"join": { | ||
"type": "INNER", | ||
"joinCondition": "nmrd.person_id = per.person_id" | ||
} | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "nmrd.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "person_id", | ||
"column": "nmrd.person_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ccc_number", | ||
"column": "fi.ccc" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ovcid_id", | ||
"column": "fi.ovcid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "upi_number", | ||
"column": "fi.nupi" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "age", | ||
"column": "nmrd.age" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "nmrd.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "nmrd.clinic" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_obs_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_ocd_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "nw_obs_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_ocd_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_nw_obs_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_ocd_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_obs_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_ocd_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_obs_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_ocd_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_ct_obs_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_ocd_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
} | ||
], | ||
"filters": { | ||
"conditionJoinOperator": "and", | ||
"conditions": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_nw_obs_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_ocd_mhd = 1 and hmrd.started_art_this_month = 1), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.location_id in ?", | ||
"parameterName": "locations" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_obs_mh_f", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'F' AND nmrd.is_ocd_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate >= ?", | ||
"parameterName": "startDate" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "ct_obs_mh_m", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.gender = 'M' AND nmrd.is_ocd_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate <= ?", | ||
"parameterName": "endDate" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "tot_ct_obs_mh", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF((nmrd.is_ocd_mhd = 1 and hmrd.on_art_this_month = 1 AND hmrd.started_art_this_month = 0), 1, 0)" | ||
} | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.visit_this_month in ?", | ||
"parameterName": "visitState" | ||
} | ||
], | ||
"filters": { | ||
"conditionJoinOperator": "and", | ||
"conditions": [ | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.location_id in ?", | ||
"parameterName": "locations" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate >= ?", | ||
"parameterName": "startDate" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.endDate <= ?", | ||
"parameterName": "endDate" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "nmrd.visit_this_month in ?", | ||
"parameterName": "visitState" | ||
} | ||
] | ||
}, | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["nmrd.person_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"paging": { | ||
"offSetParam": "offSetParam", | ||
"limitParam": "limitParam" | ||
} | ||
] | ||
}, | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["nmrd.person_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"paging": { | ||
"offSetParam": "offSetParam", | ||
"limitParam": "limitParam" | ||
} | ||
} |
183 changes: 91 additions & 92 deletions
183
...plhiv-ncd-v2-reports/disaggregations/mental-health-disorder/personality-mh-aggregate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,99 @@ | ||
{ | ||
"name": "perPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "perPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "perPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_per_mh_f", | ||
"column": "sum(b.nw_per_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_per_mh_m", | ||
"column": "sum(b.nw_per_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_per_mh", | ||
"column": "sum(b.tot_nw_per_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_per_mh_f", | ||
"column": "sum(b.ct_per_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_per_mh_m", | ||
"column": "sum(b.ct_per_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_per_mh", | ||
"column": "sum(b.tot_ct_per_mh)" | ||
"name": "perPlhivAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "perPlhivBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "perPlhivBase", | ||
"alias": "b" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "derived_column", | ||
"alias": "join_location", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "1" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "b.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "b.location_uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "b.location" | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_per_mh_f", | ||
"column": "sum(b.nw_per_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "nw_per_mh_m", | ||
"column": "sum(b.nw_per_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_nw_per_mh", | ||
"column": "sum(b.tot_nw_per_mh)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_per_mh_f", | ||
"column": "sum(b.ct_per_mh_f)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "ct_per_mh_m", | ||
"column": "sum(b.ct_per_mh_m)" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "tot_ct_per_mh", | ||
"column": "sum(b.tot_ct_per_mh)" | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["b.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "patient-list-with-contacts-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.