FHIR Chat · Restricting _elements on included resources · implementers

Stream: implementers

Topic: Restricting _elements on included resources


view this post on Zulip 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.)

view this post on Zulip 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

view this post on Zulip Josh Mandel (May 07 2020 at 15:54):

The off-the-shelf FHIR servers generally support _elements, no? ("native FHIR servers", I should say.)

view this post on Zulip Josh Mandel (May 07 2020 at 16:05):

Added FHIR#27054 to discuss in FHIR-I

view this post on Zulip 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.

view this post on Zulip Michele Mottini (May 07 2020 at 16:13):

Or 'demo servers'

view this post on Zulip 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?

view this post on Zulip 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

view this post on Zulip nicola (RIO/SS) (May 07 2020 at 21:46):

in aidbox access policy you can require list of elements implementing this way elements visibility

view this post on Zulip nicola (RIO/SS) (May 07 2020 at 21:47):

we also think to add elements to read operation - /Patient/id?elements=...

view this post on Zulip 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