Include and RevInclude Parameters

Along with resources matching search criteria, clients may request that related resources are included with results. For example, when searching for clinical resources (Observation, etc.), the client will also generally need the subject (Patient) resource that the clinical resource refers to.

The most common method for requesting additional resources is inline, via the search result parameters _include and _revinclude.

The parameter _include is used to follow links forward. For example, to include relevant Patient resources for requested Observation matches, based on the Observation.subject element, using either the subject or patient search parameters.

GET [base]/Observation?_include=Observation:subject

The parameter _revinclude is used to follow reverse links. For example, to include relevant Observation resources for requested Patient matches, based on the Observation.subject element, using either the subject or patient search parameters.

GET [base]/Patient?_revinclude=Observation:subject