Convert HIPAA 837P Claims to CMS-1500 Form

The CMS-1500 is the standard paper claim form for professional healthcare services. The HIPAA 837P is its electronic equivalent. If you work in healthcare IT, you have almost certainly needed to convert between the two — for auditing, provider review, or archival. This article provides the complete field-by-field mapping, based on production-tested conversion logic that has been processing real claims for over a decade.

Convert an 837 Claim to PDF

Understanding the Two Formats

The mapping examples in this article show how 837P data corresponds to the CMS-1500 under the NUCC instructions. They are reference mappings for readers, not a record of any one map’s output.

The CMS-1500 form has 33 numbered boxes (with many sub-boxes), organized into three sections:

  • Boxes 1–13: Patient and insured information
  • Boxes 14–23: Condition and authorization details
  • Boxes 24a–24j: Service line details (up to 6 lines per page)
  • Boxes 25–33: Provider and billing information

The 837P transaction organizes the same data into hierarchical loops:

  • 2000A (Billing Provider)
  • 2000B (Subscriber) — the insured person
  • 2000C (Patient) — if different from subscriber
  • 2300 (Claim) — one per claim
  • 2400 (Service Line) — one per procedure/service

The challenge is that the 837P spreads data across multiple loops and segments, while the CMS-1500 presents everything on a single page. A conversion engine must gather data from different levels of the hierarchy and place it in the correct box.

Patient and Insured Information (Boxes 1–13)

Box 1: Insurance Type

The insurance program indicator comes from the Subscriber loop’s SBR segment:

SBR09 Value CMS-1500 Box 1 Checkbox
MAMedicare
MBMedicaid
CHChampus/TRICARE
VACHAMPVA
OFGroup Health Plan
BLFECA/Black Lung
CIOther

Box 1a: Insured’s ID Number

Extracted from the subscriber’s NM1 segment (entity code “IL”):

NM1*IL*1*LASTNAME*FIRSTNAME*MI***MI*MEMBER_ID~
                                      ^^^^^^^^
                                    Box 1a = NM109

Box 2: Patient’s Name

If the patient is the subscriber (self-insured), the patient name is copied from the subscriber’s NM1 (entity code “IL”). If the patient is a dependent, it comes from a separate NM1 with entity code “QC”:

NM1*QC*1*DOE*JANE*M****~
         ^^^  ^^^^  ^
         Box 2 = "DOE, JANE M"

Box 3: Patient’s Birth Date and Sex

From the DMG segment in the Patient loop (2010CA) or Subscriber loop (2010BA):

DMG*D8*19850315*F~
       ^^^^^^^^  ^
       DOB        Sex (M/F)

The date requires reformatting from CCYYMMDD to MM/DD/YYYY.

Box 4: Insured’s Name

Same source as Box 1a — the NM1 segment with entity code “IL”:

Box 4 = NM103 + ", " + NM104 + " " + NM105
      = "DOE, JOHN A"

Box 5: Patient’s Address

From the N3 and N4 segments following the patient’s NM1:

N3*123 MAIN ST*APT 4~
N4*ANYTOWN*NV*89101~

Maps to: Street (Box 5 line 1), City, State, ZIP.

Box 6: Patient’s Relationship to Insured

From the PAT segment in the Patient loop (2000C):

PAT01 Value CMS-1500 Box 6
18 (Self)Self
01Spouse
09, 10, 17, 19Child
All othersOther

If HL03 = “22” (subscriber level), the patient IS the insured, so Box 6 = Self.

Box 9: Other Insured’s Name

From the Other Subscriber loop (2320), NM1 entity code “IL”:

Box 9 = NM103 + ", " + NM104 + " " + NM105

Box 10a–c: Related Causes

These checkboxes come from the CLM segment’s related causes field (CLM11):

CLM11 Component Condition CMS-1500 Box
EMEmploymentBox 10a = Yes
AAAuto AccidentBox 10b = Yes
OAOther AccidentBox 10c = Yes

The state code for auto accidents appears in CLM11:04, mapped to Box 10b’s state field.

Box 11: Insured’s Group Number

SBR*P*18*GROUP_NUMBER****BL~
         ^^^^^^^^^^^^
         Box 11 = SBR03

Box 11d: Is There Another Health Benefit Plan?

If a secondary payer loop (2320) exists: Yes. Otherwise: No.

Condition and Clinical Details (Boxes 14–23)

Box 14: Date of Current Illness/Injury/Pregnancy

From the DTP segment in the Claim loop (2300):

DTP01 Qualifier Meaning Box 14 Label
431Onset of Current SymptomsILLNESS
439Accident DateACCIDENT
484Last Menstrual PeriodLMP

