837 Health Care Claim (006030)
This is the standard X12 006030 spec, with 13 loops and 121 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 837 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 837 files into TS837 objects. See ediFabric .NET.
ediFabric Native
Map version 006030 to the Native model with set_map, then parse 837 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 837 classes in Python, Java, Node.js, Go, Rust or C
ediFabric Native returns each 837 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 TS837. 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.
837 structure
Loops and segments of the standard 837, with their usage and maximum repeats.
| ID | Name | Usage | Max use |
|---|---|---|---|
| ST | Transaction Set Header | Optional | 1 |
| BHT | Beginning of Hierarchical Transaction | Mandatory | 1 |
| REF | Reference Information | Optional | 3 |
| Loop NM1 | Individual or Organizational Name | Optional | 10 |
| NM1 | Individual or Organizational Name | Mandatory | 1 |
| N2 | Additional Name Information | Optional | 2 |
| N3 | Party Location | Optional | 2 |
| N4 | Geographic Location | Optional | 1 |
| REF | Reference Information | Optional | 2 |
| PER | Administrative Communications Contact | Optional | 2 |
| Loop HL | Hierarchical Level | Mandatory | >1 |
| HL | Hierarchical Level | Mandatory | 1 |
| PRV | Provider Information | Optional | 1 |
| SBR | Subscriber Information | Optional | 1 |
| PAT | Patient Information | Optional | 1 |
| DTP | Date or Time or Period | Optional | 5 |
| CUR | Currency | Optional | 1 |
| Loop NM1 | Individual or Organizational Name | Optional | 10 |
| NM1 | Individual or Organizational Name | Mandatory | 1 |
| N2 | Additional Name Information | Optional | 2 |
| N3 | Party Location | Optional | 2 |
| N4 | Geographic Location | Optional | 1 |
| DMG | Demographic Information | Optional | 1 |
| REF | Reference Information | Optional | 20 |
| PER | Administrative Communications Contact | Optional | 2 |
| LUI | Language Use | Optional | 1 |
| Loop CLM | Health Claim | Optional | 100 |
| CLM | Health Claim | Mandatory | 1 |
| DTP | Date or Time or Period | Optional | 150 |
| CL1 | Claim Codes | Optional | 1 |
| DN1 | Orthodontic Information | Optional | 1 |
| DN2 | Tooth Summary | Optional | 35 |
| PWK | Paperwork | Optional | 10 |
| CN1 | Contract Information | Optional | 1 |
| DSB | Disability Information | Optional | 1 |
| UR | Peer Review Organization or Utilization Review | Optional | 1 |
| AMT | Monetary Amount Information | Optional | 40 |
| REF | Reference Information | Optional | 30 |
| K3 | File Information | Optional | 10 |
| NTE | Note/Special Instruction | Optional | 20 |
| CR1 | Ambulance Certification | Optional | 1 |
| CR2 | Chiropractic Certification | Optional | 1 |
| CR3 | Durable Medical Equipment Certification | Optional | 1 |
| CR4 | Enteral or Parenteral Therapy Certification | Optional | 3 |
| CR5 | Oxygen Therapy Certification | Optional | 1 |
| CR6 | Home Health Care Certification | Optional | 1 |
| CR8 | Pacemaker Certification | Optional | 9 |
| CRC | Conditions Indicator | Optional | 100 |
| HI | Health Care Information Codes | Optional | 25 |
| QTY | Quantity Information | Optional | 10 |
| HCP | Health Care Pricing | Optional | 1 |
| Loop CR7 | Home Health Treatment Plan Certification | Optional | 6 |
| CR7 | Home Health Treatment Plan Certification | Mandatory | 1 |
| HSD | Health Care Services Delivery | Optional | 12 |
| Loop NM1 | Individual or Organizational Name | Optional | 9 |
| NM1 | Individual or Organizational Name | Mandatory | 1 |
| PRV | Provider Information | Optional | 1 |
| N2 | Additional Name Information | Optional | 2 |
| N3 | Party Location | Optional | 2 |
| N4 | Geographic Location | Optional | 1 |
| REF | Reference Information | Optional | 20 |
| PER | Administrative Communications Contact | Optional | 2 |
| Loop SBR | Subscriber Information | Optional | 10 |
| SBR | Subscriber Information | Mandatory | 1 |
| CAS | Claims Adjustment | Optional | 99 |
| RAS | Reason Adjustment | Optional | 99 |
| AMT | Monetary Amount Information | Optional | 15 |
| DMG | Demographic Information | Optional | 1 |
| OI | Other Health Insurance Information | Optional | 1 |
| MIA | Inpatient Adjudication | Optional | 1 |
| MOA | Outpatient Adjudication | Optional | 1 |
| Loop NM1 | Individual or Organizational Name | Optional | 10 |
| NM1 | Individual or Organizational Name | Mandatory | 1 |
| N2 | Additional Name Information | Optional | 2 |
| N3 | Party Location | Optional | 2 |
| N4 | Geographic Location | Optional | 1 |
| PER | Administrative Communications Contact | Optional | 2 |
| DTP | Date or Time or Period | Optional | 9 |
| REF | Reference Information | Optional | >1 |
| Loop LX | Transaction Set Line Number | Optional | >1 |
| LX | Transaction Set Line Number | Mandatory | 1 |
| SV1 | Professional Service | Optional | 1 |
| SV2 | Institutional Service | Optional | 1 |
| SV3 | Dental Service | Optional | 1 |
| TOO | Tooth Identification | Optional | 32 |
| SV4 | Drug Service | Optional | 1 |
| SV5 | Durable Medical Equipment Service | Optional | 1 |
| SV6 | Anesthesia Service | Optional | 1 |
| SV7 | Drug Adjudication | Optional | 1 |
| HI | Health Care Information Codes | Optional | 25 |
| PWK | Paperwork | Optional | 10 |
| CR1 | Ambulance Certification | Optional | 1 |
| CR2 | Chiropractic Certification | Optional | 5 |
| CR3 | Durable Medical Equipment Certification | Optional | 1 |
| CR4 | Enteral or Parenteral Therapy Certification | Optional | 3 |
| CR5 | Oxygen Therapy Certification | Optional | 1 |
| CRC | Conditions Indicator | Optional | 3 |
| DTP | Date or Time or Period | Optional | 15 |
| QTY | Quantity Information | Optional | 5 |
| MEA | Measurements | Optional | 20 |
| CN1 | Contract Information | Optional | 1 |
| REF | Reference Information | Optional | 30 |
| AMT | Monetary Amount Information | Optional | 15 |
| K3 | File Information | Optional | 10 |
| NTE | Note/Special Instruction | Optional | 10 |
| PS1 | Purchase Service | Optional | 1 |
| IMM | Immunization Status | Optional | >1 |
| HSD | Health Care Services Delivery | Optional | 1 |
| HCP | Health Care Pricing | Optional | 1 |
| Loop LIN | Item Identification | Optional | >1 |
| LIN | Item Identification | Mandatory | 1 |
| CTP | Pricing Information | Optional | 1 |
| REF | Reference Information | Optional | 1 |
| SV4 | Drug Service | Optional | 1 |
| SV7 | Drug Adjudication | Optional | 1 |
| Loop NM1 | Individual or Organizational Name | Optional | 10 |
| NM1 | Individual or Organizational Name | Mandatory | 1 |
| PRV | Provider Information | Optional | 1 |
| N2 | Additional Name Information | Optional | 2 |
| N3 | Party Location | Optional | 2 |
| N4 | Geographic Location | Optional | 1 |
| REF | Reference Information | Optional | 20 |
| PER | Administrative Communications Contact | Optional | 2 |
| Loop SVD | Service Line Adjudication | Optional | >1 |
| SVD | Service Line Adjudication | Mandatory | 1 |
| CAS | Claims Adjustment | Optional | 99 |
| RAS | Reason Adjustment | Optional | 99 |
| DTP | Date or Time or Period | Optional | 9 |
| AMT | Monetary Amount Information | Optional | 20 |
| III | Information | Optional | 99 |
| Loop LQ | Industry Code Identification | Optional | >1 |
| LQ | Industry Code Identification | Mandatory | 1 |
| FRM | Supporting Documentation | Mandatory | 99 |
| SE | Transaction Set Trailer | Optional | 1 |