What Is HL7 v2 AL1-1? Set ID, Explained for Testers
AL1-1 looks like the most boring field in the entire segment, a plain incrementing number. It is also the field most likely to be silently wrong, because nobody double-checks it until two allergy records get merged into one on screen.
AL1-1 is a sequential integer, starting at 1, that numbers each AL1 segment within a message when a patient has more than one recorded allergy. It exists purely to keep repeated segments distinguishable and ordered; it carries no clinical meaning on its own.
What this field contains
Example
AL1-1 is the leading "1", marking this as the first allergy record in the message.
Where this trips people up
Test data generators that hardcode AL1-1 to "1" on every segment are the number one cause of downstream bugs never getting caught. If your synthetic patients only ever have a single allergy, your integration engine or interface layer never has to prove it can correctly sequence and store two, three, or ten AL1 segments in one message. Also watch for gaps: some source systems skip numbers after a deletion or edit, and a parser that assumes strictly consecutive values with no gaps will fail against real production traffic even though it passes every test you wrote.