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
Comfort Care
As Link
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
| Variant | What it is |
|---|---|
| full code | Green, heart icon. |
| DNR / DNI / comfort | Red, 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
| Prop | Type | Default | Description |
|---|---|---|---|
status * | string | — | Code status ("Full Code", "DNR / DNI", "Comfort care"). DNR, DNI or Comfort turn the banner red. Required |
directive | string | none ("No advance directive on file") | Advance directive on file ("Living will on file") |
polst | string | none | Date the POLST was signed |
proxy | string | none | Health care proxy name and relationship |
onViewDocuments | () => void | none | Called by the View Documents button |
documentsHref | string | none | Makes 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>
| Kind | Name | Description |
|---|---|---|
| attribute | status | Code status ("Full Code", "DNR / DNI", "Comfort care"). DNR, DNI or Comfort turn the banner red. Required |
| attribute | directive | Advance directive on file ("Living will on file"); default none ("No advance directive on file") |
| attribute | polst | Date the POLST was signed; default none |
| attribute | proxy | Health care proxy name and relationship; default none |
| attribute | documents-href / documentsHref | Makes View Documents a link to the signed documents; default none |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-view-documents | Called by the View Documents button; default none (React: onViewDocuments) |