> For the complete documentation index, see [llms.txt](https://docs.snomed.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](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). Agents can also search and read this documentation through its [MCP server](https://docs.snomed.org/~gitbook/mcp).

# 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="https://3095490862-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNsUpoYYIwAXcVvsqbyLS%2Fuploads%2Fgit-blob-d3691ec6314253d5d84969aab6e881bfed13148b%2F278301537.png?alt=media" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
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>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
