NEWFree ROI Calculators — quantify what prior auth and siloed data are costing your organization.Prior Auth ROI Siloed Data ROI
HL7 v2Code Table7 min read

HL7 Table HL70127: Allergen Type

HL70127 is the HL7-defined code table that classifies the broad category of an allergen recorded on a patient. It is the binding for AL1-2 Allergen Type Code on legacy ADT-based allergy reporting and for IAM-2 Allergen Type Code on modern patient-allergy IAM segments. The codes describe the kind of substance (drug, food, environmental) rather than the specific allergen — the specific allergen lives in AL1-3 / IAM-3.

Purpose

HL70127 lets receiving systems route, alert, and de-duplicate allergies by class without parsing the specific allergen string. A pharmacy module that only cares about drug allergies can filter on DA; a dietary module filters on FA; an environmental-controls module on EA or LA. The category is independent of severity (HL70128) and clinical status (HL70438) — those are carried on separate fields.

Because HL70127 is HL7-defined, every conformant v2 receiver is expected to recognize all eight codes without local extension. Sites that need a richer ontology (latex, contrast media, insect venom) carry that distinction on the specific-allergen field (AL1-3 / IAM-3) coded against SNOMED CT or RxNorm, rather than coining new HL70127 codes.

Where it's used

  • AL1-2 Allergen Type Code — the legacy ADT allergy segment; still widely emitted by older registration systems.
  • IAM-2 Allergen Type Code — the modern patient-allergy segment introduced in v2.4 and preferred from v2.5 onward.
  • Some site-defined PRT (Participation) profiles that need to flag the allergen class of an exposure during a procedure.

Code list

CodeDisplayComment/Description
AAAnimal AllergyAllergy to animal dander, fur, or saliva (cat, dog, horse, etc.).
DADrug AllergyAllergy to a pharmaceutical agent — the most common category in inpatient settings.
EAEnvironmental AllergyAllergy to environmental substances (dust mite, mold, smoke). Distinct from pollen (LA) and animal (AA).
FAFood AllergyAllergy to a food substance (peanut, shellfish, dairy).
LAPollen AllergyAllergy to plant pollen — the abbreviation reflects the historical Latin term "lentigo/pollen"; modern profiles often call this Pollen Allergy explicitly.
MAMiscellaneous AllergyAllergy that does not fit AA, DA, EA, FA, LA, or PA — used sparingly.
MCMiscellaneous ContraindicationA non-allergic contraindication (for example, a drug-drug interaction recorded on the allergy segment for routing convenience).
PAPlant AllergyAllergy to a non-pollen plant substance (poison ivy, latex sap).

Code system OID

  • OID: 2.16.840.1.113883.18.49
  • Canonical URI: http://terminology.hl7.org/CodeSystem/v2-0127

The OID resolves on the HL7 Terminology server and is the value Vorro emits in CWE.14 when a downstream profile demands OID-bound coded values for AL1-2 or IAM-2.

HL7-defined vs user-defined

HL70127 is HL7-defined. The table number falls inside the HL7-reserved range (HL70001–HL70999) and the code set is normative — receivers must accept all eight values without local extension, and senders must not invent additional codes inside this table. Sites that need richer allergen-class semantics carry that on the specific-allergen field (AL1-3 / IAM-3) bound to SNOMED CT or RxNorm rather than extending HL70127.

Version differences

  • v2.1 – v2.2 — Initial three values: DA, FA, MA. Sufficient for the original AL1 use case (inpatient drug-allergy alerts).
  • v2.3EA (Environmental Allergy), AA (Animal Allergy), PA (Plant Allergy), LA (Pollen Allergy) added to accommodate outpatient and primary-care allergy reporting.
  • v2.3.1MC (Miscellaneous Contraindication) added so non-allergic contraindications could ride on the allergy segment without misuse of MA.
  • v2.4 – v2.8.1 — Set frozen at eight codes; the IAM segment supersedes AL1 but the table is unchanged.
  • v2.9 — Table unchanged. FHIR mapping clarified in the v2-to-FHIR IG to handle the lossy collapse onto AllergyIntolerance.category.

Common mistakes

  • Using MA as a default when the source EHR does not categorize the allergen. MA means "miscellaneous" — a deliberate "none of the above" — not "unknown." Unknown classifications should be carried as null and routed to curation.
  • Treating DA as the only legal value because the pharmacy is the only downstream consumer. Allergy segments are routed to dietary and clinical-decision-support modules too; mis-classifying a peanut allergy as DA blocks the dietary alert.
  • Confusing EA (Environmental) with LA (Pollen). Pollen is a specific subset of environmental allergens and has its own code; sending pollen allergies as EA defeats the routing purpose of the table.
  • Putting drug-drug interactions on AL1 with DA. A drug-drug interaction is a contraindication, not an allergy; the correct code is MC.
  • Extending HL70127 locally with LX for latex or CM for contrast media. HL70127 is HL7-defined; the latex or contrast-media specificity belongs in AL1-3 / IAM-3 against SNOMED CT.

