Select All That Apply question

Hi all,

We have a checkbox question about type of a disease treatment. The options are: Pills, Diet, Exercise, None, Other (specify).

Can you help answer the following questions?

  1. How can we configure a checkbox question in DHIS 2?
  2. We also want a validation condition to prevent the user from selecting ‘none’ in concert with additional options. if this happens an error message should be displayed saying: None can not be selected with other responses!

Thanks in advance

Hi @hernandezmachava

I can share helpful guidelines from the documentation and if you have any specific questions please let me know!

Since it appears that you are working on a tracker program then you can make use of program rules: Programs - DHIS2 Documentation

Please let me know if there’s anything that’s not clear or if this doesn’t answer your question. Thanks!

Hi @Gassim and @jason,

By reading some posts, I could understand that there is no way to have a single data element with multiple choices. What I can do is to split the choices into separate data elements.

As the choices are not attached to the data element, I do not know I can create the validation condition through program rules. How can I implement something like not(selected(DE, ‘none’) and count-selected(DE) > 1)”? I mean: “either the question is exclusively answered with ‘none’ or ‘none’ is not one of the selected options

Thanks

all-none
See the above video that I think fulfills your need. 2 prules assign values (null and true) to DEs given the value of the all and null DEs. I set this up in Play, the export of the program is here if you need to reproduce.
metadata (17).json (53.7 KB)

1 Like