FHIR DrillDocs

Reference

FHIR cheat sheet

The URLs, headers and search syntax you'll reach for most, on one page.

URLs#

Text
GET    [base]/metadata
GET    [base]/Patient/123                       read
GET    [base]/Patient/123/_history/2            vread
GET    [base]/Patient/123/_history              history
GET    [base]/Patient?family=x&birthdate=lt1980 search
POST   [base]/Patient/_search                   search (form body)
POST   [base]/Patient                           create
PUT    [base]/Patient/123                       update (or create with your own id)
PUT    [base]/Patient?identifier=sys|val        conditional update
PATCH  [base]/Patient/123                       patch
DELETE [base]/Patient/123                       delete
POST   [base]                                   transaction / batch
GET    [base]/Patient/123/$everything           operation
GET    [base]/$export                           bulk export (Prefer: respond-async)

Search syntax#

Text
,            OR                      code=a,b
&            AND                     a=1&b=2
|            system|code             code=http://loinc.org|8867-4
:exact       exact string            family:exact=Smith
:contains    substring               name:contains=mit
:missing     present or not          telecom:missing=true
:not         negate token            status:not=final
:text        token display text      code:text=heart
:above/:below  hierarchy             code:below=http://snomed.info/sct|73211009
.            chain                   subject:Patient.name=x
_has         reverse chain           _has:Observation:patient:code=8867-4
eq ne gt lt ge le sa eb ap           date and number prefixes

Result parameters#

Text
_count  _sort  _summary  _elements  _total  _include  _revinclude  _include:iterate
_id  _lastUpdated  _tag  _profile  _security  _type  _format  _pretty

Headers#

Text
Content-Type: application/fhir+json
Accept: application/fhir+json
Prefer: return=representation | return=minimal | return=OperationOutcome
Prefer: respond-async
If-Match: W/"3"
If-None-Exist: identifier=sys|val
If-None-Match: W/"3"           (conditional read)
If-Modified-Since: <http-date>  (conditional read)

jq one-liners#

Shell
jq '.total'                                            # search total
jq '[.entry[].resource.id]'                            # ids on this page
jq '.link[] | select(.relation=="next") | .url'        # next page
jq '.issue[] | {severity, diagnostics}'                # read an OperationOutcome
jq '[.entry[].resource.resourceType] | group_by(.) | map({(.[0]): length}) | add'   # count by type
FHIR Drill lab docs · synthetic data only · built 2026-11-26