// ClaimCard837 — the warm-paper card that represents one 837P claim in // the Upload page's streaming section. Originally inlined in // `src/pages/Upload.tsx`; extracted into its own file in SP9 (June 2026) // so the per-claim select-for-export interaction can live here without // bloating the page. // // Two click targets, by design (see approach A in the batch-export // design spec): a leading checkbox column for selection, and the rest // of the card (a {open ? (
{claim.diagnoses.length > 0 ? (
Diagnoses
{claim.diagnoses.map((d, i) => ( {d.qualifier ? `${d.qualifier}·` : ""} {d.code} ))}
) : null} {claim.service_lines.length > 0 ? (
Service lines
{claim.service_lines.map((line) => ( ))}
# Code Mods Date Units Charge
) : null} {(claim.validation.errors.length > 0 || claim.validation.warnings.length > 0) ? (
Validation
) : null} {/* SP21 Phase 5 Task 5.7: drill to the persisted claim. Only renders when this streamed claim_id has been saved into a parsed batch (so ClaimDrawer can find it). Before "Save batch" the claim is streaming-only and the link would 404. */} {canDrill ? (
) : null}
) : null} ); } function ServiceLine837Row({ line }: { line: ServiceLine }) { return ( {line.line_number} {line.procedure.qualifier}·{line.procedure.code} {line.procedure.modifiers.length > 0 ? line.procedure.modifiers.join(", ") : "—"} {line.service_date ?? "—"} {line.units ? `${toNum(line.units)} ${line.unit_type ?? ""}`.trim() : "—"} {fmt.usdDecimal(line.charge)} ); }