FHIR Chat · More than 1 level of FHIR resource nesting · implementers

Stream: implementers

Topic: More than 1 level of FHIR resource nesting


view this post on Zulip Andy (Jan 30 2019 at 22:33):

Does anyone know the answer to including more than 1 level of nesting _include FHIR resources? http://community.fhir.org/t/include-nested-include-fhir-entities/1170 I want to return a bundle of Coverage, Coverage.patient (Patient), and Coverage.patient.link (RelatedPerson), but I can't get it to work on the example FHIR server

view this post on Zulip Lloyd McKenzie (Jan 30 2019 at 23:04):

What query are you using?

view this post on Zulip Andy (Jan 30 2019 at 23:28):

The second two* links in the forum posts I made are the ones that aren't working

view this post on Zulip Andy (Jan 31 2019 at 18:17):

looks like it's not possible with fhir. I don't think anyone implements the _inculde:iter syntax

view this post on Zulip René Spronk (Feb 01 2019 at 07:19):

http://test.fhir.org/r3/Patient?name=Drort&_include=Patient:link&_include=Patient:organization&_include=RelatedPerson:patient was your example.

You'd need a _revinclude instead of an _include : _revinclude=RelatedPerson:patient does what you want, there is no nesting. RelatedPerson has a reference to the patient (reverse direction).

It only becomes a nested query if you first include B, [Base]/A?xxx&_include=A.refToB and then also wishes to include resources C that are referenced by B. [Base]/A?xxx&_include=A.refToB&_include=B.refToC

view this post on Zulip Brian Postlethwaite (Feb 04 2019 at 06:33):

I think they were asking with Coverage as the root resource.


Last updated: Apr 12 2022 at 19:14 UTC