# Using Defining Relationships

SNOMED CT attributes are used to represent a characteristic of the meaning of a concept. There are more than 50 attributes in SNOMED CT, which can each be used as the 'type' of a defining relationship, including:

* 363698007|finding site|
* 116676008|associated morphology|
* 246075003|causative agent|
* 363704007|procedure site|
* 260686004|method|
* 272741003|laterality|
* 127489000|has active ingredient|

The SNOMED CT Concept Model provides rules about how these attributes can be used. Some database queries use the rules from the SNOMED CT Concept Model to match concepts based on the value of their defining relationships.

## Example

The following figure illustrates the execution of a query to retrieve a set of findings which have a benign tumor morphology. The query is executed by finding those concepts with an 'associated morphology' relationship with the value 'benign neoplasm'. In this example, the concepts 'benign tumor of kidney', 'benign neoplasm of bladder' and 'benign tumor of lung' are found to have the required defining relationship value.

<figure><img src="/files/vY2X4kOBMsPqercuQUPl" alt=""><figcaption><p>Figure: Query to retrieve benign neoplasm findings</p></figcaption></figure>

In the following figure the same set of concepts are shown analyzed with the intention to identify those which have a finding site of kidney. In this example, the concepts 'renal cyst', 'benign tumor of kidney' and 'renal abscess' are found to have the required defining relationship value.

<figure><img src="/files/xldSjb3xoBpPCPStyRri" alt=""><figcaption><p>Figure: Query to retrieve findings in the kidney</p></figcaption></figure>

If the queries from the following figures are combined, then the query will return those concepts which are benign tumors of the kidney (see Figure above). In this case, the concept 'benign tumor of kidney' is the only concept found to have the required defining relationship values.

<figure><img src="/files/WOiSwXIJtPl9FSuSjXcV" alt=""><figcaption><p>Figure 6.3-3: Query to retrieve benign neoplasms of the kidney</p></figcaption></figure>

In most cases, these queries would be designed to return concepts with an associated morphology of 'benign neoplasm' *or any subtype of* 'benign neoplasm (e.g. 'angiomyolipoma'), and a finding site of 'kidney' *or any subtype of* 'kidney' (e.g. 'papillary duct of kidney', or 'upper pole, left kidney'). This query could be expressed using the Expression Constraint Language as:

{% code title="ECL example" %}

```
< 404684003 |clinical finding|:
116676008|associated morphology| = << 3898006 |benign neoplasm| AND
363698007|finding site| = << 64033007 |kidney structure|
```

{% endcode %}

When executed against the January 31st 2015 international edition of SNOMED CT, this query would return the following 12 concepts:

| Concept ID | Preferred Term                         |
| ---------- | -------------------------------------- |
| 254925008  | Benign tumor of renal calyx            |
| 254919009  | Cortical adenoma of kidney             |
| 269489006  | Benign tumor of renal parenchyma       |
| 254920003  | Cystadenoma of kidney                  |
| 254922006  | Oncocytoma of kidney                   |
| 276866009  | Benign tumor of pelviureteric junction |
| 254927000  | Benign papilloma of renal pelvis       |
| 92319008   | Benign neoplasm of renal pelvis        |
| 307618001  | Juxtaglomerular tumor                  |
| 254923001  | Hemangiopericytoma of kidney           |
| 254921004  | Angiomyolipoma of kidney               |
| 92165001   | Benign neoplasm of kidney              |

## Implementation

### Queries Over Defining Relationships

A query, which constrains the defining relationships of matching clinical meanings to specific values can either be represented informally using a set of attribute value pairs, or represented more formally using a machine processable language (e.g. the SNOMED CT Expression Constraint Language).

Approaches to implement such a query include:

* Using the distributed relationships

In this approach, the distributed Relationship file is used directly to compare the target value of each defining relationship with the required attribute value in the query. This approach may be combined with a subsumption testing approach (e.g. transitive closure table) to enable subtypes of the required attribute value to also be matched.

* Comparing normal form expressions

In this approach, the query is represented as a predicate expression containing the constrained attribute values, and the short normal form of this predicate expression is tested for subsumption against each candidate expression (as per the normal form subsumption test).

* Using a Description Logic Reasoner

In this approach, a description logic reasoner (e.g. Snorocket, ELK, Fact++) is used to determine whether each candidate expression is subsumed by the query (represented by a predicate expression).

### Case Studies

Many organization-wide implementations of SNOMED CT, such as Kaiser Permanente's HealthConnect EHR and the Danish National Medication Decision Support System, are taking advantage of SNOMED CT's definitional attributes to support advanced analytics.

A number of vendor products are also supporting analytics over SNOMED CT's defining relationships, including Apelon's Distributed Terminology System, B2i Healthcare's SnowOwl terminology server, and Cerner's Semantic Search tool.

***

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=Data+Analytics+Guide&#x26;entry.670899847=Using%20Defining%20Relationships" 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-practical-guides/snomed-ct-data-analytics-guide/6-snomed-ct-analytic-techniques/6.3-using-defining-relationships.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.
