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
By Type
Small
No Show
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
| Variant | What it is |
|---|---|
| by status | Scheduled 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 type | Stripe from appt-<color> on surface-alt. |
| telehealth | Video icon. |
| paid / due | Check-circle icon (green) or dollar icon (red) for the copay. |
| sm | One 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
| Prop | Type | Default | Description |
|---|---|---|---|
time * | string | — | Start time, e.g. "9:20" |
patient * | string | — | Patient name |
type * | string | — | Appointment type, e.g. "Follow-Up" |
status | AppointmentChipStatus | none | Appointment status ('Scheduled', 'Confirmed', 'Arrived', 'In Room', 'Completed', 'No Show', 'Cancelled'...) |
colorBy | 'status' | 'type' | 'status' | Colour the stripe by status or by appointment type |
color | AppointmentChipColor | 'blue' | 'blue' | 'green' | 'teal' | 'purple' | 'red' | 'orange' | 'yellow' | 'pink' | 'gray' |
telehealth | boolean | false | Shows the video icon |
paid | boolean | undefined | true: 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>
| Kind | Name | Description |
|---|---|---|
| attribute | time | Start time, e.g. "9:20" |
| attribute | patient | Patient name |
| attribute | type | Appointment type, e.g. "Follow-Up" |
| property / JSON attribute | status | Appointment status ('Scheduled', 'Confirmed', 'Arrived', 'In Room', 'Completed', 'No Show', 'Cancelled'...); default none |
| attribute | color-by / colorBy | Colour the stripe by status or by appointment type; default 'status' |
| attribute | color | 'blue' | 'green' | 'teal' | 'purple' | 'red' | 'orange' | 'yellow' | 'pink' | 'gray'; default 'blue' |
| attribute | telehealth | Shows the video icon; default false |
| attribute | paid | true: copay paid icon, false: copay due icon, undefined: no icon; default undefined |
| attribute | size | 'sm' (month view, no type line) | 'md'; default 'md' |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| attribute | disabled | |
| attribute | name | |
| property / JSON attribute | value |