Box 16: Dates Patient Unable to Work

Two DTP segments:

DTP*360*D8*20250101~    Disability Begin → Box 16 From
DTP*361*D8*20250115~    Disability End   → Box 16 To

Box 17: Referring Physician Name

From the Referring Provider loop (2310A), NM1 entity code “DN”:

NM1*DN*1*SMITH*ROBERT*J***XX*1234567890~
         ^^^^^  ^^^^^^  ^
         Box 17 = "SMITH, ROBERT J"

Box 17b: Referring Physician NPI

Box 17b = NM109 (when NM108 = "XX" for NPI)

Box 18: Hospitalization Dates

DTP*435*D8*20250101~    Admission → Box 18 From
DTP*096*D8*20250105~    Discharge → Box 18 To

Box 21: Diagnosis Codes

From the HI segment in the Claim loop:

HI*ABK:J0190*ABF:R0600*ABF:J4520*ABF:Z8739~
     ^^^^^^   ^^^^^^    ^^^^^^    ^^^^^^
     Diag 1   Diag 2    Diag 3    Diag 4

The qualifier ABK indicates the principal diagnosis; ABF indicates additional diagnoses. ICD-10 codes are placed in Box 21, positions A through L (up to 12 diagnosis codes on the 02/12 form).

Box 23: Prior Authorization Number

REF*G1*AUTH_NUMBER~
       ^^^^^^^^^^^
       Box 23 = REF02

Service Lines (Box 24)

The CMS-1500 form holds up to 6 service lines per page. Each line maps to one 2400 loop (LX segment) in the 837P. Claims with more than 6 lines span multiple pages.

Box 24a: Date of Service (From/To)

DTP*472*D8*20250115~           Single date → From and To are the same
DTP*472*RD8*20250115-20250117~  Date range → From/To differ

Box 24b: Place of Service

Box 24b = SV105 (if present), otherwise CLM05:01

Standard place of service codes: 11 (Office), 21 (Inpatient Hospital), 22 (Outpatient Hospital), etc.

Box 24d: Procedures/Services/Supplies (CPT/HCPCS)

The SV1 segment carries the procedure code and up to 4 modifiers:

SV1*HC:99213:25:GT**UN*1~
      ^^^^^  ^^ ^^
      CPT    Mod1 Mod2
  • Box 24d column 1 = SV101:02 (CPT/HCPCS code)
  • Box 24d columns 2–5 = SV101:03 through SV101:06 (modifiers)

Box 24e: Diagnosis Pointer

Links the service line to diagnosis codes in Box 21:

SV107 = 1:2    → Points to diagnoses 1 and 2

Box 24f: Charges

SV102 = 150.00  → $150.00

Box 24g: Days or Units

SV104 = 1       → 1 unit of service

Box 24j: Rendering Provider NPI

From the Rendering Provider loop (2420A) within each service line, or inherited from the claim-level rendering provider (2310B):

NM1*82*1*JONES*MARY***XX*9876543210~
                          ^^^^^^^^^^
                          Box 24j = NPI

Provider and Billing Information (Boxes 25–33)

Box 25: Federal Tax ID (SSN or EIN)

From the Billing Provider loop (2010AA):

NM1*85*2*CLINIC NAME****XX*1234567890~
REF*EI*123456789~    → EIN (Box 25, "EIN" checkbox)
REF*SY*123456789~    → SSN (Box 25, "SSN" checkbox)

Box 26: Patient’s Account Number

