ProblemList
ComplexClinical
<co-problem-list>ProblemList is the coded problem list with ICD-10 codes, onset, chronic and HCC tags, filtered by Active, Resolved or All.
import { ProblemList } from 'health-components';
Examples
All Problems
Resolved
Empty
Read Only
Usage
<ProblemList items={problems} icdOptions={icd10} />
When to use
- Chart Problems section; assessment review.
When not to use
- Encounter diagnoses on a claim: ClaimForm.
Variants and states
| Variant | What it is |
|---|---|
| active / resolved / all | Filter. |
| chronic | Info tag. |
| HCC | Outline tag for risk adjustment. |
| readOnly | Hides the add picker. |
Accessibility
- Code and words both shown.
Do and don't
- Do: Keep resolved problems for history.
- Don't: Free-text problems without a code.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items * | ProblemItem[] | — | Array<{code, label, onset?, by?, chronic?, hcc?, status?}>; required |
icdOptions | ProblemCodeOption[] | [] | Array<{code,label}> for the Add problem picker |
readOnly | boolean | false | Hides the Add problem picker |
filter | ProblemFilter | undefined (uncontrolled) | Status filter (controlled): 'active' | 'resolved' | 'all' |
defaultFilter | ProblemFilter | 'active' | Initial status filter (uncontrolled) |
onFilterChange | (filter: ProblemFilter) => void | none | Called when the filter changes |
onAdd | ICD10Select | none | Called with the code picked in Add problem |
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-problem-list>. 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-problem-list read-only filter="…" [items]="items" (co-filter-change)="onFilterChange($event.detail)"></co-problem-list>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | items | Array<{code, label, onset?, by?, chronic?, hcc?, status?}>; required |
| property / JSON attribute | icd-options / icdOptions | Array<{code,label}> for the Add problem picker; default [] |
| attribute | read-only / readOnly | Hides the Add problem picker; default false |
| attribute | filter | Status filter (controlled): 'active' | 'resolved' | 'all'; default undefined (uncontrolled) |
| attribute | default-filter / defaultFilter | Initial status filter (uncontrolled); default 'active' |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-filter-change | Called when the filter changes; default none (React: onFilterChange) |
| event | co-add | Called with the code picked in Add problem; default none (React: onAdd) |