Build Benefit Enrollment EDI (X12 834)
Skill: Convert member enrollment changes into an X12 834 transaction
Region: United States
Category: Health Care EDI (HIPAA X12 5010)
Does: Takes employer/sponsor member-eligibility data and assembles the ASC X12N 834 Benefit Enrollment and Maintenance EDI transaction — the HIPAA-mandated format a plan sponsor (employer, exchange, or government program) sends to a health plan to add, change, terminate, or reinstate members and their coverage.
Spec: ASC X12 005010 — 834 005010X220A1
834 is the enrollment counterpart to the claim/payment transactions; it is governed by its X12 TR3 and frequently constrained by a payer/exchange companion guide (e.g. CMS uses 834 for Marketplace and Medicare enrollment with its own rules). Loop/segment IDs below are the 5010 structure; the TR3 + companion guide are authoritative for usage and code sets.
Transaction envelope
ISA / GS (FG = BE, version 005010X220A1) / ST (834)
BGN Beginning Segment (transaction set purpose: 00 original / 15 reissue, reference, timestamp, action)
REF Master policy / transaction set policy number
DTP File effective date
N1 SPONSOR (P5) and PAYER (IN) identification
... 2000 member loops ...
SE / GE / IEA
BGN08 action code distinguishes a full file (replace) from a change-only (update) feed — a critical companion-guide setting.
Member loop structure (2000)
2000 INS Member level detail (subscriber/dependent, relationship, maintenance type/reason, benefit status)
REF Subscriber ID, member policy number
DTP Member-level dates (hire, eligibility begin)
2100A NM1·IL Member Name + PER, N3/N4 address, DMG (DOB/gender), LUI language
2100C NM1 Member mailing / responsible person (situational)
2200 DSB Disability (situational)
2300 HD HEALTH COVERAGE (maintenance type, insurance line: HLT/DEN/VIS/…)
DTP Coverage begin/end dates
REF Health coverage policy / plan ID
COB Coordination of benefits (situational)
LX/ Additional reporting (provider, etc.)
Key segments
| Segment | Carries |
|---|---|
BGN |
transaction purpose (original/reissue/reinstate), reference ID, timestamp, action code (full vs change) |
N1·P5 / N1·IN |
sponsor (employer) and insurer/payer identification |
INS |
member maintenance: subscriber/dependent (Y/N), relationship code, maintenance type (021 add, 024 terminate, 001 change, 025 reinstate), maintenance reason, benefit status |
REF |
subscriber number, group/policy numbers |
NM1·IL |
member name + identifier (SSN/member ID) |
DMG |
date of birth, gender, marital status |
HD |
health coverage: maintenance type + insurance line code (HLT, DEN, VIS, etc.) + plan coverage description |
DTP |
eligibility/coverage begin and end dates |
Data rules
INSmaintenance type code drives the action: 021 add, 001 change, 024 termination, 025 reinstatement, 030 audit/compare. TheHDmaintenance type mirrors this at the coverage level.- Subscriber vs dependent:
INS01(Y/N) marks the subscriber;INS02relationship code (18self,01spouse,19child…) ties dependents to the subscriber. Dependents reference the subscriber ID inREF. - Full file vs change file (
BGN08): a full file is a complete replace; a change file carries only deltas. The payer companion guide dictates which is expected and the reconciliation method. - Coverage dates (
DTPin 2300/2000) set begin/end; terminations require an end date consistent with the maintenance reason. - Envelope control numbers (
ISA/GS/ST) must match trailers;SEsegment count must be exact.
Worked example (add one subscriber with dependent — skeleton)
ST*834*0001*005010X220A1~
BGN*00*REF20250531*20250531*1200****2~ Original, change file (2)
REF*38*GRP00123~ Master policy / group
DTP*303*D8*20250601~ File effective date
N1*P5*ACME EMPLOYER*FI*123456789~ Sponsor
N1*IN*BCBS*FI*987654321~ Payer
INS*Y*18*021*XN*A***FT~ Subscriber, ADD (021), active full-time
REF*0F*SUB100~ Subscriber ID
NM1*IL*1*DOE*JANE****34*123456789~ Member name (SSN)
DMG*D8*19850115*F~ DOB / gender
HD*021**HLT*PLANGOLD~ Coverage ADD: health, plan GOLD
DTP*348*D8*20250601~ Coverage begin
INS*N*01*021*XN*A~ Dependent (spouse), ADD
REF*0F*SUB100~ Links to subscriber SUB100
NM1*IL*1*DOE*JOHN****34*223456789~
DMG*D8*19840320*M~
HD*021**HLT*PLANGOLD~
DTP*348*D8*20250601~
SE*19*0001~ 19 segments, ST and SE inclusive
(Subscriber INS01=Y relationship 18=self; dependent INS01=N relationship 01=spouse linked by REF*0F*SUB100; both maintenance type 021 = add, coverage begins 2025-06-01.)
Validation checklist
- Version
005010X220A1and the payer/exchange companion guide confirmed; full-file vs change-file (BGN08) correct - Sponsor (
N1·P5) and payer (N1·IN) identifiers present - Each member has
INSwith correct maintenance type (021/001/024/025) and relationship code - Dependents reference the subscriber ID; subscriber flagged
INS01=Y -
NM1·ILname + member identifier andDMG(DOB/gender) present -
HDcoverage line codes and plan IDs valid;DTPbegin/end dates consistent with the action - Terminations carry an end date and reason; reinstatements use 025
- Envelope control numbers match trailers;
SEcount exact; passes 5010 validation before send
Last updated: 2026-05-31 — verify loop/segment usage, maintenance/relationship code sets, and full-vs-change file handling against the current ASC X12 005010X220A1 (834) TR3 and the payer/exchange companion guide before use.