Testing HL7 v2 AL1-4: What Allergy Severity Code Actually Needs to Handle
AL1-4 is supposed to tell a clinician how worried to be. In practice it is one of the most inconsistently populated fields in the whole segment, and testing only the fully-populated case means your team has never seen what your system does with the gaps.
AL1-4 is a coded field indicating how severe an allergic reaction is, typically mild, moderate, severe, or unknown. It is frequently left blank in real feeds because many source systems never capture severity in the first place, so test coverage needs to include the blank case as deliberately as the populated one.
Valid code values
Example
AL1-4 carries "SV", marking this penicillin allergy as severe.
Where this trips people up
Teams frequently collapse "blank" and "U" into the same handling, which is fine right up until someone builds a severity-based sort or alert threshold that treats a blank field as the lowest priority when it should really be treated as unknown risk. If your test data always populates AL1-4, you will never catch the UI defaulting a blank severity to "mild" instead of surfacing it as unassessed. Build fixtures that mix all four coded values with a meaningful share of genuinely empty fields, matching what production feeds actually look like.