> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omophub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Mapping Quality

> Measure concept coverage and mapping composition for one directed vocabulary pair.

Measure how many valid concepts in a source vocabulary have at least one valid
relationship to a valid concept in a target vocabulary. The pair is directed:
`SNOMED` → `ICD10CM` and `ICD10CM` → `SNOMED` have different source
populations and can produce different results.

## Parameters

**source\_vocabulary** `string` *required*

Source vocabulary identifier, such as `ICD10CM`, `SNOMED`, or `RxNorm`.

**target\_vocabulary** `string` *required*

Target vocabulary identifier, such as `SNOMED`, `ICD10CM`, or `ATC`.

**vocab\_release** `string`

Vocabulary release to query, for example `2025.2`. The current default release
is used when omitted.

## How the metrics are calculated

* `total_concepts` is the number of valid concepts in `source_vocabulary`.
* `mapped_concepts` is the number of those distinct source concepts with at
  least one valid relationship to a valid concept in `target_vocabulary`.
* `coverage_percentage` is
  `100 × mapped_concepts / total_concepts` (or `0` when the source has no valid
  concepts).
* Each mapped source concept contributes exactly once to `mapping_types`. If a
  source has several relationships or target concepts, its best available type
  wins in this order: `direct`, `equivalent`, `hierarchical`, `other`.
  Consequently, the type counts always sum to `mapped_concepts`; percentages
  use `mapped_concepts` as their denominator and sum to 100 when mappings exist.

The integer `quality_score` is a heuristic summary, rounded to the nearest
whole number:

```text theme={null}
50 × coverage_fraction
+ 30 × direct_mapping_fraction
+ 20 × min(number_of_mapping_types / 4, 1)
```

Coverage therefore contributes up to 50 points, the share classified as
`direct` contributes up to 30, and mapping-type diversity contributes up to 20.
Use the underlying metrics—not this heuristic alone—for clinical or ETL
decisions.

## Response

**success** `boolean` *required*

Whether quality analysis completed.

**data** `object` *required*

Mapping quality metrics and issues.

**meta** `object` *required*

Request and vocabulary-release metadata.

**meta.request\_id** `string` *required*

Correlation identifier for this request.

**meta.timestamp** `string` *required*

ISO 8601 response timestamp.

**meta.vocab\_release** `string` *required*

Vocabulary release used to calculate the metrics.

**data.source\_vocabulary** `string` *required*

Requested source vocabulary.

**data.target\_vocabulary** `string` *required*

Requested target vocabulary.

**data.total\_concepts** `integer` *required*

Valid source concepts; denominator of `coverage_percentage`.

**data.mapped\_concepts** `integer` *required*

Distinct mapped source concepts; numerator of `coverage_percentage` and sum of
all `mapping_types[].count` values.

**data.coverage\_percentage** `number` *required*

Percentage of valid source concepts mapped to the target vocabulary, from 0 to
100\.

**data.mapping\_types** `array` *required*

Mutually exclusive breakdown of mapped source concepts by best mapping type.

**Mapping type**

**type** `string` *required*

`direct`, `equivalent`, `hierarchical`, or `other`.

**count** `integer` *required*

Distinct source concepts assigned to this type.

**percentage** `number` *required*

`100 × count / mapped_concepts`.

**data.quality\_score** `integer` *required*

Rounded 0–100 heuristic composed of coverage (50%), direct mapping share
(30%), and mapping-type diversity (20%).

**data.issues** `array` *required*

Detected coverage concerns. An `Unmapped concepts` item reports
`total_concepts - mapped_concepts`, with severity based on the unmapped share.

**Issue**

**issue\_type** `string` *required*

**count** `integer` *required*

**severity** `string` *required*

`low`, `medium`, or `high`.

**examples** `array` *required*

```bash theme={null}
curl -H "Authorization: Bearer $OMOPHUB_API_KEY" \
  "https://api.omophub.com/v1/mappings/quality/ICD10CM/SNOMED?vocab_release=2025.2"
```

```json theme={null}
{
  "success": true,
  "data": {
    "source_vocabulary": "ICD10CM",
    "target_vocabulary": "SNOMED",
    "total_concepts": 98186,
    "mapped_concepts": 97707,
    "coverage_percentage": 99.51215040840853,
    "mapping_types": [
      { "type": "direct", "count": 97305, "percentage": 99.58856581411773 },
      { "type": "other", "count": 402, "percentage": 0.4114341858822807 }
    ],
    "quality_score": 90,
    "issues": [
      {
        "issue_type": "Unmapped concepts",
        "count": 479,
        "severity": "low",
        "examples": []
      }
    ]
  },
  "meta": {
    "request_id": "req_01HXYZ",
    "timestamp": "2026-09-11T12:00:00.000Z",
    "vocab_release": "2025.2"
  }
}
```

> [!NOTE]
>
> Counts depend on the selected vocabulary release. The example illustrates the
> response shape; query the endpoint for current release-specific values.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.