FHIR Chat · questionnaire response nested items · implementers

Stream: implementers

Topic: questionnaire response nested items


view this post on Zulip Soroush Atarod (Jul 03 2019 at 10:35):

we are currently implementing FHIR and one of our main query is to do with Questionnaire Response schema. From my understanding the items in Questionnaire Response needs to be nested to represent how the questionnaire was generated. Is this something that we should follow or can we proceed without having nested items in the questionnaire response?

Not having nested will make it very easy for the front-end to generate the JSON schema of Questionnaire Response

Could you please share your thoughts?

view this post on Zulip Eric Haas (Jul 03 2019 at 13:09):

QR must match the structure of the Q. If you want it flat then I suggest flattening the Q. The reason is so that QR can be validated against Q

view this post on Zulip Simone Heckmann (Jul 03 2019 at 14:38):

Wouldn't the linkId make it clear against which item in the Q the QR item must be validated, regardless of structure...?

view this post on Zulip Eric Haas (Jul 03 2019 at 17:56):

nope.. except for the simplest of structure there repeating items that may have repeating itmes

view this post on Zulip Eric Haas (Jul 03 2019 at 17:57):

I tried to argue this same case last year and realized why it needs to be this way

view this post on Zulip Lloyd McKenzie (Jul 03 2019 at 19:36):

When you have optional questions in repeating groups, you need the linkIds so you know what goes together.

view this post on Zulip Soroush Atarod (Jul 04 2019 at 11:41):

thanks! we are going to have it have in the same level as it is much easier for the front-end to create the questionnaire response JSON. We are implementing FHIR both back-end and front-end in house, and having it on the same level is much more easier.

view this post on Zulip Brian Postlethwaite (Jul 05 2019 at 06:23):

Just hope you don't have any tables in your forms.

view this post on Zulip Lloyd McKenzie (Jul 05 2019 at 14:06):

That's not going to be conformant. The hierarchies are required to match. From the spec: "The order of questions within groups, groups within groups and groups within questions is relevant and must be retained for display and capture. The hierarchy items within the Questionnaire SHALL mirror the hierarchy of the corresponding Questionnaire (if any)."

view this post on Zulip Lloyd McKenzie (Jul 05 2019 at 14:06):

If you want to claim to be a FHIR implementation, you have to follow the spec @Soroush Atarod

view this post on Zulip Soroush Atarod (Jul 05 2019 at 16:11):

Many thanks, we will look into nested items. It is just a matter of how long does will it takes us to implement nested or not. @Lloyd McKenzie

view this post on Zulip Lloyd McKenzie (Jul 05 2019 at 16:29):

And whether or not your downstream receivers are able to handle non-compliant instances

view this post on Zulip Eric Haas (Jul 06 2019 at 01:25):

I don't think any one here said it was OK to not to mirror the Q hierarchy. Am I missing something?

view this post on Zulip Eric Haas (Jul 06 2019 at 01:32):

I think that rule needs to be prominently highlighted right in the first sentence of the introduction of QR ( and Q) in the resource narrative. I voiced this concern prior to R4 and was over-ruled. This is not obvious to folks new to fhir and Q and QR and as demonstrated here, this is too damn easy too overlook and too important to be buried in the notes below the structure. We need to assume folks won't read beyond the structure and a few examples.

view this post on Zulip Brian Postlethwaite (Jul 06 2019 at 02:32):

Agreed.

view this post on Zulip Brian Postlethwaite (Jul 06 2019 at 02:33):

I will make a pull request on both R5 and the SDC guide re-enforcing this. Along with why.


Last updated: Apr 12 2022 at 19:14 UTC