820 Payroll Deducted and Other Group Premium Payment for Insurance Products (004010X061A1)
Employers and sponsors send the 820 to pay health plan premiums and to say which members and periods the payment covers. This is the standard X12 HIPAA 004010 spec, with 11 loops and 28 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.
Use the 820 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 820 files into TS820 objects. See ediFabric .NET.
ediFabric Native
Map version 004010X061A1 to the Native model with set_map, then parse 820 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 820 classes in Python, Java, Node.js, Go, Rust or C
ediFabric Native returns each 820 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 TS820. 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 820, see the 820 transaction guide.
820 structure
Loops and segments of the standard 820, with their usage and maximum repeats.
| ID | Name | Usage | Max use |
|---|---|---|---|
| ST | Transaction Set Header | Optional | 1 |
| BPR | Financial Information | Mandatory | 1 |
| TRN | Reassociation Key | Mandatory | 1 |
| CUR | Non US Dollars Currency | Optional | 1 |
| REF | Premium Receivers Identification Key | Optional | >1 |
| DTM | Process Date | Optional | 1 |
| DTM | Delivery Date | Optional | 1 |
| DTM | Coverage Period | Optional | 1 |
| Loop N1 | Premium Receivers Name | Mandatory | 1 |
| N1 | Premium Receivers Name | Mandatory | 1 |
| N2 | Premium Receiver Additional Name | Optional | 1 |
| N3 | Premium Receivers Address | Optional | 1 |
| N4 | Premium Receivers City State Zip | Optional | 1 |
| Loop N1 | Premium Payers Name | Mandatory | 1 |
| N1 | Premium Payers Name | Mandatory | 1 |
| N2 | Premium Payer Additional Name | Optional | 1 |
| N3 | Premium Payers Address | Optional | 1 |
| N4 | Premium Payers City State Zip | Optional | 1 |
| PER | Premium Payers Administrative Contact | Optional | >1 |
| Loop ENT | Organization Summary Remittance | Optional | 1 |
| ENT | Organization Summary Remittance | Mandatory | 1 |
| Loop RMR | Organization Summary Remittance Detail | Mandatory | >1 |
| RMR | Organization Summary Remittance Detail | Mandatory | 1 |
| Loop IT1 | Summary Line Item | Optional | 1 |
| IT1 | Summary Line Item | Mandatory | 1 |
| Loop SLN | Member Count | Optional | >1 |
| SLN | Member Count | Mandatory | 1 |
| Loop ADX | Organization Summary Remittance Level Adjustment | Optional | >1 |
| ADX | Organization Summary Remittance Level Adjustment | Mandatory | 1 |
| Loop ENT | Individual Remittance | Optional | >1 |
| ENT | Individual Remittance | Mandatory | 1 |
| Loop NM1 | Individual Name | Optional | >1 |
| NM1 | Individual Name | Mandatory | 1 |
| Loop RMR | Individual Premium Remittance Detail | Optional | >1 |
| RMR | Individual Premium Remittance Detail | Mandatory | 1 |
| DTM | Individual Coverage Period | Optional | 1 |
| Loop ADX | Individual Premium Adjustment | Optional | >1 |
| ADX | Individual Premium Adjustment | Mandatory | 1 |
| SE | Transaction Set Trailer | Optional | 1 |