ChartSummary
<co-chart-summary>ChartSummary is the one-page, problem-oriented summary: each active problem with the results, medications, plan and care gap that belong to it, plus allergies, code status and last vitals.
import { ChartSummary } from 'health-components';
Examples
Showcase
Inpatient Context
Nothing Recorded
Usage
<ChartSummary problems={problems} allergies={allergies} vitals={[{ code: "SBP", value: 148 }]} codeStatus="Full code" />
When to use
- Chart landing page, pre-visit review, handoff and consult reading.
When not to use
- Editing problems: ProblemListEditor. Long result history: ResultsTrendPanel.
Variants and states
| Variant | What it is |
|---|---|
| full | Problems with linked results, medications, plan and gaps. |
| allergies not reviewed | allergies undefined: amber tag. |
| NKA | allergies []: green tag. |
| no problems | Empty state that asks to add problems. |
| critical result | HH or LL value shows a filled flag. |
Clinical values
Every number renders through CareOS.ClinicalValue and CareOS.fmt (the clinical-values builder), matched by LOINC; measures that table lacks (NT-proBNP, lactate, vancomycin trough, CrCl, PHQ-9, per-kg doses) use a local table with the same rules: tabular figures, the unit always shown, fixed decimals per measure (potassium 1, sodium 0, creatinine 2), the reference range in the title or beside it, and H, L, HH or LL flags in words for screen readers. The flag says where the number sits against the adult reference range in the rules table; it does not say the number was measured correctly.
Accessibility
- Each problem is a group with its code read before the words.
- Flags are read in words, such as "9.1 %, High".
Do and don't
- Do: Group results under the problem they monitor.
- Don't: Show a number without its unit.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
problems | ChartSummaryProblem[] | none (empty state) | Active problems with their results, medications, plan and gap |
allergies | ChartSummaryAllergy[] | undefined | Allergies. undefined = not reviewed, [] = No Known Allergies |
vitals | ChartSummaryVital[] | none ('No vitals this year') | Last recorded vitals |
vitalsTaken | string | none | When the vitals were taken |
codeStatus | string | none | Code status ('DNR/DNI') |
gaps | string[] | none | Care gaps not tied to one problem |
title | string | 'Chart Summary' | Card title |
subtitle | string | none | Card subtitle (patient, age, MRN) |
actions | ReactNode | none | Header actions |
rangeContext | RangeContextId | the global context, else 'outpatient' | Which shared reference range flags use; the lab range on a result still wins |
Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.
Angular, Vue and HTML
Register the elements once (Angular guide), then use <co-chart-summary>. 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-chart-summary vitals-taken="…" code-status="…" [problems]="problems"></co-chart-summary>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | problems | Active problems with their results, medications, plan and gap; default none (empty state) |
| property / JSON attribute | allergies | Allergies. undefined = not reviewed, [] = No Known Allergies; default undefined |
| property / JSON attribute | vitals | Last recorded vitals; default none ('No vitals this year') |
| attribute | vitals-taken / vitalsTaken | When the vitals were taken; default none |
| attribute | code-status / codeStatus | Code status ('DNR/DNI'); default none |
| property / JSON attribute | gaps | Care gaps not tied to one problem; default none |
| attribute | title | Card title; default 'Chart Summary' |
| attribute | subtitle | Card subtitle (patient, age, MRN); default none |
| attribute | range-context / rangeContext | Which shared reference range flags use; the lab range on a result still wins; default the global context, else 'outpatient' |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| slot | actions | Header actions; default none Plain text also works as the `actions` attribute. |