API Reference

Allergies and Intolerances

Overview

Allergies and Intolerances Information addresses:

The AllergyIntolerance resource defines clinical information about a patient's allergic response to a substance or class of substance including information about the adverse reaction. This profile meets the U.S. Core Data for Interoperability (USCDI) v3 requirements for Allergies and Intolerances, including enhanced support for non-medication substances.

Substances include, but are not limited to, medications, foods, environment (such as plants and animals), and insect bites. It defines the substance that elicited the response, as well as when the reaction occurred, the severity, and the type of reaction noted. The AllergyIntolerance resource can also accommodate search by ID and by patient, allowing it to return a list of allergies.

If a patient has not been asked about their allergies, this would be represented as:

  • AllergyIntolerance.code = "1631000175102" (Patient not asked (contextual qualifier) (qualifier value))
  • AllergyIntolerance.verificationStatus = "unconfirmed" or empty (element omitted)

If a patient has been asked, but has indicated they have no known allergies, this would be represented as:

  • AllergyIntolerance.code = "716186003" (No known allergy (situation))
  • AllergyIntolerance.verificationStatus = "confirmed"

Each AllergyIntolerance has next elements:

  • a clinical status of the allergy (e.g., active or resolved)
  • a code which tells you what the patient is allergic to
  • a patient

Each AllergyIntolerance must support:

  • a verification status
  • a reaction manifestation

This resource conforms to USCDI v3 for Allergies and Intolerances - refer to US Core AllergyIntolerance Profile 6.1.0. AllergyIntolerance response will be provided in JSON (refers to Capability Statement) format as per FHIR standard R4 version.

USCore Data ElementFHIR Resource Field
Substance(Drug class)AllergyIntolerance.code(Snomed CT)
Substance(Medication)AllergyIntolerance.code (RxNorm)
ReactionAllergyIntolerance.reaction

Must support elements, mandatory and optional search parameters

Allergy Intolerancemust support these elements:

  • clinicalStatus
  • verificationStatus
  • code
  • patient
  • reaction
    • manifestation

Each AllergyIntolerance Must Have (Mandatory):

  • code
  • patient

The following search parameters and search parameter combinations SHALL be supported:

The syntax used to describe the interactions is described here.

SHALL support searching for all allergies for a patient using the patient search parameter:
GET [base url]/AllergyIntolerance?patient={Type/}[id]

The following search parameter combinations SHOULD be supported (optional):

SHOULD support searching using the combination of the patient and clinical-status search parameters:
GET [base url]/AllergyIntolerance?patient={Type/}[id]&clinical-status={system|}[code]

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

Allergies By Patient Id

Search for allergies by patient.

METHOD GET

GET [base url]/AllergyIntolerance?patient={Type/}[id]

PARAMS
[base url] - FHIR base url
{Type/} - Reference type. Example: Patient/
[id] - Id for the Patient

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES
| Code | Description | Comment |
| ---- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 200 | OK | The request was processed successfully |
| 400 | Bad request | Invalid request parameters or FHIR operation outcome resource returned |
| 401 | Unauthorized | This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource |
| 404 | no Route matched with those values | The request was able to communicate with a given server, but the server could not find what was requested |
| 500 | Internal Server Error | The server has encountered a situation it doesn't know how to handle |

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/AllergyIntolerance?patient=Patient/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Allergies By Patient and Clinical Status

Search for allergies using the combination of the patient and clinical-status search parameters.

METHOD GET

GET [base url]/AllergyIntolerance?patient={Type/}[id]&clinical-status={system|}[code]

PARAMS
[base url] - FHIR base url
{Type/} - Reference type. Example: Patient/
[id] - Reference to the patient
{system|} - Terminology system for allergy intolerance clinical status. FHIR search token parameter. See Search specification for more information. Example: http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical|
[code] - Clinical status code. Example: active, inactive, resolved

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES
| Code | Description | Comment |
| ---- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 200 | OK | The request was processed successfully |
| 400 | Bad request | Invalid request parameters or FHIR operation outcome resource returned |
| 401 | Unauthorized | This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource |
| 404 | no Route matched with those values | The request was able to communicate with a given server, but the server could not find what was requested |
| 500 | Internal Server Error | The server has encountered a situation it doesn't know how to handle |

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

Implementation Notes: This search will not return any "entered-in-error" resources because of the conditional presence of the clinicalStatus element.

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/AllergyIntolerance?patient=Patient/c5137fa5-3216-b12a-cbbc-a0c6bef361g7&clinical-status=http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical|active' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'