Can I have a Program Indicator that have categories based on optionset

Dear,

in an integration work (openIMIS-DHIS2) I have a program where the product used for an event is defined as an optionSet. I’d like to create visualizations per product but I populate this optionSet via the API (could be more than 100 products) so I cannot create 1 program indicator per option. (Also I don’t really want to have all indicators X 100 )

Is there a possibility to add a “disaggregation” of a program indicator based on the optionSet of the event ?

Thanks in advance

old related topic:
Tracker Program Indicator using data element with option sert - Support - Assistance technique - DHIS2 Community

2 Likes

Hi @pmpdelcroix,
Would you send me the API request you are using to populate this optionSet? I would like to see if we could filter it right there, please!

Additionally, I think it’s possible to create a program indicator and use the filter to choose only one option from the option set.

thank you for you reply,

I am using python code to push the data, I guess “could” create indicator via API too (by setting the filter event.product=“code1” etc) but it will make the analytics really painfull because almost all reports need disaggregation and the total: with the solution 1 indicator = 1 code I would need n+1 indicators for n product but I won’t have the capabilities of cherry picking product in the filters, or did I miss something ?

The only solution would be to use PDAC to make dataset out of program but PDAC still miss a scheduler to update the data (DHIS2 module limitation) so not really user friendly … (my module will be part of openIMIS therefore I won’t configure all the DHIS2 instances myself)

best regards

Hi @pmpdelcroix,

Thanks for sharing! In my opinion, I think it’s always better to experiment in the browser with the endpoints /api/ before using code!

You can at the time of creating a Program Indicator to filter the results to be only for a certain option which I think is the best way, but since you can also get the filtered results from the Event Reports app directly from the OptionSet (even if you don’t create an indicator).

Here’s an example where I created an option set: Products with options Product_One , Product_Two , and Product_Three, and then used the Event Reports app to filter. The interesting part is that you can check the API requests and use them in your code:

Thanks you for the reply but I don’t think I could use the event reports to do averages, max, min, (all but count) or indicators that don’t require access to the Program, can I ?

Creating the indicator via the API is not the issue, I already created models for a lots of DHIS2 endpoints I could create one more, but it is more about the freindlyness of usage, with indicators from the API the user will still have to play with hundreds of indicators if not thousand (nb product x nb indicator that need product disagregation)

if program indicators could have a disagregation using event/enrollment optionset that would be great (cat/cat combo would sync with optionset selected for disagregation), and I am sure it would make the life of other better.

In the mean time, thanks to you replies,I think we will drop the program approach and sync dataset directly enven if I loose data granularity.

br

1 Like