Possible to get 2different queries in 1 request?

Hello, new forum poster here. :grinning:

I may phrase this incorrectly but I would like to know is it possible to request 2different queries in 1 request?
I’m trying to request a bundle of encounter based on a location e.g (id: Hall01) but at the same time using the same request, request for an encounter based on the location.partof (id: Hall01). Currently I am able to get an outcome if requested separately as
1. [Base]/Encounter?location=Hall01
2. [Base]/Encounter?location:Location.partof=Hall01

But I would like to know if there’s a more efficient way to request a bundle to contain either queries. Some sort of search parameter where I can request both Encounter.location or Encounter.location:Location.partof if either are present in the Encounter.

Something like this:
If I do this tho, FHIR will assume the 2nd part after ‘,’ of the query is gibberish and omit it from the search query :sweat_smile:

Thank you in advance

Typically comma is OR and ampersand is AND; See Search - FHIR v4.3.0 for more about this.

Some something like this would work


Perhaps you could try the following however; I don’t know if it works; Also I don’t think it is answering the question you are intending to be answered by the query.


So, instead of the above, maybe have a look at batch (Http - FHIR v4.3.0) as an option, I think you can have more control there.

You can send a batch request with 2 searches, one for the Location=Hall01 and the other for the Location.partOf=Hall01

1 Like

Alrights, thank you Mr @ Blessed_Tabvirwa. It seems like as of now the only method is to do a batch request. :+1:

1 Like

Just wanted share, my colleague was somehow able to make it work by doing something like this.

[Base]/Encounter?_filter=(location eq hall01 or location.partof eq hall01)

It seems to work surprisingly :smile:

1 Like

Nice!! Thanks for the feedback @Saiful .