> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://imo.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://imo.ferndocs.com/_mcp/server.

# Code systems and mappings

An IMO lexical is a canonical clinical concept. Its value is the **mappings** it
carries: once a term resolves to a lexical, you get that concept expressed in
every code system your downstream systems need.

Mappings live on each matched item under `metadata.mappings`.

## Supported code systems

| Key                   | Code system                                |
| --------------------- | ------------------------------------------ |
| `icd10cm`             | ICD-10-CM — diagnoses                      |
| `icd9cm`              | ICD-9-CM — legacy diagnoses                |
| `icd10pcs`            | ICD-10-PCS — inpatient procedures          |
| `icdo`                | ICD-O — oncology morphology and topography |
| `snomedInternational` | SNOMED CT International edition            |
| `snomedUSExtension`   | SNOMED CT US Extension                     |
| `dsm5tr`              | DSM-5-TR — psychiatric diagnoses           |
| `loinc`               | LOINC — labs and observations              |
| `cpt`                 | CPT — outpatient procedures                |
| `hcpcs`               | HCPCS — supplies and services              |
| `rxnorm`              | RxNorm — medications                       |
| `ndc`                 | NDC — drug packages                        |
| `cvx`                 | CVX — vaccines                             |
| `umls`                | UMLS concept identifiers                   |
| `uscdi`               | USCDI profiles and value sets              |
| `fda_biosimilar`      | FDA biosimilar relationships               |
| `severity_mappings`   | SNOMED severity qualifiers                 |
| `reaction_mappings`   | SNOMED allergy reaction concepts           |

## Reading mappings

```json
{
  "lexical_code": "3763",
  "lexical_title": "Chest pain",
  "score": 1.0,
  "metadata": {
    "mappings": {
      "icd10cm": {
        "codes": [
          {
            "code": "R07.9",
            "title": "Chest pain, unspecified",
            "code_metadata": {
              "ccsr": [{ "category": "SYM006" }],
              "hcc": [{ "model": "V28", "hcc_factors": { "factor": "0.000" } }]
            }
          }
        ]
      },
      "snomedInternational": {
        "codes": [{ "code": "29857009", "title": "Chest pain" }]
      }
    }
  }
}
```

### Value-added metadata

Some systems carry extra structure worth knowing about:

* **`icd10cm`** — each code can include `ccsr` (AHRQ Clinical Classifications
  Software Refined categories) and `hcc` (Hierarchical Condition Categories with
  risk-adjustment factors). This is what makes risk-model work possible without a
  second vendor.
* **`rxnorm`** — includes `rxnorm_titles` for alternate drug naming.
* **`ndc`** — includes `ndc_metadata` with `route` and `pharm_class` arrays.
* **`cvx`** — includes both `cvx_metadata` and `mvx_metadata` (manufacturer).
* **`uscdi`** — `profiles[]` with `associated_codes`, for interoperability
  requirements.

## Clinical flags

`metadata.flags` describes how a lexical may be used:

| Flag                   | Meaning                                                                                                                                             |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `age_indicator`        | Age band the concept applies to — `Newborn (< 1)`, `Pediatric (0-17)`, `Adult (> 15)`, `Maternity (9-64)`, `Adolescent (10-19)`, `Geriatric (> 65)` |
| `sex_indicator`        | `M` or `F` when the concept is sex-specific                                                                                                         |
| `is_icd10cm_refinable` | The ICD-10-CM mapping can be refined to greater specificity                                                                                         |
| `is_chargeable`        | Valid for billing                                                                                                                                   |
| `is_historical`        | Retired or superseded content                                                                                                                       |
| `is_orderable`         | Can be ordered (labs, procedures)                                                                                                                   |
| `is_performable`       | Can be performed                                                                                                                                    |
| `is_resultable`        | Can carry a result                                                                                                                                  |
| `allergen_categories`  | Allergen classification, for the `Allergen` domain                                                                                                  |

> **Tip**
>
> `is_chargeable` and `is_icd10cm_refinable` are the two flags most revenue-cycle
> integrations key on. Filtering to `is_chargeable: true` before writing to a claim
> avoids downstream rejections.

## Discrepancy checking

Set `preferences.discrepancy_check: true` when you receive both a term and a code
and want to know whether they agree.

```json
{
  "lexical_code": "3763",
  "lexical_title": "Chest pain",
  "discrepancy": {
    "checked": true,
    "found": true,
    "type": "code_term_mismatch",
    "message": "The supplied input_code does not map to the same lexical as the input_term."
  }
}
```

This is how you catch upstream data-entry errors — a note saying `diabetes`
carrying a code for `hypertension` — before they propagate.

## Subdomains

`metadata.subdomains` narrows the clinical domain further (for example, within
`Problem`, distinguishing a symptom from a confirmed diagnosis). Use it when you
need finer routing than the six top-level domains provide.