Stream: implementers
Topic: Forge and QuestionnaireResponse
Duncan McLean (Dec 14 2016 at 12:16):
Hi
I'm trying to define a questionnairereponse the effectively has a number of distinct sections (or groups I guess).
I'm trying to achieve this by attempting to slice the inner group element, within the group section of the definition. It seems the Forge tool does not like this - it creates a new element, but not sub-elements (linkid, text, title etc). Am I approaching this incorrectly? If I edit the XML (adding a nested group element) by hand and load it into Forge, it sees the group as a slice and displays it with all the elements.
Has anyone achieved something similar - if so, can they steer me in the right direction:
To demonstrate:
...
QuestionnaireResponse
root
- group element - sliced
- Section 1 (sub-group) - slice - question 1.1 - answer 1.1 - Section 2 (sub-group) - slice - question 2.1 - answer 2.1
...
etc
Thanks
Duncan
Michel Rutten (Dec 14 2016 at 12:47):
Hi Duncan, thank you for reporting this issue! I think I can reproduce it in the current Forge 14.4.1 release. If I slice QuestionnaireResponse.group.question and add a slice, then Forge does not generate child elements (linkId, text, answer) for the slice. Same issue if I try to slice QuestionnaireResponse.group.question.answer. However slicing the identifier element works correctly. I'll investigate the issue.
Duncan McLean (Dec 14 2016 at 15:34):
Thanks!
Brian Postlethwaite (Dec 15 2016 at 04:23):
Also, you might note that this is probably not what you want to do with QuestionnaireResponse, that is the role of the Questionnaire resource itself. It provides the definition of how a QuestionnaireResponse should be structured, and all the other metadata around its use, such as prompts for users, valuesset bindgings, enabling-when conditions, data types etc.
Brian Postlethwaite (Dec 15 2016 at 04:24):
Servers that support validating QuestionnaireResponses validate them against the Questionnaire they were created against.
Duncan McLean (Dec 15 2016 at 08:48):
Hi @Brian Postlethwaite
Thanks for this - so to get my head straight - do I create the grouped structure in the Questionnaire and then reference the questions in the questionnaireresponse?
Could you point me to an example of this that I can refer to?
Thanks
Duncan
Brian Postlethwaite (Dec 15 2016 at 08:50):
Just create the instance of a Questionnaire with the structure that you desire, then create a matching QuestionnaireResponse (using the linkId to match the items in the Questionnaire to the Response), and populate the Q reference in the QR.
Brian Postlethwaite (Dec 15 2016 at 08:51):
http://build.fhir.org/questionnaireresponse-example-gcs.xml.html
and
http://build.fhir.org/questionnaire-example-gcs.xml.html
Duncan McLean (Dec 15 2016 at 10:06):
Thanks again @Brian Postlethwaite . Out of interest, are the structuredefinitions for these examples available?
@Michel Rutten , note that Forge seems to have the same issues with Questionnaire , as it does QuestionnaireResponse.
Cheers
Duncan
Brian Postlethwaite (Dec 15 2016 at 10:15):
There are no structure definitions required for Questionnaires or questionnaire responses to do what I described, that's their normal usage.
Brian Postlethwaite (Dec 15 2016 at 10:16):
Questionnaires are typically processed by some form of user interface system to display the controls to a user, then save the QR as its output.
Last updated: Apr 12 2022 at 19:14 UTC