> 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/snomed-ct-practical-guides/snomed-ct-data-analytics-guide/8-data-architectures/8.3-virtual-health-record.md).

# Virtual Health Record

A Virtual Health Record (VHR) provides a virtual view of heterogeneous data sources, using a common data model. In contrast to the data warehousing approach in which heterogeneous data is extracted, transformed and stored in a homogeneous form, the VHR approach does not require clinical data to be extracted from existing data stores. Instead, logical queries are defined in terms of a common data model and then transformed into a set of physical queries which can each be executed locally on an individual data store. The following figure illustrates an architecture which supports querying over a VHR.

<figure><img src="https://2092697212-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuKngFry3XF9A8phdXFe8%2Fuploads%2Fgit-blob-7f6e7ed4c209c4ae78fba50b2739bbcca4db3ae9%2F123898466.png?alt=media" alt=""><figcaption><p>Figure 8.3-1: Querying using a Virtual Health Record</p></figcaption></figure>

The process of transforming the logical query into separate physical queries may involve translating:

* *The Query Language* – from a common query language to the local data store's native query language
* *Data Model References* – from the common data model to the local data model
* *Terminology References* – from the standard terminology to the local code system

For example, if the user poses the following SQL query, written in terms of the VHR's common data model, to select those patients with a diagnosis that is a subtype of 40733004 |infectious disease|:

SELECT patient\_id FROM Health\_Records

WHERE diagnosis IN (<40733004 |infectious disease|)

This query may be translated into the following 3 queries for local execution on each data store:

Data Store A:

Patient\_record/patient\_id\[@diagnosis=typeOf(INF)]

Data Store B:

SELECT id FROM EHR NATURAL JOIN DSummary

WHERE discharge\_diagnosis IN (descendantsOf (40733004)

Data Store C:

SELECT patient FROM record

WHERE diag IN (<40733004)

Similarly, when the query results are returned by each data store, these need to be transformed and mapped into the common data model and then combined for presentation to the user.

The VHR approach provides an alternative architecture to a data warehouse for integrating heterogeneous systems. It is most commonly used when copying clinical data into a data warehouse is not possible (e.g. due to legislative requirements), or when the currency of the data is imperative. The challenges with this approach lie with the potential complexity of the transformations required. The implementation of this approach is considered to be a type of heterogeneous distributed database.

***

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=Data+Analytics+Guide&#x26;entry.670899847=Virtual%20Health%20Record" 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/snomed-ct-practical-guides/snomed-ct-data-analytics-guide/8-data-architectures/8.3-virtual-health-record.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.
