271 Eligibility, Coverage or Benefit Information (005010X279)
Payers return the 271 in reply to a 270, with the patient's coverage, benefits, copays and deductibles. This is the standard X12 HIPAA 005010 before the errata spec, with 16 loops and 67 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 271 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 271 files into TS271 objects. See ediFabric .NET.
ediFabric Native
Map version 005010X279 to the Native model with set_map, then parse 271 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 271 classes in Python, Java, Node.js, Go, Rust or C
ediFabric Native returns each 271 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 TS271. 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 271, see the 271 transaction guide.
271 structure
Loops and segments of the standard 271, with their usage and maximum repeats.
| ID | Name | Usage | Max use |
|---|---|---|---|
| ST | Transaction Set Header | Optional | 1 |
| BHT | Beginning Of Hierarchical Transaction | Mandatory | 1 |
| Loop HL | Information Source Level | Mandatory | >1 |
| HL | Information Source Level | Mandatory | 1 |
| AAA | Request Validation | Optional | 9 |
| Loop NM1 | Information Source Name | Mandatory | 1 |
| NM1 | Information Source Name | Mandatory | 1 |
| PER | Information Source Contact Information | Optional | 3 |
| AAA | Request Validation | Optional | 9 |
| Loop HL | Information Receiver Level | Optional | >1 |
| HL | Information Receiver Level | Mandatory | 1 |
| Loop NM1 | Information Receiver Name | Mandatory | 1 |
| NM1 | Information Receiver Name | Mandatory | 1 |
| REF | Information Receiver Additional Identification | Optional | 9 |
| AAA | Information Receiver Request Validation | Optional | 9 |
| PRV | Information Receiver Provider Information | Optional | 1 |
| Loop HL | Subscriber Level | Optional | >1 |
| HL | Subscriber Level | Mandatory | 1 |
| TRN | Subscriber Trace Number | Optional | 3 |
| Loop NM1 | Subscriber Name | Mandatory | 1 |
| NM1 | Subscriber Name | Mandatory | 1 |
| REF | Subscriber Additional Identification | Optional | 9 |
| N3 | Subscriber Address | Optional | 1 |
| N4 | Subscriber City State ZIP Code | Optional | 1 |
| AAA | Subscriber Request Validation | Optional | 9 |
| PRV | Provider Information | Optional | 1 |
| DMG | Subscriber Demographic Information | Optional | 1 |
| INS | Subscriber Relationship | Optional | 1 |
| HI | Subscriber Health Care Diagnosis Code | Optional | 1 |
| DTP | Subscriber Date | Optional | 9 |
| MPI | Subscriber Military Personnel Information | Optional | 1 |
| Loop EB | Subscriber Eligibilityor Benefit Information | Optional | >1 |
| EB | Subscriber Eligibilityor Benefit Information | Mandatory | 1 |
| HSD | Health Care Services Delivery | Optional | 9 |
| REF | Subscriber Additional Identification | Optional | 9 |
| DTP | Subscriber Eligibility Benefit Date | Optional | 20 |
| AAA | Subscriber Request Validation | Optional | 9 |
| MSG | Message Text | Optional | 10 |
| Loop III | Subscriber Eligibilityor Benefit Additional Information | Optional | 10 |
| III | Subscriber Eligibilityor Benefit Additional Information | Mandatory | 1 |
| Loop LS | Header | Optional | 1 |
| LS | Header | Mandatory | 1 |
| Loop NM1 | Subscriber Benefit Related Entity Name | Optional | 23 |
| NM1 | Subscriber Benefit Related Entity Name | Mandatory | 1 |
| N3 | Subscriber Benefit Related Entity Address | Optional | 1 |
| N4 | Subscriber Benefit Related Entity City State ZIP Code | Optional | 1 |
| PER | Subscriber Benefit Related Entity Contact Information | Optional | 3 |
| PRV | Subscriber Benefit Related Provider Information | Optional | 1 |
| LE | Trailer | Mandatory | 1 |
| Loop HL | Dependent Level | Optional | >1 |
| HL | Dependent Level | Mandatory | 1 |
| TRN | Dependent Trace Number | Optional | 3 |
| Loop NM1 | Dependent Name | Mandatory | 1 |
| NM1 | Dependent Name | Mandatory | 1 |
| REF | Dependent Additional Identification | Optional | 9 |
| N3 | Dependent Address | Optional | 1 |
| N4 | Dependent City State ZIP Code | Optional | 1 |
| AAA | Dependent Request Validation | Optional | 9 |
| PRV | Provider Information | Optional | 1 |
| DMG | Dependent Demographic Information | Optional | 1 |
| INS | Dependent Relationship | Optional | 1 |
| HI | Dependent Health Care Diagnosis Code | Optional | 1 |
| DTP | Dependent Date | Optional | 9 |
| MPI | Dependent Military Personnel Information | Optional | 1 |
| Loop EB | Dependent Eligibilityor Benefit Information | Optional | >1 |
| EB | Dependent Eligibilityor Benefit Information | Mandatory | 1 |
| HSD | Health Care Services Delivery | Optional | 9 |
| REF | Dependent Additional Identification | Optional | 9 |
| DTP | Dependent Eligibility Benefit Date | Optional | 20 |
| AAA | Dependent Request Validation | Optional | 9 |
| MSG | Message Text | Optional | 10 |
| Loop III | Dependent Eligibilityor Benefit Additional Information | Optional | 10 |
| III | Dependent Eligibilityor Benefit Additional Information | Mandatory | 1 |
| Loop LS | Header | Optional | 1 |
| LS | Header | Mandatory | 1 |
| Loop NM1 | Dependent Benefit Related Entity Name | Optional | 23 |
| NM1 | Dependent Benefit Related Entity Name | Mandatory | 1 |
| N3 | Dependent Benefit Related Entity Address | Optional | 1 |
| N4 | Dependent Benefit Related Entity City State ZIP Code | Optional | 1 |
| PER | Dependent Benefit Related Entity Contact Information | Optional | 3 |
| PRV | Dependent Benefit Related Provider Information | Optional | 1 |
| LE | Trailer | Mandatory | 1 |
| SE | Transaction Set Trailer | Optional | 1 |