Program Indicator Disaggregates

Dear Community,
Suppose you have created a program indicator for the number of patients who have undergone surgery, using the date of surgery on the expression (d2:condition(‘isNotNull(Date of Surgery)’,1,0)).

Now, you have a data element for hospital departments which is attached to approximately 17 option sets representing different departments where surgeries can be performed.

If you want a report on the number of surgeries per department, how can you disaggregate the program indicator “number of patients who have undergone surgery” by departments without having to create 17 separate program indicators, such as:

Number of patients who have undergone surgery - Dept1
Number of patients who have undergone surgery - Dept2
Number of patients who have undergone surgery - Dept3

Number of patients who have undergone surgery - Dept17

PLEASE HELP and REPLY.

Thank you.

Hi @Geoffrey_Nyamongo

Although the approach I’m suggesting doesn’t include creating an indicator. If you are trying to view the number for the data element in a disaggregated format so one possible solution to get that result is using the Data Visualizer app. Add data, select Data Element type and then choose ‘details only’:

You should be able to see the list of departments. I hope this helps.

@Gassim
Thank you for a quick response.

I have done as you have done as you advice.

When you update it gives this error.
image

Are you using a tracker data element?

Hi @Geoffrey_Nyamongo

How come I see only one selected “department” when it’s supposed to disaggregate to many departments?

What is the visualization type you are using?

Thanks!

I am using data visualizer to view department tracker data element, see below.

Attached to department option sets, see below

The department is attached to about 17 hospital departments option sets as shown below, see below.

Thanks! And what is the visualization type that is selected in the Data Visualizer app?

The same one (Data Visualizer app) you have shared its image. Also See, the DHIS version
image

The “details” work for category option combos, not option sets. That’s why each individual department doesn’t show up.

Since the use case is using a data element with an option set of 17 options (1 per department), I think you will have to create a program indicator per option.

The typical alternative is to have a separate data element per option, which isn’t as user-friendly with programs (much more common within aggregate data sets).

Thank you @lnunez
Are you suggesting I create category option combos from the department option sets? Kindly guide me on how to resolve this. Thank you.

Since you’re using a tracker data element and option set, the best way forward is to use program indicators. You can also use Event Visualizer (selecting the data element, it will show the results per disaggregation).

Dear @lnunez
Yes. Event Visualizer can do it with other tracker data elements but it can’t support the program indicator.

How will I use Event Visualizer to generate reports in cases where one must create a program indictor from a date or combination of many other data element? For example number of patients who have undergone surgery , is created from the date of surgery on the expression (d2:condition(‘isNotNull(Date of Surgery)’,1,0)).

Correct, Event Visualizer does not support program indicators. You would select the data element that has the option set.

For the program indicators, you would use Data Visualizer. The analytics/calculations are automated, since ‘Date of Surgery’ is a data element within the event.

Hi @lnunez,

We have a HIV tracker, and we want a program indicator to count the patients who Initiated Antiretroviral Therapy Within 6 Months of HIV Diagnosis (we have two fields: HIV diagnosis date and ART initiation date). We came across clues below, but we would like to have a full understanding of how we should get a program indicator working to get the correct output.

d2:daysBetween(V{analytics_period_start}, Date DE})… && d2:daysBetween(Date DE}, V{analytics_period_end})…

Could you explain what the above means?

Thanks

Hi @hernandezmachava off the top of my head, here are some quick thoughts and considerations:

  • Since you’re counting patients, which I assume is your tracked entity type, the type of analytics to use is enrollment instead of event.
  • Since you want to count within 6 months, the equation will be in expression, and you likely don’t need to have anything in filter.
  • The equation in expression will be something like if(d2:daysBetween(HIV diagnosis date, ART initiation date) < 180, 1, 0). Basically, assuming 180 days = 6 months, if the number of days between these two dates is less than 180 days, count the patient, else don’t count the patient.
  • I don’t recall off the top of my head if the d2:daysBetween function subtracts the 2nd date from the 1st or vice versa, so take a look and be careful since the wrong order would give you a negative.
  • You may also want to consider if there is no ART initiation date and/or no HIV diagnosis date. Off the top of my head, I’m not sure if the d2:daysBetween function would return 0 if one or both of the dates have no value (which, if it returned 0, would be less than 180 and incorrectly count the patient). You could do this by a nested if statement or including a condition within the if (e.g., using &&).

I hope this is helpful, and let us know if it works out for you!