Skip to main content

CopayCollector

ComplexRevenue<co-copay-collector>

CopayCollector (PatientBalance) shows today's copay, prior balance and total, and collects by card, tap, cash or text link.

import { CopayCollector } from 'health-components';

Examples​

Copay Only​

Storybook

Text To Pay​

Storybook

Usage​

<CopayCollector patient="Henna West" copay={25} prior={40} cardLast4="Visa 4242" />

When to use​

  • Check-in and checkout.

When not to use​

  • Posting insurer payments: ERAPostingRow.

Variants and states​

VariantWhat it is
methodsCard on file, tap, cash, text link.
planPayment plan note.
skipSkip needs a reason.

Accessibility​

  • Amounts as text.

Do and don't​

  • Do: Show what the balance is for.
  • Don't: Charge without showing the amount on the button.

Props​

PropTypeDefaultDescription
patient *string—Patient (and plan) line under the title. Required
copay *number—Copay due today in dollars. Required
priornumber0Prior balance in dollars
priorNotestringnoneWhat the prior balance is for, e.g. "09/12 visit, after insurance"
planstringnonePayment plan note; shows an info Alert
cardLast4stringnoneCard on file, e.g. "Visa 4242"
duenumbercopayInitial amount in the Amount field
amountstringundefined (uncontrolled, starts at `due`)Controlled amount (field text)
onAmountChange(amount: string) => void—Called when the amount text changes
methodPaymentMethodundefined (uncontrolled)Controlled payment method
defaultMethodPaymentMethod'card'Initial payment method when uncontrolled
onMethodChange(method: PaymentMethod) => void—Called when the method changes
onCollect(collection: CopayCollection) => voidnoneCalled when Collect is pressed
onSkip() => voidnoneCalled when Skip is pressed (the screen then asks for a reason)

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-copay-collector>. 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-copay-collector patient="…" copay="…" [defaultValue]="defaultValue" (co-amount-change)="onAmountChange($event.detail)"></co-copay-collector>
KindNameDescription
attributepatientPatient (and plan) line under the title. Required
attributecopayCopay due today in dollars. Required
attributepriorPrior balance in dollars; default 0
attributeprior-note / priorNoteWhat the prior balance is for, e.g. "09/12 visit, after insurance"; default none
attributeplanPayment plan note; shows an info Alert; default none
attributecard-last4 / cardLast4Card on file, e.g. "Visa 4242"; default none
attributedueInitial amount in the Amount field; default copay
attributeamountControlled amount (field text); default undefined (uncontrolled, starts at `due`)
attributemethodControlled payment method; default undefined (uncontrolled)
attributedefault-method / defaultMethodInitial payment method when uncontrolled; default 'card'
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-amount-changeCalled when the amount text changes (React: onAmountChange)
eventco-method-changeCalled when the method changes (React: onMethodChange)
eventco-collectCalled when Collect is pressed; default none (React: onCollect)
eventco-skipCalled when Skip is pressed (the screen then asks for a reason); default none (React: onSkip)