Skip to main content

AppointmentChip

ComplexScheduling<co-appointment-chip>

AppointmentChip is one appointment on the calendar, coloured by status or by appointment type, with telehealth and paid or unpaid icons.

import { AppointmentChip } from 'health-components';

Examples​

Showcase​

Storybook

By Type​

Storybook

Small​

Storybook

No Show​

Storybook

Usage​

<AppointmentChip time="9:20" patient="Nora Scott" type="Therapy 50" status="Confirmed" telehealth paid={false} onClick={openAppt} />

When to use​

  • Calendar day, week and month cells; today lists.

When not to use​

  • Tables: use StatusTag in a status column.

Variants and states​

VariantWhat it is
by statusScheduled grey, Confirmed primary, Arrived and Checked In amber, In Room AI purple, Completed and Checked Out green, No Show and Cancelled red with the name struck through.
by typeStripe from appt-<color> on surface-alt.
telehealthVideo icon.
paid / dueCheck-circle icon (green) or dollar icon (red) for the copay.
smOne line for month cells.

Accessibility​

  • A button whose aria-label reads time, patient, type, status, telehealth and copay.
  • Type colours as stripes are below 3:1 for Blue, Teal, Orange and Yellow on light styles; the type name is always printed, so colour never carries it alone.

Do and don't​

  • Do: Show the status word on the chip, not only the colour.
  • Don't: Colour the whole chip in a saturated type colour.

Props​

PropTypeDefaultDescription
time *string—Start time, e.g. "9:20"
patient *string—Patient name
type *string—Appointment type, e.g. "Follow-Up"
statusAppointmentChipStatusnoneAppointment status ('Scheduled', 'Confirmed', 'Arrived', 'In Room', 'Completed', 'No Show', 'Cancelled'...)
colorBy'status' | 'type''status'Colour the stripe by status or by appointment type
colorAppointmentChipColor'blue''blue' | 'green' | 'teal' | 'purple' | 'red' | 'orange' | 'yellow' | 'pink' | 'gray'
telehealthbooleanfalseShows the video icon
paidbooleanundefinedtrue: copay paid icon, false: copay due icon, undefined: no icon
size'sm' | 'md''md''sm' (month view, no type line) | 'md'

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

Angular, Vue and HTML​

Register the elements once (Angular guide), then use <co-appointment-chip>. 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-appointment-chip time="…" patient="…" [status]="status"></co-appointment-chip>
KindNameDescription
attributetimeStart time, e.g. "9:20"
attributepatientPatient name
attributetypeAppointment type, e.g. "Follow-Up"
property / JSON attributestatusAppointment status ('Scheduled', 'Confirmed', 'Arrived', 'In Room', 'Completed', 'No Show', 'Cancelled'...); default none
attributecolor-by / colorByColour the stripe by status or by appointment type; default 'status'
attributecolor'blue' | 'green' | 'teal' | 'purple' | 'red' | 'orange' | 'yellow' | 'pink' | 'gray'; default 'blue'
attributetelehealthShows the video icon; default false
attributepaidtrue: copay paid icon, false: copay due icon, undefined: no icon; default undefined
attributesize'sm' (month view, no type line) | 'md'; default 'md'
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
attributedisabled
attributename
property / JSON attributevalue