Search code examples
hl7hl7-fhir

Use of _include in FHIR


In the FHIR query spec it states that the _include parameter can be added to the query URL to request that specified referenced resources are returned in full to prevent further network requests to retrieve these resources.

i.e.

diagnosticreport/search?_include=DiagnosticReport.subject&_include=Patient.provider

This construct requires that you know the resources that are going to be referenced in the result set in advance of the query being made. I suspect for resources such as "Observation" where there will potentially be many profiles with each profile potentially having different extensions, this will not be the case.

Is it feasible to have a syntax whereby all of the referenced resources are "included"?


Solution

  • Umm, that might be possible. Though there's a the risk that you'd get a swag of resources you had no idea why you were getting. And the server might be more inclined to reject that kind of request. It's certainly a lot slower for a server - it has to evaluate a lot more content to decide what references to include or not.