> ## Documentation Index
> Fetch the complete documentation index at: https://mso.getlemma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 837 file anatomy

> Annotated 837P with the loop and segment map, the fields that cause most rejections, and 837I and 837D difference tables.

Structural reference for the 837 claim transaction. Written for humans reading a rejection message and for engineers or agents parsing files.

## The loop hierarchy

X12 organizes data into nested **loops**. The 837P's key loops:

| Loop       | Contains                                                                 |
| ---------- | ------------------------------------------------------------------------ |
| **1000A**  | Submitter                                                                |
| **1000B**  | Receiver                                                                 |
| **2000A**  | Billing provider hierarchical level                                      |
| **2010AA** | **Billing provider**, your PC: name, NPI, Tax ID, address                |
| 2010AB     | Pay-to address, if different                                             |
| **2000B**  | Subscriber hierarchical level                                            |
| **2010BA** | **Subscriber**, member ID, name, DOB                                     |
| **2010BB** | **Payer**                                                                |
| **2000C**  | Patient hierarchical level (only when the patient is not the subscriber) |
| **2010CA** | Patient                                                                  |
| **2300**   | **Claim**, total charge, POS, frequency code, diagnoses, prior auth      |
| 2310A      | Referring provider                                                       |
| **2310B**  | **Rendering provider**, the individual clinician                         |
| 2310C      | Service facility location                                                |
| 2310D      | Supervising provider                                                     |
| **2400**   | **Service line**, one per procedure                                      |
| 2410       | Drug identification, where applicable                                    |
| 2420A      | Line-level rendering provider, where it differs from the claim level     |

## Annotated example

An 837P fragment with each segment explained:

```text theme={null}
ISA*00*          *00*          *ZZ*SUBMITTERID    *ZZ*PAYERID        *260813*1200*^*00501*000000001*0*P*:~
GS*HC*SUBMITTERID*PAYERID*20260813*1200*1*X*005010X222A1~
ST*837*0001*005010X222A1~
BHT*0019*00*REF123*20260813*1200*CH~
NM1*41*2*MERIDIAN HEALTH PARTNERS*****46*SUBMITTERID~
NM1*40*2*REGIONAL BCBS*****46*PAYERID~
HL*1**20*1~
NM1*85*2*PRIYA SHAH MD PC*****XX*1234567890~
N3*100 MAIN ST~
N4*DENVER*CO*80202~
REF*EI*880000000~
PRV*BI*PXC*207N00000X~
HL*2*1*22*0~
SBR*P*18*******CI~
NM1*IL*1*CHEN*MARGARET****MI*ABC123456789~
DMG*D8*19710415*F~
NM1*PR*2*REGIONAL BCBS*****PI*PAYERID~
CLM*PATACCT001*480.00***11:B:1*Y*A*Y*Y~
REF*G1*AUTH987654~
HI*ABK:L82.1*ABF:D22.5~
NM1*82*1*SHAH*PRIYA****XX*1987654321~
LX*1~
SV1*HC:99213:25*285.00*UN*1***1~
DTP*472*D8*20260801~
LX*2~
SV1*HC:11102*195.00*UN*1***1:2~
DTP*472*D8*20260801~
SE*24*0001~
GE*1*1~
IEA*1*000000001~
```

### Segment by segment

| Segment                           | Meaning                                                                                                                            |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `ISA`                             | Interchange envelope: sender, receiver, date, control number, delimiters                                                           |
| `GS`                              | Functional group. `HC` = health care claim. `005010X222A1` identifies the 837P implementation guide                                |
| `ST`                              | Transaction set start                                                                                                              |
| `BHT`                             | Beginning of hierarchical transaction. `CH` = chargeable                                                                           |
| `NM1*41`                          | **Submitter**, who transmitted the file                                                                                            |
| `NM1*40`                          | **Receiver**                                                                                                                       |
| `HL*1**20*1`                      | Hierarchical level: `20` = information source (billing provider)                                                                   |
| `NM1*85`                          | **Billing provider.** `2` = organization; `XX` qualifies the NPI. **This is your PC.**                                             |
| `N3` / `N4`                       | Address                                                                                                                            |
| `REF*EI`                          | **Employer ID**, the Tax ID                                                                                                        |
| `PRV*BI*PXC*...`                  | Billing provider **taxonomy**. `PXC` qualifies a taxonomy code                                                                     |
| `HL*2*1*22*0`                     | `22` = subscriber level                                                                                                            |
| `SBR*P*18*...*CI`                 | Subscriber: `P` = primary, `18` = self, `CI` = commercial insurance                                                                |
| `NM1*IL`                          | **Subscriber.** `MI` qualifies the member ID                                                                                       |
| `DMG*D8*...`                      | Demographics: date format `D8` = CCYYMMDD                                                                                          |
| `NM1*PR`                          | **Payer**                                                                                                                          |
| `CLM`                             | **Claim**: patient account number, total charge, then the composite `11:B:1` where **`11` = place of service (office)**            |
| `REF*G1`                          | **Prior authorization number**                                                                                                     |
| `HI*ABK:...*ABF:...`              | Diagnoses. `ABK` = principal ICD-10-CM; `ABF` = additional                                                                         |
| `NM1*82`                          | **Rendering provider**, the individual clinician's Type 1 NPI                                                                      |
| `LX`                              | Service line counter                                                                                                               |
| `SV1*HC:99213:25*285.00*UN*1***1` | Service line: `HC` qualifies a HCPCS/CPT code, `99213` with modifier `25`, \$285.00, `UN` units, 1 unit, **diagnosis pointer `1`** |
| `SV1*HC:11102*...***1:2`          | Second line, pointing to **diagnoses 1 and 2**                                                                                     |
| `DTP*472*D8*...`                  | Service date. `472` = service                                                                                                      |
| `SE` / `GE` / `IEA`               | Transaction, group, and interchange trailers with segment counts                                                                   |

