Skip to main content

PatientBanner

ComplexClinical<co-patient-banner>

PatientBanner identifies the patient at the top of every chart screen: name, sex, age, DOB, MRN, phone, insurance, allergies, flags and code status.

import { PatientBanner } from 'health-components';

Examples​

Variants​

Storybook

Do Not Resuscitate​

Storybook

Allergies Not Reviewed​

Storybook

Usage​

<PatientBanner name="Henna West" sex="F" age={38} dob="03/14/1988" mrn="MRN-100231" allergies={["Penicillin"]}
flags={["Diabetic"]} codeStatus="Full Code" actions={<Button variant="primary">Start Visit Note</Button>} />

When to use​

  • Top of every screen about one patient.

When not to use​

  • Lists of patients: table rows.

Variants and states​

VariantWhat it is
fullDesktop chart.
compactEncounter and billing screens.
mobileStacked, phone.
allergiesRed tags with alert icon; "No Known Allergies" green; "Allergies not reviewed" amber when the list is unknown.
flagsDiabetic, Fall Risk, Interpreter: Spanish, Behavioral Health.
code statusFull Code green; DNR, DNI, Comfort Care red with an icon.
restrictedRestricted badge (break-the-glass charts).

Accessibility​

  • Region named "Patient <name>"; the name is the page h1 on chart screens.
  • Allergy and code status carry icons and words, not only red and green.
  • Two identifiers (name plus DOB or MRN) are always visible, for patient safety.

Do and don't​

  • Do: Show DNR in red with "Code status: DNR" text.
  • Don't: Truncate allergies; wrap instead.

Props​

PropTypeDefaultDescription
name *string—Patient name. Required.
sex *string—Sex ("F"). Required.
age *string | number—Age in years. Required.
dob *string—Date of birth ("03/14/1988"). Required.
mrn *string—Medical record number ("MRN-100231"). Required.
phonestringnonePhone
insurancestringnonePayer and member id ("Aetna W123456789")
preferredstringnonePreferred name, shown in quotes
allergiesstring[]undefinedAllergies: a list, `[]` for No Known Allergies, or undefined when not reviewed
flagsPatientFlag[][]Flags such as Diabetic, Fall Risk
codeStatusstringnoneCode status ("Full Code", "DNR"); DNR, DNI and Comfort show red
restrictedbooleanfalseRestricted (break-the-glass) chart
photostringinitialsPhoto URL
actionsReactNodenoneButtons on the right
variantPatientBannerVariant'full''full' | 'compact' | 'mobile'
headingLevel1 | 2 | 31 for full, 2 otherwiseHeading level of the name

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-patient-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-patient-banner name="…" sex="…" [age]="age"></co-patient-banner>
KindNameDescription
attributenamePatient name. Required.
attributesexSex ("F"). Required.
property / JSON attributeageAge in years. Required.
attributedobDate of birth ("03/14/1988"). Required.
attributemrnMedical record number ("MRN-100231"). Required.
attributephonePhone; default none
attributeinsurancePayer and member id ("Aetna W123456789"); default none
attributepreferredPreferred name, shown in quotes; default none
property / JSON attributeallergiesAllergies: a list, `[]` for No Known Allergies, or undefined when not reviewed; default undefined
property / JSON attributeflagsFlags such as Diabetic, Fall Risk; default []
attributecode-status / codeStatusCode status ("Full Code", "DNR"); DNR, DNI and Comfort show red; default none
attributerestrictedRestricted (break-the-glass) chart; default false
attributephotoPhoto URL; default initials
attributevariant'full' | 'compact' | 'mobile'; default 'full'
attributeheading-level / headingLevelHeading level of the name; default 1 for full, 2 otherwise
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
slotactionsButtons on the right; default none Plain text also works as the `actions` attribute.