Skip to main content

ProblemListEditor

ComplexChart panels<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​

Storybook

No Map​

Storybook

Read Only​

Storybook

Empty​

Storybook

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​

VariantWhat it is
one matchGreen: the map gives one ICD-10 code. Still a candidate until the clinician signs.
pick codeAmber: several candidates; editing shows them as radios with the map rule.
pickedBlue: a person chose the code.
no mapRed: pick by hand or choose a more specific concept.
editingCandidates and status (Active, Inactive, Resolved, Entered in error).
emptyEmpty state.
readOnlyNo 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​

PropTypeDefaultDescription
itemsProblemListEditorItem[]none (empty state)Initial problems; the editor keeps its own copy
onItemsChange(items: ProblemListEditorItem[]) => voidnoneCalled with the problems after every change (code picked, status changed)
editingnumberuncontrolledIndex of the problem being edited (controlled), -1 for none
defaultEditingnumber-1 (none)Index of the problem open for editing at first
onEditingChange(index: number) => voidnoneCalled when a problem opens or closes for editing
onAdd() => voidnoneCalled by Add Problem (open your SNOMED CT search)
readOnlybooleanfalseNo edit buttons
rangeContextRangeContextIdthe 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.

Angular template
<co-problem-list-editor editing="…" default-editing="…" [items]="items" (co-items-change)="onItemsChange($event.detail)"></co-problem-list-editor>
KindNameDescription
property / JSON attributeitemsInitial problems; the editor keeps its own copy; default none (empty state)
attributeeditingIndex of the problem being edited (controlled), -1 for none; default uncontrolled
attributedefault-editing / defaultEditingIndex of the problem open for editing at first; default -1 (none)
attributeread-only / readOnlyNo edit buttons; default false
attributerange-context / rangeContextWhich shared reference range flags use; the lab range on a result still wins; default the global context, else 'outpatient'
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-items-changeCalled with the problems after every change (code picked, status changed); default none (React: onItemsChange)
eventco-editing-changeCalled when a problem opens or closes for editing; default none (React: onEditingChange)
eventco-addCalled by Add Problem (open your SNOMED CT search); default none (React: onAdd)