-
Notifications
You must be signed in to change notification settings - Fork 28
How to get population correct?
This guide is intended for implementors preparing to use CHAP - a solution for running machine learning models directly within DHIS2. CHAP works together with the Modeling app, which allows users to select covariates and import data into CHAP for analysis.
Currently, population data can be interpolated automatically by the models, but this feature is planned for deprecation. Going forward, users should ensure population data is properly structured and imported to enable accurate and reliable model results.
-
Collect at the lowest org unit level
- DHIS2 can aggregate data upward, but not disaggregate downward.
-
Create a dedicated population data element
- Name it clearly, e.g.,
Population. - Set aggregation type to:
Average (sum in org unit hierarchy)
This ensures:- The same value appears across all periods.
- Compatibility with all period types.
- Name it clearly, e.g.,
-
Use a yearly dataset
- Add the population data element to a yearly dataset.
- Assign it to all relevant org units (typically all except facilities).
- Ensure data is imported or collected for each relevant org unit.
- CHAP uses population as a core covariate in many of its models.
- Improperly configured population data may lead to misleading analytics or model inaccuracies.
- Population should be collected at the lowest possible level in the organisation unit hierarchy.
- DHIS2 supports automatic aggregation upward, but not disaggregation downward.
- If importing population data for multiple levels, be sure to configure the aggregation level on the data element carefully to prevent double counting.
- Create a dedicated data element named something like
Population. - Set the aggregation type to:
Average (sum in org unit hierarchy)
This ensures:- The data can be used across all period types.
- A constant value is shown across periods.
Example: If the yearly population is 1,000,000, that same value will appear in each month or quarter for that year.
- Add the population data element to a yearly dataset.
- Assign this dataset to the organisation units that will be used in CHAP—typically all levels except facilities.
- Ensure that population data is collected or imported for each relevant org unit in the dataset.
There is a quick hack to get around having to import data again. This hack works if you have a monthly data set where you have imported population for January, and want to use that data for all consecutive weeks / months.
- Create a new indicator in the maintenance app
- Go to the maintenance app and open the indicator list
- Create a new indicator
- Give it a proper name, short name and code
- Set the indicator type to 1
- You might have to create a new Indicator type with Factor = 1
- Set the numerator / denominator
- Numerator should be
{dataElementId}.yearToDate()- Switch out dataElementId with the correct id of your population data element id.
- Denominator should be
1