837 Health Care Claim (003030)

This is the standard X12 003030 spec, with 16 loops and 113 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 (94 KB) Generate classes
The ediFabric .NET template, class TS837. It needs the common segments, composites and codes of X12 003030, one download for every transaction in the version. Download C# (2 KB) Common files (159 KB)
The intermediary model ediFabric Native loads with set_map. Download Native (84 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 003030 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
BGNBeginning SegmentOptional1
REFReference NumbersOptional3
Loop NM1Individual or Organizational NameOptional10
NM1Individual or Organizational NameMandatory1
N2Additional Name InformationOptional2
N3Address InformationOptional2
N4Geographic LocationOptional1
REFReference NumbersOptional2
PERAdministrative Communications ContactOptional2
Loop PRVProvider InformationMandatory100
PRVProvider InformationMandatory1
CURCurrencyOptional1
Loop NM1Individual or Organizational NameOptional2
NM1Individual or Organizational NameMandatory1
N2Additional Name InformationOptional2
N3Address InformationOptional2
N4Geographic LocationOptional1
REFReference NumbersOptional2
PERAdministrative Communications ContactOptional2
Loop SBRSubscriber InformationMandatory99999
SBRSubscriber InformationMandatory1
DTPDate or Time or PeriodOptional5
Loop NM1Individual or Organizational NameOptional10
NM1Individual or Organizational NameMandatory1
N2Additional Name InformationOptional2
N3Address InformationOptional2
N4Geographic LocationOptional1
DMGDemographic InformationOptional1
PERAdministrative Communications ContactOptional2
REFReference NumbersOptional5
Loop PATPatient InformationMandatory99
PATPatient InformationMandatory1
Loop NM1Individual or Organizational NameOptional10
NM1Individual or Organizational NameMandatory1
N2Additional Name InformationOptional2
N3Address InformationOptional2
N4Geographic LocationOptional1
DMGDemographic InformationOptional1
PERAdministrative Communications ContactOptional2
REFReference NumbersOptional5
Loop CLMHealth ClaimMandatory100
CLMHealth ClaimMandatory1
DTPDate or Time or PeriodOptional40
CL1Claim CodesOptional1
DN1Orthodontic InformationOptional1
DN2Tooth SummaryOptional35
PWKPaperworkOptional10
CN1Contract InformationOptional1
DSBDisability InformationOptional1
URPeer Review Organization or Utilization ReviewOptional1
AMTMonetary AmountOptional40
REFReference NumbersOptional10
K3File InformationOptional10
NTENote/Special InstructionOptional4
CR1Ambulance CertificationOptional1
CR2Chiropractic CertificationOptional1
CR3Durable Medical Equipment CertificationOptional1
CR4Enteral or Parenteral Therapy CertificationOptional3
CR5Oxygen Therapy CertificationOptional1
CRCCertification ConditionsOptional3
PCProcedure CodesOptional25
AM1Informational ValuesOptional25
CD2Multi-Valued CharacteristicsOptional30
QTYQuantityOptional10
Loop LSLoop HeaderOptional1
LSLoop HeaderMandatory1
Loop NM1Individual or Organizational NameOptional9
NM1Individual or Organizational NameMandatory1
PRVProvider InformationOptional1
N2Additional Name InformationOptional2
N3Address InformationOptional2
N4Geographic LocationOptional1
PERAdministrative Communications ContactOptional2
LELoop TrailerMandatory1
Loop LXAssigned NumberOptional10000
LXAssigned NumberMandatory1
SV1Professional ServiceOptional1
SV2Institutional ServiceOptional1
SV3Dental ServiceOptional1
SV4Drug ServiceOptional1
Loop LINItem IdentificationOptional10
LINItem IdentificationMandatory1
CTPPricing InformationOptional1
SV5Durable Medical Equipment ServiceOptional1
SV6Anesthesia ServiceOptional1
SV7Drug AdjudicationOptional1
CD2Multi-Valued CharacteristicsOptional5
PWKPaperworkOptional10
CR1Ambulance CertificationOptional1
CR2Chiropractic CertificationOptional5
CR3Durable Medical Equipment CertificationOptional1
CR4Enteral or Parenteral Therapy CertificationOptional3
CR5Oxygen Therapy CertificationOptional1
CRCCertification ConditionsOptional3
DTPDate or Time or PeriodOptional15
QTYQuantityOptional5
CN1Contract InformationOptional1
REFReference NumbersOptional10
AMTMonetary AmountOptional15
K3File InformationOptional10
NTENote/Special InstructionOptional10
PS1Purchase ServiceOptional1
Loop LSLoop HeaderOptional1
LSLoop HeaderMandatory1
Loop NM1Individual or Organizational NameOptional9
NM1Individual or Organizational NameMandatory1
PRVProvider InformationOptional1
N2Additional Name InformationOptional2
N3Address InformationOptional2
N4Geographic LocationOptional1
PERAdministrative Communications ContactOptional2
LELoop TrailerMandatory1
Loop LSLoop HeaderOptional1
LSLoop HeaderMandatory1
Loop NM1Individual or Organizational NameOptional10
NM1Individual or Organizational NameMandatory1
N2Additional Name InformationOptional2
N3Address InformationOptional2
N4Geographic LocationOptional1
PERAdministrative Communications ContactOptional1
SBRSubscriber InformationOptional1
CA1Claim AdjudicationOptional1
AMTMonetary AmountOptional15
DMGDemographic InformationOptional1
DTPDate or Time or PeriodOptional2
REFReference NumbersOptional3
LELoop TrailerMandatory1
SETransaction Set TrailerOptional1