Stream: questionnaire
Topic: QuestionnaireResponse: Skipping a question
Kyle Neumeier (Aug 02 2019 at 21:32):
Is there a standard mechanism used to indicate that a user clicked a "skip this question" button when taking a questionnaire?
I want to record the fact that the user saw the question on the questionnaire, but chose not to answer it
I guess I could add the question to the questionnaireresponse.item without an answer...but that seems kind of ambiguous
Paul Lynch (Aug 02 2019 at 21:43):
I don't know about a "standard mechanism", but one way to do that would be to have the "skip question" button be a checkbox that would be part of the Questionnaire definition (and so it would be sent back with the response). You could use item.enableWhen to hide the other question with that checkbox was checked.
Kyle Neumeier (Aug 02 2019 at 21:46):
Thanks. That's not a bad idea. But user could choose to skip a question with other answer types, like integer or free text for example.
My problem might be pretty specific, unsure about that. So any ideas welcomed :)
Paul Lynch (Aug 02 2019 at 21:52):
I'm not sure how the data type of the question being skipped affects things.
Kyle Neumeier (Aug 02 2019 at 21:57):
Hmm, had been thinking that you meant that I should just add a question.option with value = "skip". But maybe you're saying I add a second question
Lloyd McKenzie (Aug 02 2019 at 22:14):
You could have a question that allows an answer of "answer" or "skip" with a child question that actually captures an answer. That said, in most cases, once the user submits the form, the presumption is that they've been presented with all of the 'enabled' questions and any without answers were skipped over. (Though I suppose in some cases they might have been skipped over accidentally rather than on purpose.)
Kyle Neumeier (Aug 02 2019 at 22:23):
maybe another way of saying this is that the questions on this questionnaire are optional. User chooses not to answer a question. Adding another answer for all optional questions seems heavyweight.
Lloyd McKenzie (Aug 02 2019 at 22:25):
It's very heavy-weight. More typical is you just omit an answer. If the QuestionnaireResponse is marked as 'complete', it means the user has seen all the questions and answered all those they care to.
Kyle Neumeier (Aug 02 2019 at 22:30):
Ok, thanks, that makes sense. Took me a second to frame my question correctly. My initial question was overly complicated :)
Cameron McKinney (Jan 22 2021 at 16:42):
I had a question along these lines as well--for an unanswered question, would the expected structure be an item node with no answer node, or an item node with an empty answer node, or should both be supported?
Paul Lynch (Jan 22 2021 at 16:57):
A QuestionnaireResponse would not include items that do no have answers, unless those items had child items with answers.
Cameron McKinney (Jan 22 2021 at 17:47):
Understood--so the idea is that the reader of the QuestionnaireResponse would refer to the linked Questionnaire and already have information that questions were skipped because they would be in the Questionnaire but not the response?
Paul Lynch (Jan 22 2021 at 17:55):
Right.
Brian Postlethwaite (Jan 25 2021 at 08:42):
I thought display items needed to be in the response too? (for supporting what display was shown to the user?)
Brian Postlethwaite (Jan 25 2021 at 08:43):
(I just updated me renderer to do this last week)
Lloyd McKenzie (Jan 25 2021 at 15:14):
We don't have a rule in SDC mandating it be there - though I agree it's good practice.
Last updated: Apr 12 2022 at 19:14 UTC