Event - Counting number of event for which there is a missing value for a specific data element

Dear all,
Not sure where to post this. But we are trying to create Program indicators counting missing values and can’t find a solution for Data elements linked to option sets.

e.g. we have a DE which is “Lab test” with option set “Positive / Negative / Unknown”. We have currently 3 PIs for the Number of cases with positive result, No. cases with negative result, No. cases with unknown result. We would like to have also a PI calculating the No. cases for which the information of the lab test is missing. How should we do this?

Best
Lise.

2 Likes

@GROUT_Lise

In the criteria, you use the function
!d2:hasValue(‘Lab test’)

The prefix exclamation mark means “NOT”, and the hasValue function checks if ‘Lab test’ has a value.

So this criteria will filter out and count those events (or enrollments, if you want the number of cases with missing lab test results instead of the number of lab tests with missing results) where the lab test result is missing.

Best regards
Calle

3 Likes

Great!
Thank you so much Calle. We will test this ASAP!
Warm regards
Lise

2 Likes

Hello,

Thank you! It’s finally solved. The way to do is:

d2:hasValue(#{A0987654321.B0987654321}) != true

The aggregation type of the Program Indicator must be on COUNT (maybe also the aggregation type of the DE?).

Just confirmed with Markus that the exclamation mark before !d2:hasValue(...’) won’t work.

4 Likes

@JIMENEZ_POMARETA_Ram

Sigh - you are correct - the ! (NOT) and the field name encapsulated in single quotes work fine in program RULES but not in program INDICATORS. So using != true (or the equivalent == false) is the way to do it. Apologies for leading you astray - the bewildering variations between the rules and indicators keep on catching me out …

Regards
Calle

3 Likes

Hi,

I am having a similar issue. I want a count of the events where a date OR text response was not recorded.

I tried using the following formats:

d2:hasValue(#{A0987654321.B0987654321}) != true

d2:hasValue(#{A0987654321.B0987654321}) == false

And aggregation was set to count. Neither of these worked for me. Is there a way to configure a similar expression for dates and text ?