\_lastUpdated & \_createdAt
Search by the last modification time of the resource meta.lastUpdated
(note: ts
column in database) or by the creation time meta.createdAt
(note: cts
column in the database)
javascript
GET /fhir/Patient?_lastUpdated=2019-01-01
javascript
GET /Patient?_lastUpdated=2019-01-01
javascript
GET /fhir/Patient?_createdAt=2019-01-01
javascript
GET /Patient?_createdAt=2019-01-01
Value can be a part of ISO date:
- only year
2019
- year and month
201903
- date
20190305
- hours
20190305T12
- mins
20190305T12:30
- secs
20190305T12:30:30
- microsecs
20190305T12:30:30.333444
- with timezone
20190305T12:30:30Z or 20190305T12:30:30+03
Do not forget url encode value of the expression in your code! Browser and Aidbox REST console will do some of encoding for you.
2019-03-05T12:30:30+03 =>2019-03-05T12%3A30%3A30%2B03
If you use =
operator, Aidbox rounds the query date to the max and min value and searches in between this range:
sql
ts <= max_date_bound('2019-01-01') AND ts >= min_date_bound('2019-01-01')
You can use operators lt,le,gt,ge
as the prefix of value to make Aidbox generate inequality queries:
javascript
_lastUpdated=lt2019-01 => ts < max_date_bound('2019-01')
_lastUpdated=ge2019-01 => ts >= min_date_bound('2019-01')
Aidbox uses the PostgreSQL precision for lastUpdated/ts and createdAt/cts - it's usually micro-seconds