Box 26 = CLM01 (Claim Submitter's Identifier)

Box 28: Total Charges

Sum of all SV102 values across service lines, or CLM02.

Box 32: Service Facility

If a Service Facility loop (2310C) exists:

NM1*77*2*HOSPITAL NAME***XX*NPI~
N3*456 OAK AVE~
N4*CITY*ST*ZIP~

If no service facility is present, defaults to the Billing Provider information.

Box 33: Billing Provider

From the Billing Provider loop (2010AA):

NM1*85*2*MEDICAL GROUP****XX*1234567890~
N3*789 PINE ST*SUITE 200~
N4*CITY*ST*ZIP~
PER*IC**TE*5551234567~

Multi-Page Claims

The CMS-1500 form only holds 6 service lines per page. Claims with more than 6 procedures require multiple pages. The conversion engine handles this by:

  1. Counting total service lines (LX segments)
  2. Calculating pages needed: ceil(line_count / 6)
  3. Printing header/patient info on every page
  4. Splitting service lines across pages (lines 1–6 on page 1, 7–12 on page 2, etc.)
  5. Calculating per-page subtotals for charges

PDF Generation

The final step is rendering the mapped data onto an actual CMS-1500 form template. The Redix engine uses its built-in PDF functions to:

  1. Import a blank CMS-1500 template (red or black version)
  2. Position each mapped value at exact X,Y coordinates on the form
  3. Handle checkbox fields (insurance type, sex, yes/no) by placing “X” at the correct position
  4. Generate one PDF file per claim
  5. Create an index file tracking claim numbers, patient names, and output filenames

This produces CMS-1500 forms directly from 837P data — no manual data entry, no intermediate steps.

Printing on paper. A PDF is not yet a printed claim. The Redix Claims-to-PDF Workbench offers two output methods for CMS-1500 printing: Method 2, a claim-data-only PDF without the form artwork, for printing onto appropriate preprinted forms; and Method 1, a full-form PDF with the form artwork and claim data together, useful for review, sharing, and archiving (whether a blank-paper printout is accepted for submission depends on the payer). For supported layouts it checks claim-data placement before printing and holds a job when a required check detects overflow or cannot complete; a held job states the reason. Physical alignment and each payer’s requirements still need to be validated.

Automating Claim Form Generation

Healthcare systems often receive claims in X12 837 format but need human-readable claim forms for auditing, review, or archival. Manual data entry from 837 files into CMS-1500 forms is error-prone and time-consuming.

Redix integration tools automatically generate CMS-1500, UB-04, and ADA J400 forms from incoming 837 transactions. The conversion runs in batch or real-time via REST API — no manual intervention, no intermediate steps. One 837P file with 500 claims produces 500 individually rendered CMS-1500 PDFs with a companion index file.

For operators who work through whole folders, the Claims-to-PDF Workbench, a Windows add-on to the Redix V9 engine, runs the same conversion locally, keeps each converted claim with its original EDI in a searchable archive, and exports audit-support packages.

Try It Yourself

Redix provides a live API that converts 837P claims to CMS-1500 PDFs. Upload an 837P file and receive back a completed CMS-1500 form:

API endpoint:

POST https://demo.redix.com/api/v2/claims-to-pdf
Content-Type: application/json
X-API-Key: demo-key-12345

{
  "x12_content": "ISA*00*...",
  "output_format": "cms1500"
}

The demo returns a CMS-1500 PDF produced by the CMS-1500 map installed on the demo server; that map’s output may differ in places from the reference mappings described in this article. The demo is a demonstration tool for sample or de-identified files; production PHI should not be uploaded to it.

Conclusion

Mapping HIPAA 837P to CMS-1500 is a solved problem — but it is not a simple one. The hierarchical structure of X12, the conditional logic for subscriber vs. patient, the multi-page handling for large claims, and the precise coordinate-based PDF rendering all require careful engineering.

Redix has maintained these mappings in production for over 15 years, processing claims for healthcare organizations ranging from county governments to Fortune 25 companies. The mapping definitions in this article show the standard 837P-to-CMS-1500 correspondence, as a reference.

Frequently Asked Questions

How do you convert an 837P to a CMS-1500 form?

An 837P-to-CMS-1500 conversion maps data from X12 hierarchical loops and segments to the 33 numbered boxes on the CMS-1500 form. Patient demographics come from NM1/DMG segments, diagnosis codes from HI segments, service lines from SV1 segments in the 2400 loop, and provider information from the 2010AA billing provider loop. The mapped data is then rendered onto a CMS-1500 PDF template at precise coordinates.

What happens when an 837P claim has more than 6 service lines?

The CMS-1500 form holds a maximum of 6 service lines per page. Claims with more than 6 procedures span multiple pages. The conversion engine calculates the number of pages needed, prints header and patient information on every page, splits service lines across pages, and calculates per-page subtotals for charges.

Where do diagnosis codes appear on the CMS-1500 form?

Diagnosis codes appear in Box 21. They are extracted from the HI segment in the 837P claim loop (2300). The qualifier ABK indicates the principal diagnosis and ABF indicates additional diagnoses. ICD-10 codes are placed in Box 21, positions A through L (up to 12 diagnosis codes on the 02/12 form), and each service line in Box 24E references them using diagnosis pointers (A through L).

Can you automate CMS-1500 generation from 837P files?

Yes. The Redix engine converts 837P files to CMS-1500 PDFs automatically via REST API or batch processing. One 837P file with 500 claims produces 500 individually rendered CMS-1500 PDFs with a companion index file. No manual data entry or intermediate steps are required.

Convert an 837 Claim to PDF

Run a sample 837P, 837I, or 837D file and get back a completed claim form PDF, with no local installation (demo access rules apply). Testing your own de-identified files needs an evaluation key.

Published by Redix International, Inc. — Healthcare data conversion since 1994.