ProblemListEditor
<co-problem-list-editor>ProblemListEditor records problems as SNOMED CT concepts and shows the ICD-10-CM codes the map table offers, so a person picks the billable code the note supports.
import { ProblemListEditor } from 'health-components';
Examples
Showcase
No Map
Read Only
Empty
Usage
<ProblemListEditor items={problems} />
When to use
- Problem list upkeep, assessment and plan, risk adjustment review.
When not to use
- Read-only display: ProblemList. Claim diagnosis entry: ICD10Picker.
Variants and states
| Variant | What it is |
|---|---|
| one match | Green: the map gives one ICD-10 code. Still a candidate until the clinician signs. |
| pick code | Amber: several candidates; editing shows them as radios with the map rule. |
| picked | Blue: a person chose the code. |
| no map | Red: pick by hand or choose a more specific concept. |
| editing | Candidates and status (Active, Inactive, Resolved, Entered in error). |
| empty | Empty state. |
| readOnly | No edit buttons. |
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
- Candidates are a fieldset of radios with a legend.
- Map state is in words, not only colour.
Do and don't
- Do: Show the map rule (age, laterality) next to each candidate.
- Don't: Pick the ICD-10 code for the clinician automatically when several fit.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | ProblemListEditorItem[] | none (empty state) | Initial problems; the editor keeps its own copy |
onItemsChange | (items: ProblemListEditorItem[]) => void | none | Called with the problems after every change (code picked, status changed) |
editing | number | uncontrolled | Index of the problem being edited (controlled), -1 for none |
defaultEditing | number | -1 (none) | Index of the problem open for editing at first |
onEditingChange | (index: number) => void | none | Called when a problem opens or closes for editing |
onAdd | () => void | none | Called by Add Problem (open your SNOMED CT search) |
readOnly | boolean | false | No edit buttons |
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-problem-list-editor>. 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-problem-list-editor editing="…" default-editing="…" [items]="items" (co-items-change)="onItemsChange($event.detail)"></co-problem-list-editor>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | items | Initial problems; the editor keeps its own copy; default none (empty state) |
| attribute | editing | Index of the problem being edited (controlled), -1 for none; default uncontrolled |
| attribute | default-editing / defaultEditing | Index of the problem open for editing at first; default -1 (none) |
| attribute | read-only / readOnly | No edit buttons; default false |
| 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-items-change | Called with the problems after every change (code picked, status changed); default none (React: onItemsChange) |
| event | co-editing-change | Called when a problem opens or closes for editing; default none (React: onEditingChange) |
| event | co-add | Called by Add Problem (open your SNOMED CT search); default none (React: onAdd) |