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?
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.
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 …