CareTeamPanel
<co-care-team-panel>CareTeamPanel lists everyone caring for the patient, inside and outside the practice, with role, specialty, NPI, last contact and call or message actions.
import { CareTeamPanel } from 'health-components';
Examples
Showcase
Read Only
Empty
Usage
<CareTeamPanel members={team} />
When to use
- Chart sidebar, referral routing, care coordination and transitions of care.
When not to use
- Staff scheduling: ProviderDayColumns.
Variants and states
| Variant | What it is |
|---|---|
| internal | Primary avatar, message action. |
| outside | Accent avatar, Outside tag, no secure message. |
| primary | PCP tag (or a custom label). |
| ended | Dimmed with end date. |
| empty | Asks to add the PCP. |
| readOnly | No add or row menu. |
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
- Icon buttons name the person and the number.
Do and don't
- Do: Show NPI for outside clinicians.
- Don't: Delete an ended relationship: end it.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
members | CareTeamMember[] | none (empty state) | Team members |
updated | string | none | When the team was last updated |
readOnly | boolean | false | No Add Member or row menus |
title | string | 'Care Team' | Card title |
onAddMember | () => void | none | Called by Add Member |
onCall | (member: CareTeamMember) => void | none | Called by Call |
onMessage | (member: CareTeamMember) => void | none | Called by Message |
onMemberAction | (action: CareTeamAction, member: CareTeamMember) => void | none | Called with a row menu action |
rangeContext | RangeContextId | the 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-care-team-panel>. 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.
<co-care-team-panel updated="…" read-only [members]="members" (co-add-member)="onAddMember($event.detail)"></co-care-team-panel>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | members | Team members; default none (empty state) |
| attribute | updated | When the team was last updated; default none |
| attribute | read-only / readOnly | No Add Member or row menus; default false |
| attribute | title | Card title; default 'Care Team' |
| attribute | range-context / rangeContext | Which shared reference range flags use; the lab range on a result still wins; default the global context, else 'outpatient' |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-add-member | Called by Add Member; default none (React: onAddMember) |
| event | co-call | Called by Call; default none (React: onCall) |
| event | co-message | Called by Message; default none (React: onMessage) |
| event | co-member-action | Called with a row menu action; default none (React: onMemberAction) |