Skip to main content

CodeStatusBanner

ComplexClinical<co-code-status-banner>

CodeStatusBanner shows code status and advance directive, red for DNR, DNI or comfort care and green for Full Code.

import { CodeStatusBanner } from 'health-components';

Examples​

Statuses​

Storybook

Comfort Care​

Storybook
Storybook

Usage​

<CodeStatusBanner status="DNR / DNI" polst="03/02/2026" proxy="Maria Edwards (wife)" />

When to use​

  • Top of chart, inpatient-style handoff, on-call mobile.

When not to use​

  • Inside lists: Badge.

Variants and states​

VariantWhat it is
full codeGreen, heart icon.
DNR / DNI / comfortRed, alert icon, role alert.

Accessibility​

  • DNR uses role alert.

Do and don't​

  • Do: Link to the signed documents.
  • Don't: Show a status with no document behind it.

Props​

PropTypeDefaultDescription
status *string—Code status ("Full Code", "DNR / DNI", "Comfort care"). DNR, DNI or Comfort turn the banner red. Required
directivestringnone ("No advance directive on file")Advance directive on file ("Living will on file")
polststringnoneDate the POLST was signed
proxystringnoneHealth care proxy name and relationship
onViewDocuments() => voidnoneCalled by the View Documents button
documentsHrefstringnoneMakes View Documents a link to the signed documents

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-code-status-banner>. 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-code-status-banner status="…" directive="…" [defaultValue]="defaultValue" (co-view-documents)="onViewDocuments($event.detail)"></co-code-status-banner>
KindNameDescription
attributestatusCode status ("Full Code", "DNR / DNI", "Comfort care"). DNR, DNI or Comfort turn the banner red. Required
attributedirectiveAdvance directive on file ("Living will on file"); default none ("No advance directive on file")
attributepolstDate the POLST was signed; default none
attributeproxyHealth care proxy name and relationship; default none
attributedocuments-href / documentsHrefMakes View Documents a link to the signed documents; default none
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-view-documentsCalled by the View Documents button; default none (React: onViewDocuments)