Examples

A minimal AL1 reporting a penicillin drug allergy:

AL1|1|DA|7980^Penicillin^RXNORM|SV|Hives|20240101

A peanut food allergy on a modern IAM segment:

IAM|1||DA^Drug Allergy^HL70127|7980^Penicillin^RXNORM|SV^Severe^HL70128|||||C^Confirmed^HL70438
IAM|2||FA^Food Allergy^HL70127|762952008^Peanut^SCT|MO^Moderate^HL70128|||||C^Confirmed^HL70438

A drug-drug contraindication recorded as MC:

IAM|3||MC^Miscellaneous Contraindication^HL70127|warfarin-aspirin^Warfarin/Aspirin interaction^L||||||C^Confirmed^HL70438

Same penicillin DA translated to a FHIR AllergyIntolerance snippet:

{
  "resourceType": "AllergyIntolerance",
  "id": "ai-10456-pen",
  "category": ["medication"],
  "code": {
    "coding": [{
      "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
      "code": "7980",
      "display": "Penicillin"
    }]
  },
  "patient": {"reference": "Patient/10456"}
}

Mapping failure example — unknown vendor code:

IAM|1||LX^Latex Allergy^L|111088007^Latex^SCT|MO^Moderate^HL70128

LX is not in HL70127. A conformant engine should route the message to a curation queue, recognize that latex belongs in PA (Plant Allergy) with the SNOMED specificity preserved in IAM-3, and create a remap rule rather than silently dropping the allergy.

FHIR mapping

The HL7 v2-to-FHIR Implementation Guide publishes ConceptMap-table-hl70127-to-allergy-intolerance-category, which collapses HL70127's eight codes onto the four-value FHIR AllergyIntolerance.category value set:

HL7 v2 (HL70127)FHIR (AllergyIntolerance.category)Notes
DAmedicationDirect match.
FAfoodDirect match.
EAenvironmentDirect match.
LAenvironmentLossy — pollen specificity preserved as extension.
AAenvironmentLossy — animal specificity preserved as extension.
PAenvironmentLossy — plant specificity preserved as extension.
MA(null)No FHIR equivalent; preserved on AllergyIntolerance.code text.
MC(null)Not an allergy in FHIR; modeled as DetectedIssue or Flag instead.

AllergyIntolerance.category is a code repeating element bound to http://hl7.org/fhir/ValueSet/allergy-intolerance-category. Because four v2 codes (EA, LA, AA, PA) collapse to FHIR environment, the original HL70127 code must be preserved as an extension if the receiver needs to round-trip back to HL7 v2.

Engine considerations

  • Two-character validation — AL1-2 / IAM-2 codes are exactly two characters; reject longer payloads.
  • Case sensitivity — HL70127 codes are uppercase; da is not valid. Normalize on ingest.
  • CWE upgrade path — In v2.7+ profiles IAM-2 is CWE with OID metadata in CWE.14 (2.16.840.1.113883.18.49). Engines must handle both IS and CWE shapes.
  • Round-trip preservation — When mapping LA/AA/PA to FHIR environment, always store the original HL70127 code as an extension so the outbound v2 channel can restore the specific category.
  • MC routingMC is not an allergy. Engines should emit MC as a FHIR DetectedIssue rather than an AllergyIntolerance, and downstream consumers must be wired accordingly.

How Vorro handles HL70127

Vorro validates AL1-2 and IAM-2 against the eight HL70127 codes on ingest. Values that match are forwarded to all downstream channels untouched. Values that fail validation — including lowercase variants, common vendor extensions like LX for latex, and accidental display strings — are routed to the terminology curation queue, where they either resolve to one of the eight canonical codes (with the specific allergen preserved in IAM-3 against SNOMED) or pass through with a soft warning.

On outbound to FHIR, Vorro emits the IG-recommended AllergyIntolerance.category value and attaches the original HL70127 code as an extension so round-trip back to v2 is lossless. MC is routed to a DetectedIssue resource rather than AllergyIntolerance. Vorro also enforces the "DA requires an RxNorm code in IAM-3" guard so downstream pharmacy systems never receive an uncoded drug allergy.

Sources

← Back to HL7 v2 Guide

Ready to Integrate This Into Your Workflow?

Talk to a Vorro expert about implementing HL7 v2 in your specific environment.

Browse HL7 v2 Guides
HL7 Table HL70127: Allergen Type | Vorro Academy | Vorro