Endpoint Documentation: Fetch Allergies

Overview

This endpoint retrieves a comprehensive list of allergy records from the database, formatted in accordance with the FHIR (Fast Healthcare Interoperability Resources) standard for the AllergyIntolerance resource. It primarily serves healthcare applications by providing detailed allergy information, including associated drug details.

HTTP Request

GET /api/v1/allergies

Required Headers

HeaderDescription
AuthorizationBearer BRITE_API_KEY
Content-Typeapplication/json

Query Parameters

ParameterRequiredTypeDescription
None--No query parameters required

Response Structure

The response is a JSON array of objects, each structured as an AllergyIntolerance resource.

FieldTypeDescription
resourceTypeStringAlways "AllergyIntolerance".
idStringUnique identifier for the allergy record.
clinicalStatusStringClinical status of the allergy (e.g., "active").
verificationStatusStringVerification status (e.g., "unconfirmed").
typeStringType of record, typically "allergy".
categoryArrayCategories of the allergy (e.g., ["medication"]).
criticalityStringCriticality level (e.g., "low").
codeObjectContains textual description of the allergy.
patientObjectPatient details (if available).
onsetDateTimeStringDate-time when allergy first observed.
recordedDateStringDate when allergy was recorded.
reactionArrayList of reactions related to the allergy.
drugObjectDrug details associated with the allergy (if any).

Error Handling

Status CodeDescription
404No allergy records found.
500Internal server error or issue fetching data.

Example Request

curl -X GET "https://www.britelink.io/api/allergies" -H "Authorization: Bearer BRITE_API_KEY" -H "Content-Type: application/json"

Example Response

[
  {
    "resourceType": "AllergyIntolerance",
    "id": "allergy123",
    "clinicalStatus": "active",
    ... // Additional details
  }
  // ... more allergy records
]

Use Cases

  • Patient Health Records Management: Integrates with health record systems to manage patient allergy information.
  • Clinical Decision Support: Provides healthcare providers with crucial allergy data for informed decision-making.
  • Patient Safety: Identifies potential allergens, particularly critical in medication prescriptions.