FHIR Chat · Response on _include when reference has an extension · implementers

Stream: implementers

Topic: Response on _include when reference has an extension


view this post on Zulip Ardon Toonstra (Mar 14 2019 at 13:07):

We are working with STU3, which misses the PractitionerRole extension at quite some places. For example at Patient.generalPractitioner. In our use case, we really want to know the speciality of the Practitioner and to which Organization it belongs. We do this with an extension on the reference datatype. In a Patient instance, it looks like this:

"generalPractitioner": [
                    {
                        "extension": [
                            {
                                "url": "http://nictiz.nl/fhir/StructureDefinition/practitionerrole-reference",
                                "valueReference": {
                                    "reference": "PractitionerRole/example-ID",
                                    "display": "Role Vaste Huisarts"
                                }
                            }
                        ],
                        "reference": "http://localhost:4080/Practitioner/example-ID",
                        "display": "Vaste Huisarts"
                    }
                ]

Now the main question: in our use case, we want to retrieve the Patient resource including the generalPractitioner references. So our GET URL search is:

GET [base]/Patient?_include=Patient:general-practitioner

Ideally, we would like servers to include the reference in the extension as well. Should this be normal behaviour?

view this post on Zulip Michele Mottini (Mar 14 2019 at 13:56):

No, only the practitioner is included. The way to include the practitioner role would be to have a custom search parameter - eg 'general-practitioner-role' corresponding to the extension, and then use it for the the include

view this post on Zulip René Spronk (Mar 14 2019 at 13:59):

Don't think so - server can't generally know what an extension means, but even if it did: we'd need a FHIRPath like syntax (?) for the _include to enable such behavior. We need predictable behavior, so extending the meaning of an _include or a query parameter in such a fashion seems very tricky to me. As such i agree with @Michele Mottini

view this post on Zulip Ardon Toonstra (Mar 15 2019 at 09:43):

Thnx for the input! Agree that this shouldn't be normal behaviour. But now we have a bit more confirmation.

view this post on Zulip Brian Postlethwaite (Apr 03 2019 at 12:55):

you would also need a custom search parameter for that, and also _include that search parameter - as _include works on search parameters, not properties.


Last updated: Apr 12 2022 at 19:14 UTC