CMS-1500 and 837P fields

Medipyxis submits electronically. Every claim leaves the system as an 837P transaction to Stedi, and every 837P is the same information carried by the paper CMS-1500. This page is the cross-walk: what the biller sees on the claim view, what the paper form calls it, what the 837P calls it, and which table Medipyxis reads to fill it in.

Use this page when a payer rejects a claim citing a specific element name (DMG03, HI01-01, SV107) and you need to trace it back to something you can fix in the app.

The field map

Every row is a real field on a Medipyxis claim, in the order it appears on the CMS-1500 form.

CMS-1500 item 837P location Medipyxis source Notes
Item 1a — Insured's ID 2010BA NM109 (subscriber member ID) insurance_plan.member_id Blank rejects at the payer, not at Stedi.
Item 2 — Patient name 2010BA NM103/NM104 patient.first_name, patient.last_name Splits on the last space; hyphenated last names stay whole.
Item 3 — Patient DOB and sex 2010BA DMG02 (DOB), DMG03 (sex) patient.dob, patient.gender DOB is written YYYYMMDD on the wire. See "The DMG03 rule" below.
Item 5 — Patient address 2010BA N3/N4 patient.address_* Required by most payers even when the patient is the subscriber.
Item 11 — Insured's group number 2000B SBR03 insurance_plan.group_number or group_id Optional at the transaction level; some payers reject when absent.
Item 17 — Referring provider 2310A NM1*DN Not sent from wound-care visits. Present in the schema, absent from the wound-care submit path.
Item 21 — Diagnosis codes 2300 HI (health-care code information) claims.diagnosis_codes[] First code is qualified ABK (principal), the rest ABF. Decimals are stripped for X12: L97.421 becomes L97421.
Item 24A — Date(s) of service 2400 DTP*472 per line claims.date_of_service Single-DOS today; the field exists per line so a future range would flow through untouched.
Item 24B — Place of service 2300 CLM05-1 Derived POS code Wound-care visits derive to 11 (office) or 12 (home) depending on the facility.
Item 24D — Procedure and modifiers 2400 SV101-2 (CPT/HCPCS), SV101-3..6 (modifiers) claim_lines.code, claim_lines.modifier One line per code. HCPCS Q-codes come from tissue log entries; CPT codes come from the visit's procedure list.
Item 24E — Diagnosis pointer 2400 SV107 (compositeDiagnosisCodePointers) Current: ['1'] for every line See "The diagnosis-pointer rule" below.
Item 24F — Charges 2400 SV102 (lineItemChargeAmount) facility_charge_master.charge_amount × units A line without a positive charge cannot leave the system. See Charge Master and the $0.00 claim guard.
Item 24G — Units 2400 SV104 (serviceUnitCount) claim_lines.units One unit per line for E/M and debridement; multi-unit for grafting is line-specific.
Item 25 — Federal Tax ID 2010AA REF*EI facility.tax_id (normalized) Dashes and whitespace are stripped before the payload leaves — the wire wants nine digits and nothing else.
Item 28 — Total charge 2300 CLM02 (claimChargeAmount) Sum of all line charges × units Also gated against zero — see below.
Item 32 — Service facility 2310C NM1*77 + N3/N4 facility.name, facility.address_* Populated for every claim.
Item 33 — Billing provider 2010AA NM1*85 + N3/N4 facility_billing_settings.pay_to_* The pay-to address, not the service address.
Item 33a — Billing NPI 2010AA NM109 facility.npi or facility_billing_settings.billing_npi Group NPI, not the rendering clinician's.
Rendering provider 2310B NM1*82 provider.npi, provider.full_name Emitted at the claim level, not per line — one clinician per visit is the wound-care norm. Omitted when it equals the billing NPI (X12 RFI #1531/#1989).

The full 837P builder is backend/supabase/functions/submit-claim/index.ts. _shared/claimRequiredFields.ts runs the pre-flight check that catches most of the misses documented above before a payload ever reaches Stedi.

The DMG03 rule

DMG03 is the wire code for administrative sex on the subscriber loop. X12 restricts the field to three values: M, F, U. Medipyxis stores four: M, F, Other, and null (unknown).

The mapping (backend/supabase/functions/_shared/gender.tstoX12Gender):

Stored value DMG03 wire value
M or Male M
F or Female F
Other U
null / unknown U

Two consequences of this mapping worth knowing:

The diagnosis-pointer rule

SV107 on each service line tells the payer which of the claim's diagnosis codes (HI01..HI12) that line is billed against. On the CMS-1500 it is Item 24E, and it accepts up to four pointers per line — for example, 1,2,4 means "this line is medically justified by the first, second, and fourth diagnosis on this claim".

Medipyxis today points every service line at diagnosis position 1 only (compositeDiagnosisCodePointers: { diagnosisCodePointers: ['1'] }). This works because wound-care claims almost always carry the wound's underlying condition as the principal diagnosis, and every line on the visit relates back to it.

When a visit legitimately splits between two different wounds or two different underlying diagnoses, the current single-pointer emission may under-justify the secondary line. Payers rarely deny for this alone, but a documented case (Explanation of Benefits calling out lack of medical necessity on a specific line) is worth flagging to Damon so per-line pointing can be prioritized.

The service-date rule

DTP*472 on the CMS-1500 is one item (24A) per line, and Medipyxis emits the visit's date of service on every line — same value, per-line placement. Two things to know:

What the pre-flight actually catches

Before a payload reaches Stedi, _shared/claimRequiredFields.ts refuses to submit a claim missing any of the following:

Anything else — modifiers, group number, referring provider — is optional at the transaction level even when a payer needs it, so those rejects come back from the payer, not from the pre-flight.

When a payer rejects citing an element name

The payer's rejection message names the element with its X12 code. The table above is the fastest way from that code to the app screen where you fix it:

If the payer names an element that isn't in the table above, that field is either optional in the 837P (and the payer is enforcing its own rule) or is on a loop Medipyxis doesn't emit. Send the raw payer message to Damon — the transform is small enough to trace a full round trip in one sitting.

Auto-rendered from related: in frontmatter.

ESC