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
Check Passed
Read Only
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
| Variant | What it is |
|---|---|
| edit | Inline inputs per line, Add Service Line, remove per line. |
| line errors | Red input with the message under it. |
| claim check | "N errors" or "Claim check passed". |
| readOnly | Lock 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
| Prop | Type | Default | Description |
|---|---|---|---|
lines | ClaimLine[] | uncontrolled | Service lines (controlled): Array<{dos, cpt, mods?, dx?, units, charge, errors?: Record<field, string>}> |
defaultLines | ClaimLine[] | [] | Initial service lines (uncontrolled) |
payerOrder | "Primary" | "Secondary" | "Tertiary" | 'Primary' | 'Primary' | 'Secondary' | 'Tertiary' (SBR01) |
frequency | string | '1 Original' | Claim frequency (CLM05-3), such as "7 Corrected" |
errorsCount | number | 0 | Claim check error count; 0 shows "Claim check passed" |
readOnly | boolean | false | Lock banner, read-only inputs, no buttons |
lockText | string | "Your role can view this claim but not edit it." | Lock banner text when readOnly |
onChange | (lines: ClaimLine[]) => void | none | Called with all lines after an edit, add or remove |
onSaveDraft | () => void | none | Save Draft |
onSubmit | (action: ClaimSubmitAction) => void | none | Submit 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>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | lines | Service lines (controlled): Array<{dos, cpt, mods?, dx?, units, charge, errors?: Record<field, string>}>; default uncontrolled |
| property / JSON attribute | default-lines / defaultLines | Initial service lines (uncontrolled); default [] |
| attribute | payer-order / payerOrder | 'Primary' | 'Secondary' | 'Tertiary' (SBR01); default 'Primary' |
| attribute | frequency | Claim frequency (CLM05-3), such as "7 Corrected"; default '1 Original' |
| attribute | errors-count / errorsCount | Claim check error count; 0 shows "Claim check passed"; default 0 |
| attribute | read-only / readOnly | Lock banner, read-only inputs, no buttons; default false |
| attribute | lock-text / lockText | Lock banner text when readOnly; default "Your role can view this claim but not edit it." |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-change | Called with all lines after an edit, add or remove; default none (React: onChange) |
| event | co-save-draft | Save Draft; default none (React: onSaveDraft) |
| event | co-submit | Submit Claim and its menu items; default none (React: onSubmit) |