## The fields that cause most rejections

| Field                           | Location                 | Failure                                                                                               |
| ------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------- |
| **Billing provider legal name** | `NM1*85`                 | Doesn't match the payer's records / the CP 575                                                        |
| **Billing provider NPI**        | `NM1*85`, `XX` qualifier | Wrong entity's Type 2 in a multi-PC group                                                             |
| **Tax ID**                      | `REF*EI`                 | Doesn't match enrollment                                                                              |
| **Taxonomy**                    | `PRV*BI*PXC`             | Doesn't match the enrolled taxonomy                                                                   |
| **Rendering provider NPI**      | `NM1*82`                 | Not credentialed or not linked to the group contract                                                  |
| **Subscriber ID**               | `NM1*IL`, `MI` qualifier | Transposed digits; missing alpha prefix                                                               |
| **Date of birth**               | `DMG`                    | Doesn't match the payer's record                                                                      |
| **Place of service**            | `CLM05` composite        | Wrong code, especially telehealth `02` vs `10`                                                        |
| **Prior authorization**         | `REF*G1`                 | Obtained but never entered into the structured field                                                  |
| **Diagnosis pointers**          | `SV107` composite        | Pointing to a diagnosis that doesn't support the line                                                 |
| **Claim frequency code**        | `CLM05-3`                | `1` original, `7` replacement, `8` void, resubmitting an adjudicated claim as `1` denies as duplicate |
| **Service date**                | `DTP*472`                | Before the rendering provider's effective date                                                        |

Six of the top failures trace back to **enrollment**, not billing. See [Set up EDI, ERA, and EFT](/guides/enrollment/set-up-edi-era-eft).

## 837I, institutional differences

| Element                      | 837P                      | 837I                                                                                            |
| ---------------------------- | ------------------------- | ----------------------------------------------------------------------------------------------- |
| Implementation guide         | `005010X222A1`            | `005010X223A2`                                                                                  |
| Paper analogue               | CMS-1500                  | UB-04                                                                                           |
| Service line codes           | CPT/HCPCS                 | CPT/HCPCS **plus revenue codes**                                                                |
| Distinctive segments         | —                         | `CL1` (institutional claim code, admission type/source, patient status), revenue codes in `SV2` |
| Bill type                    | —                         | Required, in `CLM05-1`                                                                          |
| Admission and discharge data | —                         | Required for inpatient                                                                          |
| Diagnosis types              | Principal plus additional | Principal, admitting, external cause, present-on-admission indicators                           |

## 837D, dental differences

| Element                 | 837P                       | 837D                                         |
| ----------------------- | -------------------------- | -------------------------------------------- |
| Implementation guide    | `005010X222A1`             | `005010X224A2`                               |
| Paper analogue          | CMS-1500                   | ADA Dental Claim Form                        |
| Procedure codes         | CPT/HCPCS (`HC` qualifier) | **CDT** (`AD` qualifier)                     |
| Service line segment    | `SV1`                      | **`SV3`**                                    |
| Tooth-level data        | —                          | **`TOO` segment**, tooth number and surfaces |
| Oral cavity designation | —                          | Quadrants and arches                         |
| Orthodontic data        | —                          | Treatment months, appliance placement        |

<Note>
  🦷 837D is not "837P with different codes." The `SV3` and `TOO` segments carry tooth-level detail with no professional-claim equivalent. Confirm your clearinghouse supports 837D before committing. See [Dental: the DSO model](/concepts/industries/dental-dsos).
</Note>

## Corrected claims

| Frequency code (`CLM05-3`) | Meaning                          |
| -------------------------- | -------------------------------- |
| `1`                        | Original                         |
| `7`                        | **Replacement** of a prior claim |
| `8`                        | **Void** / cancel a prior claim  |

A `7` or `8` must reference the original claim number, typically in `REF*F8` (payer claim control number).

<Warning>
  **Never resubmit an adjudicated claim with frequency code `1`.** It denies as a duplicate (CARC 18) and may consume your correction window.
</Warning>


## Related topics

- [The 837: how claims are told to payers](/concepts/payments/understanding-837s.md)
- [EDI and X12, gently](/concepts/payments/edi-and-x12-basics.md)
- [Submit clean claims](/guides/billing/submit-clean-claims.md)
- [X12 healthcare transaction sets](/reference/edi/x12-transaction-sets.md)
- [835 file anatomy](/reference/edi/835-anatomy.md)
- [Place of service codes](/reference/edi/place-of-service-codes.md)
- [Provider taxonomy codes](/reference/edi/taxonomy-codes.md)
