Skip to main content

ClaimForm

ComplexRevenue<co-claim-form>

ClaimForm is the claim line-item editor: DOS, CPT, modifiers, diagnosis pointers, units and charge per line, with totals, claim check and submit.

import { ClaimForm } from 'health-components';

Examples​

Showcase​

Storybook

Check Passed​

Storybook

Read Only​

Storybook

Usage​

<ClaimForm payerOrder="Primary" frequency="1 Original" errorsCount={check.errors.length}
lines={[{ dos: "10/06/2026", cpt: "99214", mods: "25", dx: "A,B", units: 1, charge: 182 }]} onChange={setLines} />

When to use​

  • Creating or correcting a professional claim.

When not to use​

  • Read-only claim lists: DataTable.

Variants and states​

VariantWhat it is
editInline inputs per line, Add Service Line, remove per line.
line errorsRed input with the message under it.
claim check"N errors" or "Claim check passed".
readOnlyLock banner, inputs read-only, no buttons.

Accessibility​

  • Every cell input is named "<field> line N"; errors set aria-invalid and a title.

Do and don't​

  • Do: Explain X12 meaning in helper text (Box 22, REF*F8).
  • Don't: Let a line point to a diagnosis that is not on the claim.

Props​

PropTypeDefaultDescription
linesClaimLine[]uncontrolledService lines (controlled): Array<{dos, cpt, mods?, dx?, units, charge, errors?: Record<field, string>}>
defaultLinesClaimLine[][]Initial service lines (uncontrolled)
payerOrder"Primary" | "Secondary" | "Tertiary"'Primary''Primary' | 'Secondary' | 'Tertiary' (SBR01)
frequencystring'1 Original'Claim frequency (CLM05-3), such as "7 Corrected"
errorsCountnumber0Claim check error count; 0 shows "Claim check passed"
readOnlybooleanfalseLock banner, read-only inputs, no buttons
lockTextstring"Your role can view this claim but not edit it."Lock banner text when readOnly
onChange(lines: ClaimLine[]) => voidnoneCalled with all lines after an edit, add or remove
onSaveDraft() => voidnoneSave Draft
onSubmit(action: ClaimSubmitAction) => voidnoneSubmit Claim and its menu items

Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.

Angular, Vue and HTML​

Register the elements once (Angular guide), then use <co-claim-form>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.

Angular template
<co-claim-form payer-order="…" frequency="…" [lines]="lines" (co-change)="onChange($event.detail)"></co-claim-form>
KindNameDescription
property / JSON attributelinesService lines (controlled): Array<{dos, cpt, mods?, dx?, units, charge, errors?: Record<field, string>}>; default uncontrolled
property / JSON attributedefault-lines / defaultLinesInitial service lines (uncontrolled); default []
attributepayer-order / payerOrder'Primary' | 'Secondary' | 'Tertiary' (SBR01); default 'Primary'
attributefrequencyClaim frequency (CLM05-3), such as "7 Corrected"; default '1 Original'
attributeerrors-count / errorsCountClaim check error count; 0 shows "Claim check passed"; default 0
attributeread-only / readOnlyLock banner, read-only inputs, no buttons; default false
attributelock-text / lockTextLock banner text when readOnly; default "Your role can view this claim but not edit it."
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-changeCalled with all lines after an edit, add or remove; default none (React: onChange)
eventco-save-draftSave Draft; default none (React: onSaveDraft)
eventco-submitSubmit Claim and its menu items; default none (React: onSubmit)