# Code to Expression Reference Set

## Purpose

The [705109006 |Code to expression type reference set|](http://snomed.info/id/705109006) is designed to enable associations between codes in another code system (other-codes) and SNOMED CT concepts, where the following constraints apply:

1. Some of the other-codes cannot be mapped to an individual SNOMED CT concept.
2. Licensing conditions (or other considerations) prevent addition of new SNOMED CT concepts to represent the same meaning as the other-codes.
3. The other-codes can be logically defined using the SNOMED concept model to represent the same meaning (sufficiently defined) or a similar though less specific meaning (primitive).
4. Other requirements similar for those applicable to mapping may also apply including:
   1. An indication of the degree of correlation between the other-code and the SNOMED CT expression.
   2. An indication of whether the other-code was created before any single concept representation of that meaning in SNOMED CT or whether the single concept representation in SNOMED CT predated the creation of the association.

## Data Structure

The general approach to the above requirements is to associate each of the other-codes with a representation of the same logic based definition as would have been applied to a SNOMED CT concept with that meaning. However, since the other-code are not identified by an SCTID, the logical definition cannot be represented using defining relationships. There are two potential approaches to this, one would be to use a general purpose description logic language (e.g. OWL) and the other is to use a SNOMED CT expression to represent each definition. The [|Code to expression type reference set|](http://snomed.info/id/705109006) is designed to support the expression-based approach.

**Code to Expression Reference Set - Data structure**

<table data-full-width="true"><thead><tr><th>Field</th><th>Data type</th><th>Purpose</th><th>Mutable</th><th>PK*</th></tr></thead><tbody><tr><td>id</td><td>UUID</td><td><p>A 128 bit unsigned Integer, uniquely identifying this reference set member.</p><p>Different versions of a <em>reference set member</em> share the same id but have different effectiveTime. This allows a <em>reference set member</em> to be modified or made inactive (i.e. removed from the active set) at a specified time.</p></td><td><strong>NO</strong></td><td><strong>YES</strong><br>(Full /Snapshot)</td></tr><tr><td>effectiveTime</td><td>Time</td><td><p>The inclusive date or time at which this version of the identified reference set member became the current version.</p><p><strong>Note</strong>: In distribution files the effectiveTime should follow the short ISO date format (<em>YYYYMMDD</em>) and should not include the hours, minutes, seconds or timezone indicator.</p><p>The current version of this reference set member at time <em>T</em> is the version with the most recent effectiveTime prior to or equal to time <em>T</em>.</p></td><td><strong>YES</strong></td><td><p><strong>YES</strong><br>(Full)</p><p>Optional (Snapshot)</p></td></tr><tr><td>active</td><td>Boolean</td><td><p>The state of the identified reference set member as at the specified effectiveTime .</p><p>If active = 1 (true) the reference set member is part of the current version of the set, if active = 0 (false) the reference set member is not part of the current version of the set.</p></td><td><strong>YES</strong></td><td><strong>NO</strong></td></tr><tr><td>moduleId</td><td>SCTID</td><td><p>Identifies the SNOMED CT module that contains this reference set member as at the specified effectiveTime.</p><p>The value must be a subtype of <a href="http://snomed.info/id/900000000000443000">900000000000443000 |Module (core metadata concept)|</a> within the metadata hierarchy.</p></td><td><strong>YES</strong></td><td><strong>NO</strong></td></tr><tr><td>refsetId</td><td>SCTID</td><td><p>Identifies the reference set to Identifies the reference set to which this reference set member belongs.</p><p>In this case, a subtype descendant of: <a href="http://snomed.info/id/705109006">705109006 |Code to expression type reference set|</a></p></td><td><strong>NO</strong></td><td><strong>NO</strong></td></tr><tr><td>referencedComponentId</td><td>SCTID</td><td><p>A reference to the SNOMED CT component to be included in the reference set.</p><p>A subtype of <a href="http://snomed.info/id/705113004">705113004 |Terminology system|</a> identifying the code system from which the code in the <a href="/pages/tFko6tvXODLYIEYP9Q0t">mapTarget</a> field is derived.</p><ul><li>For example: <a href="http://snomed.info/id/705114005">705114005 |LOINC Code System|</a>.</li></ul></td><td><strong>NO</strong></td><td><strong>NO</strong></td></tr><tr><td>mapSource</td><td>String</td><td>The other-code which is mapped to the SNOMED CT expression.</td><td><strong>NO</strong></td><td><strong>NO</strong></td></tr><tr><td>expression</td><td>String</td><td><p>A SNOMED CT expression that represents the meaning of the other-code. This expression may be a stated or inferred view of the definition provided that documentation of each identified reference set specifies the view provided.</p><p>The expression must conform to the syntax defined in the <a href="/spaces/VgpC90r7t9DyATri97GG">SNOMED CT Compositional Grammar - Specification and Guide</a>.</p></td><td><strong>YES</strong></td><td><strong>NO</strong></td></tr><tr><td>definitionStatusId</td><td>SCTID</td><td><p>Indicates whether or not the expression contains a sufficient definition of the other-code in the mapSource field.<br>Possible values are the following subtypes of <a href="http://snomed.info/id/900000000000444006">900000000000444006 |Definition status|</a> :</p><ul><li><a href="http://snomed.info/id/900000000000074008">900000000000074008 |Not sufficiently defined by necessary conditions definition status|</a></li><li><a href="http://snomed.info/id/900000000000073002">900000000000073002 |Sufficiently defined by necessary conditions definition status|</a></li></ul></td><td><strong>YES</strong></td><td><strong>NO</strong></td></tr><tr><td>correlationId</td><td>SCTID</td><td><p>The correlation between the other-code and the SNOMED CT expression. Possible values are the following subtypes of <a href="http://snomed.info/id/1193546000">1193546000 |Map source to map target correlation (foundation metadata concept)|</a> :</p><ul><li><a href="http://snomed.info/id/1193552004">1193552004 |Map source to map target correlation not specified|</a></li><li><a href="http://snomed.info/id/1193551006">1193551006 |Map source not mappable to map target|</a></li><li><a href="http://snomed.info/id/1193550007">1193550007 |Partial overlap between map source and target|</a></li><li><a href="http://snomed.info/id/1193549007">1193549007 |Narrow map source to broad map target|</a></li><li><a href="http://snomed.info/id/1193548004">1193548004 |Exact match between map source and map target|</a></li><li><a href="http://snomed.info/id/1193547009">1193547009 |Broad map source to narrow map target|</a></li></ul><p>When these values are applied to this reference set type, the phrase "<em>map source</em>" refers to the other-code. and the "<em>map target</em>" refers to the SNOMED CT expression.</p></td><td><strong>YES</strong></td><td><strong>NO</strong></td></tr><tr><td>contentOriginId</td><td>SCTID</td><td>Indication of whether the concept was initially in one of the terminologies (SNOMED CT or other-codes) and added to the other as part of mapping or was in both terminologies at the outset. Values are subtypes of <a href="http://snomed.info/id/705116007">705116007 |Original code system source for linked content value|</a>.</td><td><strong>YES</strong></td><td><strong>NO</strong></td></tr></tbody></table>

{% hint style="info" %}
PK\* indicates if the attribute is part of the primary key for that file/table.
{% endhint %}

***

## Metadata

The following metadata hierarchy supports this reference set:

**Code to Expression Reference Set in the Metadata Hierarchy**

> [900000000000454005 |Foundation metadata concept|](http://snomed.info/id/900000000000454005)\
> [900000000000455006 |Reference set|](http://snomed.info/id/900000000000455006)\
> [705109006 |Code to expression type reference set|](http://snomed.info/id/705109006)

***

## Reference Set Descriptor and Example Data

{% hint style="info" %}
**Notes on the tables used to show descriptors and examples**

The reference set example tables on this page have been revised as follows to aid clarity and understanding:

* The first four columns which are present in all release files are not shown. The omitted columns (id, effectiveTime, active, moduleId) are used in the same way in all referenced sets to support identification, versioning and packaging. They do not directly affect the specific features of a particular reference set or reference set type.
* Reference set columns that contain SNOMED CT identifiers are expanded to show details of the concept or description referenced by that identifier. In some cases, the term is shown in the same column using the expression syntax, in other cases an additional column with a name suffix '\_term' has been added. In the standard reference set files only the identifier is present in the column and there is no added column for the term. When using reference sets, the term and other details of the component are looked up from the relevant component release files.
  {% endhint %}

#### Descriptor template and examples

The tables below show the descriptors that define examples of reference sets that follow the [705109006 |Code to expression type reference set (foundation metadata concept)|](http://snomed.info/id/705109006) pattern.

**Refset Descriptor rows for a Code to Expression Reference Set**

<table data-full-width="true"><thead><tr><th>refsetId</th><th>referencedComponentId (Referenced component)</th><th>attributeDescription (Attribute description)</th><th>attributeType (Attribute type)</th><th>attributeOrder (Attribute order)</th></tr></thead><tbody><tr><td><a href="http://snomed.info/id/900000000000456007">900000000000456007 |Reference set descriptor|</a></td><td><a href="http://snomed.info/id/705109006">705109006 |Code to expression type reference set|</a></td><td><a href="http://snomed.info/id/449608002">449608002 |Referenced component|</a></td><td><a href="http://snomed.info/id/900000000000461009">900000000000461009 |Concept type component|</a></td><td>0</td></tr><tr><td><a href="http://snomed.info/id/900000000000456007">900000000000456007 |Reference set descriptor|</a></td><td><a href="http://snomed.info/id/705109006">705109006 |Code to expression type reference set|</a></td><td><a href="http://snomed.info/id/900000000000505001">900000000000505001 |Map target|</a></td><td><a href="http://snomed.info/id/900000000000465000">900000000000465000 |String|</a></td><td>1</td></tr><tr><td><a href="http://snomed.info/id/900000000000456007">900000000000456007 |Reference set descriptor|</a></td><td><a href="http://snomed.info/id/705109006">705109006 |Code to expression type reference set|</a></td><td><a href="http://snomed.info/id/706999006">706999006 |Expression|</a></td><td><a href="http://snomed.info/id/706999006">706999006 |Expression|</a></td><td>2</td></tr><tr><td><a href="http://snomed.info/id/900000000000456007">900000000000456007 |Reference set descriptor|</a></td><td><a href="http://snomed.info/id/705109006">705109006 |Code to expression type reference set|</a></td><td><a href="http://snomed.info/id/734867002">734867002 |Expression definition status|</a></td><td><a href="http://snomed.info/id/900000000000461009">900000000000461009 |Concept type component|</a></td><td>3</td></tr><tr><td><a href="http://snomed.info/id/900000000000456007">900000000000456007 |Reference set descriptor|</a></td><td><a href="http://snomed.info/id/705109006">705109006 |Code to expression type reference set|</a></td><td><a href="http://snomed.info/id/447247004">447247004 |SNOMED CT source code to target map code correlation value|</a></td><td><a href="http://snomed.info/id/900000000000461009">900000000000461009 |Concept type component|</a></td><td>4</td></tr><tr><td><a href="http://snomed.info/id/900000000000456007">900000000000456007 |Reference set descriptor|</a></td><td><a href="http://snomed.info/id/705109006">705109006 |Code to expression type reference set|</a></td><td><a href="http://snomed.info/id/705116007">705116007 |Original code system source for linked content value|</a></td><td><a href="http://snomed.info/id/900000000000461009">900000000000461009 |Concept type component|</a></td><td>5</td></tr></tbody></table>

***

#### Refset Examples

**Sample Content from a Code to Expression Type Reference Set**

<table data-full-width="true"><thead><tr><th>refsetId</th><th>referencedComponentId</th><th>mapSource</th><th>expression</th><th>definitionStatusId</th><th>correlationId</th><th>contentOriginId</th></tr></thead><tbody><tr><td><a href="http://snomed.info/id/705110001">705110001 |LOINC Term to Expression reference set|</a></td><td><a href="http://snomed.info/id/705114005">705114005 |LOINC Code System|</a></td><td>48023-6</td><td>363787002:246093002=720113009,370134009=123029007,246501002=702675006,704327008=122592007,370132008=117363000,704319004=50863008,704318007=705057003</td><td><a href="http://snomed.info/id/900000000000073002">900000000000073002 |Sufficiently defined by necessary conditions definition status|</a></td><td><a href="http://snomed.info/id/447557004">447557004 |Exact match map from SNOMED CT source code to target code|</a></td><td><a href="http://snomed.info/id/705117003">705117003 |Originally in LOINC|</a></td></tr><tr><td><a href="http://snomed.info/id/705110001">705110001 |LOINC Term to Expression reference set|</a></td><td><a href="http://snomed.info/id/705114005">705114005 |LOINC Code System|</a></td><td>51406-7</td><td>363787002:704323007=123027009,704321009=718500008,704327008=122575003,704322002=64033007,704318007=118544000,370132008=30766002,704324001=706939009</td><td><a href="http://snomed.info/id/900000000000073002">900000000000073002 |Sufficiently defined by necessary conditions definition status|</a></td><td><a href="http://snomed.info/id/447557004">447557004 |Exact match map from SNOMED CT source code to target code|</a></td><td><a href="http://snomed.info/id/705117003">705117003 |Originally in LOINC|</a></td></tr><tr><td><a href="http://snomed.info/id/705110001">705110001 |LOINC Term to Expression reference set|</a></td><td><a href="http://snomed.info/id/705114005">705114005 |LOINC Code System|</a></td><td>51406-7</td><td>363787002:370134009=123029007,704327008=122592007,704318007=118556004,370132008=30766002,704319004=50863008,246093002=4546008</td><td><a href="http://snomed.info/id/900000000000073002">900000000000073002 |Sufficiently defined by necessary conditions definition status|</a></td><td><a href="http://snomed.info/id/447557004">447557004 |Exact match map from SNOMED CT source code to target code|</a></td><td><p><br></p><p><a href="http://snomed.info/id/705117003">705117003 |Originally in LOINC|</a></p></td></tr><tr><td><a href="http://snomed.info/id/705110001">705110001 |LOINC Term to Expression reference set|</a></td><td><a href="http://snomed.info/id/705114005">705114005 |LOINC Code System|</a></td><td>59878-9</td><td>363787002:370134009=123029007,704327008=258459007,704318007=118556004,246093002=273948005,370132008=30766002,704319004=31773000</td><td><a href="http://snomed.info/id/900000000000073002">900000000000073002 |Sufficiently defined by necessary conditions definition status|</a></td><td><a href="http://snomed.info/id/447557004">447557004 |Exact match map from SNOMED CT source code to target code|</a></td><td><p><br></p><p><a href="http://snomed.info/id/705117003">705117003 |Originally in LOINC|</a></p></td></tr><tr><td><a href="http://snomed.info/id/705110001">705110001 |LOINC Term to Expression reference set|</a></td><td><a href="http://snomed.info/id/705114005">705114005 |LOINC Code System|</a></td><td>51921-5</td><td>363787002:704318007=118539007,370134009=123029007,704326004=703765007,704327008=122592007,370132008=30766002,704319004=50863008,246093002=387067003</td><td><a href="http://snomed.info/id/900000000000073002">900000000000073002 |Sufficiently defined by necessary conditions definition status|</a></td><td><a href="http://snomed.info/id/447557004">447557004 |Exact match map from SNOMED CT source code to target code|</a></td><td><a href="http://snomed.info/id/705117003">705117003 |Originally in LOINC|</a></td></tr></tbody></table>

***

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=Release+File+Specification&#x26;entry.670899847=Code%20to%20Expression%20Reference%20Set" class="button primary">Provide Feedback</a>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snomed.org/snomed-ct-specifications/snomed-ct-release-file-specification/reference-set-release-file-specification/5.2-reference-set-types/5.2.3-map-reference-sets/5.2.3.5-code-to-expression-reference-set.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
