diff --git a/api/src/main/java/org/openmrs/module/ugandaemrreports/reports/SetupMOH105Section4_2024Report.java b/api/src/main/java/org/openmrs/module/ugandaemrreports/reports/SetupMOH105Section4_2024Report.java new file mode 100644 index 000000000..219fc2436 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/ugandaemrreports/reports/SetupMOH105Section4_2024Report.java @@ -0,0 +1,132 @@ +package org.openmrs.module.ugandaemrreports.reports; + +import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; +import org.openmrs.module.reporting.evaluation.parameter.Mapped; +import org.openmrs.module.reporting.evaluation.parameter.Parameter; +import org.openmrs.module.reporting.report.ReportDesign; +import org.openmrs.module.reporting.report.definition.ReportDefinition; +import org.openmrs.module.ugandaemrreports.definition.dataset.definition.AggregateReportDataSetDefinition; +import org.openmrs.module.ugandaemrreports.definition.dataset.definition.EMRVersionDatasetDefinition; +import org.openmrs.module.ugandaemrreports.library.ARTClinicCohortDefinitionLibrary; +import org.openmrs.module.ugandaemrreports.library.DataFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.ArrayList; +import java.util.List; + +import static org.openmrs.module.ugandaemrreports.library.CommonDatasetLibrary.period; +import static org.openmrs.module.ugandaemrreports.library.CommonDatasetLibrary.settings; + +/** + * Daily Appointments List report + */ +@Component + +public class SetupMOH105Section4_2024Report extends AggregateReportDataExportManager { + + @Autowired + private DataFactory df; + + @Autowired + ARTClinicCohortDefinitionLibrary hivCohorts; + + private static final String PARAMS = "startDate=${startDate},endDate=${endDate}"; + + + /** + * @return the uuid for the report design for exporting to Excel + */ + @Override + public String getExcelDesignUuid() { + return "df932286-350a-4c3d-9355-13dc9b9ca387"; + } + public String getJSONDesignUuid() { + return "0995e08c-f13a-4c79-8b6c-4bb50f95eb6a"; + } + + @Override + public String getUuid() { + return "8212b1bd-ad1a-4c67-8032-f607fcd1715b"; + } + + @Override + public String getName() { + return "HMIS 105 Section 4: HTS"; + } + + @Override + public String getDescription() { + return "HMIS 105 Section 4: HTS 2024"; + } + + @Override + public List getParameters() { + List l = new ArrayList<>(); + l.add(df.getStartDateParameter()); + l.add(df.getEndDateParameter()); + return l; + } + + @Override + public List constructReportDesigns(ReportDefinition reportDefinition) { + List l = new ArrayList(); + l.add(buildReportDesign(reportDefinition)); + l.add(buildJSONReportDesign(reportDefinition)); + + return l; + } + + /** + * Build the report design for the specified report, this allows a user to override the report design by adding + * properties and other metadata to the report design + * + * @param reportDefinition + * @return The report design + */ + @Override + + public ReportDesign buildReportDesign(ReportDefinition reportDefinition) { + ReportDesign rd = createExcelTemplateDesign(getExcelDesignUuid(), reportDefinition, "HMIS_105_HTS_2024.xls"); + return rd; + } + + public ReportDesign buildJSONReportDesign(ReportDefinition reportDefinition) { + ReportDesign rd = createJSONTemplateDesign(getJSONDesignUuid(), reportDefinition, "HMIS_105_HTS_2024.json"); + return rd; + } + + + @Override + public ReportDefinition constructReportDefinition() { + + ReportDefinition rd = new ReportDefinition(); + + rd.setUuid(getUuid()); + rd.setName(getName()); + rd.setDescription(getDescription()); + rd.setParameters(getParameters()); + + AggregateReportDataSetDefinition dsd = new AggregateReportDataSetDefinition(); + dsd.setName(getName()); + dsd.setParameters(getParameters()); + dsd.setReportDesign(getJsonReportDesign()); + rd.addDataSetDefinition("S", Mapped.mapStraightThrough(settings())); + rd.addDataSetDefinition("x", Mapped.mapStraightThrough(dsd)); + rd.addDataSetDefinition("P", Mapped.mapStraightThrough(period())); + rd.addDataSetDefinition("aijar", Mapped.mapStraightThrough(getUgandaEMRVersion())); + return rd; + + } + + + + public static DataSetDefinition getUgandaEMRVersion(){ + EMRVersionDatasetDefinition dsd= new EMRVersionDatasetDefinition(); + return dsd; + } + @Override + public String getVersion() { + return "1.0"; + } +} diff --git a/api/src/main/resources/org/openmrs/module/ugandaemrreports/reports/HMIS_105_HTS_2024.json b/api/src/main/resources/org/openmrs/module/ugandaemrreports/reports/HMIS_105_HTS_2024.json new file mode 100644 index 000000000..9f2fc8239 --- /dev/null +++ b/api/src/main/resources/org/openmrs/module/ugandaemrreports/reports/HMIS_105_HTS_2024.json @@ -0,0 +1,3 @@ +{ + "json": {}, + "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
HTS DATA ELEMENTSNumber of Individuals   Below 1 yrNumber of Individuals   (1-4) yearsNumber of Individuals   (5-9) yearsNumber of Individuals   (10-14) yearsNumber of Individuals   (15-19) yearsNumber of Individuals   (20-24) yearsNumber of Individuals   (25-29) yearsNumber of Individuals   (30-34) yearsNumber of Individuals   (35-39) yearsNumber of Individuals   (40-44) yearsNumber of Individuals   (45-49) yearsNumber of Individuals   50+ years
MFMFMFMFMFMFMFMFMFMFMFMF
HT 01:Number of Individuals by Entry PointWard/IPDTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
OPDTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
ART ClinicTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
TB ClinicTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Nutrition UnitTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
STI ClinicTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Young Child ClinicTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
ANCTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
MaternityTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
PNCTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Family PlanningTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
SMCTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
EIDTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Other Facility Based PontsTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
HTS DATA   ELEMENTSNumber   of Individuals Below 1 yrNumber of Individuals   (1-4) yearsNumber of Individuals   (5-9) yearsNumber of Individuals   (10-14) yearsNumber of Individuals   (15-19) yearsNumber of Individuals   (20-24) yearsNumber of Individuals   (25-29) yearsNumber of Individuals   (30-34) yearsNumber of Individuals   (35-39) yearsNumber of Individuals   (40-44) yearsNumber of Individuals   (45-49) yearsNumber of Individuals 50+ years
MFMFMFMFMFMFMFMFMFMFMFMF
HT 02:Number of Individuals by Entry Point for   Community TestingWork PlaceTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Home   Based TestingTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Drop   In CentreTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
HotSpotsTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Other   Community TestingTested For HIV000000000000000000000000
New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
HT 03:   Total Number of IndividualsTested For HIV000000000000000000000000
New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
HT 04 Number of Individuals by PITC Testing   ApproachHealth FacilityTested For HIV000000000000000000000000
New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
CommunityTested For HIV000000000000000000000000
New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
HT 05 Number of Individuals by CICT/VICT Testing   ApproachHealth FacilityTested For HIV000000000000000000000000
New HIV Positive000000000000000000000000
 Linked to HIV Care000000000000000000000000
CommunityTested For HIV000000000000000000000000
New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
HTS DATA ELEMENTSNumber   of Individuals Below 1 yrNumber of Individuals   (1-4) yearsNumber of Individuals   (5-9) yearsNumber of Individuals   (10-14) yearsNumber of Individuals   (15-19) yearsNumber of Individuals   (20-24) yearsNumber of Individuals   (25-29) yearsNumber of Individuals   (30-34) yearsNumber of Individuals   (35-39) yearsNumber of Individuals   (40-44) yearsNumber of Individuals   (45-49) yearsNumber of Individuals 50+ years
MFMFMFMFMFMFMFMFMFMFMFMF
HT 06:Number of Individuals who received HIV Test   results000000000000000000000000
HT   07:Number of Individuals who tested for the first time000000000000000000000000
HT 08: Total Number of Individuals who tested HIV   Positive(New+Known)000000000000000000000000
HT   09:Number of Newly diagonised HIV Positive Indivduals with a test for recent   infection testingLong term   Infection000000000000000000000000
Recent infection000000000000000000000000
HT 10:HIV positive individuals with presumptive TB000000000000000000000000
HT 11:Number of Individuals tested morethan Once   in the last 12 Months000000000000000000000000
HT 12:Number of Individuals who where Counselled   and tested together as a Couple000000000000000000000000
HT 13: Number of Individuals who were tested and   received results as a Couple000000000000000000000000
HT 14: Number of Individuals with Concordant   positive results who tested as a Couple000000000000000000000000
HT 15: Number of Individuals with Discordant   results who tested as a Couple000000000000000000000000
HT 16: Individuals Counselled and Tested For PEP000000000000000000000000
HT 17: Individuals   Tested As Special Categories000000000000000000000000
HTS DATA   ELEMENTSNumber   of Individuals Below 1 yrNumber of Individuals   (1-4) yearsNumber of Individuals   (5-9) yearsNumber of Individuals   (10-14) yearsNumber of Individuals   (15-19) yearsNumber of Individuals   (20-24) yearsNumber of Individuals   (25-29) yearsNumber of Individuals   (30-34) yearsNumber of Individuals   (35-39) yearsNumber of Individuals   (40-44) yearsNumber of Individuals   (45-49) yearsNumber of Individuals 50+ years
MFMFMFMFMFMFMFMFMFMFMFMF
HT 18:Number of Individuals PrisonersTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
People With Injectable DrugsTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Uniformed   MenTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Migrant   WorkersTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
TruckersTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Fisher   FolksTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
RefugeesTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Pregnant   WomenTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
Breastfeeding   WomenTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
AGYWTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
People   With DisabilitiesTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
OtherTested For HIV000000000000000000000000
 New HIV Positive000000000000000000000000
Linked to HIV Care000000000000000000000000
"} \ No newline at end of file diff --git a/api/src/main/resources/org/openmrs/module/ugandaemrreports/reports/HMIS_105_HTS_2024.xls b/api/src/main/resources/org/openmrs/module/ugandaemrreports/reports/HMIS_105_HTS_2024.xls new file mode 100644 index 000000000..427745301 Binary files /dev/null and b/api/src/main/resources/org/openmrs/module/ugandaemrreports/reports/HMIS_105_HTS_2024.xls differ diff --git a/api/src/main/resources/report_designs/105HTS-2024.json b/api/src/main/resources/report_designs/105HTS-2024.json new file mode 100644 index 000000000..649bd1996 --- /dev/null +++ b/api/src/main/resources/report_designs/105HTS-2024.json @@ -0,0 +1,816 @@ +{ + "report_uuid": "8212b1bd-ad1a-4c67-8032-f607fcd1715b", + "report_name": "HMIS 105 HTS", + "report_alias": "105", + "report_fields": [ + { + "indicator_name": "HT01A1", + "sqlQuery": "SELECT mda.moh_2024_age_group AS age_group, gender, COUNT(a.client_id)\nFROM mamba_fact_encounter_hts_card a\n INNER JOIN mamba_fact_patients_latest_patient_demographics mdp ON a.client_id = mdp.patient_id\n LEFT JOIN mamba_dim_agegroup mda ON mda.age = mdp.age\nWHERE encounter_date BETWEEN ':startDate' AND ':endDate'\n AND a.delivery_model ='Facility Based (HCT)'\n AND current_hiv_test_result IS NOT NULL\nGROUP BY age_group, gender;", + "dissaggregations": [ + "age_group", + "gender" + ], + "values": [ + + { + "dissaggregations1": "0-4", + "dissaggregations2": "M", + "value_place_holder": "1a" + }, + { + "dissaggregations1": "0-4", + "dissaggregations2": "F", + "value_place_holder": "1b" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "M", + "value_place_holder": "1c" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "F", + "value_place_holder": "1d" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "M", + "value_place_holder": "1e" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "F", + "value_place_holder": "1f" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "M", + "value_place_holder": "1g" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "F", + "value_place_holder": "1h" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "M", + "value_place_holder": "1i" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "F", + "value_place_holder": "1j" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "M", + "value_place_holder": "1k" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "F", + "value_place_holder": "1l" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "M", + "value_place_holder": "1m" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "F", + "value_place_holder": "1n" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "M", + "value_place_holder": "1o" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "F", + "value_place_holder": "1p" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "M", + "value_place_holder": "1q" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "F", + "value_place_holder": "1r" + } + ] + }, + { + "indicator_name": "HT01A2", + "sqlQuery": "SELECT mda.moh_2024_age_group AS age_group, gender, COUNT(a.client_id)\nFROM mamba_fact_encounter_hts_card a\n INNER JOIN mamba_fact_patients_latest_patient_demographics mdp ON a.client_id = mdp.patient_id\n LEFT JOIN mamba_dim_agegroup mda ON mda.age = mdp.age\nWHERE encounter_date BETWEEN ':startDate' AND ':endDate'\n AND a.delivery_model ='Facility Based (HCT)'\n AND current_hiv_test_result='HIV+' and (previous_hiv_test_results is NULL OR previous_hiv_test_results = 'HIV-')\nGROUP BY age_group, gender;", + "dissaggregations": [ + "age_group", + "gender" + ], + "values": [ + + { + "dissaggregations1": "0-4", + "dissaggregations2": "M", + "value_place_holder": "2a" + }, + { + "dissaggregations1": "0-4", + "dissaggregations2": "F", + "value_place_holder": "2b" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "M", + "value_place_holder": "2c" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "F", + "value_place_holder": "2d" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "M", + "value_place_holder": "2e" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "F", + "value_place_holder": "2f" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "M", + "value_place_holder": "2g" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "F", + "value_place_holder": "2h" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "M", + "value_place_holder": "2i" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "F", + "value_place_holder": "2j" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "M", + "value_place_holder": "2k" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "F", + "value_place_holder": "2l" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "M", + "value_place_holder": "2m" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "F", + "value_place_holder": "2n" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "M", + "value_place_holder": "2o" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "F", + "value_place_holder": "2p" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "M", + "value_place_holder": "2q" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "F", + "value_place_holder": "2r" + } + ] + }, + { + "indicator_name": "HT01A3", + "sqlQuery": "SELECT mda.moh_2024_age_group AS age_group, gender, COUNT(a.client_id)\nFROM mamba_fact_encounter_hts_card a\n INNER JOIN mamba_fact_patients_latest_patient_demographics mdp ON a.client_id = mdp.patient_id\n LEFT JOIN mamba_dim_agegroup mda ON mda.age = mdp.age\nWHERE encounter_date BETWEEN ':startDate' AND ':endDate'\n AND a.delivery_model ='Facility Based (HCT)'\n AND current_hiv_test_result='HIV+' and (previous_hiv_test_results is NULL OR previous_hiv_test_results = 'HIV-') \n AND has_client_been_linked_to_care = 'YES'\nGROUP BY age_group, gender;", + "dissaggregations": [ + "age_group", + "gender" + ], + "values": [ + + { + "dissaggregations1": "0-4", + "dissaggregations2": "M", + "value_place_holder": "3a" + }, + { + "dissaggregations1": "0-4", + "dissaggregations2": "F", + "value_place_holder": "3b" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "M", + "value_place_holder": "3c" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "F", + "value_place_holder": "3d" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "M", + "value_place_holder": "3e" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "F", + "value_place_holder": "3f" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "M", + "value_place_holder": "3g" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "F", + "value_place_holder": "3h" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "M", + "value_place_holder": "3i" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "F", + "value_place_holder": "3j" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "M", + "value_place_holder": "3k" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "F", + "value_place_holder": "3l" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "M", + "value_place_holder": "3m" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "F", + "value_place_holder": "3n" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "M", + "value_place_holder": "3o" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "F", + "value_place_holder": "3p" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "M", + "value_place_holder": "3q" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "F", + "value_place_holder": "3r" + } + ] + }, + { + "indicator_name": "HT01A4", + "sqlQuery": "SELECT mda.moh_2024_age_group AS age_group, gender, COUNT(a.client_id)\nFROM mamba_fact_encounter_hts_card a\n INNER JOIN mamba_fact_patients_latest_patient_demographics mdp ON a.client_id = mdp.patient_id\n LEFT JOIN mamba_dim_agegroup mda ON mda.age = mdp.age\nWHERE encounter_date BETWEEN ':startDate' AND ':endDate'\n AND a.delivery_model ='Facility Based (HCT)'\n AND current_hiv_test_result='HIV-'\n AND prevention_services_received = 'YES'\nGROUP BY age_group, gender;", + "dissaggregations": [ + "age_group", + "gender" + ], + "values": [ + + { + "dissaggregations1": "0-4", + "dissaggregations2": "M", + "value_place_holder": "4a" + }, + { + "dissaggregations1": "0-4", + "dissaggregations2": "F", + "value_place_holder": "4b" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "M", + "value_place_holder": "4c" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "F", + "value_place_holder": "4d" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "M", + "value_place_holder": "4e" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "F", + "value_place_holder": "4f" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "M", + "value_place_holder": "4g" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "F", + "value_place_holder": "4h" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "M", + "value_place_holder": "4i" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "F", + "value_place_holder": "4j" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "M", + "value_place_holder": "4k" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "F", + "value_place_holder": "4l" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "M", + "value_place_holder": "4m" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "F", + "value_place_holder": "4n" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "M", + "value_place_holder": "4o" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "F", + "value_place_holder": "4p" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "M", + "value_place_holder": "4q" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "F", + "value_place_holder": "4r" + } + ] + }, + { + "indicator_name": "HT02A1", + "sqlQuery": "SELECT mda.moh_2024_age_group AS age_group, gender, COUNT(a.client_id)\nFROM mamba_fact_encounter_hts_card a\n INNER JOIN mamba_fact_patients_latest_patient_demographics mdp ON a.client_id = mdp.patient_id\n LEFT JOIN mamba_dim_agegroup mda ON mda.age = mdp.age\nWHERE encounter_date BETWEEN ':startDate' AND ':endDate'\n AND a.delivery_model ='Community Testing Point'\n AND current_hiv_test_result is not NULL\nGROUP BY age_group, gender;", + "dissaggregations": [ + "age_group", + "gender" + ], + "values": [ + + { + "dissaggregations1": "0-4", + "dissaggregations2": "M", + "value_place_holder": "5a" + }, + { + "dissaggregations1": "0-4", + "dissaggregations2": "F", + "value_place_holder": "5b" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "M", + "value_place_holder": "5c" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "F", + "value_place_holder": "5d" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "M", + "value_place_holder": "5e" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "F", + "value_place_holder": "5f" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "M", + "value_place_holder": "5g" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "F", + "value_place_holder": "5h" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "M", + "value_place_holder": "5i" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "F", + "value_place_holder": "5j" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "M", + "value_place_holder": "5k" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "F", + "value_place_holder": "5l" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "M", + "value_place_holder": "5m" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "F", + "value_place_holder": "5n" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "M", + "value_place_holder": "5o" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "F", + "value_place_holder": "5p" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "M", + "value_place_holder": "5q" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "F", + "value_place_holder": "5r" + } + ] + }, + { + "indicator_name": "HT02A2", + "sqlQuery": "SELECT mda.moh_2024_age_group AS age_group, gender, COUNT(a.client_id)\nFROM mamba_fact_encounter_hts_card a\n INNER JOIN mamba_fact_patients_latest_patient_demographics mdp ON a.client_id = mdp.patient_id\n LEFT JOIN mamba_dim_agegroup mda ON mda.age = mdp.age\nWHERE encounter_date BETWEEN ':startDate' AND ':endDate'\n AND a.delivery_model ='Community Testing Point'\n AND current_hiv_test_result='HIV+' and (previous_hiv_test_results is NULL OR previous_hiv_test_results = 'HIV-')\nGROUP BY age_group, gender;", + "dissaggregations": [ + "age_group", + "gender" + ], + "values": [ + + { + "dissaggregations1": "0-4", + "dissaggregations2": "M", + "value_place_holder": "6a" + }, + { + "dissaggregations1": "0-4", + "dissaggregations2": "F", + "value_place_holder": "6b" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "M", + "value_place_holder": "6c" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "F", + "value_place_holder": "6d" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "M", + "value_place_holder": "6e" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "F", + "value_place_holder": "6f" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "M", + "value_place_holder": "6g" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "F", + "value_place_holder": "6h" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "M", + "value_place_holder": "6i" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "F", + "value_place_holder": "6j" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "M", + "value_place_holder": "6k" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "F", + "value_place_holder": "6l" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "M", + "value_place_holder": "6m" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "F", + "value_place_holder": "6n" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "M", + "value_place_holder": "6o" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "F", + "value_place_holder": "6p" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "M", + "value_place_holder": "6q" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "F", + "value_place_holder": "6r" + } + ] + }, + { + "indicator_name": "HT02A3", + "sqlQuery": "SELECT mda.moh_2024_age_group AS age_group, gender, COUNT(a.client_id)\nFROM mamba_fact_encounter_hts_card a\n INNER JOIN mamba_fact_patients_latest_patient_demographics mdp ON a.client_id = mdp.patient_id\n LEFT JOIN mamba_dim_agegroup mda ON mda.age = mdp.age\nWHERE encounter_date BETWEEN ':startDate' AND ':endDate'\n AND a.delivery_model = 'Community Testing Point'\n AND current_hiv_test_result = 'HIV+'\n AND (previous_hiv_test_results IS NULL OR previous_hiv_test_results = 'HIV-')\n AND has_client_been_linked_to_care = 'YES'\nGROUP BY age_group, gender;", + "dissaggregations": [ + "age_group", + "gender" + ], + "values": [ + + { + "dissaggregations1": "0-4", + "dissaggregations2": "M", + "value_place_holder": "7a" + }, + { + "dissaggregations1": "0-4", + "dissaggregations2": "F", + "value_place_holder": "7b" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "M", + "value_place_holder": "7c" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "F", + "value_place_holder": "7d" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "M", + "value_place_holder": "7e" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "F", + "value_place_holder": "7f" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "M", + "value_place_holder": "7g" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "F", + "value_place_holder": "7h" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "M", + "value_place_holder": "7i" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "F", + "value_place_holder": "7j" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "M", + "value_place_holder": "7k" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "F", + "value_place_holder": "7l" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "M", + "value_place_holder": "7m" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "F", + "value_place_holder": "7n" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "M", + "value_place_holder": "7o" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "F", + "value_place_holder": "7p" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "M", + "value_place_holder": "7q" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "F", + "value_place_holder": "7r" + } + ] + }, + { + "indicator_name": "HT02A4", + "sqlQuery": "SELECT mda.moh_2024_age_group AS age_group, gender, COUNT(a.client_id)\nFROM mamba_fact_encounter_hts_card a\n INNER JOIN mamba_fact_patients_latest_patient_demographics mdp ON a.client_id = mdp.patient_id\n LEFT JOIN mamba_dim_agegroup mda ON mda.age = mdp.age\nWHERE encounter_date BETWEEN ':startDate' AND ':endDate'\n AND a.delivery_model = 'Community Testing Point'\n AND current_hiv_test_result = 'HIV-'\n AND prevention_services_received = 'YES'\nGROUP BY age_group, gender; ", + "dissaggregations": [ + "age_group", + "gender" + ], + "values": [ + + { + "dissaggregations1": "0-4", + "dissaggregations2": "M", + "value_place_holder": "8a" + }, + { + "dissaggregations1": "0-4", + "dissaggregations2": "F", + "value_place_holder": "8b" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "M", + "value_place_holder": "8c" + }, + { + "dissaggregations1": "5-9", + "dissaggregations2": "F", + "value_place_holder": "8d" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "M", + "value_place_holder": "8e" + }, + { + "dissaggregations1": "10-14", + "dissaggregations2": "F", + "value_place_holder": "8f" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "M", + "value_place_holder": "8g" + }, + { + "dissaggregations1": "15-19", + "dissaggregations2": "F", + "value_place_holder": "8h" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "M", + "value_place_holder": "8i" + }, + { + "dissaggregations1": "20-24", + "dissaggregations2": "F", + "value_place_holder": "8j" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "M", + "value_place_holder": "8k" + }, + { + "dissaggregations1": "25-29", + "dissaggregations2": "F", + "value_place_holder": "8l" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "M", + "value_place_holder": "8m" + }, + { + "dissaggregations1": "30-39", + "dissaggregations2": "F", + "value_place_holder": "8n" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "M", + "value_place_holder": "8o" + }, + { + "dissaggregations1": "40-49", + "dissaggregations2": "F", + "value_place_holder": "8p" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "M", + "value_place_holder": "8q" + }, + { + "dissaggregations1": "50+", + "dissaggregations2": "F", + "value_place_holder": "8r" + } + ] + } + + ] + } \ No newline at end of file