Skip to main content

Flowsheet

ComplexInpatient nursing<co-flowsheet>

Flowsheet is the nurse charting grid: measures down the side, times across the top, with add column, edit in place, abnormal shading, collapsible groups and a graph view.

import { Flowsheet } from 'health-components';

Examples​

Sepsis Watch​

Storybook

Editing Collapsed​

Storybook

Graph View​

Storybook

Read Only​

Storybook

Usage​

<Flowsheet title="Vitals and I&O" columns={cols} rows={rows} nowColumn="c6" nextTime={c => '16:00'} onChange={save} />

When to use​

  • Hourly or q4h vitals, neuro checks, drips and I&O on an inpatient or ICU unit.
  • Any repeated measure where the nurse needs to compare across time.

When not to use​

  • One set of vitals at a clinic visit: VitalsPanel.
  • Lab results with reference columns: LabResultTable.

Variants and states​

VariantWhat it is
gridDefault. Rows grouped (Vitals, Neuro, Drips, I&O); select a cell to edit, Enter saves, Esc cancels.
graphOne small trend chart per numeric row, normal band shaded green, abnormal points coloured.
abnormalAmber cell plus H or L flag; critical is red cell plus HH or LL.
collapsed groupGroup header keeps a count of abnormal values inside.
new columnAdd column appends the next charting time.
readOnlyView only badge; cells are not buttons.

Accessibility​

  • Real table with caption, row headers and column headers; sticky first column.
  • Each cell is a button named "Edit Heart rate at 12:00, now 118 bpm".
  • Flags are letters plus words for screen readers; colour is never the only signal.
  • Graph view has an aria-label listing every value.

Do and don't​

  • Do: Pass the patient's own range (for example a COPD SpO2 target) through range on the row.
  • Don't: Hide abnormal rows inside a collapsed group without the count.

Props​

PropTypeDefaultDescription
rows *FlowsheetRow[]—Measures down the side; required
columns *FlowsheetColumn[]—Charting times across the top; required
nowColumnstringnoneId of the current column (marked with a left rule)
nextTime(columns: FlowsheetColumn[]) => string'New'Label for an added column, from the current columns
viewFlowsheetView—Controlled view: 'grid' | 'graph'
defaultViewFlowsheetView'grid'Initial view (uncontrolled)
onViewChange(view: FlowsheetView) => void—Called when the view changes
defaultCollapsedstring[][]Initially collapsed group names
defaultEditingstringnoneCell open for editing at first, as 'rowId|colId'
readOnlybooleanfalseView only: no editing, no Add column
onChange(rowId: string, colId: string, value: string) => void—Called when a cell is saved
onAddColumn(column: FlowsheetColumn) => void—Called when a column is added
titlestring'Flowsheet'Card title
subtitlestringnonePatient and unit line
maxHeightnumbernoneScroll height of the grid in px
rangeContextRangeContextId'inpatient' when no global context is setWhich shared reference range flags use; a row's own range still wins

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

Angular, Vue and HTML​

Register the elements once (Angular guide), then use <co-flowsheet>. 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-flowsheet now-column="…" view="…" [rows]="rows" (co-view-change)="onViewChange($event.detail)"></co-flowsheet>
KindNameDescription
property / JSON attributerowsMeasures down the side; required
property / JSON attributecolumnsCharting times across the top; required
attributenow-column / nowColumnId of the current column (marked with a left rule); default none
attributeviewControlled view: 'grid' | 'graph'
attributedefault-view / defaultViewInitial view (uncontrolled); default 'grid'
property / JSON attributedefault-collapsed / defaultCollapsedInitially collapsed group names; default []
attributedefault-editing / defaultEditingCell open for editing at first, as 'rowId|colId'; default none
attributeread-only / readOnlyView only: no editing, no Add column; default false
attributetitleCard title; default 'Flowsheet'
attributesubtitlePatient and unit line; default none
attributemax-height / maxHeightScroll height of the grid in px; default none
attributerange-context / rangeContextWhich shared reference range flags use; a row's own range still wins; default 'inpatient' when no global context is set
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
property (function)nextTimeLabel for an added column, from the current columns; default 'New'
eventco-view-changeCalled when the view changes (React: onViewChange)
eventco-changeCalled when a cell is saved (React: onChange)
eventco-add-columnCalled when a column is added (React: onAddColumn)
eventco-input (React: onInput)