Testing X12 834 INS02: What Individual Relationship Code Actually Needs to Handle
Family coverage looks simple until you try to enumerate every legal way a person can be related to a subscriber.
INS02 states how the individual in this member loop relates to the subscriber — self, spouse, child, or one of several less common categories. Enrollment systems use it to build the family unit and to decide which dependents should be linked under which policyholder.
Common code values you'll see in practice
Example
This synthetic example uses relationship code 18 (self) because INS01 already flags the record as the subscriber — the two fields agree with each other.
Where this trips people up
A lot of test data generators only ever produce 18, 01, and 19, since that covers the "typical family" case. Then a real file arrives with 53 or a less common relationship code and the mapping layer throws it into an "unmapped" bucket that nobody monitors. If your downstream system has a fixed enum for relationship types, make sure your test cases exercise every code your trading partner agreement says they might send — not just the three everyone remembers.