Reference·AL1 Segment·AL1-3
HL7 v2 Reference

AL1-3 in HL7 v2: A Field Guide to Allergen Code/Mnemonic/Description

Jul 27, 2026 · 4 min read
← AL1-2 AL1-4 →

AL1-3 is where the segment stops being abstract and says what the patient is actually allergic to. It is also the field most likely to arrive as inconsistent free text instead of a clean code, which is exactly the kind of mess your test data should be reproducing.

Quick answer

AL1-3 is a coded element (data type CE) that names the specific allergen: a substance, medication, or ingredient. It typically carries a coded value, a matching text description, and the coding system used, though many real-world source systems only populate the free-text portion.

What this field contains

Component 1
Identifier — the coded allergen value, e.g. a local or standard code
Component 2
Text — human-readable allergen name, often the only part actually populated
Component 3
Coding system — indicates which code table the identifier belongs to, e.g. a local dictionary versus a standard terminology

Example

Synthetic example Generated by Synthibase
AL1|1|DA|PENICILLIN^PENICILLIN^L|SV|HIVES^ANAPHYLAXIS|20250314

AL1-3 is "PENICILLIN^PENICILLIN^L": a locally coded identifier, its text description, and the coding system flag.

Where this trips people up

Plenty of production interfaces send AL1-3 as text-only, something like "PCN" or "no known drug allergies" jammed into the description component with the identifier and coding system left blank. A test suite built exclusively on fully coded CE values will look complete and still fail the moment a real feed sends a bare string. There is also a subtle trap in the "no known allergies" case: some systems represent it with a specific AL1-3 value rather than omitting AL1 entirely, and if your downstream logic treats any populated AL1-3 as "patient has an allergy," you will generate false positives on every NKDA patient. Test both patterns explicitly.

HL7 v2 AL1 Segment Guide: Fields, Format, and Testing Gotchas
Synthetic Patient Data: Complete Guide for Software Testing
Healthcare API Testing Guide: FHIR and X12
Test with messy allergen data, not just clean codes
Synthibase mixes coded and free-text AL1-3 values, plus proper NKDA patterns, so your allergen parsing gets tested against the same inconsistency real feeds produce.
Start free trial →
This page is written independently by Synthibase for testing and informational purposes. It is not an official publication of HL7 International or X12/Washington Publishing Company, and is not a substitute for reviewing the official standard or your trading partner's companion guide. See our Terms of Service for full legal terms.