Skip to main content

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​

Storybook

Without System​

Storybook

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​

VariantWhat it is
inlineSystem tag, code, description on one line.
stackedTag and code above, description below.
no systemshowSystem={false} in single-system tables.
inactiveAmber Inactive code note.
normalisedICD-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​

PropTypeDefaultDescription
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
displaystringnoneDescription (use licensed short text for CPT)
variantCodeDisplayVariant'inline''inline' (tag, code, description on one line) | 'stacked' (description below)
showSystembooleantrueShows 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>
KindNameDescription
attributesystem'icd10' | 'cpt' | 'hcpcs' | 'loinc' | 'snomed' | 'rxnorm' | 'ndc'; required
attributecodeThe code; ICD-10 gets its dot and an 11-digit NDC shows 5-4-2; required
attributedisplayDescription (use licensed short text for CPT); default none
attributevariant'inline' (tag, code, description on one line) | 'stacked' (description below); default 'inline'
attributeshow-system / showSystemShows the system tag; default true
attributestatus'active' | 'inactive' (amber Inactive code note); default 'active'
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus