Generating of a predictor

Please help me to generate a predictor to count the number of MOH (Org Unit level 4) areas contain one or more health facilities (Org unit level 5). Thanks in advance

1 Like

Hi @kmnisal,

Have you checked the user manual on how to manage and create Predictors?

Best,
James.

Yeah. I went through it, But I couldn’t find a “IF” function.

1 Like

Hi @kmnisal, try this: IF(ISNULL(#{T7OyqQpUpNd}), 10, 20)

You can find the conditions on page 315: https://docs.dhis2.org/master/en/user/dhis2_user_manual_en.pdf

2 Likes

Hi @yogita,

Welcome to the DHIS2 Community and thank you so much for sharing this.

Best,
James.

@kmnisal I do not think that a predictor would be able to produce this count for you. Predictors can count the number of org units that have reported some value. They are not able to count the number of org units if no values have been captured.

I suggest you used the org unit distribution report in the reports application. This will not show you the exact number but will make it relatively easy to count.

If you do want to count the number of reporting org units, I suggest you make a predictor that then counts the number of facilities based upon some data element that is consistently and reliably captured.

For example in the generator you could use: COUNT((DataElementUID == TRUE),1,0)
and set the aggregation level to OUL5 and assign this predictor to a new data element. This will count the number of org units at OUL5 that have entered any data.

If you want to know the number of org units at OUL4 with one or more org units at OUL5 then you would need to make another predictor with an aggregation level set to OUL4. The generator would then be COUNT((PredictedDataElementUID >= 1),1,0). Here the ‘PredictedDataElementUID’ is the data element containing the values from the first predictor. Keep in mind that is a count of the number of reporting org units ultimately and not just a count of org units

Please let us know how it goes and if you need more help.

3 Likes

Hi @kmnisal,

Were you able to get this done from the recommendations given here?

Kindly let us know.

Best,
James.

Thank you very much. I will try this and let you know.

1 Like

Thank you very much Scott

1 Like