ImmunizationSchedule
ComplexClinical
<co-immunization-schedule>ImmunizationSchedule is the vaccine grid by dose with Given, Due, Overdue, Declined and Later states, synced with the state registry.
import { ImmunizationSchedule } from 'health-components';
Examples
Up To Date
Read Only
Usage
<ImmunizationSchedule columns={["2 mo", "4 mo", "6 mo"]} rows={forecast} />
When to use
- Pediatric and adult immunization history and forecast.
When not to use
- Recording one dose: a form in a Drawer.
Variants and states
| Variant | What it is |
|---|---|
| given | Date in green. |
| due | Blue. |
| overdue | Red. |
| declined | Neutral. |
| later | Outline. |
Accessibility
- Each cell has a word or date and an icon.
Do and don't
- Do: Use the registry forecast.
- Don't: Colour-only cells.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
columns * | string[] | — | string[]: dose ages ("Birth", "2 mo"...); required |
rows * | ImmunizationRow[] | — | Array<{vaccine, doses: Array<{status?, date?}>}>; required |
synced | string | subtitle; default "today" | Registry sync time, in the |
subtitle | ReactNode | "CDC schedule . IIS synced {synced}" | Replaces the subtitle |
readOnly | boolean | false | Hides Record Dose |
onRecordDose | () => void | none | Record Dose clicked |
Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, onChange, onInput, plus className and event handlers on the root element.
Angular, Vue and HTML
Register the elements once (Angular guide), then use <co-immunization-schedule>. 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-immunization-schedule synced="…" read-only [columns]="columns" (co-record-dose)="onRecordDose($event.detail)"></co-immunization-schedule>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | columns | string[]: dose ages ("Birth", "2 mo"...); required |
| property / JSON attribute | rows | Array<{vaccine, doses: Array<{status?, date?}>}>; required |
| attribute | synced | Registry sync time, in the default subtitle; default "today" |
| attribute | read-only / readOnly | Hides Record Dose; default false |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-record-dose | Record Dose clicked; default none (React: onRecordDose) |
| event | co-change | (React: onChange) |
| event | co-input | (React: onInput) |
| slot | subtitle | Replaces the subtitle; default "CDC schedule . IIS synced {synced}" Plain text also works as the `subtitle` attribute. |