API Reference

Overview

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. 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 no active allergies, an AllergyIntolerance resource will be returned indicating whether the patient's allergies have never been reviewed (are not on file), or if they have been reviewed and it has been determined that they have No Known Allergies (NKA) or No Known Medication Allergies (NKMA).

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 (in other words, then 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 V2 profile for Allergy Intolerance - refer to US Core AllergyIntolerance Profile. Allergy Intolerance 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 Intolerance must support these elements:

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

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

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

PARAMS
[base url] - FHIR base url
[id] - Id for the Patient

HEADERS

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

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

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'

Allergy Intolerance By Id

Get Allergy Intolerance by ID.

METHOD GET

[base url]/AllergyIntolerance/[id]

or

[base url]/AllergyIntolerance?_id=[id]

PARAMS
[base url] - FHIR base url
[id] - Id for Allergy Intolerance resource

HEADERS

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

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES


CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

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