837P Health Care Claim: Professional (005010X222)

Providers and billing services send the 837P to submit professional claims, the electronic CMS-1500, to payers and clearinghouses. This is the standard X12 HIPAA 005010 before the errata spec, with 65 loops and 380 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 (543 KB) Generate classes
The ediFabric .NET template, class TS837P. The download includes the common segments, composites and codes it needs. Download C# (77 KB)
The intermediary model ediFabric Native loads with set_map. Download Native (251 KB)

Use the 837P 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 837P files into TS837P objects. See ediFabric .NET.

ediFabric Native

Map version 005010X222 to the Native model with set_map, then parse 837P 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 837P classes in Python, Java, Node.js, Go, Rust or C

ediFabric Native returns each 837P 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 TS837P. 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 837P, see the 837P transaction guide.

837P structure

Loops and segments of the standard 837P, with their usage and maximum repeats.

IDNameUsageMax use
STTransaction Set HeaderOptional1
BHTBeginning Of Hierarchical TransactionMandatory1
Loop NM1Submitter NameMandatory1
NM1Submitter NameMandatory1
PERSubmitter EDI Contact InformationMandatory2
Loop NM1Receiver NameMandatory1
NM1Receiver NameMandatory1
Loop HLBilling Provider Hierarchical LevelMandatory>1
HLBilling Provider Hierarchical LevelMandatory1
PRVBilling Provider Specialty InformationOptional1
CURForeign Currency InformationOptional1
Loop NM1Billing Provider NameMandatory1
NM1Billing Provider NameMandatory1
N3Billing Provider AddressMandatory1
N4Billing Provider City State ZIP CodeMandatory1
REFBilling Provider Tax IdentificationMandatory1
REFBilling Provider UPIN License InformationOptional2
PERBilling Provider Contact InformationOptional2
Loop NM1Pay Address NameOptional1
NM1Pay Address NameMandatory1
N3Pay To Address ADDRESSMandatory1
N4Pay Address City State ZIP CodeMandatory1
Loop NM1Pay To Plan NameOptional1
NM1Pay To Plan NameMandatory1
N3Pay To Plan AddressMandatory1
N4Pay To Plan City State ZIP CodeMandatory1
REFPay To Plan Secondary IdentificationOptional1
REFPay To Plan Tax Identification NumberMandatory1
Loop HLSubscriber Hierarchical LevelMandatory>1
HLSubscriber Hierarchical LevelMandatory1
SBRSubscriber InformationMandatory1
PATPatient InformationOptional1
Loop NM1Subscriber NameMandatory1
NM1Subscriber NameMandatory1
N3Subscriber AddressOptional1
N4Subscriber City State ZIP CodeMandatory1
DMGSubscriber Demographic InformationOptional1
REFSubscriber Secondary IdentificationOptional1
REFPropertyand Casualty Claim NumberOptional1
PERPropertyand Casualty Subscriber Contact InformationOptional1
Loop NM1Payer NameMandatory1
NM1Payer NameMandatory1
N3Payer AddressOptional1
N4Payer City State ZIP CodeMandatory1
REFPayer Secondary IdentificationOptional3
REFBilling Provider Secondary IdentificationOptional2
Loop CLMClaim InformationOptional100
CLMClaim InformationMandatory1
DTPDate Onsetof Current Illnessor SymptomOptional1
DTPDate Initial Treatment DateOptional1
DTPDate Last Seen DateOptional1
DTPDate Acute ManifestationOptional1
DTPDate AccidentOptional1
DTPDate Last Menstrual PeriodOptional1
DTPDate Last X DateOptional1
DTPDate Hearingand Vision Prescription DateOptional1
DTPDate Disability DatesOptional1
DTPDate Last WorkedOptional1
DTPDate Authorized Returnto WorkOptional1
DTPDate AdmissionOptional1
DTPDate DischargeOptional1
DTPDate Assumedand Relinquished Care DatesOptional2
DTPPropertyand Casualty Dateof First ContactOptional1
DTPDate Repricer Received DateOptional1
PWKClaim Supplemental InformationOptional10
CN1Contract InformationOptional1
AMTPatient Amount PaidOptional1
REFService Authorization Exception CodeOptional1
REFMandatory Medicare Section4081 Crossover IndicatorOptional1
REFMammography Certification NumberOptional1
REFReferral NumberOptional1
REFPrior AuthorizationOptional1
REFPayer Claim Control NumberOptional1
REFClinical Laboratory Improvement Amendment CLIA NumberOptional1
REFRepriced Claim NumberOptional1
REFAdjusted Repriced Claim NumberOptional1
REFInvestigational Device Exemption NumberOptional1
REFClaim Identifier For Transmission IntermediariesOptional1
REFMedical Record NumberOptional1
REFDemonstration Project IdentifierOptional1
REFCare Plan OversightOptional1
K3File InformationOptional10
NTEClaim NoteOptional1
CR1Ambulance Transport InformationOptional1
CR2Spinal Manipulation Service InformationOptional1
CRCAmbulance CertificationOptional3
CRCPatient Condition Information VisionOptional3
CRCHomebound IndicatorOptional1
CRCEPSDT ReferralOptional1
HIHealth Care Diagnosis CodeMandatory1
HIAnesthesia Related ProcedureOptional1
HICondition InformationOptional2
HCPClaim Pricing Repricing InformationOptional1
Loop NM1Referring Provider NameOptional2
NM1Referring Provider NameMandatory1
REFReferring Provider Secondary IdentificationOptional3
Loop NM1Rendering Provider NameOptional1
NM1Rendering Provider NameMandatory1
PRVRendering Provider Specialty InformationOptional1
REFRendering Provider Secondary IdentificationOptional4
Loop NM1Service Facility Location NameOptional1
NM1Service Facility Location NameMandatory1
N3Service Facility Location AddressMandatory1
N4Service Facility Location City State ZIP CodeMandatory1
REFService Facility Location Secondary IdentificationOptional3
PERService Facility Contact InformationOptional1
Loop NM1Supervising Provider NameOptional1
NM1Supervising Provider NameMandatory1
REFSupervising Provider Secondary IdentificationOptional4
Loop NM1Ambulance Pick LocationOptional1
NM1Ambulance Pick LocationMandatory1
N3Ambulance Pick Location AddressMandatory1
N4Ambulance Pick Location City State Zip CodeMandatory1
Loop NM1Ambulance Drop LocationOptional1
NM1Ambulance Drop LocationMandatory1
N3Ambulance Drop Location AddressMandatory1
N4Ambulance Drop Location City State Zip CodeMandatory1
Loop SBROther Subscriber InformationOptional10
SBROther Subscriber InformationMandatory1
CASClaim Level AdjustmentsOptional5
AMTCoordinationof Benefits COB Payer Paid AmountOptional1
AMTCoordinationof Benefits COB Total Non AmountOptional1
AMTRemaining Patient LiabilityOptional1
OIOther Insurance Coverage InformationMandatory1
MOAOutpatient Adjudication InformationOptional1
Loop NM1Other Subscriber NameMandatory1
NM1Other Subscriber NameMandatory1
N3Other Subscriber AddressOptional1
N4Other Subscriber City State ZIP CodeMandatory1
REFOther Subscriber Secondary IdentificationOptional1
Loop NM1Other Payer NameMandatory1
NM1Other Payer NameMandatory1
N3Other Payer AddressOptional1
N4Other Payer City State ZIP CodeMandatory1
DTPClaim Checkor Remittance DateOptional1
REFOther Payer Secondary IdentifierOptional2
REFOther Payer Prior Authorization NumberOptional1
REFOther Payer Referral NumberOptional1
REFOther Payer Claim Adjustment IndicatorOptional1
REFOther Payer Claim Control NumberOptional1
Loop NM1Other Payer Referring ProviderOptional2
NM1Other Payer Referring ProviderMandatory1
REFOther Payer Referring Provider Secondary IdentificationMandatory3
Loop NM1Other Payer Rendering ProviderOptional1
NM1Other Payer Rendering ProviderMandatory1
REFOther Payer Rendering Provider Secondary IdentificationMandatory3
Loop NM1Other Payer Service Facility LocationOptional1
NM1Other Payer Service Facility LocationMandatory1
REFOther Payer Service Facility Location Secondary IdentificationMandatory3
Loop NM1Other Payer Supervising ProviderOptional1
NM1Other Payer Supervising ProviderMandatory1
REFOther Payer Supervising Provider Secondary IdentificationMandatory3
Loop NM1Other Payer Billing ProviderOptional1
NM1Other Payer Billing ProviderMandatory1
REFOther Payer Billing Provider Secondary IdentificationMandatory2
Loop LXService Line NumberMandatory50
LXService Line NumberMandatory1
SV1Professional ServiceMandatory1
SV5Durable Medical Equipment ServiceOptional1
PWKLine Supplemental InformationOptional10
PWKDurable Medical Equipment Certificateof Medical Necessity IndicatorOptional1
CR1Ambulance Transport InformationOptional1
CR3Durable Medical Equipment CertificationOptional1
CRCAmbulance CertificationOptional3
CRCHospice Employee IndicatorOptional1
CRCCondition Indicator Durable Medical EquipmentOptional1
DTPDate Service DateMandatory1
DTPDate Prescription DateOptional1
DTPDATE Certification Revision Recertification DateOptional1
DTPDate Begin Therapy DateOptional1
DTPDate Last Certification DateOptional1
DTPDate Last Seen DateOptional1
DTPDate Test DateOptional2
DTPDate Shipped DateOptional1
DTPDate Last X DateOptional1
DTPDate Initial Treatment DateOptional1
QTYAmbulance Patient CountOptional1
QTYObstetric Anesthesia Additional UnitsOptional1
MEATest ResultOptional5
CN1Contract InformationOptional1
REFRepriced Line Item Reference NumberOptional1
REFAdjusted Repriced Line Item Reference NumberOptional1
REFPrior AuthorizationOptional5
REFLine Item Control NumberOptional1
REFMammography Certification NumberOptional1
REFClinical Laboratory Improvement Amendment CLIA NumberOptional1
REFReferring Clinical Laboratory Improvement Amendment CLIA Facility IdentificationOptional1
REFImmunization Batch NumberOptional1
REFReferral NumberOptional5
AMTSales Tax AmountOptional1
AMTPostage Claimed AmountOptional1
K3File InformationOptional10
NTELine NoteOptional1
NTEThird Party Organization NotesOptional1
PS1Purchased Service InformationOptional1
HCPLine Pricing Repricing InformationOptional1
Loop LINDrug IdentificationOptional1
LINDrug IdentificationMandatory1
CTPDrug QuantityMandatory1
REFPrescriptionor Compound Drug Association NumberOptional1
Loop NM1Rendering Provider NameOptional1
NM1Rendering Provider NameMandatory1
PRVRendering Provider Specialty InformationOptional1
REFRendering Provider Secondary IdentificationOptional20
Loop NM1Purchased Service Provider NameOptional1
NM1Purchased Service Provider NameMandatory1
REFPurchased Service Provider Secondary IdentificationOptional20
Loop NM1Service Facility LocationOptional1
NM1Service Facility LocationMandatory1
N3Service Facility Location AddressMandatory1
N4Service Facility Location City State ZIP CodeMandatory1
REFService Facility Location Secondary IdentificationOptional3
Loop NM1Supervising Provider NameOptional1
NM1Supervising Provider NameMandatory1
REFSupervising Provider Secondary IdentificationOptional20
Loop NM1Ordering Provider NameOptional1
NM1Ordering Provider NameMandatory1
N3Ordering Provider AddressOptional1
N4Ordering Provider City State ZIP CodeMandatory1
REFOrdering Provider Secondary IdentificationOptional20
PEROrdering Provider Contact InformationOptional1
Loop NM1Referring Provider NameOptional2
NM1Referring Provider NameMandatory1
REFReferring Provider Secondary IdentificationOptional20
Loop NM1Ambulance Pick LocationOptional1
NM1Ambulance Pick LocationMandatory1
N3Ambulance Pick Location AddressMandatory1
N4Ambulance Pick Location City State Zip CodeMandatory1
Loop NM1Ambulance Drop LocationOptional1
NM1Ambulance Drop LocationMandatory1
N3Ambulance Drop Location AddressMandatory1
N4Ambulance Drop Location City State Zip CodeMandatory1
Loop SVDLine Adjudication InformationOptional15
SVDLine Adjudication InformationMandatory1
CASLine AdjustmentOptional5
DTPLine Checkor Remittance DateMandatory1
AMTRemaining Patient LiabilityOptional1
Loop LQForm Identification CodeOptional>1
LQForm Identification CodeMandatory1
FRMSupporting DocumentationMandatory99
Loop HLPatient Hierarchical LevelOptional>1
HLPatient Hierarchical LevelMandatory1
PATPatient InformationMandatory1
Loop NM1Patient NameMandatory1
NM1Patient NameMandatory1
N3Patient AddressMandatory1
N4Patient City State ZIP CodeMandatory1
DMGPatient Demographic InformationMandatory1
REFPropertyand Casualty Claim NumberOptional1
PERPropertyand Casualty Patient Contact InformationOptional1
Loop CLMClaim InformationMandatory100
CLMClaim InformationMandatory1
DTPDate Onsetof Current Illnessor SymptomOptional1
DTPDate Initial Treatment DateOptional1
DTPDate Last Seen DateOptional1
DTPDate Acute ManifestationOptional1
DTPDate AccidentOptional1
DTPDate Last Menstrual PeriodOptional1
DTPDate Last X DateOptional1
DTPDate Hearingand Vision Prescription DateOptional1
DTPDate Disability DatesOptional1
DTPDate Last WorkedOptional1
DTPDate Authorized Returnto WorkOptional1
DTPDate AdmissionOptional1
DTPDate DischargeOptional1
DTPDate Assumedand Relinquished Care DatesOptional2
DTPPropertyand Casualty Dateof First ContactOptional1
DTPDate Repricer Received DateOptional1
PWKClaim Supplemental InformationOptional10
CN1Contract InformationOptional1
AMTPatient Amount PaidOptional1
REFService Authorization Exception CodeOptional1
REFMandatory Medicare Section4081 Crossover IndicatorOptional1
REFMammography Certification NumberOptional1
REFReferral NumberOptional1
REFPrior AuthorizationOptional1
REFPayer Claim Control NumberOptional1
REFClinical Laboratory Improvement Amendment CLIA NumberOptional1
REFRepriced Claim NumberOptional1
REFAdjusted Repriced Claim NumberOptional1
REFInvestigational Device Exemption NumberOptional1
REFClaim Identifier For Transmission IntermediariesOptional1
REFMedical Record NumberOptional1
REFDemonstration Project IdentifierOptional1
REFCare Plan OversightOptional1
K3File InformationOptional10
NTEClaim NoteOptional1
CR1Ambulance Transport InformationOptional1
CR2Spinal Manipulation Service InformationOptional1
CRCAmbulance CertificationOptional3
CRCPatient Condition Information VisionOptional3
CRCHomebound IndicatorOptional1
CRCEPSDT ReferralOptional1
HIHealth Care Diagnosis CodeMandatory1
HIAnesthesia Related ProcedureOptional1
HICondition InformationOptional2
HCPClaim Pricing Repricing InformationOptional1
Loop NM1Referring Provider NameOptional2
NM1Referring Provider NameMandatory1
REFReferring Provider Secondary IdentificationOptional3
Loop NM1Rendering Provider NameOptional1
NM1Rendering Provider NameMandatory1
PRVRendering Provider Specialty InformationOptional1
REFRendering Provider Secondary IdentificationOptional4
Loop NM1Service Facility Location NameOptional1
NM1Service Facility Location NameMandatory1
N3Service Facility Location AddressMandatory1
N4Service Facility Location City State ZIP CodeMandatory1
REFService Facility Location Secondary IdentificationOptional3
PERService Facility Contact InformationOptional1
Loop NM1Supervising Provider NameOptional1
NM1Supervising Provider NameMandatory1
REFSupervising Provider Secondary IdentificationOptional4
Loop NM1Ambulance Pick LocationOptional1
NM1Ambulance Pick LocationMandatory1
N3Ambulance Pick Location AddressMandatory1
N4Ambulance Pick Location City State Zip CodeMandatory1
Loop NM1Ambulance Drop LocationOptional1
NM1Ambulance Drop LocationMandatory1
N3Ambulance Drop Location AddressMandatory1
N4Ambulance Drop Location City State Zip CodeMandatory1
Loop SBROther Subscriber InformationOptional10
SBROther Subscriber InformationMandatory1
CASClaim Level AdjustmentsOptional5
AMTCoordinationof Benefits COB Payer Paid AmountOptional1
AMTCoordinationof Benefits COB Total Non AmountOptional1
AMTRemaining Patient LiabilityOptional1
OIOther Insurance Coverage InformationMandatory1
MOAOutpatient Adjudication InformationOptional1
Loop NM1Other Subscriber NameMandatory1
NM1Other Subscriber NameMandatory1
N3Other Subscriber AddressOptional1
N4Other Subscriber City State ZIP CodeMandatory1
REFOther Subscriber Secondary IdentificationOptional1
Loop NM1Other Payer NameMandatory1
NM1Other Payer NameMandatory1
N3Other Payer AddressOptional1
N4Other Payer City State ZIP CodeMandatory1
DTPClaim Checkor Remittance DateOptional1
REFOther Payer Secondary IdentifierOptional2
REFOther Payer Prior Authorization NumberOptional1
REFOther Payer Referral NumberOptional1
REFOther Payer Claim Adjustment IndicatorOptional1
REFOther Payer Claim Control NumberOptional1
Loop NM1Other Payer Referring ProviderOptional2
NM1Other Payer Referring ProviderMandatory1
REFOther Payer Referring Provider Secondary IdentificationMandatory3
Loop NM1Other Payer Rendering ProviderOptional1
NM1Other Payer Rendering ProviderMandatory1
REFOther Payer Rendering Provider Secondary IdentificationMandatory3
Loop NM1Other Payer Service Facility LocationOptional1
NM1Other Payer Service Facility LocationMandatory1
REFOther Payer Service Facility Location Secondary IdentificationMandatory3
Loop NM1Other Payer Supervising ProviderOptional1
NM1Other Payer Supervising ProviderMandatory1
REFOther Payer Supervising Provider Secondary IdentificationMandatory3
Loop NM1Other Payer Billing ProviderOptional1
NM1Other Payer Billing ProviderMandatory1
REFOther Payer Billing Provider Secondary IdentificationMandatory2
Loop LXService Line NumberMandatory50
LXService Line NumberMandatory1
SV1Professional ServiceMandatory1
SV5Durable Medical Equipment ServiceOptional1
PWKLine Supplemental InformationOptional10
PWKDurable Medical Equipment Certificateof Medical Necessity IndicatorOptional1
CR1Ambulance Transport InformationOptional1
CR3Durable Medical Equipment CertificationOptional1
CRCAmbulance CertificationOptional3
CRCHospice Employee IndicatorOptional1
CRCCondition Indicator Durable Medical EquipmentOptional1
DTPDate Service DateMandatory1
DTPDate Prescription DateOptional1
DTPDATE Certification Revision Recertification DateOptional1
DTPDate Begin Therapy DateOptional1
DTPDate Last Certification DateOptional1
DTPDate Last Seen DateOptional1
DTPDate Test DateOptional2
DTPDate Shipped DateOptional1
DTPDate Last X DateOptional1
DTPDate Initial Treatment DateOptional1
QTYAmbulance Patient CountOptional1
QTYObstetric Anesthesia Additional UnitsOptional1
MEATest ResultOptional5
CN1Contract InformationOptional1
REFRepriced Line Item Reference NumberOptional1
REFAdjusted Repriced Line Item Reference NumberOptional1
REFPrior AuthorizationOptional5
REFLine Item Control NumberOptional1
REFMammography Certification NumberOptional1
REFClinical Laboratory Improvement Amendment CLIA NumberOptional1
REFReferring Clinical Laboratory Improvement Amendment CLIA Facility IdentificationOptional1
REFImmunization Batch NumberOptional1
REFReferral NumberOptional5
AMTSales Tax AmountOptional1
AMTPostage Claimed AmountOptional1
K3File InformationOptional10
NTELine NoteOptional1
NTEThird Party Organization NotesOptional1
PS1Purchased Service InformationOptional1
HCPLine Pricing Repricing InformationOptional1
Loop LINDrug IdentificationOptional1
LINDrug IdentificationMandatory1
CTPDrug QuantityMandatory1
REFPrescriptionor Compound Drug Association NumberOptional1
Loop NM1Rendering Provider NameOptional1
NM1Rendering Provider NameMandatory1
PRVRendering Provider Specialty InformationOptional1
REFRendering Provider Secondary IdentificationOptional20
Loop NM1Purchased Service Provider NameOptional1
NM1Purchased Service Provider NameMandatory1
REFPurchased Service Provider Secondary IdentificationOptional20
Loop NM1Service Facility LocationOptional1
NM1Service Facility LocationMandatory1
N3Service Facility Location AddressMandatory1
N4Service Facility Location City State ZIP CodeMandatory1
REFService Facility Location Secondary IdentificationOptional3
Loop NM1Supervising Provider NameOptional1
NM1Supervising Provider NameMandatory1
REFSupervising Provider Secondary IdentificationOptional20
Loop NM1Ordering Provider NameOptional1
NM1Ordering Provider NameMandatory1
N3Ordering Provider AddressOptional1
N4Ordering Provider City State ZIP CodeMandatory1
REFOrdering Provider Secondary IdentificationOptional20
PEROrdering Provider Contact InformationOptional1
Loop NM1Referring Provider NameOptional2
NM1Referring Provider NameMandatory1
REFReferring Provider Secondary IdentificationOptional20
Loop NM1Ambulance Pick LocationOptional1
NM1Ambulance Pick LocationMandatory1
N3Ambulance Pick Location AddressMandatory1
N4Ambulance Pick Location City State Zip CodeMandatory1
Loop NM1Ambulance Drop LocationOptional1
NM1Ambulance Drop LocationMandatory1
N3Ambulance Drop Location AddressMandatory1
N4Ambulance Drop Location City State Zip CodeMandatory1
Loop SVDLine Adjudication InformationOptional15
SVDLine Adjudication InformationMandatory1
CASLine AdjustmentOptional5
DTPLine Checkor Remittance DateMandatory1
AMTRemaining Patient LiabilityOptional1
Loop LQForm Identification CodeOptional>1
LQForm Identification CodeMandatory1
FRMSupporting DocumentationMandatory99
SETransaction Set TrailerOptional1