<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.voror.co.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DavidStables</id>
	<title>Voror_Wiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.voror.co.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DavidStables"/>
	<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Special:Contributions/DavidStables"/>
	<updated>2026-10-23T19:49:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=6052</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=6052"/>
		<updated>2022-10-18T08:22:25Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
=Discovery Data Service status=&lt;br /&gt;
&lt;br /&gt;
* The data service is live.&lt;br /&gt;
* It currently stores and processes the data from 33.5 million linked organisational patient records in the UK.&lt;br /&gt;
* It contains long term records on 14.5 million unique UK citizens who have been resident in London at some point in the last 30 years (including people who have left or died).&lt;br /&gt;
* Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world&#039;s leading health ontologies.&lt;br /&gt;
* Data in Discovery is submitted by health providers who provide primary, secondary, and urgent care services to patients or clients.&lt;br /&gt;
* Data is kept up to date in close to real time - at worst within 24 hours; see [[Latency of extract data feeds]] for more details.&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of some initial projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
The [https://wiki.endeavourhealth.org/index.php?title=Welcome_to_the_Endeavour_Health_knowledge_base health information model services] are maintained as open source by the Endeavour health charitable trust. They use standard W3C semantic web languages to model health data, concepts, sets, and queries, thus maintaining compatibility with the main stream technologies. &lt;br /&gt;
&lt;br /&gt;
= Publishers and subscribers =&lt;br /&gt;
These articles provide some brief high level information for organisations that send data to Discovery and those that use that data.&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
*[[National data opt-out]] - includes information on the NHS national data opt-out and how this is applied in the Discovery Data Service.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery information services.&lt;br /&gt;
&lt;br /&gt;
* [[Discovery Query|Sextant]] - A data set distribution service with an option to post the data directly into the recipients database.&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place.&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5910</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5910"/>
		<updated>2022-02-27T18:55:42Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
=Discovery Data Service status=&lt;br /&gt;
&lt;br /&gt;
* The data service is live.&lt;br /&gt;
* It currently stores and processes the data from 28 million linked organisational patient records in the UK.&lt;br /&gt;
* It contains long term records on 14 million unique UK citizens who have been resident in London at some point in the last 30 years (including people who have left or died).&lt;br /&gt;
* Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world&#039;s leading health ontologies.&lt;br /&gt;
* Data in Discovery is submitted by health providers who provide primary, secondary, and urgent care services to patients or clients.&lt;br /&gt;
* Data is kept up to date in close to real time - at worst within 24 hours; see [[Latency of extract data feeds]] for more details.&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of some initial projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services, structure, and functionality&amp;amp;nbsp;that operate using the Information Models;&amp;amp;nbsp;one of the fundamental tenets of the Discovery Data Service. This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
*[https://wiki.endeavourhealth.org/index.php?title=Discovery_health_information_model Health Information model] - An overview of the approach to the Discovery information model,  the purpose, and type of content.&lt;br /&gt;
*[https://wiki.endeavourhealth.org/index.php?title=Health_Information_modelling_language_-_overview Modelling language] - The W3C standard languages used to build the various components of the information model&lt;br /&gt;
*[[Health_data_model_content|Basic health data set&amp;amp;nbsp;]] - a very high level overview of the types of data mapped from data held  within the Discovery data stores.&lt;br /&gt;
*[[Information model reference data|Reference data -]] an overview of additional data held in the information model.&lt;br /&gt;
*[[Mapping and matching concepts|Mapping and matching concepts and structures]] - Introduces the approaches to matching and mapping concepts and the structural mappings in the model&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services , such as APIs and apps that enable an model instance to be used or to implement an EHR based on the model or particular data model&lt;br /&gt;
&lt;br /&gt;
= Publishers and subscribers =&lt;br /&gt;
These articles provide some brief high level information for organisations that send data to Discovery and those that use that data.&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery information services.&lt;br /&gt;
&lt;br /&gt;
* [[Discovery Query|Sextant]] - A data set distribution service with an option to post the data directly into the recipients database.&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place.&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5909</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5909"/>
		<updated>2022-02-27T18:53:54Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: Replaced content with &amp;quot;Information on the health [https://wiki.endeavourhealth.org/index.php?title=Discovery_health_information_model#Information_model_language information language can be seen...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Information on the health [https://wiki.endeavourhealth.org/index.php?title=Discovery_health_information_model#Information_model_language information language can be seen at] this wiki article&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5908</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5908"/>
		<updated>2022-02-27T18:52:06Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
=Discovery Data Service status=&lt;br /&gt;
&lt;br /&gt;
* The data service is live.&lt;br /&gt;
* It currently stores and processes the data from 28 million linked organisational patient records in the UK.&lt;br /&gt;
* It contains long term records on 14 million unique UK citizens who have been resident in London at some point in the last 30 years (including people who have left or died).&lt;br /&gt;
* Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world&#039;s leading health ontologies.&lt;br /&gt;
* Data in Discovery is submitted by health providers who provide primary, secondary, and urgent care services to patients or clients.&lt;br /&gt;
* Data is kept up to date in close to real time - at worst within 24 hours; see [[Latency of extract data feeds]] for more details.&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of some initial projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services, structure, and functionality&amp;amp;nbsp;that operate using the Information Models;&amp;amp;nbsp;one of the fundamental tenets of the Discovery Data Service. This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
*[https://wiki.endeavourhealth.org/index.php?title=Discovery_health_information_model Health Information model] - An overview of the approach to the Discovery information model,  the purpose, and type of content.&lt;br /&gt;
*[https://wiki.endeavourhealth.org/index.php?title=Discovery_health_information_model#Information_model_language Modelling language] - The W3C standard languages used to build the various components of the information model&lt;br /&gt;
*[[Health_data_model_content|Basic health data set&amp;amp;nbsp;]] - a very high level overview of the types of data mapped from data held  within the Discovery data stores.&lt;br /&gt;
*[[Information model reference data|Reference data -]] an overview of additional data held in the information model.&lt;br /&gt;
*[[Mapping and matching concepts|Mapping and matching concepts and structures]] - Introduces the approaches to matching and mapping concepts and the structural mappings in the model&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services , such as APIs and apps that enable an model instance to be used or to implement an EHR based on the model or particular data model&lt;br /&gt;
&lt;br /&gt;
= Publishers and subscribers =&lt;br /&gt;
These articles provide some brief high level information for organisations that send data to Discovery and those that use that data.&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery information services.&lt;br /&gt;
&lt;br /&gt;
* [[Discovery Query|Sextant]] - A data set distribution service with an option to post the data directly into the recipients database.&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place.&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5907</id>
		<title>Discovery health information model</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5907"/>
		<updated>2022-02-27T18:50:15Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: Replaced content with &amp;quot;Up to date information on the [https://wiki.endeavourhealth.org/index.php?title=Discovery_health_information_model information mode]l can be seen at&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Up to date information on the [https://wiki.endeavourhealth.org/index.php?title=Discovery_health_information_model information mode]l can be seen at&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5813</id>
		<title>Discovery health information model</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5813"/>
		<updated>2021-09-27T11:53:14Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Mapping from published data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the approach taken to producing information models,  including ; what they are, what their purpose is, and what the technical components of the models are. &lt;br /&gt;
&lt;br /&gt;
The article does not include the content of any particular model. &lt;br /&gt;
&lt;br /&gt;
== What is the Discovery health information model (IM)? ==&lt;br /&gt;
The IM is a representation of the meaning and structure of data held in the electronic records of the health and social care sector, together with libraries of query, extract and mappings.&lt;br /&gt;
&lt;br /&gt;
It is an abstract logical model, not a physical structure or schema. As a logical model it models data that may be physically held any a variety of different types of data stores, including relational or graph data stores. Because the model is independent of the physical schemas, the model itself has to be interoperable and without any proprietary lock in.&lt;br /&gt;
&lt;br /&gt;
The IM is a broad model that integrates a set of different approaches to modelling using a common vocabulary. The components of the model are:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by  live systems that have published data, Note that  this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data,  that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are  expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records. &lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The remainder of this article considers how models and ontologies can be constructed using this approach.&lt;br /&gt;
&lt;br /&gt;
== What is different? ==&lt;br /&gt;
The main difference between the Discovery IM and other approaches is the harmonisation of the terms used in the conventional &#039;terminology&#039; domain and the terms used in the conventional &#039;data model&#039; domain. Both are considered part of the one ontology and the concepts often differ only in the approach to their definition.. &lt;br /&gt;
&lt;br /&gt;
For example, an encounter may be defined as an &amp;quot;interaction between a patient (or on behalf of the patient) and a health professional or health provider&amp;quot;.  The definition of an encounter with Description logic as a subclass with some properties can be produced using the open world OWL2 grammar.  &lt;br /&gt;
&lt;br /&gt;
However, an encounter can also be said to be a type of entry in a health record, as modelled in FHIR or openEHR.  From this perspective an encounter will be defined as a logical &#039;schema&#039; with a set of properties such as a date  or encounter type.  &lt;br /&gt;
&lt;br /&gt;
The two disciplines (Description logic and data model constraints) are different, but  they are obviously related. The binding between a data model and the range of values that should be applied to a property blurs the boundary between one and the other. This boundary is artificial and historical and harmonising the two into a single holistic whole enables very flexible storage database designs.&lt;br /&gt;
&lt;br /&gt;
Because ontologies use inheritance and entailment as their main approach to definitions this also enables simple hierarchical approaches to data models. Instead of everyone having to make the same choice between having an encounter table or consultation table, or A&amp;amp;E attendance table, a system can be designed to suit, for example having a single high level table such as an event table, or a small number of core tables with extensions, or a complete library of tables, or no tables at all. A map between the information model and the chosen schema is all that is needed.&amp;lt;br /&amp;gt;Benefits of harmonisation accrue in user interfaces. For example, is a user elects to search for a systolic blood pressure, if the application uses the information model it  knows that a systolic blood pressure is held as a concept which is a value set of the concept property  in an observation and can automatically produce the related properties such as data and value&lt;br /&gt;
== Conceptualisation ==&lt;br /&gt;
[[File:Graph.jpg|thumb|Types of data as a graph]]&lt;br /&gt;
&lt;br /&gt;
The data in a health record stored can be conceptualised as a set of relationships between one thing and many others.&lt;br /&gt;
&lt;br /&gt;
Some people call this a graph. Others call these objects , properties and values. From a grammatical language perspective they are subjects, predicates and objects.&lt;br /&gt;
&lt;br /&gt;
The example on the right is entirely arbitrary but illustrates a problem. What does &amp;quot;condition record&amp;quot; mean, or indeed what is a &amp;quot;condition&amp;quot;? Why is a patient linked to a person and what does &amp;quot;linked to&amp;quot; mean?   &lt;br /&gt;
&lt;br /&gt;
The answer is that the &amp;quot;terms&amp;quot; or &amp;quot;concepts&amp;quot; used in a model should be derived from a vocabulary whose terms have meaning and are formally defined. Some terms have meaning in whatever context they are used whereas others have different meanings in different contexts. In defining terms, it is necessary to defined them precisely enough for a computer to interpret the meaning safely i.e. the context of an idea is part of the idea itself.  &lt;br /&gt;
&lt;br /&gt;
The most difficult challenge is to agree the definition and meaning of the concepts in the context they are used.  The agreement as to a particular model is less important. A definition defines a concept in relation to other concepts. Within a domain of interest such as healthcare, all concepts are indirectly related in some way to all other concepts in that domain.  &lt;br /&gt;
&lt;br /&gt;
Luckily, standards have evolved to enable machine readable definitions. &lt;br /&gt;
&lt;br /&gt;
The crucial step in the discovery approach is to apply this principle to both the things that are being recorded (such as clinical concepts), as well as the structure of entries in records themselves.&lt;br /&gt;
&lt;br /&gt;
== Information model language ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Main article&#039;&#039; [[Health Information modelling language - overview|information modelling language]] describes the language in more detail.&lt;br /&gt;
&lt;br /&gt;
The semantic web approach is adopted. In this approach, data can be described via the use of a plain language grammar consisting of a subject, a predicate, and an object. A triple. The theory is that all health data can be described  in this way (with predicates being extended to include functions).&lt;br /&gt;
&lt;br /&gt;
The consequence of this approach is that W3C web standards can be used such as the use of [[wikipedia:Resource_Description_Framework|Resource Descriptor Framework o]]&amp;lt;nowiki/&amp;gt;r RDF. This sees the world as a set of triples (subject/ predicate/ object) with some things named and somethings anonymous. Systems that adopt this approach can exchange data in a way that the semantics can be preserved. Whilst RDF is an incredibly arcane language at a machine level, the things it can describe can be very intuitive when represented visually. In other words the Information modelling approach involves an RDF Graph.&lt;br /&gt;
&lt;br /&gt;
However RDF has no inherent semantics or schematics. To bring those in the model uses the semantic web languages of RDFS, OWL2 DL and SHACL as its main languages with SPARQL as its query representation. It incorporates ontologies such as Snomed-CT and W3C-PROV.&lt;br /&gt;
&lt;br /&gt;
It is recognised that other languages are in common use. Consequently mappings are constructed to enable the model to be used. For example the Snomed-CT expression constraint language is a common way of defining concept sets. ECL is logically equivalent to a closed world query on an open world OWL ontology. The IM language uses the semantic language of SPARQL together with entailment to model ECL but ECL can be exported or used as input as an alternative.&lt;br /&gt;
&lt;br /&gt;
== Mapping from published data ==&lt;br /&gt;
&#039;&#039;main article&#039;&#039; [[Mapping and matching concepts|mapping concepts and structures]] &lt;br /&gt;
&lt;br /&gt;
which describes the current mapping and approach to mappings of codes or text, in context from publisher systems.&lt;br /&gt;
== Information manager==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Main article&#039;&#039; [[Information model service|information model services.]]For an information model to be useable, it has to be accessible in some way either via user interfaces or by APIS.&lt;br /&gt;
Thus the information model comes with a set of open source modules making up an application &amp;quot;Information manager&amp;quot; , which is a web based application designed to show the model.&lt;br /&gt;
&lt;br /&gt;
For a web application or set of APIs to be useful there has to be at least one service. There is a free to use  [[information model service]], i.e. an operational service that provides access to one or more information models. &lt;br /&gt;
&lt;br /&gt;
The service provides a set of APIs as well as provide instances of the model for implementations to use directly should they wish to.&lt;br /&gt;
&lt;br /&gt;
All implementation code including the evolving service, APIs, language grammars and object models are also available on Github in the following repositories:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMAPI&lt;br /&gt;
&lt;br /&gt;
A viewer of the information model and an early version of the manager is at:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMViewer&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5812</id>
		<title>Discovery health information model</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5812"/>
		<updated>2021-09-27T11:32:06Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Information model language */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the approach taken to producing information models,  including ; what they are, what their purpose is, and what the technical components of the models are. &lt;br /&gt;
&lt;br /&gt;
The article does not include the content of any particular model. &lt;br /&gt;
&lt;br /&gt;
== What is the Discovery health information model (IM)? ==&lt;br /&gt;
The IM is a representation of the meaning and structure of data held in the electronic records of the health and social care sector, together with libraries of query, extract and mappings.&lt;br /&gt;
&lt;br /&gt;
It is an abstract logical model, not a physical structure or schema. As a logical model it models data that may be physically held any a variety of different types of data stores, including relational or graph data stores. Because the model is independent of the physical schemas, the model itself has to be interoperable and without any proprietary lock in.&lt;br /&gt;
&lt;br /&gt;
The IM is a broad model that integrates a set of different approaches to modelling using a common vocabulary. The components of the model are:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by  live systems that have published data, Note that  this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data,  that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are  expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records. &lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The remainder of this article considers how models and ontologies can be constructed using this approach.&lt;br /&gt;
&lt;br /&gt;
== What is different? ==&lt;br /&gt;
The main difference between the Discovery IM and other approaches is the harmonisation of the terms used in the conventional &#039;terminology&#039; domain and the terms used in the conventional &#039;data model&#039; domain. Both are considered part of the one ontology and the concepts often differ only in the approach to their definition.. &lt;br /&gt;
&lt;br /&gt;
For example, an encounter may be defined as an &amp;quot;interaction between a patient (or on behalf of the patient) and a health professional or health provider&amp;quot;.  The definition of an encounter with Description logic as a subclass with some properties can be produced using the open world OWL2 grammar.  &lt;br /&gt;
&lt;br /&gt;
However, an encounter can also be said to be a type of entry in a health record, as modelled in FHIR or openEHR.  From this perspective an encounter will be defined as a logical &#039;schema&#039; with a set of properties such as a date  or encounter type.  &lt;br /&gt;
&lt;br /&gt;
The two disciplines (Description logic and data model constraints) are different, but  they are obviously related. The binding between a data model and the range of values that should be applied to a property blurs the boundary between one and the other. This boundary is artificial and historical and harmonising the two into a single holistic whole enables very flexible storage database designs.&lt;br /&gt;
&lt;br /&gt;
Because ontologies use inheritance and entailment as their main approach to definitions this also enables simple hierarchical approaches to data models. Instead of everyone having to make the same choice between having an encounter table or consultation table, or A&amp;amp;E attendance table, a system can be designed to suit, for example having a single high level table such as an event table, or a small number of core tables with extensions, or a complete library of tables, or no tables at all. A map between the information model and the chosen schema is all that is needed.&amp;lt;br /&amp;gt;Benefits of harmonisation accrue in user interfaces. For example, is a user elects to search for a systolic blood pressure, if the application uses the information model it  knows that a systolic blood pressure is held as a concept which is a value set of the concept property  in an observation and can automatically produce the related properties such as data and value&lt;br /&gt;
== Conceptualisation ==&lt;br /&gt;
[[File:Graph.jpg|thumb|Types of data as a graph]]&lt;br /&gt;
&lt;br /&gt;
The data in a health record stored can be conceptualised as a set of relationships between one thing and many others.&lt;br /&gt;
&lt;br /&gt;
Some people call this a graph. Others call these objects , properties and values. From a grammatical language perspective they are subjects, predicates and objects.&lt;br /&gt;
&lt;br /&gt;
The example on the right is entirely arbitrary but illustrates a problem. What does &amp;quot;condition record&amp;quot; mean, or indeed what is a &amp;quot;condition&amp;quot;? Why is a patient linked to a person and what does &amp;quot;linked to&amp;quot; mean?   &lt;br /&gt;
&lt;br /&gt;
The answer is that the &amp;quot;terms&amp;quot; or &amp;quot;concepts&amp;quot; used in a model should be derived from a vocabulary whose terms have meaning and are formally defined. Some terms have meaning in whatever context they are used whereas others have different meanings in different contexts. In defining terms, it is necessary to defined them precisely enough for a computer to interpret the meaning safely i.e. the context of an idea is part of the idea itself.  &lt;br /&gt;
&lt;br /&gt;
The most difficult challenge is to agree the definition and meaning of the concepts in the context they are used.  The agreement as to a particular model is less important. A definition defines a concept in relation to other concepts. Within a domain of interest such as healthcare, all concepts are indirectly related in some way to all other concepts in that domain.  &lt;br /&gt;
&lt;br /&gt;
Luckily, standards have evolved to enable machine readable definitions. &lt;br /&gt;
&lt;br /&gt;
The crucial step in the discovery approach is to apply this principle to both the things that are being recorded (such as clinical concepts), as well as the structure of entries in records themselves.&lt;br /&gt;
&lt;br /&gt;
== Information model language ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Main article&#039;&#039; [[Health Information modelling language - overview|information modelling language]] describes the language in more detail.&lt;br /&gt;
&lt;br /&gt;
The semantic web approach is adopted. In this approach, data can be described via the use of a plain language grammar consisting of a subject, a predicate, and an object. A triple. The theory is that all health data can be described  in this way (with predicates being extended to include functions).&lt;br /&gt;
&lt;br /&gt;
The consequence of this approach is that W3C web standards can be used such as the use of [[wikipedia:Resource_Description_Framework|Resource Descriptor Framework o]]&amp;lt;nowiki/&amp;gt;r RDF. This sees the world as a set of triples (subject/ predicate/ object) with some things named and somethings anonymous. Systems that adopt this approach can exchange data in a way that the semantics can be preserved. Whilst RDF is an incredibly arcane language at a machine level, the things it can describe can be very intuitive when represented visually. In other words the Information modelling approach involves an RDF Graph.&lt;br /&gt;
&lt;br /&gt;
However RDF has no inherent semantics or schematics. To bring those in the model uses the semantic web languages of RDFS, OWL2 DL and SHACL as its main languages with SPARQL as its query representation. It incorporates ontologies such as Snomed-CT and W3C-PROV.&lt;br /&gt;
&lt;br /&gt;
It is recognised that other languages are in common use. Consequently mappings are constructed to enable the model to be used. For example the Snomed-CT expression constraint language is a common way of defining concept sets. ECL is logically equivalent to a closed world query on an open world OWL ontology. The IM language uses the semantic language of SPARQL together with entailment to model ECL but ECL can be exported or used as input as an alternative.&lt;br /&gt;
&lt;br /&gt;
== Mapping from published data ==&lt;br /&gt;
&#039;&#039;main article&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Information manager==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Main article&#039;&#039; [[Information model service|information model services.]]For an information model to be useable, it has to be accessible in some way either via user interfaces or by APIS.&lt;br /&gt;
Thus the information model comes with a set of open source modules making up an application &amp;quot;Information manager&amp;quot; , which is a web based application designed to show the model.&lt;br /&gt;
&lt;br /&gt;
For a web application or set of APIs to be useful there has to be at least one service. There is a free to use  [[information model service]], i.e. an operational service that provides access to one or more information models. &lt;br /&gt;
&lt;br /&gt;
The service provides a set of APIs as well as provide instances of the model for implementations to use directly should they wish to.&lt;br /&gt;
&lt;br /&gt;
All implementation code including the evolving service, APIs, language grammars and object models are also available on Github in the following repositories:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMAPI&lt;br /&gt;
&lt;br /&gt;
A viewer of the information model and an early version of the manager is at:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMViewer&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5811</id>
		<title>Mapping and matching concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5811"/>
		<updated>2021-09-27T11:30:23Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Mapping API ==&lt;br /&gt;
The information model mapping API is used, when given contextual data, to return both a property concept (representing the context) and a value concept (representing the value within that context). The structure of the mapping module allows multiple contexts to reference a common mapping node (for example when the same type of value is received from multiple sources) and also multiple value types to be referenced from a common mapping node.&lt;br /&gt;
&lt;br /&gt;
The logic of the version 1 live mapping is described  more fully in the [[Information Model Mapping (v1)|model mapping article]].&lt;br /&gt;
&lt;br /&gt;
== Managing codes and taxonomies ==&lt;br /&gt;
Information consists of ideas. Another word for an idea is a &#039;concept&#039; . A concept may be named,( in which case the meaning of the concept can usually be understood), or they may be an unnamed expression, which is made up of a set of interrelated named or unnamed concepts. &lt;br /&gt;
&lt;br /&gt;
For example the term &amp;quot;chest pain&amp;quot; implies the idea of a pain in the chest. In Snomed-CT it is a named concept. &amp;quot;Chest pain, worsened by exercise&amp;quot; may be an example of an expression style concept made up from the concept of &amp;quot;chest pain&amp;quot;, and the statement that it is &amp;quot;made worse by -&amp;gt; exercise&amp;quot;. In this case “made worse by” and “exercise” are both different concepts but no author has yet created a single named concept for this expression.&lt;br /&gt;
&lt;br /&gt;
The new generation of health record management systems tend towards the recording of concepts, with the objective being for the record entry to closely match the idea behind the entry. These types of concepts can be called term based concepts as the term is the thing that describes the idea.&lt;br /&gt;
&lt;br /&gt;
A modern term based concept is defined in relation to other concepts by a set of assertions indicating whether the concept is equivalent to, or a subtype of, a set of other concepts. The standard approach to this is via the use of Description Logic (DL). By using DL, a computer can automatically classify a concept which can result in a computer deducing additional knowledge over and above the human who created the concept. Snomed-CT is the worlds largest ontology of healthcare term based concepts and is authored using DL. A collection of concepts defined in this way constitute an &amp;quot;Ontology&amp;quot; and there is a standard language OWL that is used to represent the definitions.&lt;br /&gt;
&lt;br /&gt;
These types of concepts are referred to as &amp;quot;Core concepts&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The idea of codes originated from a different starting point. The intention of a coded entry is to &#039;&#039;pre-classify&#039;&#039; an entry before it is recorded. The code is designed for a particular set of business processes e.g. analytics or payment and it is important to understand the context in which a code has been used.  A coded concept, being pre-classified, relies on categorisation of the codes, and that classification may or may not imply that one code is a subtype of another. Nothing can be inferred from a code other than its relation to another code as authored.  Consequently, as the philosophy is different, code based concepts have to be dealt with differently from term based concepts, even if they seem to saying the same thing.&lt;br /&gt;
&lt;br /&gt;
Because of their history, it is not always possible to assert the exact meaning of a code. However, it is often the case that meaning can be inferred or approximated from a coded entry. With  preference to move to an ontology, this inference can be achieved via the use of a mapping process that matches  coded concepts to term based concepts that are identified from a code.&lt;br /&gt;
&lt;br /&gt;
These types of concepts are referred to as &amp;quot;legacy concepts&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There are two strategies to link legacy code concepts to core concepts.&lt;br /&gt;
&lt;br /&gt;
1. A coded term may be stated confidently to be the same as, or a variation on, a concept. Typically code systems like Read2 or CTV3 can be dealt with in this way because they are designed to try and capture the idea in the clinicians mind, and they have been incorporated as concepts anyway. Likewise many system supplier codes have been created in this way. In this case the term code can be said to be a term code of the concept. Read2 G33 - Angina pectoris is a term code for the concept of angina pectoris.&lt;br /&gt;
&lt;br /&gt;
2. A coded term might be the same term as a concept but may have been entered without the assertion that is a true representation of a state. Typically code systems such as ICD10 and OPCS fall into this category. E11 - Diabetes type 2, seems to be the same as the concept of diabetes type 2, but was entered without clinician attestation and may have been approximated for payment purposes. In this case a legacy concept is produced and a map between this concept and the similar clinical concept is generated.&lt;br /&gt;
&lt;br /&gt;
A  map is just another form of relationship, but unlike an ontological equivalent or subclass axiom it implies that the relationship is an approximation. It is a sort of statement that something is p&#039;&#039;ossibly or probably similar to s&#039;&#039;omething else and thus has much less weight than an asserted relationship.&lt;br /&gt;
&lt;br /&gt;
Legacy Code based concepts can be mapped to Core concepts , and this enables the use of the vast volumes of data already recorded in systems. Maps must be used with care as it is almost always the case that the use of a mapped code in a query is dependent on the purpose of the query. This means that mappings are more of a guide to the things to include rather than a confident statement of meaning. When querying records the query author may need to determine which codes to include or exclude on a case by case basis.&lt;br /&gt;
&lt;br /&gt;
== Maps between core concepts and legacy concepts ==&lt;br /&gt;
As mentioned above the relationships are managed as mappings which state the type or degree of match. &lt;br /&gt;
&lt;br /&gt;
Maps generally fall into 2 patterns. These are illustrated in the context of code based concepts as follows:&lt;br /&gt;
&lt;br /&gt;
=== Simple match ===&lt;br /&gt;
A core concept may be matched to many code based concepts. In a simple match the legacy concept is deemed to be probably equivalent to, or a subclass of. the code concept&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sn:194828000 |Angina (disorder)&lt;br /&gt;
    :matchedTo emis:G33 |Angina Pectoris|.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Complex optional match ===&lt;br /&gt;
A concept may be matched to a number of alternative concepts and it is expected that a query author may wish to select these. &lt;br /&gt;
&lt;br /&gt;
In this example, the concept &#039;&#039;&#039;:&#039;&#039;&#039; &amp;quot;Ketoacidotic coma due to diabetes mellitus (disorder)&amp;quot; has a complex map which is selection of either &lt;br /&gt;
&lt;br /&gt;
a) Coma unspecified&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
b)  one of either Diabetes mellitus in pregnancy: Pre-existing diabetes mellitus, unspecified, or Diabetes mellitus in pregnancy, unspecified, or Diabetes mellitus arising in pregnancy&lt;br /&gt;
&lt;br /&gt;
In effect meaning that the compound entry in the record would need to have 2 icd 10 codes to fulfill the criteria.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sn:26298008&lt;br /&gt;
  :hasMap [&lt;br /&gt;
       :combinationOf  [ &lt;br /&gt;
                           :oneOf  icd10:R402 ] &lt;br /&gt;
                       [&lt;br /&gt;
                           :oneOf  icd10:O24.3 icd10:O24.9 O24.4]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
== Mapping  source fields ==&lt;br /&gt;
It is equally common to need to map source fields to core data model properties. In the information model a property is considered just another concept.&lt;br /&gt;
&lt;br /&gt;
However, to use mappings for source fields it is necessary to use the context in which the source fields exist.&lt;br /&gt;
&lt;br /&gt;
In the above examples, coded concepts were considered as context independent in the sense that the same code used by many providers and many systems would generally mean the same thing and can be treated the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the same way that codes can be mapped, so can source resource types such as tables or fields, message types or message segments. Mapping may involve functional transformation&lt;br /&gt;
&lt;br /&gt;
=== Defining source context ===&lt;br /&gt;
The first step in managing source concepts is to define the concept in the context of the originator of the data. This employs the use of a context object usually sent as parameters through the REST API. For example the following&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;organisation&amp;quot;: &amp;quot;Barts&amp;quot;,&lt;br /&gt;
  &amp;quot;system&amp;quot; : &amp;quot;CernerMillenium&amp;quot;,&lt;br /&gt;
  &amp;quot;message&amp;quot; :&amp;quot;cds_type_130&amp;quot;,&lt;br /&gt;
  &amp;quot;field&amp;quot; :&amp;quot;admin_cat_code&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mapping nodes ===&lt;br /&gt;
A second step is for the mapping author  to identify whether the source context  is equivalent to another source contexts. This is done in order to rationalise the number of mappings steps needed between a source concept and the final target concept.&lt;br /&gt;
=== Matching to concept ===&lt;br /&gt;
The third step involves creation of a source concept and a core concept. In the above example the source is concept has been mapped to a core concept and the core concept is returned&amp;lt;pre&amp;gt;&lt;br /&gt;
bc:BC_xyz&lt;br /&gt;
  rdfs:label &amp;quot;admin_cat_code&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and potential core map&lt;br /&gt;
&lt;br /&gt;
im:administrative_category_code_on_admission&lt;br /&gt;
           :matchedTo &lt;br /&gt;
           bc:BC_xysdasdasd.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;The information model has fully defined the administrative category property as a property of a subclass of encounter dealing with hospital stays. Consequently the source system&#039;s table and field can be fully mapped to the common model field.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Legacy codes, terms and term codes==&lt;br /&gt;
Legacy or  local codes also require context and the same approach is used as described above. In this case a local code 12345655 mat have different meaning in a ddifferent system. A local code may or may not have any sort of code scheme (the scheme then being implied by the context). In the following example, Barts trust has its own local cerner code scheme.&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;organisation&amp;quot;: &amp;quot;Barts&amp;quot;,&lt;br /&gt;
  &amp;quot;system&amp;quot; : &amp;quot;CernerMillenium&amp;quot;,&lt;br /&gt;
  &amp;quot;message&amp;quot; :&amp;quot;cds_type_130&amp;quot;,&lt;br /&gt;
  &amp;quot;field&amp;quot; :&amp;quot;admin_cat_code&amp;quot;,&lt;br /&gt;
   &amp;quot;codeScheme&amp;quot; :&amp;quot;BartsLocalCodes&amp;quot;,&lt;br /&gt;
  &amp;quot;code&amp;quot; :123445556&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enumerated values ==&lt;br /&gt;
The NHS Data dictionary employs enumerated numeric values for many of its field contents.&lt;br /&gt;
&lt;br /&gt;
These are treated as local codes using the context to create a field specific code scheme. In many cases local trusts have extended the national scheme (or even changed the scheme), and as a result mapping nodes are used for the common codes.&lt;br /&gt;
&lt;br /&gt;
==Decision process for handling codes and terms==&lt;br /&gt;
When incorporating codes and terms into the ontology, there are 4 categories of approach, the selected approach being dependent on the semantic relationship between the legacy and core concept. The categories are:&lt;br /&gt;
&lt;br /&gt;
#Creation of a local concept and creation of a simple &amp;quot;matched to&amp;quot; map between a core concept and a legacy concept. This implies that the legacy concept is a subtype of, or equivalent to the core concept. Examples of these are supplier local codes, Read 2, TPP&lt;br /&gt;
#Creation of a local or legacy concept and a complex &amp;quot;combination of&amp;quot; + some of or one of &amp;quot;mapped to&amp;quot; between a core concept and a legacy concept. This implies a more nuanced relationship meaning that the user may elect how to use the maps when querying records.&lt;br /&gt;
#Mapping of the local context object to a mapping node which maps to a core concept i.e. the core concept is used throughout the data store and the local context is replaced.&lt;br /&gt;
#Mapping of the local context object to a mapping node which maps to a legacy concept which may or may not map from a core concept&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Information_Model_Mapping_(v1)&amp;diff=5810</id>
		<title>Information Model Mapping (v1)</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Information_Model_Mapping_(v1)&amp;diff=5810"/>
		<updated>2021-09-27T11:29:15Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
The information model mapping API is used, when given contextual data, to return both a property concept (representing the context) and a value concept (representing the value within that context).  The structure of the mapping module allows multiple contexts to reference a common mapping node (for example when the same type of value is received from multiple sources) and also multiple value types to be referenced from a common mapping node.&lt;br /&gt;
&lt;br /&gt;
=== Logical Structure ===&lt;br /&gt;
[[File:IMv1Mapping.png|alt=Logical Layout|frameless|1021x1021px]]&lt;br /&gt;
&lt;br /&gt;
The initial phase of the mapping process is to identify the context within which the mapping is operating.  This is given as a combination of the supplying organisation, the originating system, the schema/format from that system (if multiple are supported) and the data location within that schema (note that though the terms &amp;quot;Table&amp;quot; and &amp;quot;Column&amp;quot; are used, they could equally be &amp;quot;CSV Filename&amp;quot; and &amp;quot;Field name&amp;quot; for example).  Multiple map contexts can reference a single map node, for example a CDS inpatient admission code from Barts/Cerner would reference the same node as a from Homerton/Cerner as they are in fact the same concept (&amp;quot;CDS Inpatient Admission Code&amp;quot;).  A treatment function code however would reference different nodes for Barts and Homerton as are they are based on local cerner codes.&lt;br /&gt;
&lt;br /&gt;
Once the map node is identified, this gives the &amp;quot;Property&amp;quot; concept for the context, for example &amp;quot;DM_methodOfAdmssion | has admission method&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Given the context of the property, further context is provided via the value type.  This allows multiple input maps for the same property context.  For example, the &amp;quot;Method of admission&amp;quot; map node could have a value type (code scheme) of &amp;quot;Snomed&amp;quot;, &amp;quot;NHS Data Dictionary&amp;quot;, &amp;quot;Barts local&amp;quot; or null for free-text matching.  For each given value type, a function must be provided.  There are currently just 2 supported functions: -&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|Lookup()&lt;br /&gt;
|Uses the &amp;quot;Value Lookup&amp;quot; table to determine the value concept &lt;br /&gt;
|-&lt;br /&gt;
|Format(&amp;lt;format&amp;gt;)&lt;br /&gt;
|Uses a simple string formatting function to generate the concept iri based on the input data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Organisation&lt;br /&gt;
!System&lt;br /&gt;
!Schema&lt;br /&gt;
!Table/File&lt;br /&gt;
!Column/Field&lt;br /&gt;
!Scheme&lt;br /&gt;
!Value&lt;br /&gt;
|-&lt;br /&gt;
|Barts&lt;br /&gt;
|Cerner&lt;br /&gt;
|CDS&lt;br /&gt;
|inpatient&lt;br /&gt;
|admission_method_code&lt;br /&gt;
|NHS Data Dictionary&lt;br /&gt;
|21&lt;br /&gt;
|}&lt;br /&gt;
The Organisation, System, Schema, Table and Columns are used to identify the initial context and thus, in this case, the `/CDS/INPTNT/ADMISSN_MTHD` map node.  That map node gives us the property concept (DM_methodOfAdmssion | has admission method).  Next the scheme is used to determine the value function, in this case &amp;quot;Lookup()&amp;quot; so the Value is used in the value lookup table to retrieve the final value concept (CM_AdmMetCasSame | Emergency admission from same trust).  Note that the same data from Homerton cerner would reference the same common map node as the data within is the same.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Organisation&lt;br /&gt;
!System&lt;br /&gt;
!Schema&lt;br /&gt;
!Table/File&lt;br /&gt;
!Column/Field&lt;br /&gt;
!Scheme&lt;br /&gt;
!Value&lt;br /&gt;
|-&lt;br /&gt;
|Barts&lt;br /&gt;
|Cerner&lt;br /&gt;
|CDS&lt;br /&gt;
|inpatient&lt;br /&gt;
|treatment_function&lt;br /&gt;
|BartsCerner&lt;br /&gt;
|123456&lt;br /&gt;
|}&lt;br /&gt;
In this case, the the initial context would lead to the `/BRTS/CRNR/CDS/INPTNT/TRTMNT_FCTN` map node.  The property concept associated with that node is &amp;quot;DM_treatmentFunctionAdmit | Treatment function&amp;quot;.  Here however, the scheme is known to be a Barts local code and so the function is &amp;quot;Format(BC_%s)&amp;quot;.  Rather than perform a lookup, a simple string format is performed on the code, resulting in the concept &amp;quot;BC_123456&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== New/unknown data. ===&lt;br /&gt;
If the mapping API is called with new/unknown context or codes, then new nodes and concepts will be generated and marked as draft for later evaluation.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Organisation&lt;br /&gt;
!System&lt;br /&gt;
!Schema&lt;br /&gt;
!Table/File&lt;br /&gt;
!Column/Field&lt;br /&gt;
!Scheme&lt;br /&gt;
!Value&lt;br /&gt;
|-&lt;br /&gt;
|BHRUT&lt;br /&gt;
|Medway&lt;br /&gt;
|MedwayBI&lt;br /&gt;
|PMI&lt;br /&gt;
|CAUSEOFDEATH&lt;br /&gt;
|Medway&lt;br /&gt;
|A1&lt;br /&gt;
|}&lt;br /&gt;
On failing to identify an existing context &amp;amp; map node, a new draft context would be created and ponted to a new draft map node(/BHRUT/MDWY/MDWYBI/PMI/CSFDTH). For the map node, a new draft property concept would be created with an iri and description based on the context in the format &amp;quot;LP_&amp;lt;Org&amp;gt;_&amp;lt;Sys&amp;gt;_&amp;lt;Scm&amp;gt;_&amp;lt;Tbl&amp;gt;_&amp;lt;Col&amp;gt;_&amp;lt;Dbid&amp;gt;&amp;quot;.  In this example, &amp;quot;LP_BHR_MDW_MDW_PMI_CSF_nnnnnn | Legacy property concept for /BHRUT/MDWY/MDWYBI/PMI/CSFDTH&amp;quot; (where &amp;quot;nnnnn&amp;quot; is the concepts dbid to ensure uniqueness).  The function for the node will default to &amp;quot;Lookup()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The final stage is to generate a new, draft value concept (in the format &amp;quot;LPV_&amp;lt;Org&amp;gt;_&amp;lt;Sys&amp;gt;_&amp;lt;Scm&amp;gt;_&amp;lt;Tbl&amp;gt;_&amp;lt;Col&amp;gt;_&amp;lt;Scm&amp;gt;_&amp;lt;Val&amp;gt;_&amp;lt;Dbid&amp;gt;&amp;quot;) and an appropriate value node entry created to reference it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The IRI generation uses 3 character shortening (after stripping vowels) but the full context information is kept in the concept name for clarity&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5808</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5808"/>
		<updated>2021-09-26T14:26:44Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Identifiers, aliasing  prefixes and context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance. The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
It should be noted that this is the modelling language, not the physical data schema or actual query. The modelling language uses logical constructs for use by an interpreter to convert to the relevant schema or query. If the actual implementation supports the modelling languages themselves as low level languages (e.g. RDF or SPARQL) then the logical model and the physical model are the same.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
The different parts of the IM can be listed as follows. This article covers item 8 which models items 1 to 7:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
* RML, an extension of R2RML, used to map between RDF and other formats such as RDBMS, JSON or CSV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefore JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;:Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;:Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:someValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;:Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5807</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5807"/>
		<updated>2021-09-26T14:24:10Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Identifiers, aliasing  prefixes and context */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance. The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
It should be noted that this is the modelling language, not the physical data schema or actual query. The modelling language uses logical constructs for use by an interpreter to convert to the relevant schema or query. If the actual implementation supports the modelling languages themselves as low level languages (e.g. RDF or SPARQL) then the logical model and the physical model are the same.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
The different parts of the IM can be listed as follows. This article covers item 8 which models items 1 to 7:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
* RML, an extension of R2RML, used to map between RDF and other formats such as RDBMS, JSON or CSV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefore JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;:Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;:Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:someValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;:Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5806</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5806"/>
		<updated>2021-09-26T14:18:32Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Sublanguages and syntaxes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance. The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
It should be noted that this is the modelling language, not the physical data schema or actual query. The modelling language uses logical constructs for use by an interpreter to convert to the relevant schema or query. If the actual implementation supports the modelling languages themselves as low level languages (e.g. RDF or SPARQL) then the logical model and the physical model are the same.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
The different parts of the IM can be listed as follows. This article covers item 8 which models items 1 to 7:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
* RML, an extension of R2RML, used to map between RDF and other formats such as RDBMS, JSON or CSV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefore JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;:Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;:Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:someValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;:Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5805</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5805"/>
		<updated>2021-09-26T14:16:43Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance. The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
It should be noted that this is the modelling language, not the physical data schema or actual query. The modelling language uses logical constructs for use by an interpreter to convert to the relevant schema or query. If the actual implementation supports the modelling languages themselves as low level languages (e.g. RDF or SPARQL) then the logical model and the physical model are the same.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
The different parts of the IM can be listed as follows. This article covers item 8 which models items 1 to 7:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
* RML, an extension of R2RML, used to map between RDF and other formats such as RDBMS, JSON or CSV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefore JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;:Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;:Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:someValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;:Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5804</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5804"/>
		<updated>2021-09-26T14:15:51Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Requirements and Contributory languages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance. The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
It should be noted that this is the modelling language, not the physical data schema or actual query. The modelling language uses logical constructs for use by an interpreter to convert to the relevant schema or query. If the actual implementation supports the modelling languages themselves as low level languages (e.g. RDF or SPARQL) then the logical model and the physical model are the same.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
The different parts of the IM can be listed as follows. This article covers item 8 which models items 1 to 7:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
* RML, an extension of R2RML, used to map between RDF and other formats such as RDBMS, JSON or CSV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefore JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;:Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;:Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:someValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;:Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5803</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5803"/>
		<updated>2021-09-26T14:14:17Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Requirements and Contributory languages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance. The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
It should be noted that this is the modelling language, not the physical data schema or actual query. The modelling language uses logical constructs for use by an interpreter to convert to the relevant schema or query. If the actual implementation supports the modelling languages themselves as low level languages (e.g. RDF or SPARQL) then the logical model and the physical model are the same.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
The different parts of the IM can be listed as follows. This article covers item 8 which models items 1 to 7:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
* RML, an extension of R2RML, used to map between RDF and other formats such as RDBMS, JSON or CSV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefore JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5802</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5802"/>
		<updated>2021-09-26T14:13:05Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Requirements and Contributory languages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance. The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
It should be noted that this is the modelling language, not the physical data schema or actual query. The modelling language uses logical constructs for use by an interpreter to convert to the relevant schema or query. If the actual implementation supports the modelling languages themselves as low level languages (e.g. RDF or SPARQL) then the logical model and the physical model are the same.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
The different parts of the IM can be listed as follows. This article covers item 8 which models items 1 to 7:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
* RML, an extension of R2RML, used to map between RDF and other formats such as RDBMS, JSON or CSV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5801</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5801"/>
		<updated>2021-09-26T14:12:00Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Requirements and Contributory languages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance. The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
It should be noted that this is the modelling language, not the physical data schema or actual query. The modelling language uses logical constructs for use by an interpreter to convert to the relevant schema or query. If the actual implementation supports the modelling languages themselves as low level languages (e.g. RDF or SPARQL) then the logical model and the physical model are the same.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
The different parts of the IM can be listed as follows. This article covers item 8 which models items 1 to 7:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
* RML, an extension of R2RML, used to map between RDF and other formats such as RDBMS, JSON or CSV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5800</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5800"/>
		<updated>2021-09-26T13:43:09Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Purpose background and rationale */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance. The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
It should be noted that this is the modelling language, not the physical data schema or actual query. The modelling language uses logical constructs for use by an interpreter to convert to the relevant schema or query. If the actual implementation supports the modelling languages themselves as low level languages (e.g. RDF or SPARQL) then the logical model and the physical model are the same.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
The different parts of the IM can be listed as follows. This article covers item 8 which models items 1 to 7:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5799</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5799"/>
		<updated>2021-09-26T13:42:14Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Purpose background and rationale */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance. The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
It should be noted that this is the modelling language, not the physical data schema or actual query. The modelling language uses logical constructs for use by an interpreter to convert to the relevant schema or query. If the actual implementation supports the modelling languages themselves as low level languages (e.g. RDF or SPARQL) then the logical model and the physical model are the same.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
The different parts of the IM can be listed as follows. This article covers item 8 which models items 1 to 7:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model as can be seen on the right. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5798</id>
		<title>Discovery health information model</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5798"/>
		<updated>2021-09-26T12:20:07Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Information manager */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the approach taken to producing information models,  including ; what they are, what their purpose is, and what the technical components of the models are. &lt;br /&gt;
&lt;br /&gt;
The article does not include the content of any particular model. &lt;br /&gt;
&lt;br /&gt;
== What is the Discovery health information model (IM)? ==&lt;br /&gt;
The IM is a representation of the meaning and structure of data held in the electronic records of the health and social care sector, together with libraries of query, extract and mappings.&lt;br /&gt;
&lt;br /&gt;
It is an abstract logical model, not a physical structure or schema. As a logical model it models data that may be physically held any a variety of different types of data stores, including relational or graph data stores. Because the model is independent of the physical schemas, the model itself has to be interoperable and without any proprietary lock in.&lt;br /&gt;
&lt;br /&gt;
The IM is a broad model that integrates a set of different approaches to modelling using a common vocabulary. The components of the model are:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by  live systems that have published data, Note that  this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data,  that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are  expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records. &lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The remainder of this article considers how models and ontologies can be constructed using this approach.&lt;br /&gt;
&lt;br /&gt;
== What is different? ==&lt;br /&gt;
The main difference between the Discovery IM and other approaches is the harmonisation of the terms used in the conventional &#039;terminology&#039; domain and the terms used in the conventional &#039;data model&#039; domain. Both are considered part of the one ontology and the concepts often differ only in the approach to their definition.. &lt;br /&gt;
&lt;br /&gt;
For example, an encounter may be defined as an &amp;quot;interaction between a patient (or on behalf of the patient) and a health professional or health provider&amp;quot;.  The definition of an encounter with Description logic as a subclass with some properties can be produced using the open world OWL2 grammar.  &lt;br /&gt;
&lt;br /&gt;
However, an encounter can also be said to be a type of entry in a health record, as modelled in FHIR or openEHR.  From this perspective an encounter will be defined as a logical &#039;schema&#039; with a set of properties such as a date  or encounter type.  &lt;br /&gt;
&lt;br /&gt;
The two disciplines (Description logic and data model constraints) are different, but  they are obviously related. The binding between a data model and the range of values that should be applied to a property blurs the boundary between one and the other. This boundary is artificial and historical and harmonising the two into a single holistic whole enables very flexible storage database designs.&lt;br /&gt;
&lt;br /&gt;
Because ontologies use inheritance and entailment as their main approach to definitions this also enables simple hierarchical approaches to data models. Instead of everyone having to make the same choice between having an encounter table or consultation table, or A&amp;amp;E attendance table, a system can be designed to suit, for example having a single high level table such as an event table, or a small number of core tables with extensions, or a complete library of tables, or no tables at all. A map between the information model and the chosen schema is all that is needed.&amp;lt;br /&amp;gt;Benefits of harmonisation accrue in user interfaces. For example, is a user elects to search for a systolic blood pressure, if the application uses the information model it  knows that a systolic blood pressure is held as a concept which is a value set of the concept property  in an observation and can automatically produce the related properties such as data and value&lt;br /&gt;
== Conceptualisation ==&lt;br /&gt;
[[File:Graph.jpg|thumb|Types of data as a graph]]&lt;br /&gt;
&lt;br /&gt;
The data in a health record stored can be conceptualised as a set of relationships between one thing and many others.&lt;br /&gt;
&lt;br /&gt;
Some people call this a graph. Others call these objects , properties and values. From a grammatical language perspective they are subjects, predicates and objects.&lt;br /&gt;
&lt;br /&gt;
The example on the right is entirely arbitrary but illustrates a problem. What does &amp;quot;condition record&amp;quot; mean, or indeed what is a &amp;quot;condition&amp;quot;? Why is a patient linked to a person and what does &amp;quot;linked to&amp;quot; mean?   &lt;br /&gt;
&lt;br /&gt;
The answer is that the &amp;quot;terms&amp;quot; or &amp;quot;concepts&amp;quot; used in a model should be derived from a vocabulary whose terms have meaning and are formally defined. Some terms have meaning in whatever context they are used whereas others have different meanings in different contexts. In defining terms, it is necessary to defined them precisely enough for a computer to interpret the meaning safely i.e. the context of an idea is part of the idea itself.  &lt;br /&gt;
&lt;br /&gt;
The most difficult challenge is to agree the definition and meaning of the concepts in the context they are used.  The agreement as to a particular model is less important. A definition defines a concept in relation to other concepts. Within a domain of interest such as healthcare, all concepts are indirectly related in some way to all other concepts in that domain.  &lt;br /&gt;
&lt;br /&gt;
Luckily, standards have evolved to enable machine readable definitions. &lt;br /&gt;
&lt;br /&gt;
The crucial step in the discovery approach is to apply this principle to both the things that are being recorded (such as clinical concepts), as well as the structure of entries in records themselves.&lt;br /&gt;
&lt;br /&gt;
== Information model language ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Main article&#039;&#039; [[Health Information modelling language - overview|information modelling language]] describes the language in more detail.&lt;br /&gt;
&lt;br /&gt;
The semantic web approach is adopted. In this approach, data can be described via the use of a plain language grammar consisting of a subject, a predicate, and an object. A triple. The theory is that all health data can be described  in this way (with predicates being extended to include functions).&lt;br /&gt;
&lt;br /&gt;
The consequence of this approach is that W3C web standards can be used such as the use of [[wikipedia:Resource_Description_Framework|Resource Descriptor Framework o]]&amp;lt;nowiki/&amp;gt;r RDF. This sees the world as a set of triples (subject/ predicate/ object) with some things named and somethings anonymous. Systems that adopt this approach can exchange data in a way that the semantics can be preserved. Whilst RDF is an incredibly arcane language at a machine level, the things it can describe can be very intuitive when represented visually. In other words the Information modelling approach involves an RDF Graph.&lt;br /&gt;
&lt;br /&gt;
However RDF has no inherent semantics or schematics. To bring those in the model uses the semantic web languages of RDFS, OWL2 DL and SHACL as its main languages with SPARQL as its query representation. It incorporates ontologies such as Snomed-CT and W3C-PROV.&lt;br /&gt;
&lt;br /&gt;
It is recognised that other languages are in common use. Consequently mappings are constructed to enable the model to be used. For example the Snomed-CT expression constraint language is a common way of defining concept sets. ECL is logically equivalent to a closed world query on an open world OWL ontology. The IM language uses the semantic language of SPARQL together with entailment to model ECL but ECL can be exported or used as input as an alternative.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Information manager==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Main article&#039;&#039; [[Information model service|information model services.]]For an information model to be useable, it has to be accessible in some way either via user interfaces or by APIS.&lt;br /&gt;
Thus the information model comes with a set of open source modules making up an application &amp;quot;Information manager&amp;quot; , which is a web based application designed to show the model.&lt;br /&gt;
&lt;br /&gt;
For a web application or set of APIs to be useful there has to be at least one service. There is a free to use  [[information model service]], i.e. an operational service that provides access to one or more information models. &lt;br /&gt;
&lt;br /&gt;
The service provides a set of APIs as well as provide instances of the model for implementations to use directly should they wish to.&lt;br /&gt;
&lt;br /&gt;
All implementation code including the evolving service, APIs, language grammars and object models are also available on Github in the following repositories:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMAPI&lt;br /&gt;
&lt;br /&gt;
A viewer of the information model and an early version of the manager is at:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMViewer&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5797</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5797"/>
		<updated>2021-09-26T11:59:16Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance. The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
It should be noted that this is the modelling language, not the physical data schema or actual query. The modelling language uses logical constructs for use by an interpreter to convert to the relevant schema or query. If the actual implementation supports the modelling languages themselves as low level languages (e.g. RDF or SPARQL) then the logical model and the physical model are the same.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model as can be seen on the right. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5796</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5796"/>
		<updated>2021-09-26T11:55:04Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Example - data set */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes a language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance.&lt;br /&gt;
&lt;br /&gt;
The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model as can be seen on the right. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
The data set shape is defined as having 2 resources (the condition and observation) i,e, two &amp;quot;tables&amp;quot; each with a filter criteria associated with it. The first consisting of the code and scheme as well as date, the latter consisting only of value.&lt;br /&gt;
The name of the resource and the fields are defined by the shape thus enabling user defined fields.&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
dds:DiabetesOnsetBp                                                  		//   iri for cohort definition&lt;br /&gt;
    a im:Dataset&lt;br /&gt;
    rdfs:label &amp;quot;Onset of diabetes and latest systolic&amp;quot;;&lt;br /&gt;
    sh:Property [jh&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:DiabetesOnset;&lt;br /&gt;
        sh:name &amp;quot;DiabetesOnset&amp;quot; ]&lt;br /&gt;
   sh:property [&lt;br /&gt;
        sh:path im:hasResource;&lt;br /&gt;
        sh:node dds:LatestSystolic;&lt;br /&gt;
        sh:name &amp;quot;LatestSystolic&amp;quot;]&lt;br /&gt;
.&lt;br /&gt;
dds:DiabetesOnset&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Diabetes}&lt;br /&gt;
       ?this rdf:type im:Condition;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY (?date)&lt;br /&gt;
        LIMIT 1&amp;quot;&amp;quot;&amp;quot;] ;&lt;br /&gt;
&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:concept, im:code;&lt;br /&gt;
       sh:name &amp;quot;code&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:string];&lt;br /&gt;
   sh:property [&lt;br /&gt;
       sh:path im:concept, im:scheme;&lt;br /&gt;
       sh:name &amp;quot;scheme&amp;quot;;&lt;br /&gt;
       sh:nodeKind sh:Iri]&lt;br /&gt;
    sh:property[&lt;br /&gt;
         sh:path im:effectiveDate;&lt;br /&gt;
         sh:dataType xsd:dateTime]&lt;br /&gt;
