Allergy data model

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNoUnique identifier for the allergy/intolerance
created_atstring (date-time)NoWhen the allergy record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)NoWhen the allergy record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
patient_idstringNoThe patient who has the allergy
encounter_idstringNoThe encounter in which the allergy was recorded
practitioner_idstringNoThe practitioner who recorded or asserted the allergy
namestringNoHuman-readable name of the substance
codesHealthcareCode[]NoCodings for the substance (e.g. RxNorm, SNOMED CT)
codes[].systemstringNoThe code system URI (e.g. http://loinc.org, http://snomed.info/sct)
codes[].codestringNoThe code within the system
codes[].displaystringNoHuman-readable display text for the code
statusenumNoClinical status of the allergy Values: ACTIVE, INACTIVE, RESOLVED, OTHER
typeenumNoCategory of the substance Values: FOOD, MEDICATION, ENVIRONMENT, BIOLOGIC, OTHER
criticalityenumNoPotential severity of future reactions Values: LOW, HIGH, UNABLE_TO_ASSESS, OTHER
reactionsHealthcareCode[]NoCodings for observed reaction manifestations (e.g. hives, anaphylaxis)
reactions[].systemstringNoThe code system URI (e.g. http://loinc.org, http://snomed.info/sct)
reactions[].codestringNoThe code within the system
reactions[].displaystringNoHuman-readable display text for the code
onset_atstring (date-time)NoWhen the allergy was first identified (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
recorded_atstring (date-time)NoWhen the allergy was recorded (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
notesstringNoFree-text notes about the allergy
metadataHealthcareMetadata[]No
metadata[].idstringNo
metadata[].valueobjectNo
metadata[].namespacestringNo
metadata[].formatenumNoValues: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT
metadata[].extra_dataobjectNo
metadata[].slugstringNo

TypeScript

TypeScript
export type HealthcareAllergy = {
	id?: string; // Unique identifier for the allergy/intolerance
	created_at?: string-time; // When the allergy record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the allergy record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	patient_id?: string; // The patient who has the allergy
	encounter_id?: string; // The encounter in which the allergy was recorded
	practitioner_id?: string; // The practitioner who recorded or asserted the allergy
	name?: string; // Human-readable name of the substance
	codes?: []; // Codings for the substance (e.g. RxNorm, SNOMED CT)
	status?: 'ACTIVE' | 'INACTIVE' | 'RESOLVED' | 'OTHER'; // Clinical status of the allergy
	type?: 'FOOD' | 'MEDICATION' | 'ENVIRONMENT' | 'BIOLOGIC' | 'OTHER'; // Category of the substance
	criticality?: 'LOW' | 'HIGH' | 'UNABLE_TO_ASSESS' | 'OTHER'; // Potential severity of future reactions
	reactions?: []; // Codings for observed reaction manifestations (e.g. hives, anaphylaxis)
	onset_at?: string-time; // When the allergy was first identified (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	recorded_at?: string-time; // When the allergy was recorded (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	notes?: string; // Free-text notes about the allergy
	metadata?: [];
	raw?: any; // Raw data from integration
} 

Zod

Zod
import { z } from 'zod';

export const ZodHealthcareAllergy = z.object({
	id: z.string().optional().describe("Unique identifier for the allergy/intolerance"),
	created_at: z.string-time().optional().describe("When the allergy record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the allergy record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	patient_id: z.string().optional().describe("The patient who has the allergy"),
	encounter_id: z.string().optional().describe("The encounter in which the allergy was recorded"),
	practitioner_id: z.string().optional().describe("The practitioner who recorded or asserted the allergy"),
	name: z.string().optional().describe("Human-readable name of the substance"),
	codes: z.array().optional().describe("Codings for the substance (e.g. RxNorm, SNOMED CT)"),
	status: z.enum("ACTIVE", "INACTIVE", "RESOLVED", "OTHER").optional().describe("Clinical status of the allergy"),
	type: z.enum("FOOD", "MEDICATION", "ENVIRONMENT", "BIOLOGIC", "OTHER").optional().describe("Category of the substance"),
	criticality: z.enum("LOW", "HIGH", "UNABLE_TO_ASSESS", "OTHER").optional().describe("Potential severity of future reactions"),
	reactions: z.array().optional().describe("Codings for observed reaction manifestations (e.g. hives, anaphylaxis)"),
	onset_at: z.string-time().optional().describe("When the allergy was first identified (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	recorded_at: z.string-time().optional().describe("When the allergy was recorded (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	notes: z.string().optional().describe("Free-text notes about the allergy"),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class HealthcareAllergyStatus(str, Enum):
	ACTIVE = 'ACTIVE'
	INACTIVE = 'INACTIVE'
	RESOLVED = 'RESOLVED'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareAllergyType(str, Enum):
	FOOD = 'FOOD'
	MEDICATION = 'MEDICATION'
	ENVIRONMENT = 'ENVIRONMENT'
	BIOLOGIC = 'BIOLOGIC'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareAllergyCriticality(str, Enum):
	LOW = 'LOW'
	HIGH = 'HIGH'
	UNABLE_TO_ASSESS = 'UNABLE_TO_ASSESS'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareAllergy:
	"""Unique identifier for the allergy/intolerance"""
	id: Optional[str]
	"""When the allergy record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the allergy record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The patient who has the allergy"""
	patient_id: Optional[str]
	"""The encounter in which the allergy was recorded"""
	encounter_id: Optional[str]
	"""The practitioner who recorded or asserted the allergy"""
	practitioner_id: Optional[str]
	"""Human-readable name of the substance"""
	name: Optional[str]
	"""Codings for the substance (e.g. RxNorm, SNOMED CT)"""
	codes: Optional[PropertyHealthcareAllergyCodes]
	"""Clinical status of the allergy"""
	status: Optional[HealthcareAllergyStatus]
	"""Category of the substance"""
	type: Optional[HealthcareAllergyType]
	"""Potential severity of future reactions"""
	criticality: Optional[HealthcareAllergyCriticality]
	"""Codings for observed reaction manifestations (e.g. hives, anaphylaxis)"""
	reactions: Optional[PropertyHealthcareAllergyReactions]
	"""When the allergy was first identified (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	onset_at: Optional[str]
	"""When the allergy was recorded (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	recorded_at: Optional[str]
	"""Free-text notes about the allergy"""
	notes: Optional[str]
	metadata: Optional[PropertyHealthcareAllergyMetadata]
Are we missing anything? Let us know
Was this page helpful?