Stream: questionnaire
Topic: Checkbox & required
Paul Lynch (Sep 15 2020 at 17:07):
In HTML, if you have a checkbox, and mark it required, the form is not valid unless the checkbox is checked. Is that the intended behavior for FHIR Questionnaire boolean questions with required=true & i itemControl set to 'check-box'? I think in previous discussions we had said checkboxes conceptually have three states (true, false, and unanswered), in which case "required=true" should mean the answer is present and either true or false.
Lloyd McKenzie (Sep 15 2020 at 17:08):
Right. If you can't distinguish 'non-answered', then you have to treat the checkbox as answered
Brian Postlethwaite (Sep 15 2020 at 20:46):
I agree with this answer, and think should be documented.
Our renderer does put in false in not selected. If we care about the use making some form of action, but in a drop down, or a 3 value coding.
Many people don't think a checkbox is tristate, and don't interact with the control if the value looks correct. So is an answer.
Paul Lynch (Sep 15 2020 at 21:09):
I found J#23019 (approved, change required).
Koray Atalag (Sep 28 2020 at 22:54):
@Brian Postlethwaite I haven't been able to follow the threads here but could argue that you'd be needing actually 4 states from my experience:
- Yes (explicit - confirmed by observation, asserted by subject, provider, other)
- No (explicit - confirmed by observation, asserted by subject, provider, other)
- Unknown (positively asserted; e.g. preferred not to answer, masked etc.)
- Null (truly! and it is the default status unless an assumed/default value has been set).
Also some questions would/coult not have an explicit No answer; I've encountered this back in 2000s when implementing a structure questionnaire for endoscopy reporting. I've been working with openEHR models at that time but it is completely applicable to FHIR structured content; the idea is real-world concepts can have explicit No whereas some abstract concepts cannot - full details explained in the attached paper (core concept vs non-core - might seem academic but actually it is a real-world clinical system implementation!)
Atalag_Yang_2010_From-openEHR-Domain-Models-to-Advanced-User-Interfaces.pdf
Hope I am not derailing this conversation!
Lloyd McKenzie (Sep 28 2020 at 23:05):
If you're wanting 'unknown', then you're no longer dealing with a boolean, and checkbox is no longer on the table as a control - you're looking for a set of radio buttons or a dropdown or something like that.
Brian Postlethwaite (Sep 28 2020 at 23:17):
Where we've had these explicit requirements, we also do the dropdown or radios, the subtleties of checkbox apart from yes/no is normally lost on users entering the information.
Koray Atalag (Sep 29 2020 at 02:05):
I had implemented a 4 state checkbox back then - the clinicians found it very intuitive but I understand potential cognitive friction for broader use cases.
Paul Lynch (Sep 30 2020 at 14:50):
@Koray Atalag That is interesting. Thanks for sharing that. What did the checkboxes look like for the other two states?
Paul Lynch (Sep 30 2020 at 15:00):
Lloyd McKenzie said:
Right. If you can't distinguish 'non-answered', then you have to treat the checkbox as answered
So then, different form renderers producing QuestionnaireResponses for the same Questionnaire and the same user input, could have different numbers of "answers". Is that a problem? Something analyzing QuestionnaireResponse data, unless it knows what created the QuestionnaireResponse, would not be able to distinguish between "false" and "unanswered", and would not be able to accurately count the number of answered questions. I suppose one could say that if such things were important, the Questionnaire should be be designed with answers lists rather than booleans.
Lloyd McKenzie (Sep 30 2020 at 15:10):
A QuestionnaireResponse item that isn't answered wouldn't have item.answer populated
Paul Lynch (Sep 30 2020 at 15:14):
@Lloyd McKenzie We are discussing the case, per your previous comment, in which some form renderers only have a two-state checkbox and can't distinguish between "unanswered" and "false".
Lloyd McKenzie (Sep 30 2020 at 15:18):
If you're analyzing the data, you have to treat the presence of an answer as 'answered'. Essentially the system behaves as one that 'defaults' the booleans to false and the user has to change if they disagree.
Koray Atalag (Oct 01 2020 at 08:13):
@Paul Lynch I'll send you a quick video
Last updated: Apr 12 2022 at 19:14 UTC