CensusList
<co-census-list>CensusList is the unit or service list of current inpatients with bed, level of care, length of stay against the expected stay, last vitals with flags, isolation and expected discharge.
import { CensusList } from 'health-components';
Examples
Showcase
Critical Vitals
Loading
No Matches
Usage
<CensusList rows={census} subtitle="Hospital Medicine, Team B" />
When to use
- Hospitalist and charge nurse lists, handoff, discharge huddles.
When not to use
- Bed-by-bed layout: BedBoard.
Variants and states
| Variant | What it is |
|---|---|
| filters | All, Discharge today, Isolation, Critical vitals, Observation, each with a count. |
| LOS over expected | Flagged H with the GMLOS below. |
| critical vitals | H! or L! in red. |
| pending level | Arrow to the requested level. |
| loading | Skeleton rows. |
| empty | No results with how to clear. |
Clinical values
Every number goes through the clinical value rules: tabular digits, unit always shown, fixed precision per measure (temperature 0.1 °C, potassium 0.1 mmol/L, creatinine 0.01 mg/dL, heart rate whole bpm), the reference range in the tooltip and H, L, H! or L! flags. Doses drop trailing zeros and keep a leading zero (0.5 mg, 5 mg).
Accessibility
- Built on DataTable: sortable headers with aria-sort.
- Flags are read out ("Heart rate 132 bpm, Critical high").
Do and don't
- Do: Pass the lab or unit range when it differs from the defaults.
- Don't: Show vitals older than the shift without the time.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
rows * | CensusRow[] | — | Array of { bed, name, mrn, age, sex, dx, level, pendingTo, los, gmlos, vitals: [{ measure, value }], isolation, organism, attending, edd, dischargeToday }; required |
defaultFilter | CensusFilter | 'all' | 'all' | 'dc' | 'iso' | 'flag' | 'obs': starting filter (uncontrolled) |
filter | CensusFilter | uncontrolled | Filter (controlled) |
onFilterChange | (filter: CensusFilter) => void | none | Called with the new filter |
loading | boolean | false | Shows skeleton rows |
pageSize | number | 10 | Rows per page |
title | string | 'Census' | Card title |
subtitle | string | none | Line under the title |
rangeContext | RangeContextId | 'inpatient' when no global context is set | Which shared reference range flags use; the lab range on a result still wins |
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-census-list>. 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.
<co-census-list default-filter="…" filter="…" [rows]="rows" (co-filter-change)="onFilterChange($event.detail)"></co-census-list>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | rows | Array of { bed, name, mrn, age, sex, dx, level, pendingTo, los, gmlos, vitals: [{ measure, value }], isolation, organism, attending, edd, dischargeToday }; required |
| attribute | default-filter / defaultFilter | 'all' | 'dc' | 'iso' | 'flag' | 'obs': starting filter (uncontrolled); default 'all' |
| attribute | filter | Filter (controlled); default uncontrolled |
| attribute | loading | Shows skeleton rows; default false |
| attribute | page-size / pageSize | Rows per page; default 10 |
| attribute | title | Card title; default 'Census' |
| attribute | subtitle | Line under the title; default none |
| attribute | range-context / rangeContext | Which shared reference range flags use; the lab range on a result still wins; default 'inpatient' when no global context is set |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-filter-change | Called with the new filter; default none (React: onFilterChange) |
| event | co-change | (React: onChange) |
| event | co-input | (React: onInput) |