NK1-1 in HL7 v2: A Field Guide to Set ID
A registration message with three NK1 segments and three "1" values in NK1-1 will parse without error and still corrupt every downstream contact record.
NK1-1 is a simple incrementing integer that numbers each NK1 segment within a message, starting at 1. Its only job is to let a receiving system tell repeating NK1 instances apart when a patient has more than one associated party — a spouse and an employer, say, both attached to the same ADT message.
What this field contains
Example
This synthetic message uses Set ID 1 because it's the only NK1 segment present; a second contact would arrive as a separate NK1 segment with Set ID 2.
Where this trips people up
Some sending systems reset NK1-1 to 1 for every segment instead of incrementing it, especially when contacts are pulled from different subsystems (registration vs. billing) and merged into one message. If your integration logic keys off NK1-1 to deduplicate or order contacts, that reset silently causes one contact to overwrite another. Test fixtures should include both correctly incrementing sequences and this broken reset pattern.