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).
/medicationrequest?date=eq2022-01-01
(Means: “Get me the medication requests for the date January 1, 2022.”)/medicationrequest?date=gt2022-01-01
(Means: “Get me the medication requests for dates after January 1, 2022.”)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.”)
GET [FHIR path]/Patient?_id=INF-101
(Means: “Get the patient resource with the _ID equal to INF-101.”)GET [FHIR path]/Observation?_lastUpdated=ge2022-3-1
(Means: “the observations that have changed since March 1, 2022.”)GET [FHIR path]/Observation?_lastUpdated=ge2022-3-1&_count=1
(Means: “Get the observations that have changed since March 1, 2022, but include only one resource in each response.”)For more information on how to work with these parameters, go to: Search - FHIR v4.0.1 (hl7.org).
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.
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).