FHIR Chat · Search _elements · implementers

Stream: implementers

Topic: Search _elements


view this post on Zulip Madeline Hoskins (Aug 13 2019 at 13:19):

I am trying to create a Bundle of search queries using the _elements tag. The patientId and encounterId are already in context, as we are using SMART on FHIR. I am trying to retrieve information about a prescription from an EMR for the given patient. Would the below query be valid to retrieve the identifier.value of the intended pharmacy to fill the prescription?
{
"request": {
"method": "GET",
"url": "/MedicationRequest?_elements=dispenseRequest.performer:Organization.identifier.value"
}
}

view this post on Zulip Michele Mottini (Aug 13 2019 at 13:46):

No - _elements specify which element of the resource being searched should be returned, it cannot be used to navigate into referenced resource. You should add &_include=MedicationRequest:intended-performer to return also the performer in the result bundle.

view this post on Zulip Michele Mottini (Aug 13 2019 at 13:47):

Also: the fact that the patient and encounter are in context for SMART does not influence the searches - you should still specify the patient in the search

view this post on Zulip Madeline Hoskins (Aug 13 2019 at 18:34):

Where are you advising to add the &_include..... part above? Are you suggesting to not use the _elements tag at all?

view this post on Zulip Michele Mottini (Aug 13 2019 at 19:22):

The request should be: .../MedicationRequest?patient=xxxx&&_include=MedicationRequest:intended-performer where xxxx is the patient id.
_elements is used to reduce the amount of data returned - that is not what you want to do here if I understand correctly

view this post on Zulip Ardon Toonstra (Mar 13 2020 at 12:11):

Hi there!
Does the search result parameter _elements also work for elements in extensions? If zo, how does this look like in the search url?
http://hl7.org/fhir/search.html#elements

view this post on Zulip Grahame Grieve (Mar 13 2020 at 12:37):

not really.

view this post on Zulip Lloyd McKenzie (Mar 13 2020 at 16:31):

Do we need to define a convention to support this?

view this post on Zulip Ardon Toonstra (Mar 13 2020 at 21:55):

Mm, not sure.. in the end we were able to go for another route or it didn't seemed to be needed anymore. So not really sure if there is a hard practical use case.

view this post on Zulip Jens Villadsen (Mar 14 2020 at 20:09):

It would be nice to have it

view this post on Zulip Lloyd McKenzie (Mar 14 2020 at 21:05):

Then submit a change request :)

view this post on Zulip Jens Villadsen (Mar 16 2020 at 23:07):

https://jira.hl7.org/browse/FHIR-26596


Last updated: Apr 12 2022 at 19:14 UTC