. expressions
Search by arbitrary elements of resources
This is non-FHIR extension, incompatible with other FHIR servers
With parameters started with . you can provide the exact path for the element, optionally provide coercing after :: using PostgreSQL types and the operator after $.
1
GET /Patient?.name.0.family=Johnson
2
=> WHERE resource#>>'{name,0,family}' = 'Jonhnson'
3
​
4
GET /Patient?.name.0.family$contains=Joh
5
=> WHERE resource#>>'{name,0,family}' ilike '%John%'
6
​
7
GET /Encounter?.start::timestamptz$gt=2015-01-01
8
=> WHERE (resource#>>'{start}')::timestamptz > '2015-01-01'
9
​
10
GET /Patient?.contact$isnull=true
11
=> WHERE resource#>>'{contact}' IS NULL
12
​
Copied!
expressions with typecast require user input to be correct by PostgreSQL syntax.
e.g.: for timestamptz values must be formatted as specified in PostgreSQL date/time input doc
​
Last modified 3d ago
Copy link