Stream: implementers
Topic: How to include "display" questions in questionnaireResponse?
Tim Berezny (Feb 19 2020 at 00:11):
We have a use case where we want to include a Questionaire item of "type=display" in the QuestionnaireResponse.
It looks to me like the display text into QuestionnaireResponse.item.text, and simply include no answer at all - which would imply that this element is meant for just display. However, this would mean that we could not imply unanswered questions by having a QuestionnaireResponse.item.text with no answer and instead would need to explicitly set the answer as null for unanswered questions.
Is this the correct approach?
Lloyd McKenzie (Feb 19 2020 at 00:48):
There's no expectation that 'display' items would appear in a QuestionnaireResponse, but agree we should make this clearer. You can't have 'null' as the value of an answer - if there is no answer for a question, you omit the answer entirely. In fact, you typically omit the question too. The only content that should be in a completed QuestionnaireResponse is the questions that have answers and any groups that contain them (to allow appropriate organizing of the grouped questions). Can you submit a change request for us to clarify that?
Tim Berezny (Feb 19 2020 at 01:03):
I can submit a change request, a few more comments first:
- The narrative for questionnaire currently explicitly states that display items can be included:
"When a QuestionnaireResponse references a Questionnaire, all the items in the questionnaire SHOULD be included in the QuestionnaireResponse if they are relevant to the interpretation of the answers, including items of type = display."
Is this statement incorrect? I can see in my questionnaire builder logic having an ability to specify whether display text is included in the output or not...
- When a questionnaireResponse is rendered in combination with a questionnaire, having not including questions with no answer is fine. However, when evaluated in isolation of the questionnaire it is meaningful to know that a question was asked but not answered (like when I am looking at a paper form). A question missing from the response due to non-answer is different in meaning than a question missing due to non-asking /conditional questions.
Is there a mechanism by which we can make explicit in the questionnaire response that a question was asked but not answered?
Lloyd McKenzie (Feb 19 2020 at 01:06):
It may be my recollection is incorrect - the line you specify is pretty clear. Certainly something for us to discuss.
Lloyd McKenzie (Feb 19 2020 at 01:07):
Without the Questionnaire, you don't really know if something was asked or not - something could have been asked and then subsequently disabled due to enableWhen from changing some other answer.
Tim Berezny (Feb 19 2020 at 02:14):
Would it be ok to say in an implementation that if you want to be explicit that a question wasn't answered, to set the answer = "no-answer"?
Lloyd McKenzie (Feb 19 2020 at 02:17):
Only if that's one of the allowed answers for the question
Last updated: Apr 12 2022 at 19:14 UTC