FHIR Search Parameters (Required and Optional Parameters)

Required and Optional Parameters with Data Types

This document describes the FHIR Search required parameters currently available in InteliChart, their capabilities, and high-level descriptions as to how to use each of these parameters with InteliChart FHIR APIs. Search result parameters modify how results are returned in a Search API’s response.

The table below for the search result parameters that are supported by InteliChart and the versions in which they are supported.

Parameter Supported in R4
_id Yes
_count Yes
_include Yes
_revInclude Yes

_id Parameter

The _id parameter is used to indicate a FHIR ID, allowing read-type functionality in a search FHIR API.

So why would you want to use _id in a search API instead of a read API? Well, what if you wanted to perform a read with a FHIR search parameter? The _id parameter allows you to do just that, by using FHIR search parameters while still reading data about a single resource.


Examples

GET https://hostname/instance/api/FHIR/R4/Patient?_id=eYg3-1aJmCMq-umIIq2Njxw3&_include=Patient:generalPractitioner:Practitioner

_count Parameter

The _count parameter is used to limit the number of results returned by a search request. Once the number of results specified has been reached, the URL to the next page of results will be generated and included in the response. This URL contains a session ID which returns the next group of _count results. This is useful for resources that could return many results (such as Observation), as using _count can minimize the demand on the server. _count can be set to any number from 1 to 999.

Important note on resources that return many results*

If your search returns more than 1000 results, the search will automatically be broken into pages with 1000 results each, regardless of whether you use the _count parameter. This means that your app needs to support this functionality to ensure that you receive all applicable data associated with the API request.


Examples:

  • Immunization Search
    • Parameter in response: Practitioner.actor (Reference)
    • From this, the second parameter would be “actor”
    • _include=Immunization:actor:Practitioner
    • Note: there is only one actor for Immunizations so the third parameter is optional (_include=Immunization:actor would also work here)

_revInclude Parameter

The _revInclude parameter (reverse include) is used to return a particular resource, along with other resources that refer to that resource. For this parameter to return results, the FHIR resource specified in the search response must be referenced by the resource specified in the _revInclude parameter.

Provenance

InteliChart will support this parameter to fetch provenance data for search interactions with any FHIR resources that are part of the U.S. Core Data for Interoperability data classes and elements for Version 1.0.

Parameter format: _revInclude=Provenance:target

The response will have the following format:

Element Type Cardinality Description
target Reference (resource) 1..* The resources this provenance supports
recorded instant 1..1 Timestamp that the activity was recorded/updated
agent BackboneElement 1..* Actor involved
agent.type CodeableConcept 0..1 How the agent participated
agent.who Reference(Practitioner | Patient | Organization) 1..1 Who participated
agent.onBehalfOf Reference(Organization) 0..1 Who the agent is representing

Examples:

https://www.example.org/api/FHIR/R4/DocumentReference?_id=eiuHBlNpiGxJwXRUWVqHjN9QaKO0ODrkAJrvUByRLuMc3&_revInclude=Provenance:target

Sample Response

"link": [{
        "relation": "self",
        "url": "https://www.example.org/api/FHIR/R4/Provenance/eC7YEH-XJufbPDHTDFWShEk2b9Ki98xTRyLbhFXwQ6sfcjhyfmeem2nFqdxZYHcS0FhROyzJUToN.o1UE0DQeXQ3"
    }],
    "fullUrl": "https://www.example.org/api/FHIR/R4/Provenance/eC7YEH-XJufbPDHTDFWShEk2b9Ki98xTRyLbhFXwQ6sfcjhyfmeem2nFqdxZYHcS0FhROyzJUToN.o1UE0DQeXQ3",
    "resource": {
        "resourceType": "Provenance",
        "id": "eC7YEH-XJufbPDHTDFWShEk2b9Ki98xTRyLbhFXwQ6sfcjhyfmeem2nFqdxZYHcS0FhROyzJUToN.o1UE0DQeXQ3",
        "target": [{"reference": "DocumentReference/eiuHBlNpiGxJwXRUWVqHjN9QaKO0ODrkAJrvUByRLuMc3"}],
        "recorded": "2020-06-23T07:33:12Z",
        "agent": [{
            "type": {
                "coding": [{
                    "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
                    "code": "author",
                    "display": "Author"
                }],
                "text": "Author"
            },
            "who": {
                "reference": "Practitioner/eIOnxJsdFcfgJ4iy716I3MA3",
                "display": "Starter Provider, MD"
            },
            "onBehalfOf": {"display": "Example Organization"}
        },
        {
            "type": {
                "coding": [{
                    "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
                    "code": "transmitter",
                    "display": "Transmitter"
                }],
                "text": "Transmitter"
            },
            "who": {
                "display": "Example Organization"
            }
        }]
    },
    "search": {"mode": "include"}
}"