Stream: implementers
Topic: Restricting _elements on included resources
Josh Mandel (May 07 2020 at 15:31):
Currently https://www.hl7.org/fhir/search.html#elements states that
The list of elements does not apply to included resources.
It'd obviously be nice to write queries like "Fetch me Observations, and for each one, include a patient but just give me gender", which could be accomplished with a pretty small tweak to our _elements
syntax. (e.g., to allow a query like
Observation?_include=Observation:patient&_elements=Observation.value,Patient.gender
Has this been considered? (A similar issue came up in discussion of Bulk Export, but the question applies to search more broadly.)
Michele Mottini (May 07 2020 at 15:52):
That would be nice, but most server do not implement _elements to begin with, don't know if there is much point to expanding the specs
Josh Mandel (May 07 2020 at 15:54):
The off-the-shelf FHIR servers generally support _elements, no? ("native FHIR servers", I should say.)
Josh Mandel (May 07 2020 at 16:05):
Added FHIR#27054 to discuss in FHIR-I
Paul Church (May 07 2020 at 16:09):
This would be relatively easy to implement but is it likely to get significant usage? Seems a bit obscure.
Michele Mottini (May 07 2020 at 16:13):
Or 'demo servers'
Josh Mandel (May 07 2020 at 16:29):
Re: usage, it's unclear. I know @nicola (RIO/SS) has experience supporting fine-grained access policies in Aidbox; curious if this has come up?
nicola (RIO/SS) (May 07 2020 at 21:44):
We extended _elements notation in two directions - if it starts from resource type - it will be applied to included resources with this type /Enc?_incl=patient&_elements=Patient.name.... and we allow use . to filter nested elements - _els=address.city
nicola (RIO/SS) (May 07 2020 at 21:46):
in aidbox access policy you can require list of elements implementing this way elements visibility
nicola (RIO/SS) (May 07 2020 at 21:47):
we also think to add elements to read operation - /Patient/id?elements=...
Josh Mandel (May 08 2020 at 17:34):
Cool -- I think this is a good pattern. Curious if others have developed anything similar.
Last updated: Apr 12 2022 at 19:14 UTC