Skip to main content

ChartSummary

ComplexChart panels<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​

Storybook

Inpatient Context​

Storybook

Nothing Recorded​

Storybook

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​

VariantWhat it is
fullProblems with linked results, medications, plan and gaps.
allergies not reviewedallergies undefined: amber tag.
NKAallergies []: green tag.
no problemsEmpty state that asks to add problems.
critical resultHH 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​

PropTypeDefaultDescription
problemsChartSummaryProblem[]none (empty state)Active problems with their results, medications, plan and gap
allergiesChartSummaryAllergy[]undefinedAllergies. undefined = not reviewed, [] = No Known Allergies
vitalsChartSummaryVital[]none ('No vitals this year')Last recorded vitals
vitalsTakenstringnoneWhen the vitals were taken
codeStatusstringnoneCode status ('DNR/DNI')
gapsstring[]noneCare gaps not tied to one problem
titlestring'Chart Summary'Card title
subtitlestringnoneCard subtitle (patient, age, MRN)
actionsReactNodenoneHeader actions
rangeContextRangeContextIdthe 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.

Angular template
<co-chart-summary vitals-taken="…" code-status="…" [problems]="problems"></co-chart-summary>
KindNameDescription
property / JSON attributeproblemsActive problems with their results, medications, plan and gap; default none (empty state)
property / JSON attributeallergiesAllergies. undefined = not reviewed, [] = No Known Allergies; default undefined
property / JSON attributevitalsLast recorded vitals; default none ('No vitals this year')
attributevitals-taken / vitalsTakenWhen the vitals were taken; default none
attributecode-status / codeStatusCode status ('DNR/DNI'); default none
property / JSON attributegapsCare gaps not tied to one problem; default none
attributetitleCard title; default 'Chart Summary'
attributesubtitleCard subtitle (patient, age, MRN); default none
attributerange-context / rangeContextWhich shared reference range flags use; the lab range on a result still wins; default the global context, else 'outpatient'
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
slotactionsHeader actions; default none Plain text also works as the `actions` attribute.