Searching

Searching for resources is fundamental to the mechanics of FHIR. The following sections describe how the Allscripts FHIR API support specific search functions.

For information on searching, see Search - FHIR v4.0.1 (hl7.org).

Date Comparators

These comparators can be used to search by a date range. For example:

/medicationrequest?date=ge2022-01-01&date=le2022-1-31 (Means: “Get me the medication requests for the month of January 2022.”)

Common Search Parameters

For more information on how to work with these parameters, go to: Search - FHIR v4.0.1 (hl7.org).

Provenance

The Provenance resource tracks information about the activity that created, revised, deleted, or signed a version of a resource. This information can be used to form assessments about its quality, reliability, trustworthiness, or to provide pointers for where to go to further investigate the origins of the resource and the information in it. The Allscripts FHIR API does not currently support searching on the Provenance resource. If you have the resource _ID value, you can perform a GET, but you cannot search.

Searching with provenance

The Allscripts FHIR API supports searching by provenance with the _include and _revinclude parameters. Use the _include parameter to get resources that are referenced by the primary resource. For example:

[FHIR path]/allergyintolerance?_id=INF-101&_revinclude=Provenance:target (Means: “Get me the AllergyIntolerance resource with the _ID INF-101 and include all provenance records that this AllergyIntolerance targets”)

For more information on the Provenance resource, see Provenance - FHIR v4.0.1 (hl7.org).