HL7 v2 AL1-6 (Identification Date): Format, Values, and Testing Notes
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.
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
Example
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.