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?
How can we configure a checkbox question in DHIS 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!
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”
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)