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.

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 (202 KB) Generate classes
The ediFabric .NET template, class TS837. It needs the common segments, composites and codes of X12 006030, one download for every transaction in the version. Download C# (2 KB) Common files (274 KB)
The intermediary model ediFabric Native loads with set_map. Download Native (162 KB)

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.

IDNameUsageMax use
STTransaction Set HeaderOptional1
BHTBeginning of Hierarchical TransactionMandatory1
REFReference InformationOptional3
Loop NM1Individual or Organizational NameOptional10
NM1Individual or Organizational NameMandatory1
N2Additional Name InformationOptional2
N3Party LocationOptional2
N4Geographic LocationOptional1
REFReference InformationOptional2
PERAdministrative Communications ContactOptional2
Loop HLHierarchical LevelMandatory>1
HLHierarchical LevelMandatory1
PRVProvider InformationOptional1
SBRSubscriber InformationOptional1
PATPatient InformationOptional1
DTPDate or Time or PeriodOptional5
CURCurrencyOptional1
Loop NM1Individual or Organizational NameOptional10
NM1Individual or Organizational NameMandatory1
N2Additional Name InformationOptional2
N3Party LocationOptional2
N4Geographic LocationOptional1
DMGDemographic InformationOptional1
REFReference InformationOptional20
PERAdministrative Communications ContactOptional2
LUILanguage UseOptional1
Loop CLMHealth ClaimOptional100
CLMHealth ClaimMandatory1
DTPDate or Time or PeriodOptional150
CL1Claim CodesOptional1
DN1Orthodontic InformationOptional1
DN2Tooth SummaryOptional35
PWKPaperworkOptional10
CN1Contract InformationOptional1
DSBDisability InformationOptional1
URPeer Review Organization or Utilization ReviewOptional1
AMTMonetary Amount InformationOptional40
REFReference InformationOptional30
K3File InformationOptional10
NTENote/Special InstructionOptional20
CR1Ambulance CertificationOptional1
CR2Chiropractic CertificationOptional1
CR3Durable Medical Equipment CertificationOptional1
CR4Enteral or Parenteral Therapy CertificationOptional3
CR5Oxygen Therapy CertificationOptional1
CR6Home Health Care CertificationOptional1
CR8Pacemaker CertificationOptional9
CRCConditions IndicatorOptional100
HIHealth Care Information CodesOptional25
QTYQuantity InformationOptional10
HCPHealth Care PricingOptional1
Loop CR7Home Health Treatment Plan CertificationOptional6
CR7Home Health Treatment Plan CertificationMandatory1
HSDHealth Care Services DeliveryOptional12
Loop NM1Individual or Organizational NameOptional9
NM1Individual or Organizational NameMandatory1
PRVProvider InformationOptional1
N2Additional Name InformationOptional2
N3Party LocationOptional2
N4Geographic LocationOptional1
REFReference InformationOptional20
PERAdministrative Communications ContactOptional2
Loop SBRSubscriber InformationOptional10
SBRSubscriber InformationMandatory1
CASClaims AdjustmentOptional99
RASReason AdjustmentOptional99
AMTMonetary Amount InformationOptional15
DMGDemographic InformationOptional1
OIOther Health Insurance InformationOptional1
MIAInpatient AdjudicationOptional1
MOAOutpatient AdjudicationOptional1
Loop NM1Individual or Organizational NameOptional10
NM1Individual or Organizational NameMandatory1
N2Additional Name InformationOptional2
N3Party LocationOptional2
N4Geographic LocationOptional1
PERAdministrative Communications ContactOptional2
DTPDate or Time or PeriodOptional9
REFReference InformationOptional>1
Loop LXTransaction Set Line NumberOptional>1
LXTransaction Set Line NumberMandatory1
SV1Professional ServiceOptional1
SV2Institutional ServiceOptional1
SV3Dental ServiceOptional1
TOOTooth IdentificationOptional32
SV4Drug ServiceOptional1
SV5Durable Medical Equipment ServiceOptional1
SV6Anesthesia ServiceOptional1
SV7Drug AdjudicationOptional1
HIHealth Care Information CodesOptional25
PWKPaperworkOptional10
CR1Ambulance CertificationOptional1
CR2Chiropractic CertificationOptional5
CR3Durable Medical Equipment CertificationOptional1
CR4Enteral or Parenteral Therapy CertificationOptional3
CR5Oxygen Therapy CertificationOptional1
CRCConditions IndicatorOptional3
DTPDate or Time or PeriodOptional15
QTYQuantity InformationOptional5
MEAMeasurementsOptional20
CN1Contract InformationOptional1
REFReference InformationOptional30
AMTMonetary Amount InformationOptional15
K3File InformationOptional10
NTENote/Special InstructionOptional10
PS1Purchase ServiceOptional1
IMMImmunization StatusOptional>1
HSDHealth Care Services DeliveryOptional1
HCPHealth Care PricingOptional1
Loop LINItem IdentificationOptional>1
LINItem IdentificationMandatory1
CTPPricing InformationOptional1
REFReference InformationOptional1
SV4Drug ServiceOptional1
SV7Drug AdjudicationOptional1
Loop NM1Individual or Organizational NameOptional10
NM1Individual or Organizational NameMandatory1
PRVProvider InformationOptional1
N2Additional Name InformationOptional2
N3Party LocationOptional2
N4Geographic LocationOptional1
REFReference InformationOptional20
PERAdministrative Communications ContactOptional2
Loop SVDService Line AdjudicationOptional>1
SVDService Line AdjudicationMandatory1
CASClaims AdjustmentOptional99
RASReason AdjustmentOptional99
DTPDate or Time or PeriodOptional9
AMTMonetary Amount InformationOptional20
IIIInformationOptional99
Loop LQIndustry Code IdentificationOptional>1
LQIndustry Code IdentificationMandatory1
FRMSupporting DocumentationMandatory99
SETransaction Set TrailerOptional1