What is advantage of using an Option set with Yes/No options attached to a data element rather than a Yes/No Value Type Data element

Hi all,

I would like to know the difference between a data element with an Option set with Yes/No options attached to it a Yes/No Value Type Data element. Which would be infinitely preferable? Iam in about whether to use the first or the second.

Thanks.

I Have the same doubt

Hi Davuya,

I assume you’re talking about Program data elements here, since Yes/No isn’t used very often in Aggregate?

The main difference is that:

  • With Yes/No, I think the underlying value is stored in the database as true/false (with a non-response stored as null), but will then be rendered as 1 or 0 in the analytics tables.
  • With an Option Set you can choose your own underlying value for Yes and No, and add other options if needed. You can, for example, record a ‘Not stated’ option, so you can distinguish between true missing data and incomplete data capture.

Having said that, I think 1 and 0 is still a great choice for Yes/No values even with your own Option Set, as it gives you lots of useful options within program indicators. (For example, you can easily count values to get a denominator and sum values to get a numerator within a single program indicator.)

There used to be bugs in DHIS2 with how the Yes/No value type displayed in analytics, so you might find some older users (like me!) have fallen into the habit of creating their own Yes/No Option Sets, rather than using a Yes/No data type. But I’m pretty sure those bugs have been fixed by now, so it should be fine to use either.

Cheers, Sam.

Hi @SamuelJohnson,

I am perfectly happy with your explanation.

Thank you very much