Stream: implementers
Topic: Questionnaire and QuestionnaireRespnse
Michal (Jul 07 2016 at 16:26):
Hi,
Michal (Jul 07 2016 at 16:38):
Hi,
I'm currently working integrating FHIR Questionnaire and QuestionnaireResponse structures with our system. Was able to solve most of the problems but got stuck with a specific problem.
In our system we have questions that can have multiple answers:
Question: "What are your interests?"
Possible Multiple Answers: "Books, Cycling, Running, Movies"
I'm using HAPI servers to test my structures, and alwasy receving error message "Multiple answers to non repeating question with linkId[Link3]"
Questionnaire id: 89655 and 89656
Can't create QuestionnaireResponse recored due to mentioned error.
Anyone that can help ?
structure that I'm POSTing
{
"resourceType": "QuestionnaireResponse",
"status": "in-progress",
"questionnaire": {
"reference": "Questionnaire/89656"
},
"group": {
"group": [
{
"linkId": "Link0",
"title": "General information about patient",
"text": "GENERAL INFORMATION",
"question": [
{
"linkId": "Link1",
"text": "Full Name",
"answer": [
{
"valueString": "James Earl Carter"
}
]
},
{
"linkId": "Link2",
"text": "Subscriber Member ID",
"answer": [
{
"valueString": "12344321"
}
]
},
{
"linkId": "Link3",
"text": "Service multiple options",
"answer": [
{
"valueCoding": {
"system": "http://our.code.system.com",
"code": "Option1"
}
},
{
"valueCoding": {
"system": "http://our.code.system.com",
"code": "Option3"
}
}
]
}
]
}
]
}
}
Lloyd McKenzie (Jul 07 2016 at 17:14):
Is the Questionnaire.question marked as repeating=true?
Brian Postlethwaite (Jul 08 2016 at 05:06):
Problem is that you repeated the answer at the value level, not the answer level.
need:
question answer value answer value
not what you have which is
answer value value
Brian Postlethwaite (Jul 08 2016 at 05:07):
I had to check the spec here: http://hl7.org/fhir/questionnaireresponse.html
to verify this.
Brian Postlethwaite (Jul 08 2016 at 05:07):
(and be sure that the question is marked for repeats as Lloyd pointed out)
Pascal Pfiffner (Jul 08 2016 at 14:53):
His response structure looks correct to me, he is creating repeated answers. If HAPI is verifying the response structure with the corresponding Questionnaire, it looks like that questionnaire has repeating
not set to true, as Lloyd suggests.
Michal (Jul 12 2016 at 15:33):
@Pascal Pfiffner that was the issue, the structure was ok, but I was just missing the "repeating" setting in my question.
Thanks guys for help.
Brian Postlethwaite (Jul 12 2016 at 21:10):
Are you sure? The values don't repeat, the answer does. @Lloyd McKenzie can you please verify this?
Lloyd McKenzie (Jul 12 2016 at 21:13):
The array markers seem to be in the right place - they're on answer, not value. (The only place repetition occurs in the example is link3, which shows two answers each with a value.)
Last updated: Apr 12 2022 at 19:14 UTC