Stream: implementers
Topic: Questionnaire multiple-choice number of choosable answers
Luca Hollenberg (Nov 24 2017 at 13:08):
I'm stucking at the questionnaire's specification and its items of item type multiple choice. When i've got an item with several options for me it's not clear what the default value for the minimum and maximum number of chooseable options is. Is it meant to be as there's only one choosable option or am if free to answer as many options as possible by default? And next to this issue: When i want to give those special items a limitation of answerable options am i right to do this using the ElementDefinition's min/max elements?
Brian Postlethwaite (Nov 24 2017 at 13:12):
ElementDefinition is for StructureDefinitions.
For the Questionnaire you should use the http://hl7.org/fhir/extension-questionnaire-maxoccurs.html extension to indicate the maximum number of multiple choice options selecting.
There is also an exclusive option selection
http://hl7.org/fhir/extension-questionnaire-optionexclusive.html
Brian Postlethwaite (Nov 24 2017 at 13:13):
To permit multiple choice options, just select the repeats for the question that you want to permit multiple answers.
Ville Lindholm (Nov 24 2017 at 13:31):
What does "select the repeats" mean? You mean the repeats
boolean? The documentation for that value is a bit vague. So if repeats
is false that's the same as maxOccurs = 1?
Ville Lindholm (Nov 24 2017 at 13:36):
At the moment we have implemented multiple choice questions in the following way:
1) "Radio button" multiple choice questions: the option
array size > 0 and repeats = false
2) "Checkbox" multiple choice questions: the option
array size > 0 and repeats = true
Is this correct? We are basically interested in implementing maxOccurs = 1 and maxOccurs = Infinity, so is the information above enough and follows the standard? Or do we need the extension as well?
Lloyd McKenzie (Nov 24 2017 at 14:10):
If you just want maxOccurs = 1 and maxOccurs = infinity, the repeats boolean is all you need. The extension is when you want to say things like "choose at least two, but no more than 4".
Ville Lindholm (Nov 24 2017 at 14:22):
Great! Having just looked at the description of repeats
in the docs again, I still think it's not very easy to get what the boolean does. But I guess someone else has been asking this question here before me, since our implementation does seem to be correct :)
Lloyd McKenzie (Nov 24 2017 at 14:31):
If you have suggestions that would clarify the description, those are always welcome :) Just click on the "propose a change" link at the bottom of any page in the spec. There's a one-time (free) registration after which you can propose any changes you wish.
Ville Lindholm (Nov 24 2017 at 14:31):
I'll do that!
Brian Postlethwaite (Nov 26 2017 at 11:34):
Yep, radio and checkbox we do the same way!
Last updated: Apr 12 2022 at 19:14 UTC