CodeDisplay
BasicClinical values
<co-code-display>CodeDisplay shows a clinical or billing code with its code system label and description: ICD-10-CM, CPT, HCPCS, LOINC, SNOMED CT, RxNorm and NDC.
import { CodeDisplay } from 'health-components';
Examples
Systems
Without System
Usage
<CodeDisplay system="icd10" code="E119" display="Type 2 diabetes mellitus without complications" />
When to use
- Problem list, claim lines, order details, result headers, medication details.
When not to use
- Code search and pick: Combobox.
Variants and states
| Variant | What it is |
|---|---|
| inline | System tag, code, description on one line. |
| stacked | Tag and code above, description below. |
| no system | showSystem={false} in single-system tables. |
| inactive | Amber Inactive code note. |
| normalised | ICD-10 gets its dot (E119 to E11.9); 11-digit NDC shows 5-4-2. |
Accessibility
- The system tag is an abbr whose title is the FHIR system URI.
Do and don't
- Do: Show the system: 99213 alone is ambiguous.
- Don't: Print full CPT descriptors without an AMA licence; use your licensed short text.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
system * | CodeDisplaySystem | — | 'icd10' | 'cpt' | 'hcpcs' | 'loinc' | 'snomed' | 'rxnorm' | 'ndc'; required |
code * | string | — | The code; ICD-10 gets its dot and an 11-digit NDC shows 5-4-2; required |
display | string | none | Description (use licensed short text for CPT) |
variant | CodeDisplayVariant | 'inline' | 'inline' (tag, code, description on one line) | 'stacked' (description below) |
showSystem | boolean | true | Shows the system tag |
status | 'active' | 'inactive' | 'active' | 'active' | 'inactive' (amber Inactive code note) |
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-code-display>. 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-code-display system="…" code="…" [defaultValue]="defaultValue"></co-code-display>
| Kind | Name | Description |
|---|---|---|
| attribute | system | 'icd10' | 'cpt' | 'hcpcs' | 'loinc' | 'snomed' | 'rxnorm' | 'ndc'; required |
| attribute | code | The code; ICD-10 gets its dot and an 11-digit NDC shows 5-4-2; required |
| attribute | display | Description (use licensed short text for CPT); default none |
| attribute | variant | 'inline' (tag, code, description on one line) | 'stacked' (description below); default 'inline' |
| attribute | show-system / showSystem | Shows the system tag; default true |
| attribute | status | 'active' | 'inactive' (amber Inactive code note); default 'active' |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus |