-
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.
- Loading branch information
Showing
80 changed files
with
106,723 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"trailingComma": "none", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": true | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
122 changes: 122 additions & 0 deletions
122
app/reporting-framework/json-reports/RRI/hei-infant-rri-testing-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 |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"name": "heiInfantRriTestingAggregate", | ||
"version": "1.0", | ||
"tag": "", | ||
"description": "", | ||
"uses": [ | ||
{ | ||
"name": "heiInfantRriTestingBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "heiInfantRriTestingBase", | ||
"alias": "hmds" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "simple_column", | ||
"alias": "reporting_month", | ||
"column": "hmds.reporting_month" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "hmds.location" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "hmds.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "hmds.location_uuid" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "initial_pcr_less_than_8_wks", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "COUNT(hmds.initial_pcr_less_than_8_wks)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "initial_pcr_8_wks_to_12_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "COUNT(hmds.initial_pcr_8_wks_to_12_months)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "initial_pcr_less_than_12_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "COUNT(hmds.initial_pcr_less_than_12_months)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "second_pcr_6_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "COUNT(hmds.second_pcr_6_months)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "third_pcr_12_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "COUNT(hmds.third_pcr_12_months)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "antibody_at_18_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "COUNT(hmds.antibody_at_18_months)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "antibody_post_18_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "COUNT(hmds.antibody_post_18_months)" | ||
} | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["hmds.reporting_month", "hmds.location_id"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"skipColumns": [], | ||
"disaggregationColumns": [] | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "hei-report-patient-list-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
}, | ||
"skipParams": [] | ||
} | ||
} | ||
} |
168 changes: 168 additions & 0 deletions
168
app/reporting-framework/json-reports/RRI/hei-infant-rri-testing-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 |
---|---|---|
@@ -0,0 +1,168 @@ | ||
{ | ||
"name": "heiInfantRriTestingBase", | ||
"version": "1.0", | ||
"tag": "hei_infant_rri_testing_base", | ||
"description": "", | ||
"uses": [], | ||
"sources": [ | ||
{ | ||
"table": "etl.pmtct_rri_dataset", | ||
"alias": "prd" | ||
}, | ||
{ | ||
"table": "etl.hei_monthly_report_dataset", | ||
"alias": "hmd", | ||
"join": { | ||
"type": "inner", | ||
"joinCondition": "prd.person_id = hmd.person_id" | ||
} | ||
}, | ||
{ | ||
"table": "amrs.location", | ||
"alias": "l", | ||
"join": { | ||
"type": "inner", | ||
"joinCondition": "hmd.location_id = l.location_id" | ||
} | ||
}, | ||
{ | ||
"table": "etl.flat_hei_summary", | ||
"alias": "fhs", | ||
"join": { | ||
"type": "LEFT", | ||
"joinCondition": "hmd.person_id = fhs.person_id AND fhs.next_clinical_datetime_hiv IS NULL" | ||
} | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "simple_column", | ||
"alias": "person_id", | ||
"column": "hmd.person_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "age", | ||
"column": "prd.age" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location", | ||
"column": "hmd.clinic" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_uuid", | ||
"column": "l.uuid" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "hmd.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "reporting_month", | ||
"column": "DATE_FORMAT(hmd.endDate,'%Y-%m')" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "month", | ||
"column": "DATE_FORMAT(hmd.endDate,'%Y-%m')" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "initial_pcr_less_than_8_wks", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF(hmd.initial_pcr_this_month is null AND hmd.age_in_months < 2 ,NULL,1)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "initial_pcr_8_wks_to_12_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF(hmd.initial_pcr_this_month is null AND hmd.age_in_months between 2 and 12,NULL,1)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "initial_pcr_less_than_12_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF(hmd.initial_pcr_this_month is null AND hmd.age_in_months < 12,NULL,1)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "second_pcr_6_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF(hmd.second_pcr_this_month is null AND hmd.age_in_months = 6,NULL,1)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "third_pcr_12_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF(hmd.third_pcr_this_month is null AND hmd.age_in_months = 12,NULL,1)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "antibody_at_18_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF(hmd.initial_antibody_screening_this_month is null AND hmd.age_in_months = 18,NULL,1)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "antibody_post_18_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "IF(hmd.initial_antibody_screening_this_month is null AND hmd.age_in_months > 18,NULL,1)" | ||
} | ||
} | ||
], | ||
"filters": { | ||
"conditionJoinOperator": "and", | ||
"conditions": [ | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "prd.encounter_datetime >= ?", | ||
"parameterName": "startDate" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "prd.encounter_datetime <= ?", | ||
"parameterName": "endDate" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "prd.encounter_type in (115)" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "hmd.endDate=?", | ||
"parameterName": "endDate" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "prd.age <=20" | ||
}, | ||
{ | ||
"filterType": "tableColumns", | ||
"conditionExpression": "hmd.location_id in (?)", | ||
"parameterName": "locations" | ||
} | ||
] | ||
}, | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["prd.person_id"], | ||
"excludeParam": "excludeParam" | ||
} | ||
} |
84 changes: 84 additions & 0 deletions
84
app/reporting-framework/json-reports/RRI/pmtct-rri-cal-hiv-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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"name": "pmtctRriCalhivAggregate", | ||
"version": "1.0", | ||
"tag": "pmtct_rri_cal_hiv_aggregate", | ||
"uses": [ | ||
{ | ||
"name": "pmtctRriCalhivDataSetBase", | ||
"version": "1.0", | ||
"type": "dataset_def" | ||
} | ||
], | ||
"sources": [ | ||
{ | ||
"dataSet": "pmtctRriCalhivDataSetBase", | ||
"alias": "prd_base" | ||
} | ||
], | ||
"columns": [ | ||
{ | ||
"type": "simple_column", | ||
"alias": "Reporting_Month", | ||
"column": "prd_base.reporting_month" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_id", | ||
"column": "prd_base.location_id" | ||
}, | ||
{ | ||
"type": "simple_column", | ||
"alias": "location_Name", | ||
"column": "prd_base.location" | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "all_calhiv", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "COUNT(prd_base.person_id)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "calhiv_vl_done_past_6_months", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "SUM(prd_base.calhiv_vl_done_past_6_months)" | ||
} | ||
}, | ||
{ | ||
"type": "derived_column", | ||
"alias": "calhiv_virally_unsuppressed", | ||
"expressionType": "simple_expression", | ||
"expressionOptions": { | ||
"expression": "SUM(prd_base.calhiv_virally_unsuppressed)" | ||
} | ||
} | ||
], | ||
"groupBy": { | ||
"groupParam": "groupByParam", | ||
"columns": ["prd_base.location_id", "prd_base.reporting_month"], | ||
"excludeParam": "excludeParam" | ||
}, | ||
"transFormDirectives": { | ||
"joinColumn": "location_id", | ||
"joinColumnParam": "", | ||
"skipColumns": [""], | ||
"disaggregationColumns": [] | ||
}, | ||
"dynamicJsonQueryGenerationDirectives": { | ||
"patientListGenerator": { | ||
"useTemplate": "pmtct-rri-report-patient-list-template", | ||
"useTemplateVersion": "1.0", | ||
"generatingDirectives": { | ||
"joinDirectives": { | ||
"joinType": "INNER", | ||
"joinCondition": "<<base_column>> = <<template_column>>", | ||
"baseColumn": "person_id", | ||
"templateColumn": "person_id" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.