FHIR Chat · Logical OR Search across multiple parameters · implementers

Stream: implementers

Topic: Logical OR Search across multiple parameters


view this post on Zulip John Carter (Jul 25 2018 at 04:59):

Is there a mechanism to do a logical OR search across multiple parameters? For example, give me all providers with surname Smith OR postcode 12345.

view this post on Zulip Grahame Grieve (Jul 25 2018 at 05:04):

there's 2 approaches. The first is relatively simple that probably covers what you're asking for: http://build.fhir.org/search.html#combining. Beyond that, you have to look at http://build.fhir.org/search_filter.html

view this post on Zulip John Carter (Jul 25 2018 at 05:53):

Thanks Grahame. We'll dig into search filters to learn more. The examples for combined search OR all focus on two values of a single parameter (language = EN or FR for example), and I didn't appreciate that it would be possible to include two completely separate parameter-value pairs in a URL separated by comma.

view this post on Zulip Grahame Grieve (Jul 25 2018 at 06:21):

oh well that might not be possible

view this post on Zulip Grahame Grieve (Jul 25 2018 at 06:21):

now that I read it.... _filter

view this post on Zulip Christiaan Knaap (Jul 25 2018 at 13:00):

And a very crude solution is to do 2 searches and combine the results clientside. You might even combine the searches in a batch.

view this post on Zulip John Carter (Jul 26 2018 at 05:38):

Thanks @Christiaan Knaap we were hoping to avoid that but it will probably be easier for us than learning to use search_filter s :thinking_face:

view this post on Zulip Christiaan Knaap (Jul 26 2018 at 05:44):

Let alone implement it (afaik only Grahame has currently implemented _filter).

view this post on Zulip Grahame Grieve (Jul 26 2018 at 06:57):

one other closed source implementation I've heard about

view this post on Zulip Grahame Grieve (Jul 26 2018 at 06:58):

but I wish others would - we keep getting pressure to do trickier and trickier things with search parameters that are easily done with _filter

view this post on Zulip Grahame Grieve (Jul 26 2018 at 06:58):

and it's a relatively easy syntax

view this post on Zulip Brian Postlethwaite (Jul 27 2018 at 06:13):

ok, I'm looking into implementing the _filter according to http://build.fhir.org/search_filter.html
The grammar format is a little strange, was expecting something closer to the fhirpath grammar
(in terms of expression, not content)
is the / meant to be the optional seperator?


Last updated: Apr 12 2022 at 19:14 UTC