FHIR AllergyIntolerance

Base Path: /fhir/1.0/AllergyIntolerance

Version: 2.0.0

The FHIR AllergyIntolerance API allows you to look up a patient's allergies and adverse reactions to substances or products. The endpoint provides the ability to:

  • Retrieve all AllergyIntolerance resources that match search criteria for a given patient.
  • Retrieve a specific AllergyIntolerance resource based on its resource ID.

The data returned in this API is subject to privacy and permissions settings, refer to the Working with Privacy guide to learn how this might affect your application.

The AllergyIntolerance API aggregates data from multiple sources, to learn about working with aggregated APIs refer to the Aggregated APIs guide in the Knowledge Hub.

This API is based on the DSTU2 release of the FHIR standard, for more information on this API refer to the official FHIR documentation.

Authorization: OAuth 2.0 Bearer token is required to access the resources of this API. Once signed up, credentials and URL to access the OAuth API can be found on My Apps Page.


Methods

Get Allergies for a Patient

GET /fhir/1.0/AllergyIntolerance/

This method returns all allergies for the patient identified by patient.identifier. Optionally, filtering the allergies using the other parameters.


Parameters

Name

Type

Data Type

Description


Name:

patient.identifier

required

Type:

query

Data Type:

string

Description:

The patient identifier consists of patient identifier namespace, also known as the system, and identifier, separated using a URL encoded | character i.e. %7c.


Sample Value: ORION|AAAA-0124-8



Name:

status

optional

Type:

query

Data Type:

string

Description:

Filters the allergies to those having the specified status. Possible values are

  • active
  • inactive


Sample Value: active


Responses


application/json+fhir

200

Returns a FHIR Bundle containing 0.. OperationOutcome resources and 0.. AllergyIntolerance resources

Sample Request

curl -X GET "https://api.orionhealth.io/fhir/1.0/AllergyIntolerance/?patient.identifier=ORION%7CAAAA-0124-8&status=active" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'

Get Allergies for a Patient

POST /fhir/1.0/AllergyIntolerance/_search

This method returns all allergies for the patient identified by patient.identifier. Optionally, filtering the allergies using the other parameters. This is the secure alternative to the GET search.


Parameters

Name

Type

Data Type

Description


Name:

Content-Type

required

Type:

header

Data Type:

string

Description:

Specifies how to encode the form data. The Content-Type value must be application/x-www-form-urlencoded


Sample Value: application/x-www-form-urlencoded



Name:

patient.identifier

required

Type:

formData

Data Type:

string

Description:

The patient identifier consists of patient identifier namespace, also known as the system, and identifier, separated using a URL encoded | character i.e. %7c.


Sample Value: ORION|AAAA-0124-8



Name:

status

optional

Type:

formData

Data Type:

string

Description:

Filters the allergies to those having the specified status. Possible values are

  • active
  • inactive


Sample Value: active


Responses


application/json+fhir

200

Returns a FHIR Bundle containing 0.. OperationOutcome resources and 0.. AllergyIntolerance resources

Sample Request

curl -X POST "https://api.orionhealth.io/fhir/1.0/AllergyIntolerance/_search" \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-d 'patient.identifier=ORION%7CAAAA-0124-8' \
-d 'status=active'

Retrieve a single Allergy

GET /fhir/1.0/AllergyIntolerance/{id}

This method returns the AllergyIntolerance resource matching the requested resource ID.


Parameters

Name

Type

Data Type

Description


Name:

id

required

Type:

path

Data Type:

string

Description:

The id of the AllergyIntolerance resource


Sample Value: shaBKPYOI7GALG7WJDEAP6D3XVX5DGCYCYYYQHHFR76CBZ6EPR3AOFA


Responses


application/json+fhir

200

Returns an AllergyIntolerance resource matching the the requested resource ID.


application/json+fhir

404

No AllergyIntolerance resource found with the requested resource ID.

Sample Request

curl -X GET "https://api.orionhealth.io/fhir/1.0/AllergyIntolerance/shaBKPYOI7GALG7WJDEAP6D3XVX5DGCYCYYYQHHFR76CBZ6EPR3AOFA" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'

Get an Allergy's history

GET /fhir/1.0/AllergyIntolerance/{id}/_history

This method returns the change history for an AllergyIntolerance resource matching the requested resource ID. AllergyIntolerance resources can be retrieved from multiple data sources, and not all sources are able to return history information. This operation will return an empty set of data if no versions of the specified AllergyIntolerance can be found, which includes cases where:

  • The specified AllergyIntolerance resource cannot be found.
  • The data source for the AllergyIntolerance is unable to return history information.


Parameters

Name

Type

Data Type

Description


Name:

id

required

Type:

path

Data Type:

string

Description:

The id of the AllergyIntolerance resource


Sample Value: shaBKPYOI7GALG7WJDEAP6D3XVX5DGCYCYYYQHHFR76CBZ6EPR3AOFA


Responses


application/json+fhir

200

A FHIR Bundle containing 0..* AllergyIntolerance resources matching the requested resource ID.

Sample Request

curl -X GET "https://api.orionhealth.io/fhir/1.0/AllergyIntolerance/shaBKPYOI7GALG7WJDEAP6D3XVX5DGCYCYYYQHHFR76CBZ6EPR3AOFA/_history" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'

Retrieve a specific version of an AllergyIntolerance

GET /fhir/1.0/AllergyIntolerance/{id}/_history/{vid}

This method returns a specific version of the AllergyIntolerance resource matching the requested resource ID.


Parameters

Name

Type

Data Type

Description


Name:

id

required

Type:

path

Data Type:

string

Description:

The id of the AllergyIntolerance resource


Sample Value: shaBKPYOI7GALG7WJDEAP6D3XVX5DGCYCYYYQHHFR76CBZ6EPR3AOFA



Name:

vid

required

Type:

path

Data Type:

integer

Description:

The version of the AllergyIntolerance resource.


Sample Value: 0


Responses


application/json+fhir

200

Returns an AllergyIntolerance resource matching the the requested resource ID and version id.


application/json+fhir

404

  • No AllergyIntolerance resource found with the requested resource ID.
  • The version id specified does not exist for the AllergyIntolerance resource with the requested resource ID.
  • The source providing the AllergyIntolerance resource is not capable of returning history of AllergyIntolerance resources.

Sample Request

curl -X GET "https://api.orionhealth.io/fhir/1.0/AllergyIntolerance/shaBKPYOI7GALG7WJDEAP6D3XVX5DGCYCYYYQHHFR76CBZ6EPR3AOFA/_history/0" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'