HL7 v2 IN1-1 (Set ID): Format, Values, and Testing Notes
One IN1 segment tests fine every time — it's the second and third one, sequenced with IN1-1, where coordination-of-benefits logic actually gets exercised.
IN1-1 is a simple incrementing integer that numbers each IN1 segment when a message carries coverage for more than one payer. The first occurrence is 1, the second is 2, and so on — receiving systems typically use this sequence, combined with IN1-21 through IN1-23, to determine primary versus secondary coverage.
What this field contains
Example
IN1-1 is set to 1, marking this as the first (typically primary) insurance segment in the message.
Where this trips people up
Test generators love producing exactly one IN1 segment per message because it's the simplest valid case. That means the code path for parsing a second or third IN1 segment — and correctly attaching it to the same patient — often ships untested. When a real message arrives with three payers because a patient has Medicare, a supplemental plan, and a workers' comp claim, that's the first time the multi-segment loop actually runs.