.&lt;br /&gt;
dds:LatestSystolic&lt;br /&gt;
  a im:DataSetResource&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
           &lt;br /&gt;
        Select ?this&lt;br /&gt;
       where {&lt;br /&gt;
       VALUES ?concept { im:SET_Systolic}&lt;br /&gt;
       ?this rdf:type im:Observation;&lt;br /&gt;
              im:concept ?concept;&lt;br /&gt;
              im:effectiveDate ?date.}&lt;br /&gt;
        ORDER BY DESC(?date)&lt;br /&gt;
        LIMIT 1&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot; ];&lt;br /&gt;
    sh:property [&lt;br /&gt;
       sh:path im:numericValue, im:;&lt;br /&gt;
       sh:name &amp;quot;Latest BP&amp;quot;;&lt;br /&gt;
       sh:dataType xsd:integer];&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5795</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5795"/>
		<updated>2021-09-26T11:11:37Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Health Record cohort style query - SHACL/SPARQL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes a language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance.&lt;br /&gt;
&lt;br /&gt;
The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model as can be seen on the right. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
   sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
     sh:prefixes im:, sn: ;                                          #prefixes used in query&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.                       #entity has event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.                   #event has concept in diabetes set&lt;br /&gt;
                  ?event im:effectiveDate ?date                      #date must be latest from .....&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)                    #get the maximum date&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}  #diabetes or resolved&lt;br /&gt;
                        ?patient im:hasEvent ?event.                  # patient has event&lt;br /&gt;
                        ?event im:concept ?dores.                     #event has concept in diores set&lt;br /&gt;
                        ?event im:effectiveDate ?date}                #get date&lt;br /&gt;
                           group by ?patient}}                        #group by patient&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
