_filter
Aidbox offers the partial support of FHIR _filter API. However, we tend to use other search capabilities like AidboxQuery, SearchQuery, or Search resource for complex queries. They offer better expressiveness with SQL and better performance.

Supported operators

1
# returns patient with specific id
2
GET /fhir/Patient?_filter=id eq pt-2
3
4
# returns patients with name that contain specific substring e.g. Smith
5
GET /fhir/Patient?_filter=name co 'smi'
6
7
# returns patients with address.city starting with provided string, e.g. London
8
GET /fhir/Patient?_filter=address-city sw 'Lon'
9
10
# returns all patients with birthdate >= (<=) provided date
11
GET /fhir/Patient?_filter=birthdate ge 1996-06-06
12
GET /fhir/Patient?_filter=birthdate le 1996-06-06
Copied!

Logical expressions support

1
# you can do composition of logical expressions with parentheses
2
GET /fhir/Patient?_filter=(name co 'smi' or name co 'fed') or name co 'unex'
Copied!
If your application requires not supported _filter functionality, please reach out to us via email, community chat, or private support chat.
Last modified 8mo ago
Copy link