834 Benefit Enrollment and Maintenance (005010X220)

Employers, sponsors and exchanges send the 834 to enroll members in health plans and to update or end their coverage. This is the standard X12 HIPAA 005010 before the errata spec, with 21 loops and 76 segment positions, as OpenEDI JSON, an ediFabric C# template and an ediFabric Native model. To change it for a trading partner, customize it in the EDI Spec Builder.

Loading the spec…
The spec as an OpenAPI 3 schema with x-openedi-* extensions, for ediFabric Native, ediFabric Cloud and the EDI Spec Builder. Download OpenEDI (265 KB) Generate classes
The ediFabric .NET template, class TS834. The download includes the common segments, composites and codes it needs. Download C# (73 KB)
The intermediary model ediFabric Native loads with set_map. Download Native (100 KB)

Use the 834 spec in your code

ediFabric .NET

Add the C# template and its common files to your project, or reference the template NuGet package, and read 834 files into TS834 objects. See ediFabric .NET.

ediFabric Native

Map version 005010X220 to the Native model with set_map, then parse 834 files to JSON from Python, Java, C or C#. See Convert between EDI and JSON.

OpenEDI

Select Customize in Spec Builder to copy the spec under your own name, change it for your partner, and parse files against it in EdiNation, ediFabric Native or ediFabric Cloud. Read about OpenEDI.

Generate 834 classes in Python, Java, Node.js, Go, Rust or C

ediFabric Native returns each 834 as JSON, with the property names of the OpenEDI schema. To work with that JSON as typed objects, generate classes from the OpenEDI file in your language and deserialize the JSON into TS834. Serialize the objects back to JSON to build EDI with ediFabric Native. The classes keep the loops, segments, lengths and code lists, but not the EDI data formats, so validate files with ediFabric Native. Read more in Generate a class from OpenEDI.

Python: datamodel-code-generator. Node.js: openapi-typescript. Java, Go, Rust and C: OpenAPI Generator.

For a sample file, the same data as JSON, and code to parse, validate and generate the 834, see the 834 transaction guide.

834 structure

Loops and segments of the standard 834, with their usage and maximum repeats.

IDNameUsageMax use
STTransaction Set HeaderOptional1
BGNBeginning SegmentMandatory1
REFTransaction Set Policy NumberOptional1
DTPFile Effective DateOptional>1
QTYTransaction Set Control TotalsOptional3
Loop N1Sponsor NameMandatory1
N1Sponsor NameMandatory1
Loop N1PayerMandatory1
N1PayerMandatory1
Loop N1TPA Broker NameOptional2
N1TPA Broker NameMandatory1
Loop ACTTPA Broker Account InformationOptional1
ACTTPA Broker Account InformationMandatory1
Loop INSMember Level DetailMandatory>1
INSMember Level DetailMandatory1
REFSubscriber IdentifierMandatory1
REFMember Policy NumberOptional1
REFMember Supplemental IdentifierOptional13
DTPMember Level DatesOptional24
Loop NM1Member NameMandatory1
NM1Member NameMandatory1
PERMember Communications NumbersOptional1
N3Member Residence Street AddressOptional1
N4Member City State ZIP CodeMandatory1
DMGMember DemographicsOptional1
ECEmployment ClassOptional>1
ICMMember IncomeOptional1
AMTMember Policy AmountsOptional7
HLHMember Health InformationOptional1
LUIMember LanguageOptional>1
Loop NM1Incorrect Member NameOptional1
NM1Incorrect Member NameMandatory1
DMGIncorrect Member DemographicsOptional1
Loop NM1Member Mailing AddressOptional1
NM1Member Mailing AddressMandatory1
N3Member Mail Street AddressMandatory1
N4Member Mail City State ZIP CodeMandatory1
Loop NM1Member EmployerOptional3
NM1Member EmployerMandatory1
PERMember Employer Communications NumbersOptional1
N3Member Employer Street AddressOptional1
N4Member Employer City State ZIP CodeMandatory1
Loop NM1Member SchoolOptional3
NM1Member SchoolMandatory1
PERMember School Commmunications NumbersOptional1
N3Member School Street AddressOptional1
N4Member School City State ZIP CodeMandatory1
Loop NM1Custodial ParentOptional1
NM1Custodial ParentMandatory1
PERCustodial Parent Communications NumbersOptional1
N3Custodial Parent Street AddressOptional1
N4Custodial Parent City State ZIP CodeMandatory1
Loop NM1Responsible PersonOptional13
NM1Responsible PersonMandatory1
PERResponsible Person Communications NumbersOptional1
N3Responsible Person Street AddressOptional1
N4Responsible Person City State ZIP CodeMandatory1
Loop NM1Drop Off LocationOptional1
NM1Drop Off LocationMandatory1
N3Drop Off Location Street AddressOptional1
N4Drop Off Location City State ZIP CodeMandatory1
Loop DSBDisability InformationOptional>1
DSBDisability InformationMandatory1
DTPDisability Eligibility DatesOptional2
Loop HDHealth CoverageOptional99
HDHealth CoverageMandatory1
DTPHealth Coverage DatesMandatory6
AMTHealth Coverage PolicyOptional9
REFHealth Coverage Policy NumberOptional14
REFPrior Coverage MonthsOptional1
IDCIdentification CardOptional3
Loop LXProvider InformationOptional30
LXProvider InformationMandatory1
NM1Provider NameMandatory1
N3Provider AddressOptional2
N4Provider City State ZIP CodeMandatory1
PERProvider Communications NumbersOptional2
PLAProvider Change ReasonOptional1
Loop COBCoordinationof BenefitsOptional5
COBCoordinationof BenefitsMandatory1
REFAdditional Coordinationof Benefits IdentifiersOptional4
DTPCoordinationof Benefits Eligibility DatesOptional2
Loop NM1Coordinationof Benefits Related EntityOptional3
NM1Coordinationof Benefits Related EntityMandatory1
N3Coordinationof Benefits Related Entity AddressOptional1
N4Coordinationof Benefits Other Insurance Company City State ZIP CodeMandatory1
PERAdministrative Communications ContactOptional1
Loop LSAdditional Reporting CategoriesOptional1
LSAdditional Reporting CategoriesMandatory1
Loop LXMember Reporting CategoriesOptional>1
LXMember Reporting CategoriesMandatory1
Loop N1Reporting CategoryOptional1
N1Reporting CategoryMandatory1
REFReporting Category ReferenceOptional16
DTPReporting Category DateOptional1
LEAdditional Reporting Categories TerminationMandatory1
SETransaction Set TrailerOptional1