&lt;br /&gt;
There is no need to state that ?patient refers to resources of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Health Record data set style query - SHACL / SPARQL ===&lt;br /&gt;
A data set is normally separated into 3 steps, each of which are defined independently&lt;br /&gt;
&lt;br /&gt;
# Identification of the source of data to be searched. This might be a set of organisations. An example is described above.&lt;br /&gt;
# Definition of a base population of some entity type, which is used to filter any instances of that type in the data set. The base population definition is independent of the subset of the data to be extracted i.e. many data sets may use the same base population. An example is described above&lt;br /&gt;
# Definition of the entities and attributes in the data set. In essence a list of entity types, together with any filtering, and a list of attributes to extract.&lt;br /&gt;
&lt;br /&gt;
From a logical perspective the data set has two main patterns&lt;br /&gt;
&lt;br /&gt;
a) A statement of the entity and attributes in the data set, which are a subset of the entities and attributes within the data model. These are usually restricted to those entities within the base population.&lt;br /&gt;
&lt;br /&gt;
b) A query definition of additional filters of the entities included in the data set e.g. only certain events or only certain values of certain attributes may be included.&lt;br /&gt;
&lt;br /&gt;
==== Example - data set ====&lt;br /&gt;
Let us say that for the population of active diabetes we wish to extract the first date of their condition, the type of diabetes they had, together with their latest systolic blood pressure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]] &lt;br /&gt;
&lt;br /&gt;
=== Query ===&lt;br /&gt;
It is fair to say that data modelling and semantic ontology is useless without the means of query.&lt;br /&gt;
&lt;br /&gt;
The current approach to the specification of query uses the GRAPHQL approach with type extensions and directive extensions.&lt;br /&gt;
&lt;br /&gt;
Graph QL , (despite its name) is not in itself a query language but a way of representing the graph like structure of a underlying model that has been built using OWL. GRAPH QL has a very simple class property representation, is ideal for REST APIs and results are JSON objects in line with the approach taken by the above Discovery syntax. &lt;br /&gt;
&lt;br /&gt;
Nevertheless, GRAPHQL considers properties to be functions (high order logic) and therefore properties can accept parameters. For example, a patient&#039;s average systolic blood pressure reading could be considered a property with a single parameter being a list of the last 3 blood pressure readings. Parameters are types and types can be created and extended.&lt;br /&gt;
&lt;br /&gt;
In addition GRAPHQL supports the idea of extensions of directives which further extend the grammar.&lt;br /&gt;
&lt;br /&gt;
Thus GRAPHQL capability is extended by enabling property parameters as types to support such things as filtering, sorting and limiting in the same way as an.y other query language by modelling types passed as parameters. Subqueries are then supported in the same way. &lt;br /&gt;
&lt;br /&gt;
GRAPHQL itself is used when the enquirer is familiar with the local logical schema i.e. understands the available types and fields. In order to support semantic web concepts an extension to GRAPHQL, GRAPHQL-LD is used, which is essentially GRAPH-QL with JSON-LD context. &lt;br /&gt;
&lt;br /&gt;
GRAPH QL-LD  has been chosen over SPARQL for reasons of simplicity and many now consider GRAPHQL to be a de-facto standard. However, this is an ongoing consideration.&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5794</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5794"/>
		<updated>2021-09-26T10:47:24Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes a language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance.&lt;br /&gt;
&lt;br /&gt;
The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model as can be seen on the right. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Health Record cohort style query - SHACL/SPARQL ===&lt;br /&gt;
From a logical perspective there is no difference between querying instance data from the catalogue and health records.&lt;br /&gt;
&lt;br /&gt;
Data sets are normally based on a base  population of some kind such as a cohort of patients.&lt;br /&gt;
&lt;br /&gt;
==== Example- patient cohort based on events ====&lt;br /&gt;
For example, let us define active diabetics, which are people who have had the condition of diabetes recorded and may or may not have a record of it being resolved, but if so, then the date of the active diabetes record must be after the date of resolution (otherwise their diabetes would be resolved).&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dds:ActiveDiabetics                                                  		//   iri for cohort definition&lt;br /&gt;
    rdfs:label “Patients with active diabetes”;&lt;br /&gt;
    sh:target [&lt;br /&gt;
    sh:targetType sh:SPARQLTarget;&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Select ?patient&lt;br /&gt;
           where {?patient im:hasEvent ?event.&lt;br /&gt;
                ?event im:concept im:SET_Diabetes.&lt;br /&gt;
                  ?event im:effectiveDate ?date&lt;br /&gt;
                   FILTER (?date &amp;gt;= ?max)&lt;br /&gt;
            {Select ?patient (max(?date) as ?max)&lt;br /&gt;
                 where {&lt;br /&gt;
                     VALUES ?dores {im:SET_Diabetes im:SET_Resolved}&lt;br /&gt;
                        ?patient im:hasEvent ?event.&lt;br /&gt;
                        ?event im:concept ?dores.&lt;br /&gt;
                        ?event im:effectiveDate ?date}&lt;br /&gt;
                           group by ?patient}}&lt;br /&gt;
               &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This states the following&lt;br /&gt;
&lt;br /&gt;
1.      First as a subquery find patient and their most recent date of events, with concepts of diabetes or resolved, group by patient&lt;br /&gt;
&lt;br /&gt;
2.      Then as an outer query find matching patients with events with concepts of diabetes whose date for is the same or greater than the patient’s most recent date from the sub query.&lt;br /&gt;
There are some implicit assumptions in this query definition that the query interpreter should use:&lt;br /&gt;
There is no need to state that ?patient refers to resoueces of type patient. This is because within the IM, the domain of &amp;quot;im:hasEvent&amp;quot; IS a patient and therefore only patient resources will be retrieved&lt;br /&gt;
&lt;br /&gt;
There is no need to explicitly state that the concepts being searched for are members of the set of diabetes. The interpreter uses &#039;Entailment&#039; which means that any member of a concept set (or indeed, any sub property or subclass) will be entailed in the statement.&lt;br /&gt;
&lt;br /&gt;
The result of this is a simpler definition. The above when implemented on a relational database would expect the concept set to be expanded to a list of members. &lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]] &lt;br /&gt;
&lt;br /&gt;
=== Query ===&lt;br /&gt;
It is fair to say that data modelling and semantic ontology is useless without the means of query.&lt;br /&gt;
&lt;br /&gt;
The current approach to the specification of query uses the GRAPHQL approach with type extensions and directive extensions.&lt;br /&gt;
&lt;br /&gt;
Graph QL , (despite its name) is not in itself a query language but a way of representing the graph like structure of a underlying model that has been built using OWL. GRAPH QL has a very simple class property representation, is ideal for REST APIs and results are JSON objects in line with the approach taken by the above Discovery syntax. &lt;br /&gt;
&lt;br /&gt;
Nevertheless, GRAPHQL considers properties to be functions (high order logic) and therefore properties can accept parameters. For example, a patient&#039;s average systolic blood pressure reading could be considered a property with a single parameter being a list of the last 3 blood pressure readings. Parameters are types and types can be created and extended.&lt;br /&gt;
&lt;br /&gt;
In addition GRAPHQL supports the idea of extensions of directives which further extend the grammar.&lt;br /&gt;
&lt;br /&gt;
Thus GRAPHQL capability is extended by enabling property parameters as types to support such things as filtering, sorting and limiting in the same way as an.y other query language by modelling types passed as parameters. Subqueries are then supported in the same way. &lt;br /&gt;
&lt;br /&gt;
GRAPHQL itself is used when the enquirer is familiar with the local logical schema i.e. understands the available types and fields. In order to support semantic web concepts an extension to GRAPHQL, GRAPHQL-LD is used, which is essentially GRAPH-QL with JSON-LD context. &lt;br /&gt;
&lt;br /&gt;
GRAPH QL-LD  has been chosen over SPARQL for reasons of simplicity and many now consider GRAPHQL to be a de-facto standard. However, this is an ongoing consideration.&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5793</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5793"/>
		<updated>2021-09-26T10:35:57Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes a language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance.&lt;br /&gt;
&lt;br /&gt;
The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model as can be seen on the right. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]] &lt;br /&gt;
&lt;br /&gt;
=== Query ===&lt;br /&gt;
It is fair to say that data modelling and semantic ontology is useless without the means of query.&lt;br /&gt;
&lt;br /&gt;
The current approach to the specification of query uses the GRAPHQL approach with type extensions and directive extensions.&lt;br /&gt;
&lt;br /&gt;
Graph QL , (despite its name) is not in itself a query language but a way of representing the graph like structure of a underlying model that has been built using OWL. GRAPH QL has a very simple class property representation, is ideal for REST APIs and results are JSON objects in line with the approach taken by the above Discovery syntax. &lt;br /&gt;
&lt;br /&gt;
Nevertheless, GRAPHQL considers properties to be functions (high order logic) and therefore properties can accept parameters. For example, a patient&#039;s average systolic blood pressure reading could be considered a property with a single parameter being a list of the last 3 blood pressure readings. Parameters are types and types can be created and extended.&lt;br /&gt;
&lt;br /&gt;
In addition GRAPHQL supports the idea of extensions of directives which further extend the grammar.&lt;br /&gt;
&lt;br /&gt;
Thus GRAPHQL capability is extended by enabling property parameters as types to support such things as filtering, sorting and limiting in the same way as an.y other query language by modelling types passed as parameters. Subqueries are then supported in the same way. &lt;br /&gt;
&lt;br /&gt;
GRAPHQL itself is used when the enquirer is familiar with the local logical schema i.e. understands the available types and fields. In order to support semantic web concepts an extension to GRAPHQL, GRAPHQL-LD is used, which is essentially GRAPH-QL with JSON-LD context. &lt;br /&gt;
&lt;br /&gt;
GRAPH QL-LD  has been chosen over SPARQL for reasons of simplicity and many now consider GRAPHQL to be a de-facto standard. However, this is an ongoing consideration.&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5792</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5792"/>
		<updated>2021-09-26T10:35:04Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes a language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance.&lt;br /&gt;
&lt;br /&gt;
The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model as can be seen on the right. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
==== Identifiers, aliasing  prefixes and context ====&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model - SHACL ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions - SHACL/SPARQL ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Catalogue query - SHACL/SPARQL ===&lt;br /&gt;
In the same way that concept sets use SHACL/SPARQL to query the ontology, instance data can be queried as a set in the same way.&lt;br /&gt;
&lt;br /&gt;
==== Example -reference data set ====&lt;br /&gt;
It is often the case that a subscriber wishes to access data from only a limited number of source publishers i.e. a set of organisations.&lt;br /&gt;
&lt;br /&gt;
During the query process, this set of organisations will be used to filter organisations according to their data controller.&lt;br /&gt;
&lt;br /&gt;
Whilst these may be selected as a static it is also possible to define a set by certain criteria so that the definition can be re-used&lt;br /&gt;
&lt;br /&gt;
Using the same technique – A set can be defined, for example&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:SET_OrgSetNELGP&lt;br /&gt;
   a sh:NodeShape, im:Set;&lt;br /&gt;
   rdfs:label &amp;quot;North East London commissioned general practices located in E1&amp;quot;&lt;br /&gt;
  sh:target [&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                              #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
            Where {&lt;br /&gt;
              ?this rdf:type im:Organisation;                        #Searching the organisation resources			                                                 &lt;br /&gt;
   	            im:commissionedBy org:NELCCG;	              # commissioned by NELCCG&lt;br /&gt;
                    im:organisationType im:GPPracticeType;           # organisation type general practice			&lt;br /&gt;
                    im:hasMainLocation/ im:address/ im:postcode &lt;br /&gt;
                                                        ?postCode&lt;br /&gt;
                    FILTER regex (?postCode, “^E1”)                                    &lt;br /&gt;
                                                                   # Main location with address with post &lt;br /&gt;
                                                                     code starting with E1  &lt;br /&gt;
  &amp;quot;&amp;quot;&amp;quot;                                                                   &lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]] &lt;br /&gt;
&lt;br /&gt;
=== Query ===&lt;br /&gt;
It is fair to say that data modelling and semantic ontology is useless without the means of query.&lt;br /&gt;
&lt;br /&gt;
The current approach to the specification of query uses the GRAPHQL approach with type extensions and directive extensions.&lt;br /&gt;
&lt;br /&gt;
Graph QL , (despite its name) is not in itself a query language but a way of representing the graph like structure of a underlying model that has been built using OWL. GRAPH QL has a very simple class property representation, is ideal for REST APIs and results are JSON objects in line with the approach taken by the above Discovery syntax. &lt;br /&gt;
&lt;br /&gt;
Nevertheless, GRAPHQL considers properties to be functions (high order logic) and therefore properties can accept parameters. For example, a patient&#039;s average systolic blood pressure reading could be considered a property with a single parameter being a list of the last 3 blood pressure readings. Parameters are types and types can be created and extended.&lt;br /&gt;
&lt;br /&gt;
In addition GRAPHQL supports the idea of extensions of directives which further extend the grammar.&lt;br /&gt;
&lt;br /&gt;
Thus GRAPHQL capability is extended by enabling property parameters as types to support such things as filtering, sorting and limiting in the same way as an.y other query language by modelling types passed as parameters. Subqueries are then supported in the same way. &lt;br /&gt;
&lt;br /&gt;
GRAPHQL itself is used when the enquirer is familiar with the local logical schema i.e. understands the available types and fields. In order to support semantic web concepts an extension to GRAPHQL, GRAPHQL-LD is used, which is essentially GRAPH-QL with JSON-LD context. &lt;br /&gt;
&lt;br /&gt;
GRAPH QL-LD  has been chosen over SPARQL for reasons of simplicity and many now consider GRAPHQL to be a de-facto standard. However, this is an ongoing consideration.&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5791</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5791"/>
		<updated>2021-09-26T10:25:54Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Example - complex set */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes a language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance.&lt;br /&gt;
&lt;br /&gt;
The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model as can be seen on the right. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
=== Identifiers aliasing and context ===&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== Example - complex set ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]] &lt;br /&gt;
&lt;br /&gt;
=== Query ===&lt;br /&gt;
It is fair to say that data modelling and semantic ontology is useless without the means of query.&lt;br /&gt;
&lt;br /&gt;
The current approach to the specification of query uses the GRAPHQL approach with type extensions and directive extensions.&lt;br /&gt;
&lt;br /&gt;
Graph QL , (despite its name) is not in itself a query language but a way of representing the graph like structure of a underlying model that has been built using OWL. GRAPH QL has a very simple class property representation, is ideal for REST APIs and results are JSON objects in line with the approach taken by the above Discovery syntax. &lt;br /&gt;
&lt;br /&gt;
Nevertheless, GRAPHQL considers properties to be functions (high order logic) and therefore properties can accept parameters. For example, a patient&#039;s average systolic blood pressure reading could be considered a property with a single parameter being a list of the last 3 blood pressure readings. Parameters are types and types can be created and extended.&lt;br /&gt;
&lt;br /&gt;
In addition GRAPHQL supports the idea of extensions of directives which further extend the grammar.&lt;br /&gt;
&lt;br /&gt;
Thus GRAPHQL capability is extended by enabling property parameters as types to support such things as filtering, sorting and limiting in the same way as an.y other query language by modelling types passed as parameters. Subqueries are then supported in the same way. &lt;br /&gt;
&lt;br /&gt;
GRAPHQL itself is used when the enquirer is familiar with the local logical schema i.e. understands the available types and fields. In order to support semantic web concepts an extension to GRAPHQL, GRAPHQL-LD is used, which is essentially GRAPH-QL with JSON-LD context. &lt;br /&gt;
&lt;br /&gt;
GRAPH QL-LD  has been chosen over SPARQL for reasons of simplicity and many now consider GRAPHQL to be a de-facto standard. However, this is an ongoing consideration.&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5790</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5790"/>
		<updated>2021-09-26T10:25:21Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes a language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance.&lt;br /&gt;
&lt;br /&gt;
The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model as can be seen on the right. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sublanguages and syntaxes ==&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes - RDF, TURTLE and JSON-LD ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
=== Identifiers aliasing and context ===&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology - OWL2 DL ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== The ubiquitous ISA and inferred views. ====&lt;br /&gt;
OWL has a number of ways of handling sub types. The axioms &amp;quot;subclass of&amp;quot;, &amp;quot;sub property of&amp;quot; or &amp;quot;equivalent class&amp;quot; indicate sub types. In the information model, in line with Snomed-CT the predicate &amp;quot;is a&amp;quot; is used as a supertype in order to simplify the sub typing. In addition, &#039;is a&#039; assumes that the ontology is classified i.e. from the stated axioms, a subtype hierarchy has been produced by a reasoner, and it is the sub type hierarchy that &#039;is a&#039; refers to.&lt;br /&gt;
&lt;br /&gt;
In other words, for every subclass or equivalent class stated axiom an &#039;is a&#039; relationship is generated, and this is used throughout the model when using query. &lt;br /&gt;
&lt;br /&gt;
Similarly, when querying for properties, the stated axioms can create complex sub property and sub range logic. Consequently, the &#039;inferred view&#039; is assumed in query i.e. where a descendant concept inherits its properties directly, unless overridden by sub properties.&lt;br /&gt;
&lt;br /&gt;
In practical implementation of the IM both isa and inferred properties are explicitly modelled as direct relationships enabling the ontology to be queries without the need for axioms within the query itself. &lt;br /&gt;
&lt;br /&gt;
==== Use of Annotation properties for original codes====&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Data model ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
SHACL for part of Encounter record type data model, note that it is both a class and a shape so it is classified as a subclass of an event which means it inherits the properties of an event (such as effective date), but the super class &amp;quot;has concept&amp;quot; property has a range constrained to a London extension&amp;quot; which is the class of encounter types such as gp consultation.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:Encounter&lt;br /&gt;
 a sh:NodeShape , owl:Class;&lt;br /&gt;
     rdfs:label &amp;quot;Encounter (record type)&amp;quot; .&lt;br /&gt;
     im:isA im:Event ;&lt;br /&gt;
     im:status im:Active;&lt;br /&gt;
     rdfs:subClassOf im:PatientEvent;&lt;br /&gt;
     &lt;br /&gt;
     rdfs:comment &amp;quot;An interaction between a patient (or on behalf of the patient) and a health professional or health provider. It includes consultations as well as care processes such as admission, discharges. It also includes the noting of a filing of a document or report.&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     sh:property &lt;br /&gt;
          [sh:path im:additionalPractitioners;&lt;br /&gt;
           sh:class im:PractitionerInRole] , &lt;br /&gt;
          [sh:path im:completionStatus;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:duration;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:894281000252100] , &lt;br /&gt;
          [sh:path im:linkedAppointment;&lt;br /&gt;
           sh:class im:Appointment] , &lt;br /&gt;
          [sh:path im:concept;&lt;br /&gt;
           sh:maxCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:minCount &amp;quot;1&amp;quot;^^xsd:integer;&lt;br /&gt;
           sh:class im:1741000252102]&lt;br /&gt;
         ......&lt;br /&gt;
         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set definitions ===&lt;br /&gt;
In line with expression constraint language, defining a set is a query over the ontology resulting in a set of concepts to use in a subsequent query.&lt;br /&gt;
&lt;br /&gt;
The information model uses SHACL to define the set meta data (e.g. the name of the set, the fact that it is a set etc) and SPARQL for the expression constraint.&lt;br /&gt;
&lt;br /&gt;
SHACL has the idea of &amp;quot;focus node&amp;quot; which is an RDF node that the shape wishes to validate. As the focus node of a set are all members of the class of concept, then there has to be a way of narrowing down the nodes from the millions of concepts. SHACL has the idea of &#039;custom target&#039; which is a filter applied to the graph. A typical custom target is a SPARQL target and therefore a SPARQL target is used to specify the constraint.&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Example - complex set&#039;&#039;&#039; ====&lt;br /&gt;
Lets say a commissioner needs to know who the patients are that have had Covid vaccines.&lt;br /&gt;
&lt;br /&gt;
Covid vaccines are recorded either as immunisation records, or medication records, or both.  To query the medication records, a set of vaccine medication concepts are searched for, these being stored in medication order record entries. Covid vaccines change every few weeks as new brands or strengths are released.&lt;br /&gt;
&lt;br /&gt;
A definition of a covid vaccine is helpful, thus a concept set is defined.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
im:CSET_CVSMeds&lt;br /&gt;
  a im:ConceptSet,sh:NodeShape;&lt;br /&gt;
  rdfs:label &amp;quot;Covid vaccine study medication set&amp;quot;;&lt;br /&gt;
 sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this                                                #Select concept&lt;br /&gt;
         Where {                                                 #where the concept is….&lt;br /&gt;
               {?this im:isA sn:39330711000001103}         # is a Covid vaccine&lt;br /&gt;
           UNION                                                    #or (&lt;br /&gt;
              {?this im:isA sn:10363601000001109.          # is a uk product&lt;br /&gt;
                                                                      #and&lt;br /&gt;
             ?this sn:10362601000001103 sn:10362601000001103} }      #has vmp Covd vaccine)&lt;br /&gt;
&lt;br /&gt;
            &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
].&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above states that a covid vaccine must be a subtype of either&lt;br /&gt;
&lt;br /&gt;
a)      a  covid vaccine product&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
b)       a UK product and which is both an  actual product which is a covid vaccine virtual medicinal product. &lt;br /&gt;
&lt;br /&gt;
Note the direct use of inferred &#039;is a&#039; and property restrictions, avoiding the need for complex axiom &lt;br /&gt;
&lt;br /&gt;
==== Example Set with exclusion ====&lt;br /&gt;
It is common to remove certain subclasses. OWL Object complement cannot be used for this due to the open world assumption.&lt;br /&gt;
&lt;br /&gt;
Exclusion assumes something to exclude against (i.e. a set of things from which to exclude)&lt;br /&gt;
&lt;br /&gt;
Let us assume that we define an event type of &#039;procedure&#039; and we model a procedure as having a property of &#039;concept&#039; whose range is the class of procedures as defined by Snomed-CT. Within Snomed-CT, immunisations are also classified as procedures but within the data model they are classified as immunisations. Consequently in the procedure value set we wish to exclude immunisations.&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
im:VSET_Category_Procedures&lt;br /&gt;
     a im:ValueSet, sh:NodeShape;&lt;br /&gt;
    rdfs:label &amp;quot;Value set -  Procedures&amp;quot; ;&lt;br /&gt;
  sh:target [                                                      #Custom target for the shape&lt;br /&gt;
   sh:targetType sh:SPARQLTarget;                                 #Focus nodes are sparql results&lt;br /&gt;
    sh:select &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
      Select ?this        &lt;br /&gt;
       Where {&lt;br /&gt;
              ?this im:isA sn:71388002.                         # is a procedure    &lt;br /&gt;
             MINUS {&lt;br /&gt;
              ?this im:isa ?exclusions                          #Minus  is a exclusions&lt;br /&gt;
              VALUES ?exclusions {  sn:33879002  sn:51116004 }  #which are vaccination, passive immunisation&lt;br /&gt;
                              } } &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
]                                                                                                                                         &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]] &lt;br /&gt;
&lt;br /&gt;
=== Query ===&lt;br /&gt;
It is fair to say that data modelling and semantic ontology is useless without the means of query.&lt;br /&gt;
&lt;br /&gt;
The current approach to the specification of query uses the GRAPHQL approach with type extensions and directive extensions.&lt;br /&gt;
&lt;br /&gt;
Graph QL , (despite its name) is not in itself a query language but a way of representing the graph like structure of a underlying model that has been built using OWL. GRAPH QL has a very simple class property representation, is ideal for REST APIs and results are JSON objects in line with the approach taken by the above Discovery syntax. &lt;br /&gt;
&lt;br /&gt;
Nevertheless, GRAPHQL considers properties to be functions (high order logic) and therefore properties can accept parameters. For example, a patient&#039;s average systolic blood pressure reading could be considered a property with a single parameter being a list of the last 3 blood pressure readings. Parameters are types and types can be created and extended.&lt;br /&gt;
&lt;br /&gt;
In addition GRAPHQL supports the idea of extensions of directives which further extend the grammar.&lt;br /&gt;
&lt;br /&gt;
Thus GRAPHQL capability is extended by enabling property parameters as types to support such things as filtering, sorting and limiting in the same way as an.y other query language by modelling types passed as parameters. Subqueries are then supported in the same way. &lt;br /&gt;
&lt;br /&gt;
GRAPHQL itself is used when the enquirer is familiar with the local logical schema i.e. understands the available types and fields. In order to support semantic web concepts an extension to GRAPHQL, GRAPHQL-LD is used, which is essentially GRAPH-QL with JSON-LD context. &lt;br /&gt;
&lt;br /&gt;
GRAPH QL-LD  has been chosen over SPARQL for reasons of simplicity and many now consider GRAPHQL to be a de-facto standard. However, this is an ongoing consideration.&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5789</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5789"/>
		<updated>2021-09-26T09:33:55Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes a language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance.&lt;br /&gt;
