Stream: implementers
Topic: How to define an enableWhen for a question with multiple cho
SAM TSAI (Jul 19 2021 at 18:02):
Q11 is a multiple choice (check-box) question.
"enableWhen": [
{
"operator": "=",
"question": "Q11",
"answerString": "option1"
}
]
Q1: Is “answerString” is the correct answer type for multiple choice (check-box) question ?
Q2: Can define more than one answer . For example, when the user’s input are option1 and option2, then enable it ?
Eric Haas (Jul 19 2021 at 18:17):
better to ask in the #questionnaire stream (sorry mistyped)
Elliot Silver (Jul 19 2021 at 18:32):
@Eric Haas Why subscription? Isn't this for #questionnaire ?
Peter Muir (Jul 19 2021 at 18:57):
This should be asked in the Questionnaire stream, but the answer is to use repeats = true for multiple choice checkbox rather than radio button response. enableWhen would have to address each potential trigger.
https://www.hl7.org/fhir/questionnaire-definitions.html#Questionnaire.item.repeats
Brian Postlethwaite (Jul 19 2021 at 23:22):
There is also the enableBehaviour
property that indicates if all or any of the enableWhen options are selected, you could could create something like this:
"enableWhen": [
{
"operator": "=",
"question": "Q11",
"answerString": "option1"
},
{
"operator": "=",
"question": "Q11",
"answerString": "option2"
}
],
"enableBehaviour": "all"
This would only then activate when Q11 has both option1 and option2 selected.
or it you had any
instead of all, it would be an or style test.
Last updated: Apr 12 2022 at 19:14 UTC