Google fhir store alters query string in search results next link

208 Views Asked by At

I query with a count less than the total to make it paginate: https://healthcare.googleapis.com/v1/projects//locations//datasets//fhirStores//fhir/Encounter?_sort=date&_count=5&practitioner=abcdefg&subject:missing=false&patient:Patient.name=John&patient:Patient.name=Doe&_include=Encounter:patient

And the returned next link has combined the 2 Patient.name values, make it be an OR instead of an AND:

.../?_count=5&_include=Encounter%3Apatient&_sort=-date&patient%3APatient.name=John%2CDoe&practitioner=abcdefg&subject%3Amissing=false&_page_token=

Is it right that it combines the 2 values for Patient.name? I still want the next page of results to have those 2 conditions ANDed together, not ORed. How do I get that?

1

There are 1 best solutions below

0
On

This looks like a bug. I see that it works without the chained search, e.g. if I do Patient?name=John&name=Doe, I get a next link that has the correct AND.

For the chained search, the actual results seem to be from the AND query but the pagination links are incorrectly converted to OR.

I have reported this issue internally.

As a workaround, it appears that if you use the _page_token value from the link and run the query with the conditions you want and &_page_token=[value], it does return the correct next page.