Reference·AL1 Segment·AL1-6
HL7 v2 Reference

HL7 v2 AL1-6 (Identification Date): Format, Values, and Testing Notes

Jul 27, 2026 · 4 min read
← AL1-5

AL1-6 answers a simple question, when was this allergy identified, but the field is populated so inconsistently across source systems that treating it as reliable is itself a testing risk.

Quick answer

AL1-6 is a date field (data type DT) recording when the allergy was first identified or documented. It typically appears as an eight-digit YYYYMMDD value, though like much of the AL1 segment it is frequently left blank in real-world feeds.

What this field contains

Format
YYYYMMDD — standard HL7 date format; no time component expected in this field
Meaning
Identification date, not onset date — represents when the allergy was recorded, not necessarily when the reaction first occurred
Common state
Frequently blank — many legacy source systems never captured this data point historically

Example

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

AL1-6 is "20250314", meaning this allergy was recorded on March 14, 2025.

Where this trips people up

Test suites that always populate AL1-6 with a valid recent date miss two common real-world cases: the field being entirely blank, and the field carrying an implausibly old or clearly placeholder date such as "19000101" from a legacy migration. If your date-parsing logic assumes a well-formed, recent value, both of those cases can produce silent failures or nonsensical "years since identified" calculations in the UI. It is worth explicitly testing blank, malformed, and out-of-range dates rather than only ever generating today's date in a fixture.

HL7 v2 AL1 Segment Guide: Fields, Format, and Testing Gotchas
Regression Testing for EHR Upgrades: A Complete Guide
Synthetic Patient Data: Complete Guide for Software Testing
Test date edge cases automatically
Synthibase generates AL1-6 with a realistic spread of valid dates, blanks, and legacy placeholder values, so your date handling gets exercised the way production data actually behaves.
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.