- HIPAA names the 837 as the standard for the health care claim transaction: 005010X222 for professional, 005010X223 for institutional and 005010X224 for dental claims (45 CFR 162.1102).
- A file is built from envelopes (ISA, GS, ST) around loops: billing provider (2000A), subscriber (2000B), claim (2300) and service lines (2400).
- Diagnosis codes sit in the HI segment of loop 2300; procedure codes, charges and units sit in SV1 (837P), SV2 (837I) or the dental service line with its TOO tooth segment (837D).
- The 837 asks for payment and the 835 answers it. Together, years of both show every claim and every payer decision, which is why they are protected health information until de-identified.
What is an 837 file, and what are 837P, 837I and 837D?
HIPAA defines the claim transaction as "A request to obtain payment, and the necessary accompanying information from a health care provider to a health plan, for health care." The 837 file is the format that request must take when it is sent electronically. Three versions exist, one for each kind of provider, and the regulation names each by its X12 report number.
| Transaction | Standard named in the rule | Who sends it, per CMS | Rule or source | Date checked |
|---|---|---|---|---|
| 837P (professional) | Health Care Claim: Professional (837), ASC X12N/005010X222; current version 5010A1 | Physicians, therapists, ambulance services and other professionals and suppliers; paper twin is the CMS-1500 | 45 CFR 162.1102; CMS MLN006976 | 20 Nov 2026 |
| 837I (institutional) | Health Care Claim: Institutional (837), ASC X12N/005010X223; current version 5010A2 | Hospitals, skilled nursing facilities, home health agencies, hospices and other institutions; paper twin is the UB-04 (CMS-1450) | 45 CFR 162.1102; CMS MLN006926 | 20 Nov 2026 |
| 837D (dental) | Health Care Claim: Dental (837), ASC X12N/005010X224 | Dental practices billing dental plans and Medicaid dental programs | 45 CFR 162.1102; a state Medicaid 837D companion guide | 20 Nov 2026 |
| 835 (the answer) | Health Care Claim Payment/Advice (835), ASC X12N/005010X221 | Health plans, back to the provider or its billing service | 45 CFR 162.1602 | 20 Nov 2026 |
Sources: 45 CFR 162.1101, 45 CFR 162.1102 and 45 CFR 162.1602 on eCFR, and CMS's CMS-1500 and 837P booklet and CMS-1450 and 837I booklet, read on 20 November 2026.
The rule lists the 5010 claim standards "For the period from January 1, 2012 through August 14, 2027" and then carries the same 837 standards into the next period, which changes the pharmacy standard, not the 837. CMS adds that the full 837P implementation guide "is available from X12 by purchasing an X12 license"; each Medicare contractor publishes a free companion guide on top of it.
837 file format: envelopes, loops and segments
An 837 is plain text. Segments end with a terminator, usually a tilde (~), elements inside a segment are split by an asterisk (*), and sub-elements by a colon or another character the ISA header declares. One Medicare contractor's guide lists its own outbound choices as asterisk, caret, greater-than sign and "Segment Terminator ~". Read the ISA header first, because it tells you which characters this particular file uses.
The structure is three envelopes and a tree. ISA and IEA wrap the whole interchange between two trading partners. GS and GE wrap a functional group of one transaction type. ST and SE wrap one transaction set, which can carry many claims. Inside the ST, the BHT segment starts the hierarchy, and HL segments open each level of the tree: billing provider, then subscriber, then patient when the patient is not the subscriber. Loops are named by number, and the names below are the ones the Medicare companion guides use.
| Loop or segment | What it holds | Where it appears in the example |
|---|---|---|
| ISA, GS, ST | Interchange, functional group and transaction headers: sender, recipient, date, control numbers, version 005010X222A1 | Lines 1 to 3 |
| BHT | Start of the hierarchy, batch reference, and whether these are chargeable claims or encounters | Line 4 |
| 1000A and 1000B | Submitter (the practice or billing service) and the payer or clearinghouse that gets the file | Lines 5 to 7 |
| 2000A and 2010AA | Billing provider level and name, address, NPI and tax ID | Lines 8 to 12 |
| 2000B, 2010BA, 2010BB | Subscriber level, subscriber name, member ID and birth date, then the payer | Lines 13 to 17 |
| 2300 | One claim: CLM (patient control number, total charge and claim-level codes), claim dates, and HI diagnosis codes | Lines 18 and 19 |
| 2400 | One service line each: LX line number, SV1 (837P), SV2 (837I) or the dental line with its TOO tooth segment (837D), and the service date | Lines 20 to 22 |
| SE, GE, IEA | Trailers with segment and group counts that must match | Lines 23 to 25 |
The institutional and dental versions keep the same frame and change the service line. On an 837I the service line is an SV2 segment, and when Medicare is primary "CLM02 must equal the sum of all SV203 service line charge amounts"; Medicare also rejects a claim with more than 449 lines. On an 837D, tooth numbers ride in "2400-TOO TOOTH INFORMATION". Sources: the CGS 837P companion guide and 837I companion guide for Medicare, and the Nebraska Medicaid 837D guide.
What does an 837 file example look like?
Below is a fictional 837P with one claim and one service line. Every name, number and code is a placeholder, and real files put each segment on one long line or wrap at a fixed width. The notes under it walk through the parts a reader needs most.
- ST*837*0001*005010X222A1 says this is an 837 built on the professional implementation guide. Check this value first: an institutional file shows 005010X223A2.
- BHT ends with CH, the code the Medicare guide requires for chargeable claims, as opposed to encounter reports.
- NM1*85 in loop 2010AA is the billing provider, with its NPI at the end. NM1*IL in loop 2010BA is the subscriber, with the member ID at the end, and the DMG segment holds the subscriber's birth date.
- CLM is the claim. The first element is the patient control number the practice assigned (Medicare stores only the first 20 characters), the second is the total charge, and the rest are claim-level codes the implementation guide defines.
- HI holds the diagnosis codes, each behind a qualifier that names its code set and role. The code in this sample is a placeholder.
- LX numbers the line, SV1 gives the procedure code, line charge and units, and the DTP segment after it gives the date of service.
- SE counts the segments from ST to SE (21 here), and GE and IEA count the groups and transaction sets, so a truncated file fails on arrival.
ISA*00* *00* *ZZ*SUBMITTER01 *ZZ*PAYER01 *261120*1030*^*00501*000000101*0*T*:~
GS*HC*SUBMITTER01*PAYER01*20261120*1030*101*X*005010X222A1~
ST*837*0001*005010X222A1~
BHT*0019*00*BATCH0001*20261120*1030*CH~
NM1*41*2*EXAMPLE BILLING SERVICE*****46*SUB0001~
PER*IC*BILLING DESK*TE*5555550100~
NM1*40*2*EXAMPLE HEALTH PLAN*****46*PAYER01~
HL*1**20*1~
NM1*85*2*EXAMPLE FAMILY CLINIC*****XX*1234567893~
N3*100 MAIN STREET~
N4*ANYTOWN*CA*900010000~
REF*EI*000000000~
HL*2*1*22*0~
SBR*P*18*******CI~
NM1*IL*1*DOE*JANE****MI*MEMBER0001~
DMG*D8*19800101*F~
NM1*PR*2*EXAMPLE HEALTH PLAN*****PI*PAYER01~
CLM*PCN0001*125***11:B:1*Y*A*Y*Y~
HI*ABK:J069~
LX*1~
SV1*HC:99213*125*UN*1***1~
DTP*472*D8*20261110~
SE*21*0001~
GE*1*101~
IEA*1*000000101~837 vs 835: how do the claim and the remittance fit together?
The 837 goes out and the 835 comes back. The claim states what the provider did and what it charges; the remittance states what the payer allowed, paid and adjusted, line by line, with the codes that explain each adjustment. X12 says claim adjustment reason codes "describe why a claim or service line was paid differently than it was billed". The two files share keys: the patient control number the provider puts in CLM comes back on the payer's remittance, so the pair can be matched claim by claim.
This page covers the outbound claim. How to read the remittance itself, segment by segment, is in electronic remittance advice: how to read an 835 file, and the codes it uses are explained in denial codes: CARC, RARC and the group codes.
How do you read an 837 file without errors?
Open it in a text editor, not a word processor, and turn on line wrap. Then follow the same order every time.
- Read the ISA header to find the element, sub-element and segment separators, then split the text on the segment terminator so each segment sits on its own line.
- Read ST to confirm the transaction and version: 005010X222A1 (837P), 005010X223A2 (837I) or 005010X224A2 (837D).
- Walk the HL segments to see the tree: which billing provider, which subscriber, which patient.
- For each CLM, list the control number, total charge and HI diagnosis codes, then the 2400 lines under it, and check that the lines add up to the total.
- Check the trailers: SE, GE and IEA counts must match what the file contains.
- Compare with the payer's companion guide, which states the payer's own rules on top of the X12 guide.
Three errors recur. Patient control numbers longer than Medicare stores, so the 835 comes back with a shortened number that no longer matches the practice's records. Line charges that do not add up to CLM02. And late files: CMS says to file Medicare claims "no later than 1 CY after the date of service", and Medicare treats a timely-filing denial as not appealable (42 CFR 405.926(n)).
Where is years of 837 claims data kept, and how do you export it?
Most practices never see raw 837 files. The practice management or billing system builds them, a clearinghouse checks and forwards them, and acknowledgments and 835s come back the same way. So years of claims data usually sit in three places: the billing system's claim tables, the clearinghouse's archive of submitted files, and the payer portals.
To export it, ask the billing system vendor for a claims history extract with claim and line detail, and ask the clearinghouse for its archive of 837 and 835 files with acknowledgments. Ask both how far back their archives go and in what format, because the answer decides what you can rebuild. A billing company holds this history for each client under that client's business associate agreement, so it is each client's record, not the billing company's.
Retention rules for the underlying records vary by state and payer; how long to keep patient records sets them out. A practice that is closing should export before the billing system and clearinghouse contracts end, as the closing a medical practice checklist explains.
What are years of 837 and 835 history worth to AI companies?
Linked 837 and 835 history is a record of payer behavior: what was billed, what was paid, what was denied and why. AI teams building claim review, denial prediction and coding tools want exactly that. Origin's guide to claims, denial and prior authorization data covers who can license it and what buyers ask for; it found no buyer that has published a price for this data.
The rules come first, because every 837 carries protected health information. HIPAA says "a covered entity or business associate may not sell protected health information" without the patient's authorization. Data that meets the de-identification standard is outside those limits. The rule reads: "A covered entity may determine that health information is not individually identifiable health information only if" an expert finds the risk of identification very small, or eighteen identifiers are removed and the entity has no actual knowledge that what remains could identify the patient. For claims, the list of eighteen identifiers bites hard: names, member and account numbers, addresses below the state, and "All elements of dates (except year)", which includes service dates. California adds conditions: a contract to sell or license de-identified patient information, where a party is in the state, must say that it includes de-identified patient information and that re-identification by the licensee is prohibited (Cal. Civ. Code 1798.148).
A billing company is a business associate, and its contract says it may "Not use or further disclose the information other than as permitted or required by the contract or as required by law". The regulation does let a covered entity disclose protected health information to a business associate to create de-identified data. So the practice decides, and the billing company acts only with its written permission. This is general information, not legal advice.
We help you license your data. Origin Data Partners is an independent data partner that helps business owners value and license their company records: the company pays Origin nothing, and a buyer may pay Origin when a deal completes. If you hold claim history as the provider, or with your clients' written permission, describe the records and check their fit; the check asks for a description, never for files or patient data.
Sources: 45 CFR 164.502, 45 CFR 164.504 and 45 CFR 164.514 on eCFR, and Cal. Civ. Code 1798.148 on the California Legislature's site, read on 20 November 2026.
How we checked this
We read every source on this page on 20 November 2026. The transaction definitions and standards come from the regulation itself on eCFR (45 CFR 162.1101, 162.1102 and 162.1602), and the privacy rules from 45 CFR 164.502, 164.504 and 164.514, with California's rule on licensing de-identified patient information from Civil Code 1798.148 on the Legislature's site. Version numbers, paper equivalents and timely filing come from CMS's own Medicare Learning Network booklets, and the appeal rule from 42 CFR 405.926. Loop and segment names come from the CMS companion guides published by a Medicare contractor and a state Medicaid program, and the code list description from X12.
What we could not verify: the X12 implementation guides themselves are sold under license, so element-level detail here comes from the free companion guides, which may add payer-specific rules. The example is fictional and has not been run through a validator. We found no public price for claims history.
Common questions
What does 837 stand for?
The number is not an abbreviation. X12, the standards body, numbers its transaction sets, and 837 is the number of the health care claim. CMS spells out the rest of the name: ANSI ASC X12N 837P means the American National Standards Institute's Accredited Standards Committee X12, its insurance section X12N, transaction 837, professional version. The 835 is the matching payment and remittance transaction.
How to read an 837 file?
Open it in a text editor and split it on the segment terminator, usually a tilde, so each segment is on its own line. The ISA header shows the separators. ST shows the version, HL segments show the provider, subscriber and patient tree, CLM starts each claim, HI holds the diagnosis codes and the 2400 loop holds the service lines. Check the SE, GE and IEA counts last.
Can you provide an example of an EDI 837 file?
Yes, this page shows a fictional 837P with one claim and one service line, from the ISA header to the IEA trailer. It includes the billing provider in loop 2010AA, the subscriber in loop 2010BA, the claim in CLM, a diagnosis in HI and a procedure in SV1. All names, numbers and codes are placeholders, so use it to learn the shape, not as a test file.
What are 837 EDI transactions used for in healthcare?
They carry claims and encounter reports from providers to health plans. Practices use the 837P, hospitals and other institutions the 837I, and dentists the 837D. Medicare accepts paper claims only from providers that meet the ASCA exceptions, and HIPAA requires the 5010 version of the 837 whenever a covered provider sends a claim electronically. The payer's 835 then reports payment and adjustments for those claims.
What is 835 and 837 data?
It is the paired record of what a provider billed and what payers paid. The 837 holds each claim: provider, patient, diagnosis codes, procedure codes, charges and dates. The 835 holds each payment: amounts allowed and paid, and the reason and remark codes for every adjustment or denial. Matched on the patient control number, years of both show every payer decision a practice received.
What is 837 in medical billing?
In medical billing, the 837 is the electronic claim. The billing system turns charges entered for a visit into an 837, a clearinghouse checks it and sends it to the payer, and the payer returns acknowledgments and later an 835 with the payment decision. Billing staff fix rejections on the 837 and work denials from the 835, so they meet both every day.
Is an 837 claim form the same as the CMS-1500?
They carry the same professional claim in two forms. CMS calls the CMS-1500 the standard paper claim form for non-institutional providers and suppliers, and the 837P the standard electronic format, and it keeps their data elements consistent so one processing system can handle both. Institutional claims pair differently: the UB-04, also called the CMS-1450, is the paper form and the 837I its electronic twin. Medicare takes paper only under the ASCA exceptions.
We are a medical billing company with 60 staff and years of 837 claims and 835 remittances. Can we license that history to AI companies?
Only with each client's permission, and only in de-identified form. A billing company holds claims as a business associate of the practices it serves, and HIPAA lets it use that data only as each contract allows. The practices own the records. With written permission, the history can be de-identified under 45 CFR 164.514(b) and then licensed. Without it, the company cannot license claims data alone.
Does a billing company need the provider's permission to license 837 and 835 data?
Yes. Claims and remittances are protected health information that the billing company handles for the provider under a business associate agreement. HIPAA bars a business associate from using or disclosing it beyond what the contract permits, and bars selling it. The provider may authorize de-identification, so the usual route is a written amendment or consent from each client before any data leaves.
Sources and further reading
- 45 CFR 162.1101: Health care claims transaction (eCFR)
- 45 CFR 162.1102: Standards for health care claims (eCFR)
- 45 CFR 162.1602: Standards for remittance advice (eCFR)
- CMS MLN booklet: Medicare Billing, CMS-1500 and 837P (December 2025)
- CMS MLN booklet: Medicare Billing, CMS-1450 and 837I (December 2025)
- CMS 837P 005010X222A1 Companion Guide (CGS, Medicare contractor)
- CMS 837I 005010X223A2 Companion Guide (CGS, Medicare contractor)
- Nebraska Medicaid 837D (005010X224A2) Companion Guide
- X12: Code lists
- 45 CFR 164.502: Uses and disclosures of protected health information (eCFR)
- 45 CFR 164.504: Business associate contracts (eCFR)
- 45 CFR 164.514: De-identification of protected health information (eCFR)
- 42 CFR 405.926: Actions that are not initial determinations (eCFR)
- California Civil Code 1798.148 (de-identified patient information)