&lt;br /&gt;
The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model as can be seen on the right. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Contributory languages ==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.&lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
The modelling language is an amalgam of the following languages:&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/REC-rdf-syntax/ RDF.] An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph. RDF Forms the statements describing the data. RDF in itself holds no semantics whatsoever. i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things. RDF can be represented using either TURTLE syntax or JSON-LD.&lt;br /&gt;
* [https://www.w3.org/TR/rdf-schema/ RDFS]. This is the first of the semantic languages. It is used for the purposes of some of the ontology axioms such as subclasses, domains and ranges as well as the standard annotation properties such as &#039;label&#039;&lt;br /&gt;
* [https://www.w3.org/TR/owl2-primer/ OWL2 DL.] This brings with it more sophisticated description logic such as equivalent classes and existential quantifications and is used in the ontology and for defining things when an open world assumption is required&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL]. Used for everything that defines the shape of data where a closed world assumption is required. Although SHACL is designed for validation of RDF, as SHACL describes what  things &#039;should be&#039; it can be used as a data modelling language&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL] Used as the logical means of querying model conformant data (not to be confused with the actual query language used which may be SQL)&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example (OWL2)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider a definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male &#039;&#039;and&#039;&#039; has children who are people that must have children.&lt;br /&gt;
&lt;br /&gt;
using the turtle language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
:Grandfather&lt;br /&gt;
   owl:EquivalentClass [&lt;br /&gt;
      owl:intersectionOf &lt;br /&gt;
              :Person,                             &lt;br /&gt;
              [owl:onProperty :hasGender;&lt;br /&gt;
               owl:somValuesFrom :Male],&lt;br /&gt;
              [owl:onProperty :hasChild;&lt;br /&gt;
               owl:somValuesFrom  [owl:intersectionOf&lt;br /&gt;
                                           :Person,                 &lt;br /&gt;
                                         [owl:onProperty :hasChild;&lt;br /&gt;
                                          owl:someValuesFrom :Person] ) ])     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;:Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;owl:EquivalentClass&amp;quot; : [&lt;br /&gt;
            {&amp;quot;owl:intersectionOf&amp;quot; :[&lt;br /&gt;
                     { &amp;quot;@id&amp;quot;: &amp;quot;Person&amp;quot;},&lt;br /&gt;
                     { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasGender&amp;quot;,&lt;br /&gt;
                       &amp;quot;owl:somValuesFrom&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                     &lt;br /&gt;
                      { &amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                        &amp;quot;owl:somveValuesFrom&amp;quot; : {&lt;br /&gt;
                           &amp;quot;owl:intersectionOf&amp;quot;: [&lt;br /&gt;
                                { &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;owl:onProperty&amp;quot; : &amp;quot;:hasChild&amp;quot;,&lt;br /&gt;
                                  &amp;quot;owl:someValuesFrom&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
=== Identifiers aliasing and context ===&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology structures and vocabulary ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Use of Annotation properties for original codes===&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Shape structures and vocabulary  ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]] &lt;br /&gt;
&lt;br /&gt;
=== Query ===&lt;br /&gt;
It is fair to say that data modelling and semantic ontology is useless without the means of query.&lt;br /&gt;
&lt;br /&gt;
The current approach to the specification of query uses the GRAPHQL approach with type extensions and directive extensions.&lt;br /&gt;
&lt;br /&gt;
Graph QL , (despite its name) is not in itself a query language but a way of representing the graph like structure of a underlying model that has been built using OWL. GRAPH QL has a very simple class property representation, is ideal for REST APIs and results are JSON objects in line with the approach taken by the above Discovery syntax. &lt;br /&gt;
&lt;br /&gt;
Nevertheless, GRAPHQL considers properties to be functions (high order logic) and therefore properties can accept parameters. For example, a patient&#039;s average systolic blood pressure reading could be considered a property with a single parameter being a list of the last 3 blood pressure readings. Parameters are types and types can be created and extended.&lt;br /&gt;
&lt;br /&gt;
In addition GRAPHQL supports the idea of extensions of directives which further extend the grammar.&lt;br /&gt;
&lt;br /&gt;
Thus GRAPHQL capability is extended by enabling property parameters as types to support such things as filtering, sorting and limiting in the same way as an.y other query language by modelling types passed as parameters. Subqueries are then supported in the same way. &lt;br /&gt;
&lt;br /&gt;
GRAPHQL itself is used when the enquirer is familiar with the local logical schema i.e. understands the available types and fields. In order to support semantic web concepts an extension to GRAPHQL, GRAPHQL-LD is used, which is essentially GRAPH-QL with JSON-LD context. &lt;br /&gt;
&lt;br /&gt;
GRAPH QL-LD  has been chosen over SPARQL for reasons of simplicity and many now consider GRAPHQL to be a de-facto standard. However, this is an ongoing consideration.&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5788</id>
		<title>Health Information modelling language - overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Health_Information_modelling_language_-_overview&amp;diff=5788"/>
		<updated>2021-09-26T08:58:26Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Purpose of the language. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes a language used for creating information models used in health records, as well as the means by which health record queries can be defined in a system independent manner.&lt;br /&gt;
&lt;br /&gt;
For those familiar with the semantic web languages, it is safe to assume that the language described herein is simply a dialect (or profile) of the standard W3C recommendations of RDF, RDFS, OWL2, SHACL and SPARQL. The profile is designed to simplify implementations of the model and to constrain it’s features to ensure relevance and optimum performance.&lt;br /&gt;
&lt;br /&gt;
The language is designed to support an information model conceived as a graph  and thus implementation of the model and related health data are represented logically as a graph.&lt;br /&gt;
&lt;br /&gt;
Before tackling the language it is worth reading the article on [[Health Information modelling|information modelling.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Purpose background and rationale ==&lt;br /&gt;
Question: Yet another language? Surely not.&lt;br /&gt;
&lt;br /&gt;
Answer: No, not at all. What can be stated though is that it is not a health domain language. It is a language used commonly across all sectors across the world, applied to the health and social care domain. &lt;br /&gt;
&lt;br /&gt;
One of the ambitions of the language is to free the representation of health data from the modelling silos within healthcare itself. This is based on the principle that the only difference between health data and other data is the vocabulary and ontologies used.&lt;br /&gt;
&lt;br /&gt;
The following sections first describe the purpose of a modelling language, the background to the Endeavour /Discovery approach and the rationale behind the approach adopted.&lt;br /&gt;
&lt;br /&gt;
For those familiar with semantic web languages this article can be skimmed. There is nothing that is non standard except perhaps to state that the language is a combination of the standard languages.&lt;br /&gt;
&lt;br /&gt;
Subsequently the sections break down the various aspects of the language at ever increasing granularity, emphasising the relationship between the language fragments and the languages from which they are derived, resulting in the definition of the grammar of the language. The relationship between the language and a model store is also described. &lt;br /&gt;
&lt;br /&gt;
=== Purpose of the language. ===&lt;br /&gt;
The language is used to enable the information model to be readable by machines. The language covers all areas of the model and uses different grammars for the different approaches.&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by live systems that have published data, Note that this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records.&lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a modelling language is to exchange data and information about [[Discovery health information model|information models]] in a way that both machines and humans can understand. A language must be able to describe the types of structures that make up an information model as can be seen on the right. Diagrams and pictures are all very well, but they cannot be used by machines. &lt;br /&gt;
&lt;br /&gt;
It is necessary to support both human and machine readability so that a model can be validated both by humans and computers.  Humans can read diagrams or text. Machines can read data bits. The two forms can be brought together as a stream of characters forming a language.  &lt;br /&gt;
&lt;br /&gt;
A purely human based language would be ambiguous, as all human languages are. A language that is both can be used to promote a shared understanding of often complex structures whilst enabling machines to process data in a consistent way. &lt;br /&gt;
&lt;br /&gt;
It is almost always the case that a very precise machine readable language is hard for humans to follow and that a human understandable language is hard to compute consistently. As a compromise, many languages are presented in a variety of grammars and syntaxes, each targeted at different readers. The language in this article all adopt a multi-grammar approach in line with this dual purpose.&lt;br /&gt;
&lt;br /&gt;
Multi grammars are the norm in computer languages. Different software implementations use different technologies and different grammars are needed. The crucial point is that for systems to interoperate effectively, the different grammars must mean the same thing in the end, they are just presented in different ways with different syntaxes.&lt;br /&gt;
&lt;br /&gt;
=== Contributory languages ===&lt;br /&gt;
An information model can be modelled as a Graph i.e. a set of nodes and edges (nodes and relationships, nodes and properties). Likewise, health data can be modelled as a graph conforming to the information model graph.&lt;br /&gt;
&lt;br /&gt;
The world standard approach to a language that models graphs is RDF, which considers a graph to be a series of interconnected triples, a triple consisting of the language grammar of subject, predicate and object. Thus the modelling language uses RDF as its fundamental basis, and can therefore be presented in the RDF grammars. The common grammars used in this article include TURTLE (terse RDF Triple language) and JSON-LD (json linked data) which enables simple JSON identifiers to be contextualised in a way that one set of terms can map directly to internationally defined terms or IRIs.&lt;br /&gt;
&lt;br /&gt;
RDF in itself holds no semantics whatsoever i.e. it is not practical to infer or validate or query based purely on an RDF structure. To use RDF it is necessary to provide semantic definitions for certain predicates and adopt certain conventions. In providing those semantic definitions, the predicates themselves can then be used to semantically define many other things.&lt;br /&gt;
&lt;br /&gt;
The three aspects alluded to above are covered by the logical inclusion of W3C semantic based languages, described further in the sublanguages section of this article.&lt;br /&gt;
&lt;br /&gt;
== What the language must do==&lt;br /&gt;
Health data can be conceptualised as a graph, and thus the model of health data is a graph model.  &lt;br /&gt;
&lt;br /&gt;
The language must be both human and machine readable in text form.&lt;br /&gt;
&lt;br /&gt;
The language must use the recognisable plain language characters in UTF-8. For human readability the characters read from left to right and for machine readability a graph is a character stream from beginning to end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two grammars are required; one for human legibility, and the other for optimised machine processing. However, both must be human and machine readable.&lt;br /&gt;
&lt;br /&gt;
A model presented in the human legible grammar must be translatable directly to the machine representation without loss of semantics. In the ensuing paragraphs the human optimised grammar is illustrated but in the final language specification both are presented side by side to illustrate semantic translatability.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider them definition of a grandfather, in the first example the grandfather is an equivalent to a person who is male and has children who are people that have children.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;turtle&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
Grandfather&lt;br /&gt;
   isEquivalentTo &lt;br /&gt;
              Person,                             &lt;br /&gt;
              [ hasGender Male;                   &lt;br /&gt;
                hasChild Person,                 &lt;br /&gt;
                          [hasChild Person]  ]     &lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Machine oriented grammar ===&lt;br /&gt;
JSON is a popular syntax currently and thus this is used as an alternative.&lt;br /&gt;
&lt;br /&gt;
JSON represents subjects , predicates and objects as object names and values with values being either literals or or objects.&lt;br /&gt;
&lt;br /&gt;
JSON itself has no inherent mechanism of differentiating between different types of entities and therefor JSON-LD is used. In JSON-LD identifiers resolve initially to @id and the use of @context enables prefixed IRIs and aliases.&lt;br /&gt;
&lt;br /&gt;
The above  Grandfather can be represented in JSON-LD (context not shown) as follows:&amp;lt;syntaxhighlight lang=&amp;quot;json-ld&amp;quot; style=&amp;quot;border:3px solid grey&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;@id&amp;quot; : &amp;quot;Grandfather&amp;quot;,&lt;br /&gt;
 &amp;quot;EquivalentTo&amp;quot; :[{ &amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                  {&amp;quot;hasGender&amp;quot;: {&amp;quot;@id&amp;quot;:&amp;quot;Male&amp;quot;}},&lt;br /&gt;
                  {&amp;quot;hasChild&amp;quot;: [{&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;},&lt;br /&gt;
                                {&amp;quot;hasChild&amp;quot; : {&amp;quot;@id&amp;quot;:&amp;quot;Person&amp;quot;}}]]}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Language sublanguage grammar and syntax ==&lt;br /&gt;
&lt;br /&gt;
=== Sub languages ===&lt;br /&gt;
A number of W3C recommended languages are used in their respective grammars and syntaxes for the elements of interest.  This enables multiple levels of interoperability. For example, the information model contains an OWL2 ontology and can therefore be accessed via any of the OWL2 syntaxes. The information model also contains data models in the form of shapes and can therefore be accessed via SHACL. Queries can be exchanged via SPARQL and expression constraints by ECL. &lt;br /&gt;
&lt;br /&gt;
For those who want a consistent syntax encompassing the entire model then Discovery grammar can be used and this is supported via a simplified TURTle, TURTLE itself and JSON-LD as well as JSON serialised java classes that reflect some standard object oriented objects.&lt;br /&gt;
&lt;br /&gt;
Many specialised sublanguages overlap with others in a way that makes them difficult to translate to each other.  For example, in ECL, the reserved word MINUS (used to exclude certain subclasses from a superclass) ,overlaps with SPARQL.&lt;br /&gt;
&lt;br /&gt;
The following sublanguages are supported in TURTLE, JSON-LD or OWL Functional syntax: &lt;br /&gt;
&lt;br /&gt;
*[https://www.w3.org/TR/owl2-primer/ OWL2], which is used for semantic definition and inference. In line with convention, only OWL2 EL is used and thus existential quantification and object intersection can be assumed in its treating of class expressions and axioms.  The open world assumption inherent in OWL means it is very powerful for [[Subsumption test|subsumption]] testing but cannot be used for constraints without abuse of the grammar.&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/shacl/ SHACL,] which is used for data modelling constraint definitions. SHACL can also include OWL constructs but its main emphasis is on cardinality and value constraints. It is an ideal approach for defining logical schemas, and because SHACL uses IRIs and shares conventions with other W3C recommended languages it can be integrated with the other two aspects. Furthermore, as some validation rules require quite advanced processing SHACL can also include query fragments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQ]L, [https://graphql.org/ GRAPHQL] are both used for query. SPARQL forms the basis of interoperable query. GRAPH QL, when presented in JSON-LD is a pragmatic approach to extracting graph results via APIs as its type and directive systems enables  properties to operating as functions or methods.   SPARQL is a more standard W3C query language for graphs but suffers from its own in built flexibility (and an ambiguous issue with subqueries)  making it hard to produce consistent results. Consequently a pragmatic SPARQL profile is supported. The degree of SPARQL is included to the extent that it can be easily interpreted into SQL or other query languages. SPARQL with entailment regimes are in effect SPARQL query with OWL support.&lt;br /&gt;
*[https://www.w3.org/TR/REC-rdf-syntax/ RDF] and RDFS itself. RDF triples can be used to hold objects themselves and an information model will hold many objects which are instances of the classes as defined above (e.g. value sets and other instances) &lt;br /&gt;
&lt;br /&gt;
The information modelling services used by Discovery can interoperate using the above sub-languages, but Discovery also includes a language superset making it easy to integrate. For example it is easy to mix OWL axioms with data model shape constraints as well as value sets  without forcing a misinterpretation of axioms.&lt;br /&gt;
&lt;br /&gt;
=== Foundation grammars and syntaxes ===&lt;br /&gt;
Discovery language has its own Grammars built on the foundations of the W3C RDF grammars:&lt;br /&gt;
&lt;br /&gt;
* A terse abbreviated language, TURTLE&lt;br /&gt;
&lt;br /&gt;
* SPARQL for query&lt;br /&gt;
&lt;br /&gt;
* JSON-LD representation, which can  used by systems that prefer JSON, wish to use standard approaches,  and are able to resolve identifiers via the JSON-LD context structure.&lt;br /&gt;
*Proprietary JSON based object serializable grammar. This directly maps to the internal class structures used in Discovery and can be used by client applications that have a strong contract with a server.&lt;br /&gt;
&lt;br /&gt;
=== Identifiers aliasing and context ===&lt;br /&gt;
Concepts are identified and referenced by the use of International resource identifiers (IRIs). &lt;br /&gt;
&lt;br /&gt;
Identifiers are universal and presented in one of the following forms:&lt;br /&gt;
&lt;br /&gt;
# Full IRI (International resource identifier) which is the fully resolved identifier encompassed by &amp;lt;&amp;gt;&lt;br /&gt;
# Abbreviated IRI  a Prefix followed by a &amp;quot;:&amp;quot; followed by  the local name which is resolved  to a full IRI&lt;br /&gt;
#Aliases. The core language tokens (that are themselves concepts) have aliases for ease of use. For example rdfs:subClassOf is aliased to subClassOf,&lt;br /&gt;
&lt;br /&gt;
There is of course nothing to stop applications using their own aliases and when used with JSON-LD @context may be used to enable the use of aliases.&lt;br /&gt;
&lt;br /&gt;
Data is considered to be linked across the world, which means that IRIs are the main identifiers. However, IRIs can be unwieldy to use and some of the languages such as GRAPH-QL do not use them. Furthermore, when used in JSON, (the main exchange syntax via APIs) they can cause significant bloat. Also, identifiers  such as codes or terms have often been created for local use in local single systems and in isolation are ambiguous.&lt;br /&gt;
&lt;br /&gt;
To  create linked data from local identifiers or vocabulary, the concept of Context is applied. The main form of context in use are:&lt;br /&gt;
&lt;br /&gt;
# PREFIX declaration for IRIs, which enable the use of abbreviated IRIs. This approach is used in OWL, RDF turtle, SHACL and Discovery itself. &lt;br /&gt;
# VOCABULAR CONTEXT declaration for both IRIs and other tokens. This approach is used in JSON-LD which converts local JSON properties and objects into linked data identifiers via the @context keyword. This enables applications that know their context to use simple identifiers such as aliases.&lt;br /&gt;
# MAPPING CONTEXT definitions for system level vocabularies. This provides sufficient context to uniquely identify a local code or term by including details such as the health care provider, the system and the table within a system. In essence a specialised class with the various property values making up the context.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the use of the prefix directives for IRIs and to define aliases for some of the owl and rdfs tokens &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
@prefix :  &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;gt;.&lt;br /&gt;
@prefix rdf:  &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt; .&lt;br /&gt;
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .&lt;br /&gt;
@prefix sh:   &amp;lt;http://www.w3.org/ns/shacl#&amp;gt; .&lt;br /&gt;
@prefix xsd:  &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt; .&lt;br /&gt;
@prefix owl:  &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;.&lt;br /&gt;
@prefix sn: &amp;lt;ttp://snomed.info/sct#&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rdfs:subClassOf :alias (&amp;quot;subClassOf&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
owl:Class  :alias (&amp;quot;Class&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
:alias&lt;br /&gt;
   a owl:DatatypeProperty;&lt;br /&gt;
   &amp;lt;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;gt; &lt;br /&gt;
   (&amp;quot;alias&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
rdfs:label&lt;br /&gt;
    a owl:annotationProperty;&lt;br /&gt;
    :alias (&amp;quot;name&amp;quot; &amp;quot;label&amp;quot;) .&lt;br /&gt;
&lt;br /&gt;
owl:DataTypeProperty&lt;br /&gt;
    a owl:DataTypeProperty;&lt;br /&gt;
    :alias (&amp;quot;dataProperty&amp;quot;) .&lt;br /&gt;
&amp;lt;/pre&amp;gt;As the aliases are defined they can now be used in an abbreviated Turtle syntax, as well as the standard turtle syntax. For example, the following Snomed-CT code is defined as a class and a subclass of another Snomed-CT code.  &amp;lt;pre style=&amp;quot;background-color:#fcfaee&amp;quot;&amp;gt;&lt;br /&gt;
sn:407708003&lt;br /&gt;
a Class;&lt;br /&gt;
name : &amp;quot;Sample appearance (observable entity)&amp;quot;;&lt;br /&gt;
subClassOf sn:407708003.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A JSON-LD equivalent of the above uses context to cover prefixes and aliases in a simpler manner &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;@context&amp;quot; : {&lt;br /&gt;
   &lt;br /&gt;
    &amp;quot;alias&amp;quot; : {&lt;br /&gt;
      &amp;quot;@id&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#alias&amp;quot;,&lt;br /&gt;
      &amp;quot;@type&amp;quot; : &amp;quot;@id&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;@base&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;&amp;quot; : &amp;quot;http://www.DiscoveryDataService.org/InformationModel/Ontology#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdf&amp;quot; : &amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;,&lt;br /&gt;
    &amp;quot;sh&amp;quot; : &amp;quot;http://www.w3.org/ns/shacl#&amp;quot;,&lt;br /&gt;
    &amp;quot;owl&amp;quot; : &amp;quot;http://www.w3.org/2002/07/owl#&amp;quot;,&lt;br /&gt;
    &amp;quot;xsd&amp;quot; : &amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;,&lt;br /&gt;
    &amp;quot;rdfs&amp;quot; : &amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Resulting in the standard JSON-ld context based approach: &amp;lt;syntaxhighlight lang=&amp;quot;jsonld&amp;quot;&amp;gt;&lt;br /&gt;
 {&amp;quot;@id&amp;quot; : &amp;quot;sn:12345&amp;quot;,&lt;br /&gt;
    &amp;quot;@type&amp;quot; : &amp;quot;owl:Class&amp;quot;,&lt;br /&gt;
    &amp;quot;subClassOf&amp;quot; : &amp;quot;sn:34568&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ontology structures and vocabulary ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of reasoning  the semantic ontology axiom and class expression vocabulary uses the tokens and structure from the OWL2 profile [https://www.w3.org/TR/owl2-profiles/#OWL_2_EL OWL EL], which itself is a sublanguage of the [https://www.w3.org/TR/owl2-syntax/ OWL2 language]&lt;br /&gt;
&lt;br /&gt;
However, in addition some standard OWL2 DL axioms are used in order to provide a means of specifying additional relationships that are of value when defining relationships. The following table lists the main owl  types used and example for each.  Note that their aliases are used for brevity. Please refer to the OWL2 specification to describe their meanings&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Owl construct&lt;br /&gt;
!usage examples&lt;br /&gt;
|-&lt;br /&gt;
|Class&lt;br /&gt;
|An entity that is a class concept e.g. A snomed-ct concept or a general concept&lt;br /&gt;
|-&lt;br /&gt;
|ObjectProperty&lt;br /&gt;
|&#039;hasSubject&#039; (an observation &#039;&#039;&#039;has a subject&#039;&#039;&#039; that is a patient)&lt;br /&gt;
|-&lt;br /&gt;
|DataProperty&lt;br /&gt;
|&#039;dateOfBirth&#039;  (a patient record has a date of birth attribute&lt;br /&gt;
|-&lt;br /&gt;
|annotationProperty&lt;br /&gt;
|&#039;description&#039;  (a concept has a description)&lt;br /&gt;
|-&lt;br /&gt;
|SubClassOf&lt;br /&gt;
|Patient is a subclass of a Person&lt;br /&gt;
|-&lt;br /&gt;
|Equivalent To&lt;br /&gt;
|Adverse reaction to Atenolol is equivalent to An adverse reaction to a drug AND has causative agent of Atenolol (substance)&lt;br /&gt;
|-&lt;br /&gt;
|Disjoint with&lt;br /&gt;
|Father is disjoint with Mother&lt;br /&gt;
|-&lt;br /&gt;
|Sub property of &lt;br /&gt;
|has responsible practitioner is a subproperty of has responsible agent&lt;br /&gt;
|-&lt;br /&gt;
|Property chain &lt;br /&gt;
|is sibling of&#039;/ &#039;is parent of&#039; / &#039;has parent&#039; is a sub property chain of &#039;is first cousin of&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Inverse property&lt;br /&gt;
|is subject of is inverse of has subject&lt;br /&gt;
|-&lt;br /&gt;
|Transitive property&lt;br /&gt;
|is child of is transitive&lt;br /&gt;
|-&lt;br /&gt;
|Existential quantification&lt;br /&gt;
|Chest pain and&lt;br /&gt;
Finding site of  - {some} thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Object Intersection&lt;br /&gt;
|Chest pain is equivalent to pain of truncal structure AND finding in region of thorax AND finding site of thoracic structure&lt;br /&gt;
|-&lt;br /&gt;
|Individual&lt;br /&gt;
|All chest pain subclasses but not the specific i&#039;&#039;nstance of acute chest pain&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|DataType definition&lt;br /&gt;
|Date time  is a restriction on a string with a regex that allows approximate dates&lt;br /&gt;
|-&lt;br /&gt;
|Property domain&lt;br /&gt;
|a property domain of has causative agent is allergic reaction&lt;br /&gt;
|-&lt;br /&gt;
|Property range&lt;br /&gt;
|A property range of has causative agent is a substance&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Use of Annotation properties for original codes===&lt;br /&gt;
Annotation properties are the properties that provide information beyond that needed for reasoning.&amp;amp;nbsp; They form no part in the ontological reasoning, but without them, the information model would be impossible for most people to understand. Annotation properties can also be used for implementation supporting properties such as release status, version control, authoring dates and times and so on.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Typical annotation properties are names and descriptions. They are also used as meta data such as a status of a concept or the version of a document.&lt;br /&gt;
&lt;br /&gt;
Many concepts are derived directly from source systems that used them as codes, or even free text.&lt;br /&gt;
&lt;br /&gt;
The concept indicates the source and original code or text (or combination) in the form actually entered into the source system. It should be noted that many systems do not record codes exactly as determined by an official classification or provide codes via mappings from an internal id.&amp;amp;nbsp; It is the codes or text used from the publishers perspective that&amp;amp;nbsp; is used as the source.&lt;br /&gt;
&lt;br /&gt;
Thus in many cases, it is convenient to auto generate a code, which is then placed as the value of the “code” property in the concept, together with the scheme. From this, the provenance of the code can be inferred. &lt;br /&gt;
&lt;br /&gt;
Each code must have a scheme. A scheme may be an official scheme or&amp;amp;nbsp; proprietary scheme or a local scheme related to a particular sub system.&lt;br /&gt;
&lt;br /&gt;
For example, here are some scheme/ code combinations&lt;br /&gt;
{| class=&amp;quot;MsoTableGrid&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Scheme&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Original Code/Text/Context&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Concept code/ Auto code&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Meaning&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Snomed-CT&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;47032000&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Primary hydrocephaly&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS- Read&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;H33-1&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Bronchial asthma&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMIS – EMIS&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;EMLOC_EMISNQCO303&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Confirmed corona virus infection&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order=687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_687309281&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Tested for Coronavirus (misuse of code term in context)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;109&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Barts/Cerner&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;316&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Event/Order= 687309281/ResultTxt= SARS-CoV-2 RNA DETECTED&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;106&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;BC_dsdsdsdx7&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| width=&amp;quot;224&amp;quot; |&amp;lt;span&amp;gt;&amp;lt;span&amp;gt;Positive coronavirus result&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
|}Note that in the last example, the original code is actually text and has been contextualised as being from the Cerner event table, the order field having a value of 687309281 and the result text having a value of ResultTxt= SARS-CoV-2 RNA DETECTED&lt;br /&gt;
&lt;br /&gt;
=== Shape structures and vocabulary  ===&lt;br /&gt;
As in the semantic ontology, the language borrows the constructs from the W3C standard SHACL, which can also be represented in any of the RDF supporting languages such as TURTLE or JSON-LD.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data mapping and matching ===&lt;br /&gt;
&lt;br /&gt;
This part of the language is used to define mappings between the data model and an actual schema to enable query and filers to automatically cope with the ever extending ontology and data properties.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The processes involved in mapping and matching concepts are described in the article on [[Mapping and matching concepts|mapping of concepts codes and structures]] &lt;br /&gt;
&lt;br /&gt;
=== Query ===&lt;br /&gt;
It is fair to say that data modelling and semantic ontology is useless without the means of query.&lt;br /&gt;
&lt;br /&gt;
The current approach to the specification of query uses the GRAPHQL approach with type extensions and directive extensions.&lt;br /&gt;
&lt;br /&gt;
Graph QL , (despite its name) is not in itself a query language but a way of representing the graph like structure of a underlying model that has been built using OWL. GRAPH QL has a very simple class property representation, is ideal for REST APIs and results are JSON objects in line with the approach taken by the above Discovery syntax. &lt;br /&gt;
&lt;br /&gt;
Nevertheless, GRAPHQL considers properties to be functions (high order logic) and therefore properties can accept parameters. For example, a patient&#039;s average systolic blood pressure reading could be considered a property with a single parameter being a list of the last 3 blood pressure readings. Parameters are types and types can be created and extended.&lt;br /&gt;
&lt;br /&gt;
In addition GRAPHQL supports the idea of extensions of directives which further extend the grammar.&lt;br /&gt;
&lt;br /&gt;
Thus GRAPHQL capability is extended by enabling property parameters as types to support such things as filtering, sorting and limiting in the same way as an.y other query language by modelling types passed as parameters. Subqueries are then supported in the same way. &lt;br /&gt;
&lt;br /&gt;
GRAPHQL itself is used when the enquirer is familiar with the local logical schema i.e. understands the available types and fields. In order to support semantic web concepts an extension to GRAPHQL, GRAPHQL-LD is used, which is essentially GRAPH-QL with JSON-LD context. &lt;br /&gt;
&lt;br /&gt;
GRAPH QL-LD  has been chosen over SPARQL for reasons of simplicity and many now consider GRAPHQL to be a de-facto standard. However, this is an ongoing consideration.&lt;br /&gt;
&lt;br /&gt;
=== ABAC language ===&lt;br /&gt;
&#039;&#039;Main article : [[Attribute based access control|ABAC Language]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Discovery attribute based access control language is presented as a pragmatic JSON based profile of the XACML language, modified to use the information model query language (SPARQL) to define policy rules. ABAC attributes are defined in the semantic ontology in the same way as all other classes and properties.&lt;br /&gt;
&lt;br /&gt;
The language is used to support some of the data access authorisation processes as described in the specification - [[Identity Authentication Authorisation|Identity, authentication and authorisation]] .&lt;br /&gt;
&lt;br /&gt;
This article specifies the scope of the language , the grammar and the syntax, together with examples. Whilst presented as a JSON syntax, in line with other components of the information modelling language, the syntax can also be accessed via the ABAC xml schema which includes the baseline Information model XSD schema on the Endeavour GitHub, and example content viewed in the information manager data files folder&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5787</id>
		<title>Discovery health information model</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5787"/>
		<updated>2021-09-26T08:55:50Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Information model language */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the approach taken to producing information models,  including ; what they are, what their purpose is, and what the technical components of the models are. &lt;br /&gt;
&lt;br /&gt;
The article does not include the content of any particular model. &lt;br /&gt;
&lt;br /&gt;
== What is the Discovery health information model (IM)? ==&lt;br /&gt;
The IM is a representation of the meaning and structure of data held in the electronic records of the health and social care sector, together with libraries of query, extract and mappings.&lt;br /&gt;
&lt;br /&gt;
It is an abstract logical model, not a physical structure or schema. As a logical model it models data that may be physically held any a variety of different types of data stores, including relational or graph data stores. Because the model is independent of the physical schemas, the model itself has to be interoperable and without any proprietary lock in.&lt;br /&gt;
&lt;br /&gt;
The IM is a broad model that integrates a set of different approaches to modelling using a common vocabulary. The components of the model are:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by  live systems that have published data, Note that  this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data,  that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are  expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records. &lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The remainder of this article considers how models and ontologies can be constructed using this approach.&lt;br /&gt;
&lt;br /&gt;
== What is different? ==&lt;br /&gt;
The main difference between the Discovery IM and other approaches is the harmonisation of the terms used in the conventional &#039;terminology&#039; domain and the terms used in the conventional &#039;data model&#039; domain. Both are considered part of the one ontology and the concepts often differ only in the approach to their definition.. &lt;br /&gt;
&lt;br /&gt;
For example, an encounter may be defined as an &amp;quot;interaction between a patient (or on behalf of the patient) and a health professional or health provider&amp;quot;.  The definition of an encounter with Description logic as a subclass with some properties can be produced using the open world OWL2 grammar.  &lt;br /&gt;
&lt;br /&gt;
However, an encounter can also be said to be a type of entry in a health record, as modelled in FHIR or openEHR.  From this perspective an encounter will be defined as a logical &#039;schema&#039; with a set of properties such as a date  or encounter type.  &lt;br /&gt;
&lt;br /&gt;
The two disciplines (Description logic and data model constraints) are different, but  they are obviously related. The binding between a data model and the range of values that should be applied to a property blurs the boundary between one and the other. This boundary is artificial and historical and harmonising the two into a single holistic whole enables very flexible storage database designs.&lt;br /&gt;
&lt;br /&gt;
Because ontologies use inheritance and entailment as their main approach to definitions this also enables simple hierarchical approaches to data models. Instead of everyone having to make the same choice between having an encounter table or consultation table, or A&amp;amp;E attendance table, a system can be designed to suit, for example having a single high level table such as an event table, or a small number of core tables with extensions, or a complete library of tables, or no tables at all. A map between the information model and the chosen schema is all that is needed.&amp;lt;br /&amp;gt;Benefits of harmonisation accrue in user interfaces. For example, is a user elects to search for a systolic blood pressure, if the application uses the information model it  knows that a systolic blood pressure is held as a concept which is a value set of the concept property  in an observation and can automatically produce the related properties such as data and value&lt;br /&gt;
== Conceptualisation ==&lt;br /&gt;
[[File:Graph.jpg|thumb|Types of data as a graph]]&lt;br /&gt;
&lt;br /&gt;
The data in a health record stored can be conceptualised as a set of relationships between one thing and many others.&lt;br /&gt;
&lt;br /&gt;
Some people call this a graph. Others call these objects , properties and values. From a grammatical language perspective they are subjects, predicates and objects.&lt;br /&gt;
&lt;br /&gt;
The example on the right is entirely arbitrary but illustrates a problem. What does &amp;quot;condition record&amp;quot; mean, or indeed what is a &amp;quot;condition&amp;quot;? Why is a patient linked to a person and what does &amp;quot;linked to&amp;quot; mean?   &lt;br /&gt;
&lt;br /&gt;
The answer is that the &amp;quot;terms&amp;quot; or &amp;quot;concepts&amp;quot; used in a model should be derived from a vocabulary whose terms have meaning and are formally defined. Some terms have meaning in whatever context they are used whereas others have different meanings in different contexts. In defining terms, it is necessary to defined them precisely enough for a computer to interpret the meaning safely i.e. the context of an idea is part of the idea itself.  &lt;br /&gt;
&lt;br /&gt;
The most difficult challenge is to agree the definition and meaning of the concepts in the context they are used.  The agreement as to a particular model is less important. A definition defines a concept in relation to other concepts. Within a domain of interest such as healthcare, all concepts are indirectly related in some way to all other concepts in that domain.  &lt;br /&gt;
&lt;br /&gt;
Luckily, standards have evolved to enable machine readable definitions. &lt;br /&gt;
&lt;br /&gt;
The crucial step in the discovery approach is to apply this principle to both the things that are being recorded (such as clinical concepts), as well as the structure of entries in records themselves.&lt;br /&gt;
&lt;br /&gt;
== Information model language ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Main article&#039;&#039; [[Health Information modelling language - overview|information modelling language]] describes the language in more detail.&lt;br /&gt;
&lt;br /&gt;
The semantic web approach is adopted. In this approach, data can be described via the use of a plain language grammar consisting of a subject, a predicate, and an object. A triple. The theory is that all health data can be described  in this way (with predicates being extended to include functions).&lt;br /&gt;
&lt;br /&gt;
The consequence of this approach is that W3C web standards can be used such as the use of [[wikipedia:Resource_Description_Framework|Resource Descriptor Framework o]]&amp;lt;nowiki/&amp;gt;r RDF. This sees the world as a set of triples (subject/ predicate/ object) with some things named and somethings anonymous. Systems that adopt this approach can exchange data in a way that the semantics can be preserved. Whilst RDF is an incredibly arcane language at a machine level, the things it can describe can be very intuitive when represented visually. In other words the Information modelling approach involves an RDF Graph.&lt;br /&gt;
&lt;br /&gt;
However RDF has no inherent semantics or schematics. To bring those in the model uses the semantic web languages of RDFS, OWL2 DL and SHACL as its main languages with SPARQL as its query representation. It incorporates ontologies such as Snomed-CT and W3C-PROV.&lt;br /&gt;
&lt;br /&gt;
It is recognised that other languages are in common use. Consequently mappings are constructed to enable the model to be used. For example the Snomed-CT expression constraint language is a common way of defining concept sets. ECL is logically equivalent to a closed world query on an open world OWL ontology. The IM language uses the semantic language of SPARQL together with entailment to model ECL but ECL can be exported or used as input as an alternative.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Information manager==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an information model to be useable, it has to be accessible in some way either via user interfaces or by APIS.&lt;br /&gt;
Thus the information model comes with a set of open source modules making up an application &amp;quot;Information manager&amp;quot; , which is a web based application designed to show the model.&lt;br /&gt;
&lt;br /&gt;
For a web application or set of APIs to be useful there has to be at least one service. There is a free to use  [[information model service]], i.e. an operational service that provides access to one or more information models. &lt;br /&gt;
&lt;br /&gt;
The service provides a set of APIs as well as provide instances of the model for implementations to use directly should they wish to.&lt;br /&gt;
&lt;br /&gt;
All implementation code including the evolving service, APIs, language grammars and object models are also available on Github in the following repositories:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMAPI&lt;br /&gt;
&lt;br /&gt;
A viewer of the information model and an early version of the manager is at:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMViewer&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5786</id>
		<title>Discovery health information model</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5786"/>
		<updated>2021-09-26T08:54:32Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the approach taken to producing information models,  including ; what they are, what their purpose is, and what the technical components of the models are. &lt;br /&gt;
&lt;br /&gt;
The article does not include the content of any particular model. &lt;br /&gt;
&lt;br /&gt;
== What is the Discovery health information model (IM)? ==&lt;br /&gt;
The IM is a representation of the meaning and structure of data held in the electronic records of the health and social care sector, together with libraries of query, extract and mappings.&lt;br /&gt;
&lt;br /&gt;
It is an abstract logical model, not a physical structure or schema. As a logical model it models data that may be physically held any a variety of different types of data stores, including relational or graph data stores. Because the model is independent of the physical schemas, the model itself has to be interoperable and without any proprietary lock in.&lt;br /&gt;
&lt;br /&gt;
The IM is a broad model that integrates a set of different approaches to modelling using a common vocabulary. The components of the model are:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. The ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties, using the vocabulary, that represent the data and relationships as published by  live systems that have published data, Note that  this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data,  that are mapped to a single model.&lt;br /&gt;
# A library of business specific concept and value sets, which are  expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records. &lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The remainder of this article considers how models and ontologies can be constructed using this approach.&lt;br /&gt;
&lt;br /&gt;
== What is different? ==&lt;br /&gt;
The main difference between the Discovery IM and other approaches is the harmonisation of the terms used in the conventional &#039;terminology&#039; domain and the terms used in the conventional &#039;data model&#039; domain. Both are considered part of the one ontology and the concepts often differ only in the approach to their definition.. &lt;br /&gt;
&lt;br /&gt;
For example, an encounter may be defined as an &amp;quot;interaction between a patient (or on behalf of the patient) and a health professional or health provider&amp;quot;.  The definition of an encounter with Description logic as a subclass with some properties can be produced using the open world OWL2 grammar.  &lt;br /&gt;
&lt;br /&gt;
However, an encounter can also be said to be a type of entry in a health record, as modelled in FHIR or openEHR.  From this perspective an encounter will be defined as a logical &#039;schema&#039; with a set of properties such as a date  or encounter type.  &lt;br /&gt;
&lt;br /&gt;
The two disciplines (Description logic and data model constraints) are different, but  they are obviously related. The binding between a data model and the range of values that should be applied to a property blurs the boundary between one and the other. This boundary is artificial and historical and harmonising the two into a single holistic whole enables very flexible storage database designs.&lt;br /&gt;
&lt;br /&gt;
Because ontologies use inheritance and entailment as their main approach to definitions this also enables simple hierarchical approaches to data models. Instead of everyone having to make the same choice between having an encounter table or consultation table, or A&amp;amp;E attendance table, a system can be designed to suit, for example having a single high level table such as an event table, or a small number of core tables with extensions, or a complete library of tables, or no tables at all. A map between the information model and the chosen schema is all that is needed.&amp;lt;br /&amp;gt;Benefits of harmonisation accrue in user interfaces. For example, is a user elects to search for a systolic blood pressure, if the application uses the information model it  knows that a systolic blood pressure is held as a concept which is a value set of the concept property  in an observation and can automatically produce the related properties such as data and value&lt;br /&gt;
== Conceptualisation ==&lt;br /&gt;
[[File:Graph.jpg|thumb|Types of data as a graph]]&lt;br /&gt;
&lt;br /&gt;
The data in a health record stored can be conceptualised as a set of relationships between one thing and many others.&lt;br /&gt;
&lt;br /&gt;
Some people call this a graph. Others call these objects , properties and values. From a grammatical language perspective they are subjects, predicates and objects.&lt;br /&gt;
&lt;br /&gt;
The example on the right is entirely arbitrary but illustrates a problem. What does &amp;quot;condition record&amp;quot; mean, or indeed what is a &amp;quot;condition&amp;quot;? Why is a patient linked to a person and what does &amp;quot;linked to&amp;quot; mean?   &lt;br /&gt;
&lt;br /&gt;
The answer is that the &amp;quot;terms&amp;quot; or &amp;quot;concepts&amp;quot; used in a model should be derived from a vocabulary whose terms have meaning and are formally defined. Some terms have meaning in whatever context they are used whereas others have different meanings in different contexts. In defining terms, it is necessary to defined them precisely enough for a computer to interpret the meaning safely i.e. the context of an idea is part of the idea itself.  &lt;br /&gt;
&lt;br /&gt;
The most difficult challenge is to agree the definition and meaning of the concepts in the context they are used.  The agreement as to a particular model is less important. A definition defines a concept in relation to other concepts. Within a domain of interest such as healthcare, all concepts are indirectly related in some way to all other concepts in that domain.  &lt;br /&gt;
&lt;br /&gt;
Luckily, standards have evolved to enable machine readable definitions. &lt;br /&gt;
&lt;br /&gt;
The crucial step in the discovery approach is to apply this principle to both the things that are being recorded (such as clinical concepts), as well as the structure of entries in records themselves.&lt;br /&gt;
&lt;br /&gt;
== Information model language ==&lt;br /&gt;
&lt;br /&gt;
The semantic web approach is adopted. In this approach, data can be described via the use of a plain language grammar consisting of a subject, a predicate, and an object. A triple. The theory is that all health data can be described  in this way (with predicates being extended to include functions).&lt;br /&gt;
&lt;br /&gt;
The consequence of this approach is that W3C web standards can be used such as the use of [[wikipedia:Resource_Description_Framework|Resource Descriptor Framework o]]&amp;lt;nowiki/&amp;gt;r RDF. This sees the world as a set of triples (subject/ predicate/ object) with some things named and somethings anonymous. Systems that adopt this approach can exchange data in a way that the semantics can be preserved. Whilst RDF is an incredibly arcane language at a machine level, the things it can describe can be very intuitive when represented visually. In other words the Information modelling approach involves an RDF Graph.&lt;br /&gt;
&lt;br /&gt;
However RDF has no inherent semantics or schematics. To bring those in the model uses the semantic web languages of RDFS, OWL2 DL and SHACL as its main languages with SPARQL as its query representation. It incorporates ontologies such as Snomed-CT and W3C-PROV.&lt;br /&gt;
&lt;br /&gt;
It is recognised that other languages are in common use. Consequently mappings are constructed to enable the model to be used. For example the Snomed-CT expression constraint language is a common way of defining concept sets. ECL is logically equivalent to a closed world query on an open world OWL ontology. The IM language uses the semantic language of SPARQL together with entailment to model ECL but ECL can be exported or used as input as an alternative.&lt;br /&gt;
&lt;br /&gt;
Details of the [[Health Information modelling language - overview|information modelling language]] are described in a separate article.&lt;br /&gt;
== Information manager==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an information model to be useable, it has to be accessible in some way either via user interfaces or by APIS.&lt;br /&gt;
Thus the information model comes with a set of open source modules making up an application &amp;quot;Information manager&amp;quot; , which is a web based application designed to show the model.&lt;br /&gt;
&lt;br /&gt;
For a web application or set of APIs to be useful there has to be at least one service. There is a free to use  [[information model service]], i.e. an operational service that provides access to one or more information models. &lt;br /&gt;
&lt;br /&gt;
The service provides a set of APIs as well as provide instances of the model for implementations to use directly should they wish to.&lt;br /&gt;
&lt;br /&gt;
All implementation code including the evolving service, APIs, language grammars and object models are also available on Github in the following repositories:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMAPI&lt;br /&gt;
&lt;br /&gt;
A viewer of the information model and an early version of the manager is at:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMViewer&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5785</id>
		<title>Discovery health information model</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Discovery_health_information_model&amp;diff=5785"/>
		<updated>2021-09-26T08:50:00Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the approach taken to producing information models,  including ; what they are, what their purpose is, and what the technical components of the models are. &lt;br /&gt;
&lt;br /&gt;
The article does not include the content of any particular model. &lt;br /&gt;
&lt;br /&gt;
== What is the Discovery health information model (IM)? ==&lt;br /&gt;
It is a representation of the meaning and structure of data held in the electronic records of the health and social care sector, together with a model of query, extract and mappings.&lt;br /&gt;
&lt;br /&gt;
It is an abstract logical model, not a physical structure or schema. As a logical model it models data that may be physically held any a variety of different types of data stores, including relational or graph data stores.&lt;br /&gt;
&lt;br /&gt;
It is a broad model that integrates a set of different approaches to modelling using a common vocabulary. The components of the model are:&lt;br /&gt;
&lt;br /&gt;
# An ontology, which is a vocabulary and definitions of the concepts used in healthcare, or more simply put, a vocabulary of health. the ontology is made up of the world&#039;s leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling.&lt;br /&gt;
# A data model, which is a set of classes and properties made up of the vocabulary, that represent all of the data relationships as published by  live systems that have published data, Note that  this data model is NOT a standard model but a collated set of entities and relationships bound to the concepts based on real data, mapped to a single model.&lt;br /&gt;
# A library of business specific sets, which are  expression constraints on the ontology for the purpose of query&lt;br /&gt;
# A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.&lt;br /&gt;
# A library of Queries for querying and extracting instance data from reference data or health records. &lt;br /&gt;
# A set of maps creating mappings between published concepts and the core ontology as well as structural mappings between submitted data and the data model.&lt;br /&gt;
# An open source set of utilities that can be used to browse, search, or maintain the model.&lt;br /&gt;
# A modelling language using the World wide web semantic languages that can be used to exchange all elements of the model.&lt;br /&gt;
&lt;br /&gt;
The remainder of this article considers how models and ontologies can be constructed using this approach.&lt;br /&gt;
&lt;br /&gt;
== What is different? ==&lt;br /&gt;
The main difference between the Discovery IM and other approaches is the harmonisation of the terms used in the conventional &#039;terminology&#039; domain and the terms used in the conventional &#039;data model&#039; domain. Both are considered part of the one ontology and the concepts often differ only in the approach to their definition.. &lt;br /&gt;
&lt;br /&gt;
For example, an encounter may be defined as an &amp;quot;interaction between a patient (or on behalf of the patient) and a health professional or health provider&amp;quot;.  The definition of an encounter with Description logic as a subclass with some properties can be produced using the open world OWL2 grammar.  &lt;br /&gt;
&lt;br /&gt;
However, an encounter can also be said to be a type of entry in a health record, as modelled in FHIR or openEHR.  From this perspective an encounter will be defined as a logical &#039;schema&#039; with a set of properties such as a date  or encounter type.  &lt;br /&gt;
&lt;br /&gt;
The two disciplines (Description logic and data model constraints) are different, but  they are obviously related. The binding between a data model and the range of values that should be applied to a property blurs the boundary between one and the other. This boundary is artificial and historical and harmonising the two into a single holistic whole enables very flexible storage database designs.&lt;br /&gt;
&lt;br /&gt;
Because ontologies use inheritance and entailment as their main approach to definitions this also enables simple hierarchical approaches to data models. Instead of everyone having to make the same choice between having an encounter table or consultation table, or A&amp;amp;E attendance table, a system can be designed to suit, for example having a single high level table such as an event table, or a small number of core tables with extensions, or a complete library of tables, or no tables at all. A map between the information model and the chosen schema is all that is needed.&amp;lt;br /&amp;gt;Benefits of harmonisation accrue in user interfaces. For example, is a user elects to search for a systolic blood pressure, if the application uses the information model it  knows that a systolic blood pressure is held as a concept which is a value set of the concept property  in an observation and can automatically produce the related properties such as data and value&lt;br /&gt;
== Conceptualisation ==&lt;br /&gt;
[[File:Graph.jpg|thumb|Types of data as a graph]]&lt;br /&gt;
&lt;br /&gt;
The data in a health record stored can be conceptualised as a set of relationships between one thing and many others.&lt;br /&gt;
&lt;br /&gt;
Some people call this a graph. Others call these objects , properties and values. From a grammatical language perspective they are subjects, predicates and objects.&lt;br /&gt;
&lt;br /&gt;
The example on the right is entirely arbitrary but illustrates a problem. What does &amp;quot;condition record&amp;quot; mean, or indeed what is a &amp;quot;condition&amp;quot;? Why is a patient linked to a person and what does &amp;quot;linked to&amp;quot; mean?   &lt;br /&gt;
&lt;br /&gt;
The answer is that the &amp;quot;terms&amp;quot; or &amp;quot;concepts&amp;quot; used in a model should be derived from a vocabulary whose terms have meaning and are formally defined. Some terms have meaning in whatever context they are used whereas others have different meanings in different contexts. In defining terms, it is necessary to defined them precisely enough for a computer to interpret the meaning safely i.e. the context of an idea is part of the idea itself.  &lt;br /&gt;
&lt;br /&gt;
The most difficult challenge is to agree the definition and meaning of the concepts in the context they are used.  The agreement as to a particular model is less important. A definition defines a concept in relation to other concepts. Within a domain of interest such as healthcare, all concepts are indirectly related in some way to all other concepts in that domain.  &lt;br /&gt;
&lt;br /&gt;
Luckily, standards have evolved to enable machine readable definitions. &lt;br /&gt;
&lt;br /&gt;
The crucial step in the discovery approach is to apply this principle to both the things that are being recorded (such as clinical concepts), as well as the structure of entries in records themselves.&lt;br /&gt;
&lt;br /&gt;
== Information model language ==&lt;br /&gt;
&lt;br /&gt;
The semantic web approach is adopted. In this approach, data can be described via the use of a plain language grammar consisting of a subject, a predicate, and an object. A triple. The theory is that all health data can be described  in this way (with predicates being extended to include functions).&lt;br /&gt;
&lt;br /&gt;
The consequence of this approach is that W3C web standards can be used such as the use of [[wikipedia:Resource_Description_Framework|Resource Descriptor Framework o]]&amp;lt;nowiki/&amp;gt;r RDF. This sees the world as a set of triples (subject/ predicate/ object) with some things named and somethings anonymous. Systems that adopt this approach can exchange data in a way that the semantics can be preserved. Whilst RDF is an incredibly arcane language at a machine level, the things it can describe can be very intuitive when represented visually. In other words the Information modelling approach involves an RDF Graph. &lt;br /&gt;
&lt;br /&gt;
However RDF has no inherent semantics or schematics. To bring those in the model uses the semantic web languages of RDFS, OWL2 DL and SHACL as its main languages with SPARQL as its query representation. It incorporates ontologies such as Snomed-CT and W3C-PROV.&lt;br /&gt;
&lt;br /&gt;
It is recognised that other languages are in common use. Consequently mappings are constructed to enable the model to be used. For example the Snomed-CT expression constraint language is a common way of defining concept sets. ECL is logically equivalent to a closed world query on an open world OWL ontology. The IM language uses the semantic language of SPARQL together with entailment to model ECL but ECL can be exported or used as input as an alternative.&lt;br /&gt;
&lt;br /&gt;
Details of the [[Health Information modelling language - overview|information modelling language]] are described in a separate article.&lt;br /&gt;
== Information manager==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an information model to be useable, it has to be accessible in some way either via user interfaces or by APIS.&lt;br /&gt;
Thus the information model comes with a set of open source modules making up an application &amp;quot;Information manager&amp;quot; , which is a web based application designed to show the model.&lt;br /&gt;
&lt;br /&gt;
For a web application or set of APIs to be useful there has to be at least one service. There is a free to use  [[information model service]], i.e. an operational service that provides access to one or more information models. &lt;br /&gt;
&lt;br /&gt;
The service provides a set of APIs as well as provide instances of the model for implementations to use directly should they wish to.&lt;br /&gt;
&lt;br /&gt;
All implementation code including the evolving service, APIs, language grammars and object models are also available on Github in the following repositories:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMAPI&lt;br /&gt;
&lt;br /&gt;
A viewer of the information model and an early version of the manager is at:&lt;br /&gt;
&lt;br /&gt;
https://github.com/endeavourhealth-discovery/IMViewer&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5713</id>
		<title>Mapping and matching concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5713"/>
		<updated>2021-08-04T14:46:46Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Legacy codes, terms and term codes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Managing codes and taxonomies ==&lt;br /&gt;
Information consists of ideas. Another word for an idea is a &#039;concept&#039; . A concept may be named,( in which case the meaning of the concept can usually be understood), or they may be an unnamed expression, which is made up of a set of interrelated named or unnamed concepts. &lt;br /&gt;
&lt;br /&gt;
For example the term &amp;quot;chest pain&amp;quot; implies the idea of a pain in the chest. In Snomed-CT it is a named concept. &amp;quot;Chest pain, worsened by exercise&amp;quot; may be an example of an expression style concept made up from the concept of &amp;quot;chest pain&amp;quot;, and the statement that it is &amp;quot;made worse by -&amp;gt; exercise&amp;quot;. In this case “made worse by” and “exercise” are both different concepts but no author has yet created a single named concept for this expression.&lt;br /&gt;
&lt;br /&gt;
The new generation of health record management systems tend towards the recording of concepts, with the objective being for the record entry to closely match the idea behind the entry. These types of concepts can be called term based concepts as the term is the thing that describes the idea.&lt;br /&gt;
&lt;br /&gt;
A modern term based concept is defined in relation to other concepts by a set of assertions indicating whether the concept is equivalent to, or a subtype of, a set of other concepts. The standard approach to this is via the use of Description Logic (DL). By using DL, a computer can automatically classify a concept which can result in a computer deducing additional knowledge over and above the human who created the concept. Snomed-CT is the worlds largest ontology of healthcare term based concepts and is authored using DL. A collection of concepts defined in this way constitute an &amp;quot;Ontology&amp;quot; and there is a standard language OWL that is used to represent the definitions.&lt;br /&gt;
&lt;br /&gt;
These types of concepts are referred to as &amp;quot;Core concepts&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The idea of codes originated from a different starting point. The intention of a coded entry is to &#039;&#039;pre-classify&#039;&#039; an entry before it is recorded. The code is designed for a particular set of business processes e.g. analytics or payment and it is important to understand the context in which a code has been used.  A coded concept, being pre-classified, relies on categorisation of the codes, and that classification may or may not imply that one code is a subtype of another. Nothing can be inferred from a code other than its relation to another code as authored.  Consequently, as the philosophy is different, code based concepts have to be dealt with differently from term based concepts, even if they seem to saying the same thing.&lt;br /&gt;
&lt;br /&gt;
Because of their history, it is not always possible to assert the exact meaning of a code. However, it is often the case that meaning can be inferred or approximated from a coded entry. With  preference to move to an ontology, this inference can be achieved via the use of a mapping process that matches  coded concepts to term based concepts that are identified from a code.&lt;br /&gt;
&lt;br /&gt;
These types of concepts are referred to as &amp;quot;legacy concepts&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There are two strategies to link legacy code concepts to core concepts.&lt;br /&gt;
&lt;br /&gt;
1. A coded term may be stated confidently to be the same as, or a variation on, a concept. Typically code systems like Read2 or CTV3 can be dealt with in this way because they are designed to try and capture the idea in the clinicians mind, and they have been incorporated as concepts anyway. Likewise many system supplier codes have been created in this way. In this case the term code can be said to be a term code of the concept. Read2 G33 - Angina pectoris is a term code for the concept of angina pectoris.&lt;br /&gt;
&lt;br /&gt;
2. A coded term might be the same term as a concept but may have been entered without the assertion that is a true representation of a state. Typically code systems such as ICD10 and OPCS fall into this category. E11 - Diabetes type 2, seems to be the same as the concept of diabetes type 2, but was entered without clinician attestation and may have been approximated for payment purposes. In this case a legacy concept is produced and a map between this concept and the similar clinical concept is generated.&lt;br /&gt;
&lt;br /&gt;
A  map is just another form of relationship, but unlike an ontological equivalent or subclass axiom it implies that the relationship is an approximation. It is a sort of statement that something is p&#039;&#039;ossibly or probably similar to s&#039;&#039;omething else and thus has much less weight than an asserted relationship.&lt;br /&gt;
&lt;br /&gt;
Legacy Code based concepts can be mapped to Core concepts , and this enables the use of the vast volumes of data already recorded in systems. Maps must be used with care as it is almost always the case that the use of a mapped code in a query is dependent on the purpose of the query. This means that mappings are more of a guide to the things to include rather than a confident statement of meaning. When querying records the query author may need to determine which codes to include or exclude on a case by case basis.&lt;br /&gt;
&lt;br /&gt;
== Maps between core concepts and legacy concepts ==&lt;br /&gt;
As mentioned above the relationships are managed as mappings which state the type or degree of match. &lt;br /&gt;
&lt;br /&gt;
Maps generally fall into 2 patterns. These are illustrated in the context of code based concepts as follows:&lt;br /&gt;
&lt;br /&gt;
=== Simple match ===&lt;br /&gt;
A core concept may be matched to many code based concepts. In a simple match the legacy concept is deemed to be probably equivalent to, or a subclass of. the code concept&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sn:194828000 |Angina (disorder)&lt;br /&gt;
    :matchedTo emis:G33 |Angina Pectoris|.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Complex optional match ===&lt;br /&gt;
A concept may be matched to a number of alternative concepts and it is expected that a query author may wish to select these. &lt;br /&gt;
&lt;br /&gt;
In this example, the concept &#039;&#039;&#039;:&#039;&#039;&#039; &amp;quot;Ketoacidotic coma due to diabetes mellitus (disorder)&amp;quot; has a complex map which is selection of either &lt;br /&gt;
&lt;br /&gt;
a) Coma unspecified&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
b)  one of either Diabetes mellitus in pregnancy: Pre-existing diabetes mellitus, unspecified, or Diabetes mellitus in pregnancy, unspecified, or Diabetes mellitus arising in pregnancy&lt;br /&gt;
&lt;br /&gt;
In effect meaning that the compound entry in the record would need to have 2 icd 10 codes to fulfill the criteria.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sn:26298008&lt;br /&gt;
  :hasMap [&lt;br /&gt;
       :combinationOf  [ &lt;br /&gt;
                           :oneOf  icd10:R402 ] &lt;br /&gt;
                       [&lt;br /&gt;
                           :oneOf  icd10:O24.3 icd10:O24.9 O24.4]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
== Mapping  source fields ==&lt;br /&gt;
It is equally common to need to map source fields to core data model properties. In the information model a property is considered just another concept.&lt;br /&gt;
&lt;br /&gt;
However, to use mappings for source fields it is necessary to use the context in which the source fields exist.&lt;br /&gt;
&lt;br /&gt;
In the above examples, coded concepts were considered as context independent in the sense that the same code used by many providers and many systems would generally mean the same thing and can be treated the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the same way that codes can be mapped, so can source resource types such as tables or fields, message types or message segments. Mapping may involve functional transformation&lt;br /&gt;
&lt;br /&gt;
=== Defining source context ===&lt;br /&gt;
The first step in managing source concepts is to define the concept in the context of the originator of the data. This employs the use of a context object usually sent as parameters through the REST API. For example the following&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;organisation&amp;quot;: &amp;quot;Barts&amp;quot;,&lt;br /&gt;
  &amp;quot;system&amp;quot; : &amp;quot;CernerMillenium&amp;quot;,&lt;br /&gt;
  &amp;quot;message&amp;quot; :&amp;quot;cds_type_130&amp;quot;,&lt;br /&gt;
  &amp;quot;field&amp;quot; :&amp;quot;admin_cat_code&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mapping nodes ===&lt;br /&gt;
A second step is for the mapping author  to identify whether the source context  is equivalent to another source contexts. This is done in order to rationalise the number of mappings steps needed between a source concept and the final target concept.&lt;br /&gt;
=== Matching to concept ===&lt;br /&gt;
The third step involves creation of a source concept and a core concept. In the above example the source is concept has been mapped to a core concept and the core concept is returned&amp;lt;pre&amp;gt;&lt;br /&gt;
bc:BC_xyz&lt;br /&gt;
  rdfs:label &amp;quot;admin_cat_code&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and potential core map&lt;br /&gt;
&lt;br /&gt;
im:administrative_category_code_on_admission&lt;br /&gt;
           :matchedTo &lt;br /&gt;
           bc:BC_xysdasdasd.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;The information model has fully defined the administrative category property as a property of a subclass of encounter dealing with hospital stays. Consequently the source system&#039;s table and field can be fully mapped to the common model field.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Legacy codes, terms and term codes==&lt;br /&gt;
Legacy or  local codes also require context and the same approach is used as described above. In this case a local code 12345655 mat have different meaning in a ddifferent system. A local code may or may not have any sort of code scheme (the scheme then being implied by the context). In the following example, Barts trust has its own local cerner code scheme.&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;organisation&amp;quot;: &amp;quot;Barts&amp;quot;,&lt;br /&gt;
  &amp;quot;system&amp;quot; : &amp;quot;CernerMillenium&amp;quot;,&lt;br /&gt;
  &amp;quot;message&amp;quot; :&amp;quot;cds_type_130&amp;quot;,&lt;br /&gt;
  &amp;quot;field&amp;quot; :&amp;quot;admin_cat_code&amp;quot;,&lt;br /&gt;
   &amp;quot;codeScheme&amp;quot; :&amp;quot;BartsLocalCodes&amp;quot;,&lt;br /&gt;
  &amp;quot;code&amp;quot; :123445556&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enumerated values ==&lt;br /&gt;
The NHS Data dictionary employs enumerated numeric values for many of its field contents.&lt;br /&gt;
&lt;br /&gt;
These are treated as local codes using the context to create a field specific code scheme. In many cases local trusts have extended the national scheme (or even changed the scheme), and as a result mapping nodes are used for the common codes.&lt;br /&gt;
&lt;br /&gt;
==Decision process for handling codes and terms==&lt;br /&gt;
When incorporating codes and terms into the ontology, there are 4 categories of approach, the selected approach being dependent on the semantic relationship between the legacy and core concept. The categories are:&lt;br /&gt;
&lt;br /&gt;
#Creation of a local concept and creation of a simple &amp;quot;matched to&amp;quot; map between a core concept and a legacy concept. This implies that the legacy concept is a subtype of, or equivalent to the core concept. Examples of these are supplier local codes, Read 2, TPP&lt;br /&gt;
#Creation of a local or legacy concept and a complex &amp;quot;combination of&amp;quot; + some of or one of &amp;quot;mapped to&amp;quot; between a core concept and a legacy concept. This implies a more nuanced relationship meaning that the user may elect how to use the maps when querying records.&lt;br /&gt;
#Mapping of the local context object to a mapping node which maps to a core concept i.e. the core concept is used throughout the data store and the local context is replaced.&lt;br /&gt;
#Mapping of the local context object to a mapping node which maps to a legacy concept which may or may not map from a core concept&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5712</id>
		<title>Mapping and matching concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5712"/>
		<updated>2021-08-04T14:41:27Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Managing codes and taxonomies ==&lt;br /&gt;
Information consists of ideas. Another word for an idea is a &#039;concept&#039; . A concept may be named,( in which case the meaning of the concept can usually be understood), or they may be an unnamed expression, which is made up of a set of interrelated named or unnamed concepts. &lt;br /&gt;
&lt;br /&gt;
For example the term &amp;quot;chest pain&amp;quot; implies the idea of a pain in the chest. In Snomed-CT it is a named concept. &amp;quot;Chest pain, worsened by exercise&amp;quot; may be an example of an expression style concept made up from the concept of &amp;quot;chest pain&amp;quot;, and the statement that it is &amp;quot;made worse by -&amp;gt; exercise&amp;quot;. In this case “made worse by” and “exercise” are both different concepts but no author has yet created a single named concept for this expression.&lt;br /&gt;
&lt;br /&gt;
The new generation of health record management systems tend towards the recording of concepts, with the objective being for the record entry to closely match the idea behind the entry. These types of concepts can be called term based concepts as the term is the thing that describes the idea.&lt;br /&gt;
&lt;br /&gt;
A modern term based concept is defined in relation to other concepts by a set of assertions indicating whether the concept is equivalent to, or a subtype of, a set of other concepts. The standard approach to this is via the use of Description Logic (DL). By using DL, a computer can automatically classify a concept which can result in a computer deducing additional knowledge over and above the human who created the concept. Snomed-CT is the worlds largest ontology of healthcare term based concepts and is authored using DL. A collection of concepts defined in this way constitute an &amp;quot;Ontology&amp;quot; and there is a standard language OWL that is used to represent the definitions.&lt;br /&gt;
&lt;br /&gt;
These types of concepts are referred to as &amp;quot;Core concepts&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The idea of codes originated from a different starting point. The intention of a coded entry is to &#039;&#039;pre-classify&#039;&#039; an entry before it is recorded. The code is designed for a particular set of business processes e.g. analytics or payment and it is important to understand the context in which a code has been used.  A coded concept, being pre-classified, relies on categorisation of the codes, and that classification may or may not imply that one code is a subtype of another. Nothing can be inferred from a code other than its relation to another code as authored.  Consequently, as the philosophy is different, code based concepts have to be dealt with differently from term based concepts, even if they seem to saying the same thing.&lt;br /&gt;
&lt;br /&gt;
Because of their history, it is not always possible to assert the exact meaning of a code. However, it is often the case that meaning can be inferred or approximated from a coded entry. With  preference to move to an ontology, this inference can be achieved via the use of a mapping process that matches  coded concepts to term based concepts that are identified from a code.&lt;br /&gt;
&lt;br /&gt;
These types of concepts are referred to as &amp;quot;legacy concepts&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There are two strategies to link legacy code concepts to core concepts.&lt;br /&gt;
&lt;br /&gt;
1. A coded term may be stated confidently to be the same as, or a variation on, a concept. Typically code systems like Read2 or CTV3 can be dealt with in this way because they are designed to try and capture the idea in the clinicians mind, and they have been incorporated as concepts anyway. Likewise many system supplier codes have been created in this way. In this case the term code can be said to be a term code of the concept. Read2 G33 - Angina pectoris is a term code for the concept of angina pectoris.&lt;br /&gt;
&lt;br /&gt;
2. A coded term might be the same term as a concept but may have been entered without the assertion that is a true representation of a state. Typically code systems such as ICD10 and OPCS fall into this category. E11 - Diabetes type 2, seems to be the same as the concept of diabetes type 2, but was entered without clinician attestation and may have been approximated for payment purposes. In this case a legacy concept is produced and a map between this concept and the similar clinical concept is generated.&lt;br /&gt;
&lt;br /&gt;
A  map is just another form of relationship, but unlike an ontological equivalent or subclass axiom it implies that the relationship is an approximation. It is a sort of statement that something is p&#039;&#039;ossibly or probably similar to s&#039;&#039;omething else and thus has much less weight than an asserted relationship.&lt;br /&gt;
&lt;br /&gt;
Legacy Code based concepts can be mapped to Core concepts , and this enables the use of the vast volumes of data already recorded in systems. Maps must be used with care as it is almost always the case that the use of a mapped code in a query is dependent on the purpose of the query. This means that mappings are more of a guide to the things to include rather than a confident statement of meaning. When querying records the query author may need to determine which codes to include or exclude on a case by case basis.&lt;br /&gt;
&lt;br /&gt;
== Maps between core concepts and legacy concepts ==&lt;br /&gt;
As mentioned above the relationships are managed as mappings which state the type or degree of match. &lt;br /&gt;
&lt;br /&gt;
Maps generally fall into 2 patterns. These are illustrated in the context of code based concepts as follows:&lt;br /&gt;
&lt;br /&gt;
=== Simple match ===&lt;br /&gt;
A core concept may be matched to many code based concepts. In a simple match the legacy concept is deemed to be probably equivalent to, or a subclass of. the code concept&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sn:194828000 |Angina (disorder)&lt;br /&gt;
    :matchedTo emis:G33 |Angina Pectoris|.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Complex optional match ===&lt;br /&gt;
A concept may be matched to a number of alternative concepts and it is expected that a query author may wish to select these. &lt;br /&gt;
&lt;br /&gt;
In this example, the concept &#039;&#039;&#039;:&#039;&#039;&#039; &amp;quot;Ketoacidotic coma due to diabetes mellitus (disorder)&amp;quot; has a complex map which is selection of either &lt;br /&gt;
&lt;br /&gt;
a) Coma unspecified&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
b)  one of either Diabetes mellitus in pregnancy: Pre-existing diabetes mellitus, unspecified, or Diabetes mellitus in pregnancy, unspecified, or Diabetes mellitus arising in pregnancy&lt;br /&gt;
&lt;br /&gt;
In effect meaning that the compound entry in the record would need to have 2 icd 10 codes to fulfill the criteria.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sn:26298008&lt;br /&gt;
  :hasMap [&lt;br /&gt;
       :combinationOf  [ &lt;br /&gt;
                           :oneOf  icd10:R402 ] &lt;br /&gt;
                       [&lt;br /&gt;
                           :oneOf  icd10:O24.3 icd10:O24.9 O24.4]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
== Mapping  source fields ==&lt;br /&gt;
It is equally common to need to map source fields to core data model properties. In the information model a property is considered just another concept.&lt;br /&gt;
&lt;br /&gt;
However, to use mappings for source fields it is necessary to use the context in which the source fields exist.&lt;br /&gt;
&lt;br /&gt;
In the above examples, coded concepts were considered as context independent in the sense that the same code used by many providers and many systems would generally mean the same thing and can be treated the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the same way that codes can be mapped, so can source resource types such as tables or fields, message types or message segments. Mapping may involve functional transformation&lt;br /&gt;
&lt;br /&gt;
=== Defining source context ===&lt;br /&gt;
The first step in managing source concepts is to define the concept in the context of the originator of the data. This employs the use of a context object usually sent as parameters through the REST API. For example the following&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;organisation&amp;quot;: &amp;quot;Barts&amp;quot;,&lt;br /&gt;
  &amp;quot;system&amp;quot; : &amp;quot;CernerMillenium&amp;quot;,&lt;br /&gt;
  &amp;quot;message&amp;quot; :&amp;quot;cds_type_130&amp;quot;,&lt;br /&gt;
  &amp;quot;field&amp;quot; :&amp;quot;admin_cat_code&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mapping nodes ===&lt;br /&gt;
A second step is for the mapping author  to identify whether the source context  is equivalent to another source contexts. This is done in order to rationalise the number of mappings steps needed between a source concept and the final target concept.&lt;br /&gt;
=== Matching to concept ===&lt;br /&gt;
The third step involves creation of a source concept and a core concept. In the above example the source is concept has been mapped to a core concept and the core concept is returned&amp;lt;pre&amp;gt;&lt;br /&gt;
bc:BC_xyz&lt;br /&gt;
  rdfs:label &amp;quot;admin_cat_code&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and potential core map&lt;br /&gt;
&lt;br /&gt;
im:administrative_category_code_on_admission&lt;br /&gt;
           :matchedTo &lt;br /&gt;
           bc:BC_xysdasdasd.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;The information model has fully defined the administrative category property as a property of a subclass of encounter dealing with hospital stays. Consequently the source system&#039;s table and field can be fully mapped to the common model field.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Legacy codes, terms and term codes==&lt;br /&gt;
Legacy or  local codes also require context and the same approach is used as described above. In this case a local code 12345655 mat have different meaning in a ddifferent system. A local code may or may not have any sort of code scheme (the scheme then being implied by the context). In the following example, Barts trust has its own local cerner code scheme.&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;organisation&amp;quot;: &amp;quot;Barts&amp;quot;,&lt;br /&gt;
  &amp;quot;system&amp;quot; : &amp;quot;CernerMillenium&amp;quot;,&lt;br /&gt;
  &amp;quot;message&amp;quot; :&amp;quot;cds_type_130&amp;quot;,&lt;br /&gt;
  &amp;quot;field&amp;quot; :&amp;quot;admin_cat_code&amp;quot;,&lt;br /&gt;
   &amp;quot;codeScheme&amp;quot; :&amp;quot;BartsLocalCodes&amp;quot;,&lt;br /&gt;
  &amp;quot;code&amp;quot; :123445556&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
==Decision process for handling codes and terms==&lt;br /&gt;
When incorporating codes and terms into the ontology, there are 2 categories of approach, the selected approach being dependent on the semantic relationship between the legacy and core concept. The categories are:&lt;br /&gt;
&lt;br /&gt;
#Creation of a simple &amp;quot;matched to&amp;quot; map between a core concept and a legacy concept. This implies that the legacy concept is a subtype of, or equivalent to the core concept. Examples of these are supplier local codes, Read 2, TPP&lt;br /&gt;
#Creation of a complex &amp;quot;mapped to&amp;quot; between a core concept and a legacy concept. This implies a more nuanced relationship meaning that the user may elect how to use the maps when querying records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5711</id>
		<title>Mapping and matching concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5711"/>
		<updated>2021-08-04T14:28:52Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Managing codes and taxonomies ==&lt;br /&gt;
&#039;&#039;Main article&#039;&#039; [[Management of code based taxonomies.]] Describes how codes such as EMIS local codes, Read 2, OPCS4 etc are handled in the information model applying the maps as described in this article.&lt;br /&gt;
&lt;br /&gt;
== Concepts -  background ==&lt;br /&gt;
Information consists of ideas. Another word for an idea is a &#039;concept&#039; . A concept may be named,( in which case the meaning of the concept can usually be understood), or they may be an unnamed expression, which is made up of a set of interrelated named or unnamed concepts. &lt;br /&gt;
&lt;br /&gt;
For example the term &amp;quot;chest pain&amp;quot; implies the idea of a pain in the chest. In Snomed-CT it is a named concept. &amp;quot;Chest pain, worsened by exercise&amp;quot; may be an example of an expression style concept made up from the concept of &amp;quot;chest pain&amp;quot;, and the statement that it is &amp;quot;made worse by -&amp;gt; exercise&amp;quot;. In this case “made worse by” and “exercise” are both different concepts but no author has yet created a single named concept for this expression.&lt;br /&gt;
&lt;br /&gt;
The new generation of health record management systems tend towards the recording of concepts, with the objective being for the record entry to closely match the idea behind the entry. These types of concepts can be called term based concepts as the term is the thing that describes the idea.&lt;br /&gt;
&lt;br /&gt;
A modern term based concept is defined in relation to other concepts by a set of assertions indicating whether the concept is equivalent to, or a subtype of, a set of other concepts. The standard approach to this is via the use of Description Logic (DL). By using DL, a computer can automatically classify a concept which can result in a computer deducing additional knowledge over and above the human who created the concept. Snomed-CT is the worlds largest ontology of healthcare term based concepts and is authored using DL. A collection of concepts defined in this way constitute an &amp;quot;Ontology&amp;quot; and there is a standard language OWL that is used to represent the definitions.&lt;br /&gt;
&lt;br /&gt;
The idea of codes originated from a different starting point. The intention of a coded entry is to &#039;&#039;pre-classify&#039;&#039; an entry before it is recorded. The code is designed for a particular set of business processes e.g. analytics or payment and it is important to understand the context in which a code has been used.  A coded concept, being pre-classified, relies on categorisation of the codes, and that classification may or may not imply that one code is a subtype of another. Nothing can be inferred from a code other than its relation to another code as authored.  Consequently, as the philosophy is different, code based concepts have to be dealt with differently from term based concepts, even if they seem to saying the same thing.&lt;br /&gt;
&lt;br /&gt;
Because of their history, it is not always possible to assert the exact meaning of a code. However, it is often the case that meaning can be inferred or approximated from a coded entry. With  preference to move to an ontology, this inference can be achieved via the use of a mapping process that matches  coded concepts to term based concepts that are identified from a code.&lt;br /&gt;
&lt;br /&gt;
There are two strategies to link codes to concepts.&lt;br /&gt;
&lt;br /&gt;
1. A coded term may be stated confidently to be the same as, or a variation on, a concept. Typically code systems like Read2 or CTV3 can be dealt with in this way because they are designed to try and capture the idea in the clinicians mind, and they have been incorporated as concepts anyway. Likewise many system supplier codes have been created in this way. In this case the term code can be said to be a term code of the concept. Read2 G33 - Angina pectoris is a term code for the concept of angina pectoris.&lt;br /&gt;
&lt;br /&gt;
2. A coded term might be the same term as a concept but may have been entered without the assertion that is a true representation of a state. Typically code systems such as ICD10 and OPCS fall into this category. E11 - Diabetes type 2, seems to be the same as the concept of diabetes type 2, but was entered without clinician attestation and may have been approximated for payment purposes. In this case a legacy concept is produced and a map between this concept and the similar clinical concept is generated.&lt;br /&gt;
&lt;br /&gt;
A  map is just another form of relationship, but unlike an ontological equivalent or subclass axiom it implies that the relationship is an approximation. It is a sort of statement that something is p&#039;&#039;ossibly or probably similar to s&#039;&#039;omething else and thus has much less weight than an asserted relationship.&lt;br /&gt;
&lt;br /&gt;
Legacy Code based concepts can be mapped to Core concepts , and this enables the use of the vast volumes of data already recorded in systems. Maps must be used with care as it is almost always the case that the use of a mapped code in a query is dependent on the purpose of the query. This means that mappings are more of a guide to the things to include rather than a confident statement of meaning. When querying records the query author may need to determine which codes to include or exclude on a case by case basis.&lt;br /&gt;
&lt;br /&gt;
== Maps between core concepts and legacy concepts ==&lt;br /&gt;
As mentioned above the relationships are managed as mappings which state the type or degree of match. &lt;br /&gt;
&lt;br /&gt;
Maps generally fall into 2 patterns. These are illustrated in the context of code based concepts as follows:&lt;br /&gt;
&lt;br /&gt;
=== Simple match ===&lt;br /&gt;
A core concept may be matched to many code based concepts. In a simple match the legacy concept is deemed to be probably equivalent to, or a subclass of. the code concept&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sn:194828000 |Angina (disorder)&lt;br /&gt;
    :matchedTo emis:G33 |Angina Pectoris|.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Complex optional match ===&lt;br /&gt;
A concept may be matched to a number of alternative concepts and it is expected that a query author may wish to select these. &lt;br /&gt;
&lt;br /&gt;
In this example, the concept &#039;&#039;&#039;:&#039;&#039;&#039; &amp;quot;Ketoacidotic coma due to diabetes mellitus (disorder)&amp;quot; has a complex map which is selection of either &lt;br /&gt;
&lt;br /&gt;
a) Coma unspecified&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
b)  one of either Diabetes mellitus in pregnancy: Pre-existing diabetes mellitus, unspecified, or Diabetes mellitus in pregnancy, unspecified, or Diabetes mellitus arising in pregnancy&lt;br /&gt;
&lt;br /&gt;
In effect meaning that the compound entry in the record would need to have 2 icd 10 codes to fulfill the criteria.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sn:26298008&lt;br /&gt;
  :hasMap [&lt;br /&gt;
       :combinationOf  [ &lt;br /&gt;
                           :oneOf  icd10:R402 ] &lt;br /&gt;
                       [&lt;br /&gt;
                           :oneOf  icd10:O24.3 icd10:O24.9 O24.4]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
== Mapping resources properties and local codes ==&lt;br /&gt;
In the above examples, coded concepts were considered as context independent in the sense that the same code used by many providers and many systems would generally mean the same thing and can be treated the same way.&lt;br /&gt;
&lt;br /&gt;
It is equally common to find provider and system specific constructs, including coded items whose meaning depends on the table or field within the source system. A similar approach to mapping of standard code schemes can be taken except that the source properties of the source concept must be explicitly described in order to provide context.&lt;br /&gt;
&lt;br /&gt;
In the same way that codes can be mapped, so can source resource types such as tables or fields, message types or message segments. Mapping may involve functional transformation&lt;br /&gt;
&lt;br /&gt;
=== Defining source context ===&lt;br /&gt;
The first step in managing source concepts is to define the concept in the context of the originator of the data. This employs the use of a context object usually sent as parameters through the REST API. For example the following&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;organisation&amp;quot;: &amp;quot;Barts&amp;quot;,&lt;br /&gt;
  &amp;quot;system&amp;quot; : &amp;quot;CernerMillenium&amp;quot;,&lt;br /&gt;
  &amp;quot;message&amp;quot; :&amp;quot;cds_type_130&amp;quot;,&lt;br /&gt;
  &amp;quot;field&amp;quot; :&amp;quot;admin_cat_code&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mapping nodes ===&lt;br /&gt;
A second step is for the mapping author  to identify whether the source context  is equivalent to another source contexts. This is done in order to rationalise the number of mappings steps needed between a source concept and the final target concept.&lt;br /&gt;
=== Matching to concept ===&lt;br /&gt;
The third step involves creation of a source concept and a core concept. In the above example the source is concept has been mapped to a core concept and the core concept is returned&amp;lt;pre&amp;gt;&lt;br /&gt;
bc:BC_xyz&lt;br /&gt;
  rdfs:label &amp;quot;admin_cat_code&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and potential core map&lt;br /&gt;
&lt;br /&gt;
im:administrative_category_code_on_admission&lt;br /&gt;
           :matchedTo &lt;br /&gt;
           bc:BC_xysdasdasd.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;The information model has fully defined the administrative category property as a property of a subclass of encounter dealing with hospital stays. Consequently the source system&#039;s table and field can be fully mapped to the common model field.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Legacy codes, terms and term codes==&lt;br /&gt;
Health records tend to hold 3 types of items when describing a clinical or administrative concept: A code, a term, or a term code (i.e. a code with a term(&lt;br /&gt;
&lt;br /&gt;
The information model&#039;s ontology uses the idea of concepts (which are ideas).  Concepts categorise into those that are considered core concepts, which mean they are concepts intended to be used in the future, and legacy concepts i.e. those that may deprecate over time.&lt;br /&gt;
&lt;br /&gt;
All purely code based concepts are considered legacy whereas ontologically defined concepts (that may have codes) are considered core. Snomed-CT is an example of core concepts that have codes.&lt;br /&gt;
&lt;br /&gt;
The healthcare ontology Snomed-CT consists of a set of codes which reference concepts and hence Snomed refers to the codes as concept identifiers. For example the code for &#039;Chest pain (finding) &#039;  (29857009) references the concept of chest pain ([http://snomed.info/sct#29857009 http://snomed.info/sct#29857009) ,], which itself has a label of &amp;quot;Chest pain (finding)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Snomed also contains a list of terms that are similar or synonymous with the meaning of a concept and these reference the concept. This article refers to these as &#039;term codes&#039; . For example the term &#039;Chest Pain&#039; (49966017) also references the same concept of chest pain  ([http://snomed.info/sct#29857009 http://snomed.info/sct#29857009) ,]&lt;br /&gt;
&lt;br /&gt;
Legacy classifications such as Read2 and CTV3 have term codes also. For example H33..11 Bronchial asthma is a term code of asthma which is itself a code that is NOT semantically defined.&lt;br /&gt;
==Decision process for handling codes and terms==&lt;br /&gt;
When incorporating codes and terms into the ontology, there are 2 categories of approach, the selected approach being dependent on the semantic relationship between the legacy and core concept. The categories are:&lt;br /&gt;
&lt;br /&gt;
#Creation of a simple &amp;quot;matched to&amp;quot; map between a core concept and a legacy concept. This implies that the legacy concept is a subtype of, or equivalent to the core concept. Examples of these are supplier local codes, Read 2, TPP&lt;br /&gt;
#Creation of a complex &amp;quot;mapped to&amp;quot; between a core concept and a legacy concept. This implies a more nuanced relationship meaning that the user may elect how to use the maps when qureying records.&lt;br /&gt;
&lt;br /&gt;
When creating a forward relationship, 2 outcomes are possible:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5709</id>
		<title>Mapping and matching concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5709"/>
		<updated>2021-08-04T14:18:18Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Code relationships to term based concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Managing codes and taxonomies ==&lt;br /&gt;
&#039;&#039;Main article&#039;&#039; [[Management of code based taxonomies.]] Describes how codes such as EMIS local codes, Read 2, OPCS4 etc are handled in the information model applying the maps as described in this article.&lt;br /&gt;
&lt;br /&gt;
== Concepts -  background ==&lt;br /&gt;
Information consists of ideas. Another word for an idea is a &#039;concept&#039; . A concept may be named,( in which case the meaning of the concept can usually be understood), or they may be an unnamed expression, which is made up of a set of interrelated named or unnamed concepts. &lt;br /&gt;
&lt;br /&gt;
For example the term &amp;quot;chest pain&amp;quot; implies the idea of a pain in the chest. In Snomed-CT it is a named concept. &amp;quot;Chest pain, worsened by exercise&amp;quot; may be an example of an expression style concept made up from the concept of &amp;quot;chest pain&amp;quot;, and the statement that it is &amp;quot;made worse by -&amp;gt; exercise&amp;quot;. In this case “made worse by” and “exercise” are both different concepts but no author has yet created a single named concept for this expression.&lt;br /&gt;
&lt;br /&gt;
The new generation of health record management systems tend towards the recording of concepts, with the objective being for the record entry to closely match the idea behind the entry. These types of concepts can be called term based concepts as the term is the thing that describes the idea.&lt;br /&gt;
&lt;br /&gt;
A modern term based concept is defined in relation to other concepts by a set of assertions indicating whether the concept is equivalent to, or a subtype of, a set of other concepts. The standard approach to this is via the use of Description Logic (DL). By using DL, a computer can automatically classify a concept which can result in a computer deducing additional knowledge over and above the human who created the concept. Snomed-CT is the worlds largest ontology of healthcare term based concepts and is authored using DL. A collection of concepts defined in this way constitute an &amp;quot;Ontology&amp;quot; and there is a standard language OWL that is used to represent the definitions.&lt;br /&gt;
&lt;br /&gt;
The idea of codes originated from a different starting point. The intention of a coded entry is to &#039;&#039;pre-classify&#039;&#039; an entry before it is recorded. The code is designed for a particular set of business processes e.g. analytics or payment and it is important to understand the context in which a code has been used.  A coded concept, being pre-classified, relies on categorisation of the codes, and that classification may or may not imply that one code is a subtype of another. Nothing can be inferred from a code other than its relation to another code as authored.  Consequently, as the philosophy is different, code based concepts have to be dealt with differently from term based concepts, even if they seem to saying the same thing.&lt;br /&gt;
&lt;br /&gt;
Because of their history, it is not always possible to assert the exact meaning of a code. However, it is often the case that meaning can be inferred or approximated from a coded entry. With  preference to move to an ontology, this inference can be achieved via the use of a mapping process that matches  coded concepts to term based concepts that are identified from a code.&lt;br /&gt;
&lt;br /&gt;
There are two strategies to link codes to concepts.&lt;br /&gt;
&lt;br /&gt;
1. A coded term may be stated confidently to be the same as, or a variation on, a concept. Typically code systems like Read2 or CTV3 can be dealt with in this way because they are designed to try and capture the idea in the clinicians mind, and they have been incorporated as concepts anyway. Likewise many system supplier codes have been created in this way. In this case the term code can be said to be a term code of the concept. Read2 G33 - Angina pectoris is a term code for the concept of angina pectoris.&lt;br /&gt;
&lt;br /&gt;
2. A coded term might be the same term as a concept but may have been entered without the assertion that is a true representation of a state. Typically code systems such as ICD10 and OPCS fall into this category. E11 - Diabetes type 2, seems to be the same as the concept of diabetes type 2, but was entered without clinician attestation and may have been approximated for payment purposes. In this case a legacy concept is produced and a map between this concept and the similar clinical concept is generated.&lt;br /&gt;
&lt;br /&gt;
A  map is just another form of relationship, but unlike an ontological equivalent or subclass axiom it implies that the relationship is an approximation. It is a sort of statement that something is p&#039;&#039;ossibly or probably similar to s&#039;&#039;omething else and thus has much less weight than an asserted relationship.&lt;br /&gt;
&lt;br /&gt;
Legacy Code based concepts can be mapped to Core concepts , and this enables the use of the vast volumes of data already recorded in systems. Maps must be used with care as it is almost always the case that the use of a mapped code in a query is dependent on the purpose of the query. This means that mappings are more of a guide to the things to include rather than a confident statement of meaning. When querying records the query author may need to determine which codes to include or exclude on a case by case basis.&lt;br /&gt;
&lt;br /&gt;
== Code relationships to term based concepts ==&lt;br /&gt;
As mentioned above the relationships are managed as mappings which state the type or degree of match. &lt;br /&gt;
&lt;br /&gt;
Maps generally fall into 4 patterns. These are illustrated in the context of code based concepts as follows:&lt;br /&gt;
&lt;br /&gt;
=== Simple match ===&lt;br /&gt;
A core concept may be matched to many code based concepts. In a simple match the legacy concept is deemed to be probably equivalent to, or a subclass of. the code concept&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sn:194828000 |Angina (disorder)&lt;br /&gt;
    :matchedTo emis:G33 |Angina Pectoris|.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Complex optional match ===&lt;br /&gt;
A concept may be matched to a number of alternative concepts and it is expected that a query author may wish to select these. &lt;br /&gt;
&lt;br /&gt;
In this example, the concept &#039;&#039;&#039;:&#039;&#039;&#039; &amp;quot;Ketoacidotic coma due to diabetes mellitus (disorder)&amp;quot; has a complex map which is selection of either &lt;br /&gt;
&lt;br /&gt;
a) Coma unspecified&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
b)  one of either Diabetes mellitus in pregnancy: Pre-existing diabetes mellitus, unspecified, or Diabetes mellitus in pregnancy, unspecified, or Diabetes mellitus arising in pregnancy&lt;br /&gt;
&lt;br /&gt;
In effect meaning that the compound entry in the record would need to have 2 icd 10 codes to fulfill the criteria.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sn:26298008&lt;br /&gt;
  :hasMap [&lt;br /&gt;
       :combinationOf  [ &lt;br /&gt;
                           :oneOf  icd10:R402 ] &lt;br /&gt;
                       [&lt;br /&gt;
                           :oneOf  icd10:O24.3 icd10:O24.9 O24.4]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
== Source resources properties and local codes ==&lt;br /&gt;
In the above examples, coded concepts were considered as context independent in the sense that the same code used by many providers and many systems would generally mean the same thing and can be treated the same way.&lt;br /&gt;
&lt;br /&gt;
It is equally common to find provider and system specific constructs, including coded items whose meaning depends on the table or field within the source system. A similar approach to mapping of standard code schemes can be taken except that the source properties of the source concept must be explicitly described in order to provide context.&lt;br /&gt;
&lt;br /&gt;
In the same way that codes can be mapped, so can source resource types such as tables or fields, message types or message segments. Mapping may involve functional transformation&lt;br /&gt;
&lt;br /&gt;
=== Defining source context ===&lt;br /&gt;
The first step in managing source concepts is to define the concept in the context of the originator of the data. This employs the use of a context object usually sent as parameters through the REST API. For example the following&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;organisation&amp;quot;: &amp;quot;Barts&amp;quot;,&lt;br /&gt;
  &amp;quot;system&amp;quot; : &amp;quot;CernerMillenium&amp;quot;,&lt;br /&gt;
  &amp;quot;message&amp;quot; :&amp;quot;cds_type_130&amp;quot;,&lt;br /&gt;
  &amp;quot;field&amp;quot; :&amp;quot;admin_cat_code&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mapping nodes ===&lt;br /&gt;
A second step is for the mapping author  to identify whether the source context  is equivalent to another source contexts. This is done in order to rationalise the number of mappings steps needed between a source concept and the final target concept.&lt;br /&gt;
=== Matching to concept ===&lt;br /&gt;
The third step involves creation of a source concept and a core concept. In the above example the source is concept has been mapped to a core concept and the core concept is returned&amp;lt;pre&amp;gt;&lt;br /&gt;
bc:BC_xyz&lt;br /&gt;
  rdfs:label &amp;quot;admin_cat_code&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and potential core map&lt;br /&gt;
&lt;br /&gt;
im:administrative_category_code_on_admission&lt;br /&gt;
           :matchedTo &lt;br /&gt;
           bc:BC_xysdasdasd.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;The information model has fully defined the administrative category property as a property of a subclass of encounter dealing with hospital stays. Consequently the source system&#039;s table and field can be fully mapped to the common model field.&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5708</id>
		<title>Mapping and matching concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Mapping_and_matching_concepts&amp;diff=5708"/>
		<updated>2021-08-04T11:55:12Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Simple match */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Managing codes and taxonomies ==&lt;br /&gt;
&#039;&#039;Main article&#039;&#039; [[Management of code based taxonomies.]] Describes how codes such as EMIS local codes, Read 2, OPCS4 etc are handled in the information model applying the maps as described in this article.&lt;br /&gt;
&lt;br /&gt;
== Concepts -  background ==&lt;br /&gt;
Information consists of ideas. Another word for an idea is a &#039;concept&#039; . A concept may be named,( in which case the meaning of the concept can usually be understood), or they may be an unnamed expression, which is made up of a set of interrelated named or unnamed concepts. &lt;br /&gt;
&lt;br /&gt;
For example the term &amp;quot;chest pain&amp;quot; implies the idea of a pain in the chest. In Snomed-CT it is a named concept. &amp;quot;Chest pain, worsened by exercise&amp;quot; may be an example of an expression style concept made up from the concept of &amp;quot;chest pain&amp;quot;, and the statement that it is &amp;quot;made worse by -&amp;gt; exercise&amp;quot;. In this case “made worse by” and “exercise” are both different concepts but no author has yet created a single named concept for this expression.&lt;br /&gt;
&lt;br /&gt;
The new generation of health record management systems tend towards the recording of concepts, with the objective being for the record entry to closely match the idea behind the entry. These types of concepts can be called term based concepts as the term is the thing that describes the idea.&lt;br /&gt;
&lt;br /&gt;
A modern term based concept is defined in relation to other concepts by a set of assertions indicating whether the concept is equivalent to, or a subtype of, a set of other concepts. The standard approach to this is via the use of Description Logic (DL). By using DL, a computer can automatically classify a concept which can result in a computer deducing additional knowledge over and above the human who created the concept. Snomed-CT is the worlds largest ontology of healthcare term based concepts and is authored using DL. A collection of concepts defined in this way constitute an &amp;quot;Ontology&amp;quot; and there is a standard language OWL that is used to represent the definitions.&lt;br /&gt;
&lt;br /&gt;
The idea of codes originated from a different starting point. The intention of a coded entry is to &#039;&#039;pre-classify&#039;&#039; an entry before it is recorded. The code is designed for a particular set of business processes e.g. analytics or payment and it is important to understand the context in which a code has been used.  A coded concept, being pre-classified, relies on categorisation of the codes, and that classification may or may not imply that one code is a subtype of another. Nothing can be inferred from a code other than its relation to another code as authored.  Consequently, as the philosophy is different, code based concepts have to be dealt with differently from term based concepts, even if they seem to saying the same thing.&lt;br /&gt;
&lt;br /&gt;
Because of their history, it is not always possible to assert the exact meaning of a code. However, it is often the case that meaning can be inferred or approximated from a coded entry. With  preference to move to an ontology, this inference can be achieved via the use of a mapping process that matches  coded concepts to term based concepts that are identified from a code.&lt;br /&gt;
&lt;br /&gt;
There are two strategies to link codes to concepts.&lt;br /&gt;
&lt;br /&gt;
1. A coded term may be stated confidently to be the same as, or a variation on, a concept. Typically code systems like Read2 or CTV3 can be dealt with in this way because they are designed to try and capture the idea in the clinicians mind, and they have been incorporated as concepts anyway. Likewise many system supplier codes have been created in this way. In this case the term code can be said to be a term code of the concept. Read2 G33 - Angina pectoris is a term code for the concept of angina pectoris.&lt;br /&gt;
&lt;br /&gt;
2. A coded term might be the same term as a concept but may have been entered without the assertion that is a true representation of a state. Typically code systems such as ICD10 and OPCS fall into this category. E11 - Diabetes type 2, seems to be the same as the concept of diabetes type 2, but was entered without clinician attestation and may have been approximated for payment purposes. In this case a legacy concept is produced and a map between this concept and the similar clinical concept is generated.&lt;br /&gt;
&lt;br /&gt;
A  map is just another form of relationship, but unlike an ontological equivalent or subclass axiom it implies that the relationship is an approximation. It is a sort of statement that something is p&#039;&#039;ossibly or probably similar to s&#039;&#039;omething else and thus has much less weight than an asserted relationship.&lt;br /&gt;
&lt;br /&gt;
Legacy Code based concepts can be mapped to Core concepts , and this enables the use of the vast volumes of data already recorded in systems. Maps must be used with care as it is almost always the case that the use of a mapped code in a query is dependent on the purpose of the query. This means that mappings are more of a guide to the things to include rather than a confident statement of meaning. When querying records the query author may need to determine which codes to include or exclude on a case by case basis.&lt;br /&gt;
&lt;br /&gt;
== Code relationships to term based concepts ==&lt;br /&gt;
As mentioned above the relationships are managed as mappings which state the type or degree of match. &lt;br /&gt;
&lt;br /&gt;
Maps generally fall into 4 patterns. These are illustrated in the context of code based concepts as follows:&lt;br /&gt;
&lt;br /&gt;
=== Simple match ===&lt;br /&gt;
A core concept may be matched to many code based concepts. In a simple match the legacy concept is deemed to be probably equivalent to, or a subclass of. the code concept&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sn:194828000 |Angina (disorder)&lt;br /&gt;
    :matchedTo emis:G33 |Angina Pectoris|.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Complex option match ===&lt;br /&gt;
A concept may be matched to a number of alternative concepts and it is expected that a query author may wish to select thise&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sn:26298008&lt;br /&gt;
  :hasMap [&lt;br /&gt;
      :oneOf&lt;br /&gt;
            &lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Complex source match ===&lt;br /&gt;
A combination of concepts may be matched to a single target concept (e.g. A and B matches C) implying that the meaning of C should include all of the source concepts.&amp;lt;pre&amp;gt;&lt;br /&gt;
sn:6025007 |Laparoscopic appendectomy (procedure)]&lt;br /&gt;
:hasMap [&lt;br /&gt;
  :combinationOf [&lt;br /&gt;
     :oneOf opcs:H029| Unspecified other excision of appendix (OPCS49 H02),&lt;br /&gt;
            opcs:H021 | Interval appendicectomy (opcs49 H02.1),&lt;br /&gt;
            opcs:H028  Other specified other excision of appendix(opcs49 H02)&lt;br /&gt;
   ],&lt;br /&gt;
   [&lt;br /&gt;
       opcs:Y752 | Laparoscopic approach to abdominal cavity NEC (opcs49 Y75.2),&lt;br /&gt;
       opcs: Y755 |Laparoscopic ultrasonic approach to abdominal cavity (opcs49 Y75.5)]&lt;br /&gt;
   ]&lt;br /&gt;
]&lt;br /&gt;
]&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;In other words a combination of one of the appendix excision OPCS codes and laparoscopic codes matches to the Snomed-CT concept of laparoscopic appendectomy. The matching objects also contain advice.&lt;br /&gt;
&lt;br /&gt;
=== Axiom based target match. ===&lt;br /&gt;
A concept may be matched with a high level of confidence to an intersection of target concepts i.e. a concept expression. If the level of confidence is high enough and the context known, this could also be asserted as an axiom.&lt;br /&gt;
							&lt;br /&gt;
It should be noted that in this case, in the knowledge that the original code was authored with an ontological definition in mind that the above could be represented as an equivalent i.e.&amp;lt;pre&amp;gt;&lt;br /&gt;
emis:ALLERGY6183BRIDL | Adverse reaction to Mercilon&lt;br /&gt;
 owl:equivalentClass &lt;br /&gt;
            [owl:intersectionOf &lt;br /&gt;
               [rdf:type sn:281647001 |Adverse reaction (disorder)],&lt;br /&gt;
               [rdf:type : owl:Restriction;&lt;br /&gt;
                owl:onProperty sn:246075003 | Causative agent (attribute);&lt;br /&gt;
                owl:someValuesFrom sn:9491701000001106|Mercilon (product)&lt;br /&gt;
               ]&lt;br /&gt;
             ]&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source resources properties and local codes ==&lt;br /&gt;
In the above examples, coded concepts were considered as context independent in the sense that the same code used by many providers and many systems would generally mean the same thing and can be treated the same way.&lt;br /&gt;
&lt;br /&gt;
It is equally common to find provider and system specific constructs, including coded items whose meaning depends on the table or field within the source system. A similar approach to mapping of standard code schemes can be taken except that the source properties of the source concept must be explicitly described in order to provide context.&lt;br /&gt;
&lt;br /&gt;
In the same way that codes can be mapped, so can source resource types such as tables or fields, message types or message segments. Mapping may involve functional transformation&lt;br /&gt;
&lt;br /&gt;
=== Defining source context ===&lt;br /&gt;
The first step in managing source concepts is to define the concept in the context of the originator of the data. This employs the use of a context object.&amp;lt;pre&amp;gt;&lt;br /&gt;
Barts_cds_type_130_admin&lt;br /&gt;
      :hasSourceContext&lt;br /&gt;
         [:organisation :organisation/12345|Barts NHS Foundation Trust;&lt;br /&gt;
         :system :system/92223 | Cerner Millenium ;&lt;br /&gt;
         :resource :table/cds_type_130;&lt;br /&gt;
           :field :field/admin_cat_code| administrative category code on admission&lt;br /&gt;
          ];&lt;br /&gt;
       owl:equivalentClass nhsdm:administrative_category_code_on_admission.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mapping nodes ===&lt;br /&gt;
A second step is to identify whether the source concept is equivalent to another source concept. This is done in order to rationalise the number of mappings steps needed between a source concept and the final target concept. For example:&amp;lt;pre&amp;gt;&lt;br /&gt;
Barts_cds_type_130_admin&lt;br /&gt;
      :hasSourceContext&lt;br /&gt;
         [:organisation :organisation/12345|Barts NHS Foundation Trust;&lt;br /&gt;
         :system :system/92223 | Cerner Millenium ;&lt;br /&gt;
         :resource :table/cds_type_130;&lt;br /&gt;
           :field :field/admin_cat_code| administrative category code on admission&lt;br /&gt;
          ];&lt;br /&gt;
       owl:equivalentClass nhsdm:administrative_category_code_on_admission.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Matching to ontological concept ===&lt;br /&gt;
In the above example we may have a number of different providers each providing different files or concepts, whose context suggests a match with the NHS Data model. As the Discovery data service includes the NHS data model attributes as part of its core model, the NHS datamodel is then mapped to the Discovery model.&amp;lt;pre&amp;gt;&lt;br /&gt;
nhsdm:administrative_category_code_on_admission&lt;br /&gt;
           :matchedTo &lt;br /&gt;
              [rdf:type im:administrativeCategory| administrative category on admission]&lt;br /&gt;
&amp;lt;/pre&amp;gt;The information model has fully defined the administrative category property as a property of a subclass of encounter dealing with hospital stays. Consequently the source system&#039;s table and field can be fully mapped to the common model field.&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Sextant&amp;diff=5657</id>
		<title>Sextant</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Sextant&amp;diff=5657"/>
		<updated>2021-07-20T08:05:04Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Delivery mechanism */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Discovery query is an application that supports the defining of data sets based on query of data within Discovery. In this article only the simple query application is specified at this time&lt;br /&gt;
&lt;br /&gt;
== Simple Query ==&lt;br /&gt;
The basic provision supports a simple &#039;generic&#039; query service, which is an extract and report service provided by the Discovery Data Service.&lt;br /&gt;
&lt;br /&gt;
The service is&amp;amp;nbsp;designed to enable rapid and frequent extracts of small or&amp;amp;nbsp;large data sets from the Discovery Data Service, where the definition of those data sets conform to a simple pattern.&lt;br /&gt;
&lt;br /&gt;
The application is a query editor and runner user interface which presents a set of constrained options that enables a user with basic informatics skills to define simple but highly valuable reports from the Discovery analytical databases.&lt;br /&gt;
&lt;br /&gt;
The simple query service is a semi automated process involving the&amp;amp;nbsp; extract of a set of files or tables from the data service. The content of the files should cover&amp;amp;nbsp;the source data requirements of a subscriber to the Discovery Data service. Files or tables may be aggregate counts or line (event level) entries derived from health records.&lt;br /&gt;
&lt;br /&gt;
The content of the extracts are governed by the Discovery data processing agreements (DPA) , the Discovery data sharing agreements (DSA) and the Discovery project definitions (DPC).&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The generic query service is not suitable for advanced analytical rule based data sets, but instead provides either simple outputs, or extensive data sets that can then be subsequently analysed in depth. For subscribers seeking sophisticated rule based outputs, the standard Discovery Data Distribution service, or reporting service should be used.&lt;br /&gt;
&lt;br /&gt;
The following description will indicate whether or not the simple generic query service should be used for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The service is initiated by a data&amp;amp;nbsp;access agreement, accompanied&amp;amp;nbsp;&amp;amp;nbsp;by a&amp;amp;nbsp;data set definition as provided by a subscriber, with the data set definition&amp;amp;nbsp;being constrained to the generic query service&#039;s simple query parameters. In other words, the service is used when the parameters of a data set definition are in a simple form.&lt;br /&gt;
&lt;br /&gt;
=== Simple data set definition ===&lt;br /&gt;
&lt;br /&gt;
The configuration parameters of a simple data set definition fall into two parts:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Input parameters, &#039;&#039;&#039;which include the defining of a cohort, with criteria which include the selection of simple broad types of data from the Discovery common information model, and the filtering of data entries by single attribute value sets.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Output parameters,&amp;amp;nbsp;&#039;&#039;&#039;which include whether the output is event level (e.g. 1 line per event and 1 line per patient), or aggregate, where the aggregation is by one common attribute type such as multi-level organisational grouping, personal demographic grouping, or event level date time grouping.&lt;br /&gt;
&lt;br /&gt;
=== Cohort definition ===&lt;br /&gt;
&lt;br /&gt;
The simple generic query service supports simple definitions of cohorts of patients. The following configuration options are supported i.e. one or more of the following:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Provider organisations&amp;amp;nbsp;&#039;&#039;&#039;List of organisations, or list of organisations groups, whose records will be used as the base cohort. An example may be all GP practices in London, or a list of a small number of practices in Tower hamlets. This MUST be present&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Included organisations&amp;amp;nbsp;&#039;&#039;&#039;This is the list of organisations whose records are included for the patients who are in the base cohort, but not included if they are not. For example, patient who have records in a GP practice may be in the base, and they may have visited hospital and the hospital may be included in the included organisation list. If not defined NO other organisational records are included.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Patient GP registration status&amp;amp;nbsp;&#039;&#039;&#039;Whether the cohort is limited to currently registered patients (if the organisations are practices), or whether the cohort may include patients who have left or died.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;One Value set per entity type&amp;amp;nbsp;&#039;&#039;&#039;Patients that have entries containing concepts that are part of a&amp;amp;nbsp;[[Information_model_service|value set,]]&amp;amp;nbsp; i.e. one set of concepts, either built as a &amp;quot;combined set of sets&amp;quot; or a single set&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;One demographic,&amp;amp;nbsp;&#039;&#039;&#039;One age range&amp;amp;nbsp;or gender list, or a list of high level post codes for the patient&#039;s main home residence&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Input criteria ===&lt;br /&gt;
&lt;br /&gt;
Input criteria includes a collection of&amp;amp;nbsp;&amp;amp;nbsp;&#039;&#039;&#039;ONE or more items, each of which&amp;amp;nbsp;&#039;&#039;&#039;includes one or more, high level types of entities&amp;amp;nbsp;from the information model (listed below) and one type of filter applied to each.&lt;br /&gt;
&lt;br /&gt;
The following table illustrates available entities&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;text-align: left; background-color: rgb(239, 239, 239); width: 181px;&amp;quot; | Data entity type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 553px; background-color: rgb(239, 239, 239);&amp;quot; | Attribute value sets/ranges&lt;br /&gt;
|-&lt;br /&gt;
| Person&lt;br /&gt;
| Age range in years, months or days / Gender male/ female /other, list of high level post codes e.g. LS24, NW1&lt;br /&gt;
|-&lt;br /&gt;
| Observations (including rconditions, values, procedures, family history, referrals, allergies&lt;br /&gt;
| &lt;br /&gt;
All observations of an inclusion Observation type value set i.e a value set whose definition is known to the information model. Example may be diabetics, all diseases, or an exclusion value set (e.g. a list of sensitive codes)&lt;br /&gt;
&lt;br /&gt;
Relative date range. A date&amp;amp;nbsp;range of observations relative to the day of extract, in days , weeks, or years&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Medication orders or issues&lt;br /&gt;
| &lt;br /&gt;
Medicine type value set whose definition is known to DDS information model e.g. oral non steroidal anti-inflammatory drugs&lt;br /&gt;
&lt;br /&gt;
Relative date range. A date&amp;amp;nbsp;range of observations relative to the day of extract, in days , weeks, or years&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Encounters, including consultations, admissions, discharges, outpatient attendances&lt;br /&gt;
| &lt;br /&gt;
Optionally an Encounter type value set known to the DDS information model e.g. hospital encountes, real GP consultations&lt;br /&gt;
&lt;br /&gt;
Relative date range. A date&amp;amp;nbsp;range of observations relative to the day of extract, in days , weeks, or years&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Output definition ===&lt;br /&gt;
&lt;br /&gt;
The following table illustrates the types of output and parameters associated with each type&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;text-align: left; background-color: rgb(239, 239, 239); width: 181px;&amp;quot; | Output type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 553px; background-color: rgb(239, 239, 239);&amp;quot; | Attribute value sets/ranges&lt;br /&gt;
|-&lt;br /&gt;
| Aggregate&lt;br /&gt;
| &lt;br /&gt;
Counts which can br broken down by ONE of the following&lt;br /&gt;
&lt;br /&gt;
1. Organisational grouping e.g. by STP and by CCG and by practice&lt;br /&gt;
&lt;br /&gt;
2. Date range groupings for the observation or medication or encounter tables e.g. daily weekly yearly.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
3. High level post codes&lt;br /&gt;
&lt;br /&gt;
4. Age&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Event level&lt;br /&gt;
| &lt;br /&gt;
For each observation, medication or encounter table, event selection from the following attributes&lt;br /&gt;
&lt;br /&gt;
1. Patient ID - This is a table level identifier that links the tables to thesame patient&lt;br /&gt;
&lt;br /&gt;
2. Patient NHS number - or pseudonymised NHS number which is an alternative link to 1.&lt;br /&gt;
&lt;br /&gt;
3. Effective date&lt;br /&gt;
&lt;br /&gt;
4. Concept e.g Anginal, systolic blood pressure, Atenolol 50 mg&lt;br /&gt;
&lt;br /&gt;
5. Owning organisation (the practice or organisation responsible for this entry)&lt;br /&gt;
&lt;br /&gt;
6. Numeric value where present&lt;br /&gt;
&lt;br /&gt;
And for the patient level&lt;br /&gt;
&lt;br /&gt;
1. Post code&lt;br /&gt;
&lt;br /&gt;
2. Age (approx)&lt;br /&gt;
&lt;br /&gt;
3. Gender (approx)&lt;br /&gt;
&lt;br /&gt;
4. Registered organisation&lt;br /&gt;
&lt;br /&gt;
5. Death status&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Extract Schedule ==&lt;br /&gt;
&lt;br /&gt;
Subscribers can set an extract schedule being either, daily, weekly, monthly (date of each month) or quarterly, or none&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Delivery mechanisms ==&lt;br /&gt;
&lt;br /&gt;
Subscribers must set one of the following delivery mechanisms and have the right levels of infrastructure in place to receive and process the data.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;text-align: left; background-color: rgb(239, 239, 239); width: 181px;&amp;quot; | Output type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 553px; background-color: rgb(239, 239, 239);&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| NHS email&lt;br /&gt;
| &lt;br /&gt;
This is suitable for aggregate reports or smallish&amp;amp;nbsp; data sets suitable for email attachments&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Encrypted cloud drive&lt;br /&gt;
| &lt;br /&gt;
A cloud drive such as Google or one drive where the data resides temporarily by agreement and made available to specific named person and is downloaded with single factor authentication to unzip the files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Secure ftp&lt;br /&gt;
| This is the mechanism required for large or regular scheduled data sets and requires the subscriber to use an &amp;quot;ftp client&amp;quot; to initiate the download from the Data service&#039;s ftp server&lt;br /&gt;
|-&lt;br /&gt;
|Sextant database&lt;br /&gt;
|Sends the data and automatically files into a data base conforming to the compass database schema  (mysql MSSQL or other)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Discovery_Query&amp;diff=5656</id>
		<title>Discovery Query</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Discovery_Query&amp;diff=5656"/>
		<updated>2021-07-20T08:02:31Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: DavidStables moved page Discovery Query to Sextant&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Sextant]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Sextant&amp;diff=5655</id>
		<title>Sextant</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Sextant&amp;diff=5655"/>
		<updated>2021-07-20T08:02:31Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: DavidStables moved page Discovery Query to Sextant&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Discovery query is an application that supports the defining of data sets based on query of data within Discovery. In this article only the simple query application is specified at this time&lt;br /&gt;
&lt;br /&gt;
== Simple Query ==&lt;br /&gt;
The basic provision supports a simple &#039;generic&#039; query service, which is an extract and report service provided by the Discovery Data Service.&lt;br /&gt;
&lt;br /&gt;
The service is&amp;amp;nbsp;designed to enable rapid and frequent extracts of small or&amp;amp;nbsp;large data sets from the Discovery Data Service, where the definition of those data sets conform to a simple pattern.&lt;br /&gt;
&lt;br /&gt;
The application is a query editor and runner user interface which presents a set of constrained options that enables a user with basic informatics skills to define simple but highly valuable reports from the Discovery analytical databases.&lt;br /&gt;
&lt;br /&gt;
The simple query service is a semi automated process involving the&amp;amp;nbsp; extract of a set of files or tables from the data service. The content of the files should cover&amp;amp;nbsp;the source data requirements of a subscriber to the Discovery Data service. Files or tables may be aggregate counts or line (event level) entries derived from health records.&lt;br /&gt;
&lt;br /&gt;
The content of the extracts are governed by the Discovery data processing agreements (DPA) , the Discovery data sharing agreements (DSA) and the Discovery project definitions (DPC).&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The generic query service is not suitable for advanced analytical rule based data sets, but instead provides either simple outputs, or extensive data sets that can then be subsequently analysed in depth. For subscribers seeking sophisticated rule based outputs, the standard Discovery Data Distribution service, or reporting service should be used.&lt;br /&gt;
&lt;br /&gt;
The following description will indicate whether or not the simple generic query service should be used for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The service is initiated by a data&amp;amp;nbsp;access agreement, accompanied&amp;amp;nbsp;&amp;amp;nbsp;by a&amp;amp;nbsp;data set definition as provided by a subscriber, with the data set definition&amp;amp;nbsp;being constrained to the generic query service&#039;s simple query parameters. In other words, the service is used when the parameters of a data set definition are in a simple form.&lt;br /&gt;
&lt;br /&gt;
=== Simple data set definition ===&lt;br /&gt;
&lt;br /&gt;
The configuration parameters of a simple data set definition fall into two parts:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Input parameters, &#039;&#039;&#039;which include the defining of a cohort, with criteria which include the selection of simple broad types of data from the Discovery common information model, and the filtering of data entries by single attribute value sets.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Output parameters,&amp;amp;nbsp;&#039;&#039;&#039;which include whether the output is event level (e.g. 1 line per event and 1 line per patient), or aggregate, where the aggregation is by one common attribute type such as multi-level organisational grouping, personal demographic grouping, or event level date time grouping.&lt;br /&gt;
&lt;br /&gt;
=== Cohort definition ===&lt;br /&gt;
&lt;br /&gt;
The simple generic query service supports simple definitions of cohorts of patients. The following configuration options are supported i.e. one or more of the following:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Provider organisations&amp;amp;nbsp;&#039;&#039;&#039;List of organisations, or list of organisations groups, whose records will be used as the base cohort. An example may be all GP practices in London, or a list of a small number of practices in Tower hamlets. This MUST be present&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Included organisations&amp;amp;nbsp;&#039;&#039;&#039;This is the list of organisations whose records are included for the patients who are in the base cohort, but not included if they are not. For example, patient who have records in a GP practice may be in the base, and they may have visited hospital and the hospital may be included in the included organisation list. If not defined NO other organisational records are included.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Patient GP registration status&amp;amp;nbsp;&#039;&#039;&#039;Whether the cohort is limited to currently registered patients (if the organisations are practices), or whether the cohort may include patients who have left or died.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;One Value set per entity type&amp;amp;nbsp;&#039;&#039;&#039;Patients that have entries containing concepts that are part of a&amp;amp;nbsp;[[Information_model_service|value set,]]&amp;amp;nbsp; i.e. one set of concepts, either built as a &amp;quot;combined set of sets&amp;quot; or a single set&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;One demographic,&amp;amp;nbsp;&#039;&#039;&#039;One age range&amp;amp;nbsp;or gender list, or a list of high level post codes for the patient&#039;s main home residence&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Input criteria ===&lt;br /&gt;
&lt;br /&gt;
Input criteria includes a collection of&amp;amp;nbsp;&amp;amp;nbsp;&#039;&#039;&#039;ONE or more items, each of which&amp;amp;nbsp;&#039;&#039;&#039;includes one or more, high level types of entities&amp;amp;nbsp;from the information model (listed below) and one type of filter applied to each.&lt;br /&gt;
&lt;br /&gt;
The following table illustrates available entities&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;text-align: left; background-color: rgb(239, 239, 239); width: 181px;&amp;quot; | Data entity type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 553px; background-color: rgb(239, 239, 239);&amp;quot; | Attribute value sets/ranges&lt;br /&gt;
|-&lt;br /&gt;
| Person&lt;br /&gt;
| Age range in years, months or days / Gender male/ female /other, list of high level post codes e.g. LS24, NW1&lt;br /&gt;
|-&lt;br /&gt;
| Observations (including rconditions, values, procedures, family history, referrals, allergies&lt;br /&gt;
| &lt;br /&gt;
All observations of an inclusion Observation type value set i.e a value set whose definition is known to the information model. Example may be diabetics, all diseases, or an exclusion value set (e.g. a list of sensitive codes)&lt;br /&gt;
&lt;br /&gt;
Relative date range. A date&amp;amp;nbsp;range of observations relative to the day of extract, in days , weeks, or years&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Medication orders or issues&lt;br /&gt;
| &lt;br /&gt;
Medicine type value set whose definition is known to DDS information model e.g. oral non steroidal anti-inflammatory drugs&lt;br /&gt;
&lt;br /&gt;
Relative date range. A date&amp;amp;nbsp;range of observations relative to the day of extract, in days , weeks, or years&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Encounters, including consultations, admissions, discharges, outpatient attendances&lt;br /&gt;
| &lt;br /&gt;
Optionally an Encounter type value set known to the DDS information model e.g. hospital encountes, real GP consultations&lt;br /&gt;
&lt;br /&gt;
Relative date range. A date&amp;amp;nbsp;range of observations relative to the day of extract, in days , weeks, or years&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Output definition ===&lt;br /&gt;
&lt;br /&gt;
The following table illustrates the types of output and parameters associated with each type&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;text-align: left; background-color: rgb(239, 239, 239); width: 181px;&amp;quot; | Output type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 553px; background-color: rgb(239, 239, 239);&amp;quot; | Attribute value sets/ranges&lt;br /&gt;
|-&lt;br /&gt;
| Aggregate&lt;br /&gt;
| &lt;br /&gt;
Counts which can br broken down by ONE of the following&lt;br /&gt;
&lt;br /&gt;
1. Organisational grouping e.g. by STP and by CCG and by practice&lt;br /&gt;
&lt;br /&gt;
2. Date range groupings for the observation or medication or encounter tables e.g. daily weekly yearly.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
3. High level post codes&lt;br /&gt;
&lt;br /&gt;
4. Age&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Event level&lt;br /&gt;
| &lt;br /&gt;
For each observation, medication or encounter table, event selection from the following attributes&lt;br /&gt;
&lt;br /&gt;
1. Patient ID - This is a table level identifier that links the tables to thesame patient&lt;br /&gt;
&lt;br /&gt;
2. Patient NHS number - or pseudonymised NHS number which is an alternative link to 1.&lt;br /&gt;
&lt;br /&gt;
3. Effective date&lt;br /&gt;
&lt;br /&gt;
4. Concept e.g Anginal, systolic blood pressure, Atenolol 50 mg&lt;br /&gt;
&lt;br /&gt;
5. Owning organisation (the practice or organisation responsible for this entry)&lt;br /&gt;
&lt;br /&gt;
6. Numeric value where present&lt;br /&gt;
&lt;br /&gt;
And for the patient level&lt;br /&gt;
&lt;br /&gt;
1. Post code&lt;br /&gt;
&lt;br /&gt;
2. Age (approx)&lt;br /&gt;
&lt;br /&gt;
3. Gender (approx)&lt;br /&gt;
&lt;br /&gt;
4. Registered organisation&lt;br /&gt;
&lt;br /&gt;
5. Death status&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Extract Schedule ==&lt;br /&gt;
&lt;br /&gt;
Subscribers can set an extract schedule being either, daily, weekly, monthly (date of each month) or quarterly, or none&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Delivery mechanism ==&lt;br /&gt;
&lt;br /&gt;
Subscribers must set one of the following delivery mechanisms and have the right levels of infrastructure in place to receive and process the data.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;text-align: left; background-color: rgb(239, 239, 239); width: 181px;&amp;quot; | Output type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 553px; background-color: rgb(239, 239, 239);&amp;quot; | Attribute value sets/ranges&lt;br /&gt;
|-&lt;br /&gt;
| NHS email&lt;br /&gt;
| &lt;br /&gt;
This is suitable for aggregate reports or smallish&amp;amp;nbsp; data sets suitable for email attachments&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Encrypted cloud drive&lt;br /&gt;
| &lt;br /&gt;
A cloud drive such as Google or one drive where the data resides temporarily by agreement and made available to specific named person and is downloaded with single factor authentication to unzip the files&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Secure ftp&lt;br /&gt;
| This is the mechanism required for large or regular scheduled data sets and requires the subscriber to use an &amp;quot;ftp client&amp;quot; to initiate the download from the Data service&#039;s ftp server&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5654</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5654"/>
		<updated>2021-07-20T08:02:07Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Services and applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
=Discovery Data Service status=&lt;br /&gt;
&lt;br /&gt;
* The data service is live.&lt;br /&gt;
* It currently stores and processes the data from 28 million linked organisational patient records in the UK.&lt;br /&gt;
* It contains long term records on 14 million unique UK citizens who have been resident in London at some point in the last 30 years (including people who have left or died).&lt;br /&gt;
* Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world&#039;s leading health ontologies.&lt;br /&gt;
* Data in Discovery is submitted by health providers who provide primary, secondary, and urgent care services to patients or clients.&lt;br /&gt;
* Data is kept up to date in close to real time - at worst within 24 hours; see [[Latency of extract data feeds]] for more details.&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of some initial projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services, structure, and functionality&amp;amp;nbsp;that operate using the Information Models;&amp;amp;nbsp;one of the fundamental tenets of the Discovery Data Service. This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
*[[Discovery health information model|Health Information model]] - An overview of the approach to the Discovery information model,  the purpose, and type of content.&lt;br /&gt;
*[[Health Information modelling language|Modelling language]] - The W3C standard languages used to build the various components of the information model&lt;br /&gt;
*[[Health_data_model_content|Basic health data set&amp;amp;nbsp;]] - a very high level overview of the types of data mapped from data held  within the Discovery data stores.&lt;br /&gt;
*[[Information model reference data|Reference data -]] an overview of additional data held in the information model.&lt;br /&gt;
*[[Mapping and matching concepts|Mapping and matching concepts and structures]] - Introduces the approaches to matching and mapping concepts and the structural mappings in the model&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services , such as APIs and apps that enable an model instance to be used or to implement an EHR based on the model or particular data model&lt;br /&gt;
&lt;br /&gt;
= Publishers and subscribers =&lt;br /&gt;
These articles provide some brief high level information for organisations that send data to Discovery and those that use that data.&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery information services.&lt;br /&gt;
&lt;br /&gt;
* [[Discovery Query|Sextant]] - A data set distribution service with an option to post the data directly into the recipients database.&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place.&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5598</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5598"/>
		<updated>2021-07-10T16:08:15Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Services and applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
==Discovery data service status==&lt;br /&gt;
The data service is live.&lt;br /&gt;
&lt;br /&gt;
It currently stores and processes the data from 28 million linked organisational patient records in the uk.&lt;br /&gt;
&lt;br /&gt;
It contains long term records on 14 million unique uk citizens who have been resident in London at some point in the last 30 years (including people who have left or died), &lt;br /&gt;
&lt;br /&gt;
Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world leading health ontologies.&lt;br /&gt;
&lt;br /&gt;
Data in discovery is submitted by health providers who provide primary and secondary care and  urgent care services to patients or clients.&lt;br /&gt;
&lt;br /&gt;
Data is kept up to date in close to real time (at worst within 24 hours).&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of some initial projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services, structure, and functionality&amp;amp;nbsp;that operate using the Information Models;&amp;amp;nbsp;one of the fundamental tenets of the Discovery Data Service. This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
*[[Discovery health information model|Health Information model]] - An overview of the approach to the Discovery information model,  the purpose, and type of content.&lt;br /&gt;
*[[Health Information modelling language|Modelling language]] - The W3C standard languages used to build the various components of the information model&lt;br /&gt;
*[[Health_data_model_content|Basic health data set&amp;amp;nbsp;]] - a very high level overview of the types of data mapped from data held  within the Discovery data stores.&lt;br /&gt;
*[[Information model reference data|Reference data -]] an overview of additional data held in the information model.&lt;br /&gt;
*[[Mapping and matching concepts|Mapping and matching concepts and structures]] - Introduces the approaches to matching and mapping concepts and the structural mappings in the model&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services , such as APIs and apps that enable an model instance to be used or to implement an EHR based on the model or particular data model&lt;br /&gt;
&lt;br /&gt;
= Publishers and subscribers =&lt;br /&gt;
These articles provide some brief high level information for organisations that send data to Discovery and those that use the dats.how oDiscovery and pro&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery information services.&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place.&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5597</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5597"/>
		<updated>2021-07-10T16:07:49Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Services and applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
==Discovery data service status==&lt;br /&gt;
The data service is live.&lt;br /&gt;
&lt;br /&gt;
It currently stores and processes the data from 28 million linked organisational patient records in the uk.&lt;br /&gt;
&lt;br /&gt;
It contains long term records on 14 million unique uk citizens who have been resident in London at some point in the last 30 years (including people who have left or died), &lt;br /&gt;
&lt;br /&gt;
Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world leading health ontologies.&lt;br /&gt;
&lt;br /&gt;
Data in discovery is submitted by health providers who provide primary and secondary care and  urgent care services to patients or clients.&lt;br /&gt;
&lt;br /&gt;
Data is kept up to date in close to real time (at worst within 24 hours).&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of some initial projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services, structure, and functionality&amp;amp;nbsp;that operate using the Information Models;&amp;amp;nbsp;one of the fundamental tenets of the Discovery Data Service. This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
*[[Discovery health information model|Health Information model]] - An overview of the approach to the Discovery information model,  the purpose, and type of content.&lt;br /&gt;
*[[Health Information modelling language|Modelling language]] - The W3C standard languages used to build the various components of the information model&lt;br /&gt;
*[[Health_data_model_content|Basic health data set&amp;amp;nbsp;]] - a very high level overview of the types of data mapped from data held  within the Discovery data stores.&lt;br /&gt;
*[[Information model reference data|Reference data -]] an overview of additional data held in the information model.&lt;br /&gt;
*[[Mapping and matching concepts|Mapping and matching concepts and structures]] - Introduces the approaches to matching and mapping concepts and the structural mappings in the model&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services , such as APIs and apps that enable an model instance to be used or to implement an EHR based on the model or particular data model&lt;br /&gt;
&lt;br /&gt;
= Publishers and subscribers =&lt;br /&gt;
These articles provide some brief high level information for organisations that send data to Discovery and those that use the dats.how oDiscovery and pro&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery information services.&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place for the DDS and the infrastructure that supports&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5596</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5596"/>
		<updated>2021-07-10T16:05:32Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
==Discovery data service status==&lt;br /&gt;
The data service is live.&lt;br /&gt;
&lt;br /&gt;
It currently stores and processes the data from 28 million linked organisational patient records in the uk.&lt;br /&gt;
&lt;br /&gt;
It contains long term records on 14 million unique uk citizens who have been resident in London at some point in the last 30 years (including people who have left or died), &lt;br /&gt;
&lt;br /&gt;
Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world leading health ontologies.&lt;br /&gt;
&lt;br /&gt;
Data in discovery is submitted by health providers who provide primary and secondary care and  urgent care services to patients or clients.&lt;br /&gt;
&lt;br /&gt;
Data is kept up to date in close to real time (at worst within 24 hours).&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of some initial projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services, structure, and functionality&amp;amp;nbsp;that operate using the Information Models;&amp;amp;nbsp;one of the fundamental tenets of the Discovery Data Service. This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
*[[Discovery health information model|Health Information model]] - An overview of the approach to the Discovery information model,  the purpose, and type of content.&lt;br /&gt;
*[[Health Information modelling language|Modelling language]] - The W3C standard languages used to build the various components of the information model&lt;br /&gt;
*[[Health_data_model_content|Basic health data set&amp;amp;nbsp;]] - a very high level overview of the types of data mapped from data held  within the Discovery data stores.&lt;br /&gt;
*[[Information model reference data|Reference data -]] an overview of additional data held in the information model.&lt;br /&gt;
*[[Mapping and matching concepts|Mapping and matching concepts and structures]] - Introduces the approaches to matching and mapping concepts and the structural mappings in the model&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services , such as APIs and apps that enable an model instance to be used or to implement an EHR based on the model or particular data model&lt;br /&gt;
&lt;br /&gt;
= Publishers and subscribers =&lt;br /&gt;
These articles provide some brief high level information for organisations that send data to Discovery and those that use the dats.how oDiscovery and pro&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place for the DDS and the infrastructure that supports&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery Data Service and the underlying functionality.&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5595</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5595"/>
		<updated>2021-07-10T16:03:46Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Publishers and subscribers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
==Discovery data service status==&lt;br /&gt;
The data service is live.&lt;br /&gt;
&lt;br /&gt;
It currently stores and processes the data from 28 million linked organisational patient records in the uk.&lt;br /&gt;
&lt;br /&gt;
It contains long term records on 14 million unique uk citizens who have been resident in London at some point in the last 30 years (including people who have left or died), &lt;br /&gt;
&lt;br /&gt;
Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world leading health ontologies.&lt;br /&gt;
&lt;br /&gt;
Data in discovery is submitted by health providers who provide primary and secondary care and  urgent care services to patients or clients.&lt;br /&gt;
&lt;br /&gt;
Data is kept up to date in close to real time (at worst within 24 hours).&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of some initial projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services, structure, and functionality&amp;amp;nbsp;that operate using the Information Models;&amp;amp;nbsp;one of the fundamental tenets of the Discovery Data Service. This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
*[[Discovery health information model|Health Information model]] - An overview of the approach to the Discovery information model,  the purpose, and type of content.&lt;br /&gt;
*[[Health Information modelling language|Modelling language]] - The W3C standard languages used to build the various components of the information model&lt;br /&gt;
*[[Health_data_model_content|Basic health data set&amp;amp;nbsp;]] - a very high level overview of the types of data mapped from data held  within the Discovery data stores.&lt;br /&gt;
*[[Information model reference data|Reference data -]] an overview of additional data held in the information model.&lt;br /&gt;
*[[Mapping and matching concepts|Mapping and matching concepts and structures]] - Introduces the approaches to matching and mapping concepts and the structural mappings in the model&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services , such as APIs and apps that enable an model instance to be used or to implement an EHR based on the model or particular data model&lt;br /&gt;
&lt;br /&gt;
= Publishers and subscribers =&lt;br /&gt;
These articles provide some brief high level information for organisations that send data to Discovery and those that use the dats.how oDiscovery and pro&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place for the DDS and the infrastructure that supports it.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery Data Service and the underlying functionality.&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5594</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5594"/>
		<updated>2021-07-10T16:01:26Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Operational topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
==Discovery data service status==&lt;br /&gt;
The data service is live.&lt;br /&gt;
&lt;br /&gt;
It currently stores and processes the data from 28 million linked organisational patient records in the uk.&lt;br /&gt;
&lt;br /&gt;
It contains long term records on 14 million unique uk citizens who have been resident in London at some point in the last 30 years (including people who have left or died), &lt;br /&gt;
&lt;br /&gt;
Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world leading health ontologies.&lt;br /&gt;
&lt;br /&gt;
Data in discovery is submitted by health providers who provide primary and secondary care and  urgent care services to patients or clients.&lt;br /&gt;
&lt;br /&gt;
Data is kept up to date in close to real time (at worst within 24 hours).&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of some initial projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services, structure, and functionality&amp;amp;nbsp;that operate using the Information Models;&amp;amp;nbsp;one of the fundamental tenets of the Discovery Data Service. This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
*[[Discovery health information model|Health Information model]] - An overview of the approach to the Discovery information model,  the purpose, and type of content.&lt;br /&gt;
*[[Health Information modelling language|Modelling language]] - The W3C standard languages used to build the various components of the information model&lt;br /&gt;
*[[Health_data_model_content|Basic health data set&amp;amp;nbsp;]] - a very high level overview of the types of data mapped from data held  within the Discovery data stores.&lt;br /&gt;
*[[Information model reference data|Reference data -]] an overview of additional data held in the information model.&lt;br /&gt;
*[[Mapping and matching concepts|Mapping and matching concepts and structures]] - Introduces the approaches to matching and mapping concepts and the structural mappings in the model&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services , such as APIs and apps that enable an model instance to be used or to implement an EHR based on the model or particular data model&lt;br /&gt;
&lt;br /&gt;
= Publishers and subscribers =&lt;br /&gt;
These articles provide information about the fundamental differences between oroganisations that send data to Discovery and those that use the dats.how oDiscovery and pro&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place for the DDS and the infrastructure that supports it.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery Data Service and the underlying functionality.&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5593</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5593"/>
		<updated>2021-07-10T15:58:37Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Discovery overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
==Discovery data service status==&lt;br /&gt;
The data service is live.&lt;br /&gt;
&lt;br /&gt;
It currently stores and processes the data from 28 million linked organisational patient records in the uk.&lt;br /&gt;
&lt;br /&gt;
It contains long term records on 14 million unique uk citizens who have been resident in London at some point in the last 30 years (including people who have left or died), &lt;br /&gt;
&lt;br /&gt;
Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world leading health ontologies.&lt;br /&gt;
&lt;br /&gt;
Data in discovery is submitted by health providers who provide primary and secondary care and  urgent care services to patients or clients.&lt;br /&gt;
&lt;br /&gt;
Data is kept up to date in close to real time (at worst within 24 hours).&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of some initial projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services, structure, and functionality&amp;amp;nbsp;that operate using the Information Models;&amp;amp;nbsp;one of the fundamental tenets of the Discovery Data Service. This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
*[[Discovery health information model|Health Information model]] - An overview of the approach to the Discovery information model,  the purpose, and type of content.&lt;br /&gt;
*[[Health Information modelling language|Modelling language]] - The W3C standard languages used to build the various components of the information model&lt;br /&gt;
*[[Health_data_model_content|Basic health data set&amp;amp;nbsp;]] - a very high level overview of the types of data mapped from data held  within the Discovery data stores.&lt;br /&gt;
*[[Information model reference data|Reference data -]] an overview of additional data held in the information model.&lt;br /&gt;
*[[Mapping and matching concepts|Mapping and matching concepts and structures]] - Introduces the approaches to matching and mapping concepts and the structural mappings in the model&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services , such as APIs and apps that enable an model instance to be used or to implement an EHR based on the model or particular data model&lt;br /&gt;
&lt;br /&gt;
= Operational topics =&lt;br /&gt;
These articles provide information about how systems can interoperate with Discovery and provide further links into test APIs, schemas, and other documentation associated with data formats for sending and receiving data.&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place for the DDS and the infrastructure that supports it.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery Data Service and the underlying functionality.&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5592</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5592"/>
		<updated>2021-07-10T15:55:47Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Discovery data service status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
==Discovery data service status==&lt;br /&gt;
The data service is live.&lt;br /&gt;
&lt;br /&gt;
It currently stores and processes the data from 28 million linked organisational patient records in the uk.&lt;br /&gt;
&lt;br /&gt;
It contains long term records on 14 million unique uk citizens who have been resident in London at some point in the last 30 years (including people who have left or died), &lt;br /&gt;
&lt;br /&gt;
Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world leading health ontologies.&lt;br /&gt;
&lt;br /&gt;
Data in discovery is submitted by health providers who provide primary and secondary care and  urgent care services to patients or clients.&lt;br /&gt;
&lt;br /&gt;
Data is kept up to date in close to real time (at worst within 24 hours).&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services, structure, and functionality&amp;amp;nbsp;that operate using the Information Models;&amp;amp;nbsp;one of the fundamental tenets of the Discovery Data Service. This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
*[[Discovery health information model|Health Information model]] - An overview of the approach to the Discovery information model,  the purpose, and type of content.&lt;br /&gt;
*[[Health Information modelling language|Modelling language]] - The W3C standard languages used to build the various components of the information model&lt;br /&gt;
*[[Health_data_model_content|Basic health data set&amp;amp;nbsp;]] - a very high level overview of the types of data mapped from data held  within the Discovery data stores.&lt;br /&gt;
*[[Information model reference data|Reference data -]] an overview of additional data held in the information model.&lt;br /&gt;
*[[Mapping and matching concepts|Mapping and matching concepts and structures]] - Introduces the approaches to matching and mapping concepts and the structural mappings in the model&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services , such as APIs and apps that enable an model instance to be used or to implement an EHR based on the model or particular data model&lt;br /&gt;
&lt;br /&gt;
= Operational topics =&lt;br /&gt;
These articles provide information about how systems can interoperate with Discovery and provide further links into test APIs, schemas, and other documentation associated with data formats for sending and receiving data.&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place for the DDS and the infrastructure that supports it.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery Data Service and the underlying functionality.&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
	<entry>
		<id>https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5591</id>
		<title>Voror Health Platform</title>
		<link rel="alternate" type="text/html" href="https://wiki.voror.co.uk/index.php?title=Voror_Health_Platform&amp;diff=5591"/>
		<updated>2021-07-10T15:55:21Z</updated>

		<summary type="html">&lt;p&gt;DavidStables: /* Discovery data service status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
These articles describe the Discovery Data Service; the architecture that underpins the data service, the components that make up the service, the testing and assurance processes, and the resources, open source technologies, and software that are used to host, develop, and support the service.&lt;br /&gt;
&lt;br /&gt;
==Discovery data service status==&lt;br /&gt;
The data service is live.&lt;br /&gt;
&lt;br /&gt;
It currently stores and processes the data from 28 million linked organisational patient records in the uk.&lt;br /&gt;
&lt;br /&gt;
It contains long term records on 14 million unique uk citizens who have been resident in London at some point in the last 30 years (including people who have left or died), &lt;br /&gt;
&lt;br /&gt;
Data on individuals are held in a single common data model with data values represented by a super ontology composed of the world leading health ontologies.&lt;br /&gt;
&lt;br /&gt;
Data in discovery is submitted by health providers who provide primary and secondary care and  urgent care services to patients or clients.&lt;br /&gt;
&lt;br /&gt;
Data is kept up to date in close to real time (at worst within 24 hours).&lt;br /&gt;
&lt;br /&gt;
Data within the service is modelled in semantic web languages.&lt;br /&gt;
&lt;br /&gt;
= Discovery overview =&lt;br /&gt;
&lt;br /&gt;
These articles provide background to the ideas, philosophies and approaches that have resulted in the Discovery Data Service. They cover the original objectives, the approach to collaboration and shared tenancy, and the information governance rules that underpin the way privacy and sharing are balanced.&lt;br /&gt;
&lt;br /&gt;
*[[What_is_Discovery|What is Discovery]]? - This article describes what Discovery is and how it is conceptualised at a very high level.&lt;br /&gt;
*[[Case studies]] - An overview of projects that access and utilise data from Discovery; information includes the applicant, project summary, and the latest status (Development/Live).&lt;br /&gt;
*[[Latest news]] - The latest information for all Discovery Data Service releases and changes, plus known issues and updates from system suppliers and other third parties.&lt;br /&gt;
*[[Current_data_sets|Current data sets]] - the broad types of data received from various systems.&lt;br /&gt;
*[[Current published data]] - provides the latest data publisher information by sector, geographical area, service, and system provider.&lt;br /&gt;
&lt;br /&gt;
= Information model topics =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services, structure, and functionality&amp;amp;nbsp;that operate using the Information Models;&amp;amp;nbsp;one of the fundamental tenets of the Discovery Data Service. This is the starting point for those interested in health data and the information derived from it, and why Discovery may be different from other approaches:&lt;br /&gt;
&lt;br /&gt;
*[[Discovery health information model|Health Information model]] - An overview of the approach to the Discovery information model,  the purpose, and type of content.&lt;br /&gt;
*[[Health Information modelling language|Modelling language]] - The W3C standard languages used to build the various components of the information model&lt;br /&gt;
*[[Health_data_model_content|Basic health data set&amp;amp;nbsp;]] - a very high level overview of the types of data mapped from data held  within the Discovery data stores.&lt;br /&gt;
*[[Information model reference data|Reference data -]] an overview of additional data held in the information model.&lt;br /&gt;
*[[Mapping and matching concepts|Mapping and matching concepts and structures]] - Introduces the approaches to matching and mapping concepts and the structural mappings in the model&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services , such as APIs and apps that enable an model instance to be used or to implement an EHR based on the model or particular data model&lt;br /&gt;
&lt;br /&gt;
= Operational topics =&lt;br /&gt;
These articles provide information about how systems can interoperate with Discovery and provide further links into test APIs, schemas, and other documentation associated with data formats for sending and receiving data.&lt;br /&gt;
&lt;br /&gt;
* [[Publishers]] - includes technical interface information, FHIR mapping, system requirements, and how to make changes to publishing services.&lt;br /&gt;
* [[Subscribers]] - includes set up, data mapping, and schema information.&lt;br /&gt;
*[[Monitoring and alerting]] - provides an overview of the monitoring and alert systems in place for the DDS and the infrastructure that supports it.&lt;br /&gt;
&lt;br /&gt;
= Services and applications =&lt;br /&gt;
&lt;br /&gt;
These articles provide information about the services and applications provided by the Discovery Data Service and the underlying functionality.&lt;br /&gt;
&lt;br /&gt;
*[[Data Sharing Manager|Data Sharing manager]]- DSM provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
&lt;br /&gt;
*[[UPRN address match application|ASSIGN- UPRN address matching application -]] a web based application that matches single or batches of hand entered address to authoritative addresses and assigns a unique property reference number.&lt;br /&gt;
*[[Information model manager]] - an application designed to provide a view of the common information model, and support the authoring of the content of the model.&lt;br /&gt;
*[[Information_model_service|Information model services]] - the technical services that enable the common information model to be used.&lt;br /&gt;
*[[FHIR Get Structured Record API]] - returns a complete patient record in a structured format following GP and Care Connect standards.&lt;br /&gt;
*[[HL7v2 API]] - Send HL7v2 ADT and ORU (clinical events) data to Discovery.&lt;br /&gt;
*Get health record - the service that obtains a fully structured health record about a person, in real time via a standards based API.&lt;br /&gt;
*Record publication service - the service that publishes data from health records for specific purposes, often immediately on receipt.&lt;br /&gt;
*Data set distribution service - the service that distributes sets of data for populations of patients where the definition is complex or where the subscriber is hosting a copy of the data permanently.&lt;br /&gt;
*[[NHS 111 Discovery frailty flagging]] / [[Frailty algorithm]]&lt;br /&gt;
*[[GitHub repositories]] - descriptions and information relating to the application source code.&lt;br /&gt;
&lt;br /&gt;
= Architectures =&lt;br /&gt;
These articles provide information about the overall high level software architecture models providing a descriptions and visualisations of the Discovery Data Service and information service components and how they interact.&lt;br /&gt;
&lt;br /&gt;
* The [[Data Storage Architecture]] illustrates how data is stored within the service and the various implementation options available for organisations that wish to use some or parts of the services.&lt;br /&gt;
*[[Identity Authentication Authorisation|Identity, authentication and authorisation]] specifies the approach taken by Discovery for accessing utilities and controlling some aspects of access to application functionality and some data resources, after all of the other locks have been opened.&lt;br /&gt;
*[[Application zone architecture]] illustrates how the data is accessed in different places and in different ways according to different use cases &lt;br /&gt;
*[[Pseudonymisation]] describes how Discovery generates pseudonymised data.&lt;br /&gt;
*[[Data linking]] describes how Discovery links several patient records into a single person/citizen record.&lt;br /&gt;
&lt;br /&gt;
= Application help =&lt;br /&gt;
&lt;br /&gt;
*[[Data_Sharing_Manager|Data Sharing Manager]]&amp;amp;nbsp;-&amp;amp;nbsp;Data Sharing Manager provides a visual representation of data that is being shared and processed and by which organisations, regions, and/or services.&lt;br /&gt;
*:You can also amend or cancel data sharing and processing agreements in real time.&lt;br /&gt;
*[[Record Viewer]] - Record Viewer shows a combined view of an individual&#039;s patient records, using data from different source organisations.&lt;br /&gt;
*[[Jira]] - Jira is an effective way to share and track information and helps to make sure that tasks and issues are completed, and signed off, by all relevant teams.&lt;br /&gt;
&lt;br /&gt;
= Wiki tips =&lt;br /&gt;
&lt;br /&gt;
*[[Adding a new page to the wiki]]&lt;br /&gt;
*[[Adding tables from word documents]]&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Tables Mediawiki Help:Tables]&lt;br /&gt;
*[[Creating a DDS wiki watchlist]]&lt;br /&gt;
*[[Creating a new user]]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:List Wikipedia Help:Lists]&lt;br /&gt;
*[[Test page]]&lt;/div&gt;</summary>
		<author><name>DavidStables</name></author>
	</entry>
</feed>