# Transformations between SWEC and FHIR

Transforming information between the SNOMED concept model and a FHIR representation is a clear use case for interoperability or analytics. Creating a set of rules to reproducibly perform these transformations safely in real-world scenarios is possible.

We represent these rules as a decision table to offer a clear and structured approach to handling the heterogeneity between terminologies and information models. Although the list provided is not exhaustive and serves only as an example, it effectively demonstrates the critical considerations and steps involved in the transformation process. This approach helps readers understand not just the theoretical aspects but also the practical implementation of transformation rules, enabling them to apply similar strategies within their own systems to achieve seamless interoperability.

#### Example of a set of transformation rules from SNOMED Situations to FHIR Resources

<table data-full-width="true"><thead><tr><th>Parent concepts in the Situation hierarchy</th><th>Context</th><th>Subject</th><th>Temporal</th><th>FHIR Resource</th><th>Presets for information model elements</th></tr></thead><tbody><tr><td><strong>417662000 |History of clinical finding in subject (situation)|</strong></td><td>Known present</td><td>Subject of record</td><td>In the past</td><td>Condition</td><td><em>clinicalStatus = inactive</em></td></tr><tr><td><strong>416471007 |Family history of clinical finding (situation)|</strong></td><td>Known present</td><td>Person in the family</td><td>Current or past</td><td>FamilyMemberHistory</td><td><em>relationship = &#x3C;&#x3C; 303071001 |Person in the family (person)|</em></td></tr><tr><td><strong>1260502004 |History of event in life of subject (situation)|</strong></td><td>Known present</td><td>Subject of record</td><td>In the past</td><td>Condition</td><td><em>clinicalStatus = inactive</em></td></tr><tr><td><strong>373572006 |Clinical finding absent (situation)|</strong></td><td>Known absent</td><td>Subject of record</td><td>Current or specified time</td><td>Observation</td><td><em>observation.code = associated finding</em><br><em>observation.value = known absent</em></td></tr><tr><td><strong>373573001 |Clinical finding present (situation)|</strong></td><td>Known present</td><td>Subject of record</td><td>Current</td><td>Condition</td><td><em>verificationStatus = confirmed</em></td></tr><tr><td><strong>443859009 |Possible clinical finding (situation)|</strong></td><td>Known possible</td><td>Subject of record</td><td>Current or specified time</td><td>Condition</td><td><em>verificationStatus = unconfirmed</em></td></tr></tbody></table>

To further illustrate the practical application of these transformation rules, we have developed a demonstration tool that performs real-time conversions from SNOMED CT to FHIR. This tool serves as a concrete example of how context information can be effectively translated between different models using a similar set of rules. It is open source, and the code is publicly available for anyone to review, use, or modify.

<https://ihtsdo.github.io/sct-implementation-demonstrator/#/context>

<figure><img src="/files/AVaOwb0QJtcqk12twvLg" alt=""><figcaption><p>Figure 6.3.2-1: A screenshot of the realtime transformation demonstration site</p></figcaption></figure>

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=Context+Representation+Guide&#x26;entry.670899847=Transformations%20between%20SWEC%20and%20FHIR" 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/implementation-guides/context-representation-implementation-guide/6-technical-application/6.3-context-representation-transformations/6.3.2-transformations-between-swec-and-fhir.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.
