Stream: implementers
Topic: Choice vs MultipleChoice
Chessler (Apr 06 2017 at 14:00):
Hello there,
I've been trying to find a way to make a distinction between showing an item of type choice as radio buttons (1 option allowed) and as checkboxes (mutliple options allowed). Is there a way in the FHIR STU3 format to do this?
Eric Haas (Apr 06 2017 at 14:36):
UI stuff is generally out of scope for FHIR
Chessler (Apr 06 2017 at 14:52):
Okay let me rephrase; How do I distinct between an item with multiple answers and a single answer in the Questionnaire Resource...?
Lloyd McKenzie (Apr 06 2017 at 14:56):
Actually, there's an extension that deals with UI guidance - see http://hl7.org/fhir/extension-questionnaire-itemcontrol.html. To determine whether a given question can have multiple answers or only one, use Questionnaire.item.repeats
Lloyd McKenzie (Apr 06 2017 at 14:57):
Note that repeating questions can be handled using a variety of user interface approaches - including repeating the entire question and the answer choices multiple times (along with all child items), or using check boxes or providing multiple answer slots beneath the question. It's up to the rendering engine what approach makes most sense based on the design of the questionnaire, the capabilities of the renderer and any hints provided by extensions like the one noted above.
Chessler (Apr 07 2017 at 07:04):
@Lloyd McKenzie Thank you for your reference to the itemcontrol extension. That really helped me out.
On the other hand; I don't really understand your comment about Questionnaire.item.repeats. Since the items I'm talking about are of type choice, and itemcontrol enables me to have a user select multiple answers via check-box interface, why (and how) exactly would I want to make use of questionnaire.item.repeats?
Lloyd McKenzie (Apr 07 2017 at 13:27):
If Questionnaire.item.repeats = true, you can have multiple answers to a question in the QuestionnaireResponse. If it's false, you can't. That's orthogonal to what control you use to capture those multiple answers.
Michele Mottini (Apr 07 2017 at 16:40):
If the item is of type choice and you use either check-boxes or radio-buttons in your UI then repeats = true -> check-boxes, repeats = false -> radio-button
Lloyd McKenzie (Apr 08 2017 at 00:04):
Yes.
Brian Postlethwaite (Apr 10 2017 at 03:38):
and if that's based on a binding to a valueset, be careful as to how big the valueset is, as that can make a difference.
Brian Postlethwaite (Apr 10 2017 at 03:39):
We identify multiple choice as Lloyd suggests from the item.repeats value
Last updated: Apr 12 2022 at 19:14 UTC