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
Do Not Resuscitate
Allergies Not Reviewed
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
| Variant | What it is |
|---|---|
| full | Desktop chart. |
| compact | Encounter and billing screens. |
| mobile | Stacked, phone. |
| allergies | Red tags with alert icon; "No Known Allergies" green; "Allergies not reviewed" amber when the list is unknown. |
| flags | Diabetic, Fall Risk, Interpreter: Spanish, Behavioral Health. |
| code status | Full Code green; DNR, DNI, Comfort Care red with an icon. |
| restricted | Restricted 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
| Prop | Type | Default | Description |
|---|---|---|---|
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. |
phone | string | none | Phone |
insurance | string | none | Payer and member id ("Aetna W123456789") |
preferred | string | none | Preferred name, shown in quotes |
allergies | string[] | undefined | Allergies: a list, `[]` for No Known Allergies, or undefined when not reviewed |
flags | PatientFlag[] | [] | Flags such as Diabetic, Fall Risk |
codeStatus | string | none | Code status ("Full Code", "DNR"); DNR, DNI and Comfort show red |
restricted | boolean | false | Restricted (break-the-glass) chart |
photo | string | initials | Photo URL |
actions | ReactNode | none | Buttons on the right |
variant | PatientBannerVariant | 'full' | 'full' | 'compact' | 'mobile' |
headingLevel | 1 | 2 | 3 | 1 for full, 2 otherwise | Heading 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>
| Kind | Name | Description |
|---|---|---|
| attribute | name | Patient name. Required. |
| attribute | sex | Sex ("F"). Required. |
| property / JSON attribute | age | Age in years. Required. |
| attribute | dob | Date of birth ("03/14/1988"). Required. |
| attribute | mrn | Medical record number ("MRN-100231"). Required. |
| attribute | phone | Phone; default none |
| attribute | insurance | Payer and member id ("Aetna W123456789"); default none |
| attribute | preferred | Preferred name, shown in quotes; default none |
| property / JSON attribute | allergies | Allergies: a list, `[]` for No Known Allergies, or undefined when not reviewed; default undefined |
| property / JSON attribute | flags | Flags such as Diabetic, Fall Risk; default [] |
| attribute | code-status / codeStatus | Code status ("Full Code", "DNR"); DNR, DNI and Comfort show red; default none |
| attribute | restricted | Restricted (break-the-glass) chart; default false |
| attribute | photo | Photo URL; default initials |
| attribute | variant | 'full' | 'compact' | 'mobile'; default 'full' |
| attribute | heading-level / headingLevel | Heading level of the name; default 1 for full, 2 otherwise |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| slot | actions | Buttons on the right; default none Plain text also works as the `actions` attribute. |