Stream: implementers
Topic: More than 1 level of FHIR resource nesting
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
Lloyd McKenzie (Jan 30 2019 at 23:04):
What query are you using?
Andy (Jan 30 2019 at 23:28):
The second two* links in the forum posts I made are the ones that aren't working
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
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
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