FHIR Chat · Questionnaire Response Multiple Answers · implementers

Stream: implementers

Topic: Questionnaire Response Multiple Answers


view this post on Zulip Patrick Werner (Jun 29 2016 at 12:54):

we are currently wondering about the best practice of generating questionnaireResponses from questionnaire resources. Currently the simplest way seems to just add a questionnaireresponse.question.answer with the linkid in the question for every answer and ignore the groups of the questionnaire for the qAnswer.
This way you would receive a flat questionnaireResponse Resource which could be assigned to the Questionnaire vie the (unique) linkIDs. Any thoughts about this idea?

view this post on Zulip Grahame Grieve (Jun 29 2016 at 13:48):

I think it should have the same structure - groups are very often repeating, and you'll lose the structure if you don't nest them

view this post on Zulip Brian Postlethwaite (Jun 29 2016 at 21:40):

Most definitely need the groups in there to keep the answers to group sections together.
Especially with repeating groups (like in a table on a form, the group holds the answers for each row)

view this post on Zulip Pascal Pfiffner (Jun 30 2016 at 08:43):

In our implementation, linkId is always unique, so we generate a flat response. Meaning right now we lose the group structure in responses collected via ResearchKit – works in our case, but agreed, would be nice to preserve the structure.

view this post on Zulip Brian Postlethwaite (Jun 30 2016 at 09:57):

So you wouldn't be able to collect tabular, or repeating group structure data, which is ok for some data, but there are many forms that it is required.

view this post on Zulip Patrick Werner (Jun 30 2016 at 12:22):

you can collect repeating groups or answers, the repeating items just get the same linkID. And Thanks @Pascal Pfiffner we will do it the same way -> flat responses, thx for confirming this idea. With unique linkIds and the corresponding questionnaire resource you should be able to map the flat answers back to a hirarchicle structure in the future (if it will needed sometimes)

view this post on Zulip Pascal Pfiffner (Jun 30 2016 at 12:24):

We wish to do the same, but due to the round trip via ResearchKit it's not trivial to keep track of the groups w/o gymnastics.

view this post on Zulip Brian Postlethwaite (Jun 30 2016 at 12:35):

That then doesn't associate the repeated items with the others on the row.

view this post on Zulip Brian Postlethwaite (Jun 30 2016 at 12:37):

you need both the items LinkId, and the Parent question's answer id. to be able to group the row's answers together.

view this post on Zulip Pascal Pfiffner (Jun 30 2016 at 12:45):

We currently only support repeating items for "type": "choice". So the answer to the question just has several Coding elements in its answer.

So, actually, is there a default behavior for repeats: true? Are there examples for non-choice questions or groups?

view this post on Zulip Pascal Pfiffner (Jun 30 2016 at 12:46):

Is the assumption correct that the combination of type: choice and repeats: true simply means that this is a multiple choice question?

view this post on Zulip Brian Postlethwaite (Jun 30 2016 at 12:54):

If you have no repeating groups, then you are fine (which means no table structures)

view this post on Zulip Brian Postlethwaite (Jun 30 2016 at 12:55):

But still would make it harder to process the questionnaire without the groups if they aren't there.
(Easier in STU3 where you don't need any groups if you don't want them)

view this post on Zulip Jonathan DeVries (Jun 30 2016 at 18:20):

That is what i believe, but i dont think you will get far without supporting both repeating groups and repeating questions that arent choice or open-choice.

view this post on Zulip James Daniels (Jul 17 2019 at 17:18):

I am trying to find the best way in the questionnaire response to represent multiple answers to a single question (checkboxes in the UI) as well as a question that can be answered multiple times. What seems to make sense for both of these is something like this:

-- {
-- -- "linkId": "#groups/inputData/multiselect",
-- -- "definition": "DataElement/123-123",
-- -- "text": "What medications should the patient be taking?",
-- -- "answer": [
-- -- -- {
-- -- -- -- "valueCoding": {
-- -- -- -- "code": "drugA"
-- -- -- -- }
-- -- -- },
-- -- -- {
-- -- -- -- "valueCoding": {
-- -- -- -- "code": "drugB"
-- -- -- -- }
-- -- -- }
-- -- ]
-- }

But of course, if a multi-select needed to be answered multiple times, I'd be sunk.

I combed through these chats and I haven't found an established pattern. Is there one?

view this post on Zulip Lloyd McKenzie (Jul 17 2019 at 17:27):

What do you see as the difference between a question that can have multiple answers vs. a question that can be answered multiple times? (Because we couldn't come up with a difference - and think they're both handled the same way - as you showed)

view this post on Zulip James Daniels (Jul 17 2019 at 17:30):

It's good to know I'm kind of on the right track. :slight_smile:

I see your point, @Lloyd McKenzie, there isn't really a difference, I'm just running up against the conflict of multi-answer, multiple times... which is not a requirement at the moment anyhow, so maybe I can just carry on as I have been.

view this post on Zulip James Daniels (Jul 17 2019 at 18:00):

...that said, if anyone has solutions for the case of multi-selects answered multiple times, I'd love to hear them.

view this post on Zulip Lloyd McKenzie (Jul 17 2019 at 18:06):

The only use-case I'm aware of is if the multi-select is in a repeating group - in which case you've got the repetition on the group and a separate repetition on the question.

view this post on Zulip Brian Postlethwaite (Jul 18 2019 at 09:58):

Agree with this too. It's what my system will do.

view this post on Zulip Anubhav Gulati (Sep 30 2021 at 14:59):

Do we have some way to assign id for each question response. As an example, if there is a multi select check box question with multiple answer options .
Question - Which countries you have travelled ?
Answer Option -
a) US
b) India
c) Australia
d) New Zealand

Can I assign ID to these different answer responses for same question.

view this post on Zulip Lloyd McKenzie (Sep 30 2021 at 17:09):

Already asked here. (Please only ask questions in one stream at a time unless specifically instructed to ask them in another place.)

view this post on Zulip Anubhav Gulati (Sep 30 2021 at 18:14):

Lloyd McKenzie said:

Already asked here. (Please only ask questions in one stream at a time unless specifically instructed to ask them in another place.)

My bad. I created under questionnaire stream then I realized that I should create under implementers stream.

view this post on Zulip Lloyd McKenzie (Sep 30 2021 at 19:05):

Actually, #questionnaire stream is the best place for this question.


Last updated: Apr 12 2022 at 19:14 UTC