FHIR Chat · Search with OR parameters · implementers

Stream: implementers

Topic: Search with OR parameters


view this post on Zulip Shamil Nizamov (Dec 06 2019 at 16:06):

All samples that I've seen assumes that search criteria are piled up with &.

What if I have a set of parameters and I'd like to search for any of them, i.e. applying logical OR , for example:
name.first=John OR name.last=Smith OR gender=M

In a practical sense this may be required when I have a set of data (business identifier, name, etc.) but do not know which of them was used in a resource instance.

view this post on Zulip Jean Duteau (Dec 06 2019 at 16:15):

You can't do that with the simple search mechanism: http://hl7.org/implement/standards/fhir/search.html#combining
The resource would need to have defined a composite search parameter (talked about in the bottom of the section I linked) to allow you to do something like that.

view this post on Zulip Jean Duteau (Dec 06 2019 at 16:16):

When I'm teaching, I tell my students that you have to convert OR searches into multiple searches - one for each OR.

view this post on Zulip Shamil Nizamov (Dec 06 2019 at 16:28):

It's not clear how "a resource may also specify composite parameters".
I'm also looking at _filter but it's not supported in Vonk as far as I can tell.

view this post on Zulip Jean Duteau (Dec 06 2019 at 16:33):

the resource actually has to specify the parameters or you have to create a profile that lists the parameters and then implement that in your server. Unless the server has implemented these composite parameters, you are unable to do OR searches like that. Many simple OR searches are best done as individual searches.

view this post on Zulip Yunwei Wang (Dec 09 2019 at 18:18):

If you are on server side, you can support _filter.
If you are on client side, you can hope server supports _filter or send separate search queries.

view this post on Zulip Alex Goel (Feb 10 2020 at 17:00):

Hi All,

How do we do a search for an either or code e.g. /Observation?subject:Patient/{id}/&value-concept=http://radlex.org|RID50136, value-concept=http://radlex.org|RID50137"?

We want to look for RadLex RID50136 or RID50137 when evaluating a condition in a PlanDefinition.action.condition @Joel Francis

view this post on Zulip Jose Costa Teixeira (Feb 10 2020 at 17:07):

http://build.fhir.org/search.html#combining

view this post on Zulip Jose Costa Teixeira (Feb 10 2020 at 17:07):

this?

view this post on Zulip Lloyd McKenzie (Feb 10 2020 at 17:55):

value-concept=http://radlex.org|RID50136,http://radlex.org|RID50137,....

view this post on Zulip Alex Goel (Feb 10 2020 at 18:02):

@Lloyd McKenzie thanks


Last updated: Apr 12 2022 at 19:14 UTC