Information model meta model: Difference between revisions

From Endeavour Knowledge Base
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TOC left}}
 


== Scope of the meta model ==
== Scope of the meta model ==
The model meta model consists of a set of specialised classes or 'shapes', made interoperable via the use of the semantic web languages, which use RDF grammar and syntax.
The model meta model consists of a set of specialised classes or 'shapes', made interoperable via the use of the semantic web languages, which use either RDF grammar and syntax (turtle)  or JSON-LD as the exchange formats, with options for other inpout and output formats such as OWL functional syntax, Snomed compositional grammar or Snomed expression constraint language.  


The shapes cover the following areas:
The shapes cover the following areas:
Line 18: Line 18:
== General approach ==
== General approach ==
The information model language uses RDF triples as its basic grammar i.e. subject, predicate, and object with graph making up quadruples of an RDF data set.
The information model language uses RDF triples as its basic grammar i.e. subject, predicate, and object with graph making up quadruples of an RDF data set.
When viewed from the perspective of data modelling or an ontology these could also be referred to as object, property and value or class property and type.


Thus, RDF is used for the meta model and the W3C language used for the metal model is SHACL. In other words, SHACL is used to define all the meta classes, and the meta classes are used to hold the instances which are the content of the model.
Thus, RDF is used for the meta model and the W3C language used for the metal model is SHACL. In other words, SHACL is used to define all the meta classes, and the meta classes are used to hold the instances which are the content of the model.


The paradox of the information model content is that the instances of the meta model classes are themselves considered classes in the real world. For example when noting that a patient has 'chest pain' this is recorded as a concept which is an instance of the concept model. But 'chest pain' is also the class of all chest pains, so the same identifiers can be used for subsumption query. Likewise a clinical event in a health record is an instance of a data model meta class, but the clinical event is also a class of all clinical events!
The paradox of the information model content is that the instances of the meta model classes are themselves considered classes in the real world. For example when noting that a patient has 'chest pain' this is recorded as a concept which is an instance of the concept model. But 'chest pain' is also the class of all chest pains, so the same identifiers can be used for subsumption query. Likewise a clinical event in a health record is an instance of a data model meta class, but the clinical event is also a class of all clinical events such as an observation or encounter!


The model itself can be exchanged in JSON-LD, but JSON-LD can be somewhat tedious (as RDF predicates cannot directly map to standard programming language class properties) , so the use of 'local names' for business related APIs (e.g. query) is supported. In this case the JSON field names can use the local names without the full IRI, as long as the JSON complies with the model classes as described here.
The model itself can be exchanged in JSON-LD, but JSON-LD can be somewhat tedious (as RDF predicates cannot directly map to standard programming language class properties) , so the use of 'local names' for business related APIs (e.g. query) is supported. In this case the JSON field names can use the local names without the full IRI, as long as the JSON complies with the model classes as described here.
Line 30: Line 32:


== Types and shapes ==
== Types and shapes ==
Types (as represented as the value of the rdf: type predicate), are used to indicate the structure of an object in the model. Thus each meta model class is marked as an RDF TYPE.
Types (as represented as the value of the rdf: type predicate), are used to indicate the class structure of an object in the model. Thus each meta model class is marked as an RDF TYPE.


Shapes are made up of SHACL node shapes and property shapes. A 'type' is defined in the form of a shape.
Shapes are made up of SHACL node shapes and property shapes. A 'type' is defined in the form of a shape.
Line 36: Line 38:
Shapes are also classes (i.e. also are rdf:type -> rdf:Class), so that any shape that is a subclass of another shape inherits its properties unless overridden by sub properties, or subclass values of the parent properties.
Shapes are also classes (i.e. also are rdf:type -> rdf:Class), so that any shape that is a subclass of another shape inherits its properties unless overridden by sub properties, or subclass values of the parent properties.


<br />
== Model categories ==
Given the RDF nature of the class models, it is also reasonable to consider each area of the model as a "language". For example, the W3C OWL,SHACL, SPARQL etc are referred to as "languages" by dint of the types and properties being arranged as a grammar with a vocabulary.


The information model considers the model as a set of class descriptions. Thus things like ontological concepts, data models,  and query definitions are modelled as SHACL RDF shapes, but implemented in programming languages such as Java and JavaScript, as classes and objects, mapped precisely to the triples..


To bridge RDF into programming languages requires some constraints on the triple design. For example, a predicate in a triple would normally be represented as a property in JSON or C# or Java, using the local name element of the IRI as the property name, thus the triple predicates should have local names which are unique for the class.


<br />
The IM meta model can be broadly divided into the following:
== Basic shapes ==
=== Ontology of concepts ===
These shapes are the meta classes of the named entities within the information model.
These are classes that have an IRI, a term (name), a description, a code, one or more synonyms (that may also be coded), a set of subclass axioms, and one or more role groups with roles (property value pairs) which represent existential quantifications from Description Logic. OWL Equivalent axioms t(hat represent concepts whose definition are both necessary and sufficient) are classified via a reasoner prior to ingestion into the IM. Transitive relationships such as subclass, sub property, together with replacement maps, generate a transitive "is a" closure structure for efficient subsumption query.
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23IriRef/ IrirRef] ===
A reference to resource with an iri and optional name to enable readability
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23name/ <span style="color:green">name ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The name of the entity
|-


|}
External language support includes OWL functional syntax and Snomed-CT compositional grammar.
{{Note| Example <br>{"@id" : "sn:29857009", "name" : "Chest pain (finding)"} }}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23EntityShape/ Entity shape] ===
Defines the target class : org.endeavourhealth.imapi.model.tripletree.TTEntity@14b8a751
The super class and data model for all named resources in the model i.e. the data model of the entities that are labelled with iri label and status
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label/ <span style="color:green">label ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The preferred full name of the entity
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23type/ <span style="color:green">type ]</span></span>
|1..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23Resource/ rdfs:Resource]</span>
|The base type of the entity i.e. one of the high level entity types
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23comment/ <span style="color:green">comment ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The description of the entity
|-
|colspan="2"|<span title="Status of relationship">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23status/ <span style="color:green">status ]</span></span>
|1..1
|<span title="A status that is in active or active">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Status/ im:Status]</span>
|The status of the entity being active, inactive, draft or unassigned
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23scheme/ <span style="color:green">scheme ]</span></span>
|1..1
|<span title="Core graphs for core ontologies such as the health information model, Discovery and Snomed">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Graph/ im:Graph]</span>
|The code scheme or graph which the entity belongs to
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23subClassOf/ <span style="color:green">subClassOf ]</span></span>
|0..*
|<span title="The super class and data model for all named resources in the model i.e. the data model of the entities that are labelled with iri label and status">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23EntityShape/ im:EntityShape]</span>
|An entity that this entity inherits from, both semantically and structurally, this is also used for sub properties as properties are classes of properties
|-


|}
=== Data model shapes ===
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23IriAlias/ IriAlias] ===
These are entities that have an IRI, a name, a description, a subclass relationship with another entity, and one or more properties with range types and cardinality. i.e. a very straightforward entity definition with entity to entity relationships modelled as properties that point to other entities (sh:node), and properties whose value types may be literals (sh:dataType) or value set concepts (sh:class).


Is a subtype of [[#IrirRef|IrirRef]]
=== Set and Query definitions ===
This is a class model of a logical query expressed in the form of "''from'' a thing, or a set of things, ''where'' the thing has characteristics, ''select'' properties of the thing and related things". In other words from, where, select. The model classes cover all the main query language constructs but arranged in a way that flows top to bottom in a series of steps. The effect of this is that the model supports multiple and nested sub queries as well as hierarchical results (of the kind described in GraphQL).


An IRI with a name and an optional alias  and a variable name when the iri is passed in as an argument (e.g. $this
The set definition model supports translation from Snomed expression constraint language.
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="The column name in a select clause for this property, or a variable used to reference the result set of the values matched">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23alias/ <span style="color:green">alias ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The column name in a select clause for this property, or a variable used to reference the result set of the values matched
|-
|colspan="2"|<span title="The name of a variable, passed as an argument to the query, which is resolved to the IRI">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23variable/ <span style="color:green">variable ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The name of a variable, passed as an argument to the query, which is resolved to the IRI
|-
|colspan="2"|<span title="When  used as a property, whether this is an inverse object property i.e. an inbound connection to this entity">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23inverse/ <span style="color:green">inverse ]</span></span>
|0..1
|<span title="boolean true or false">[https://www.w3.org/TR/xmlschema-2/#boolean xsd:boolean]</span>
|When  used as a property, whether this is an inverse object property i.e. an inbound connection to this entity
|-
|colspan="2"|<span title="Whether to include the subtypes of the entities selected or matched">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23includeSubtypes/ <span style="color:green">includeSubtypes ]</span></span>
|0..1
|<span title="boolean true or false">[https://www.w3.org/TR/xmlschema-2/#boolean xsd:boolean]</span>
|When used in a with or where clause, whether to include the subtypes of this entity
|-
|colspan="2"|<span title="Whether to include the supertypes of the entity in a match clause. Used for ascending the hierarch to look for properties inherited">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23includeSupertypes/ <span style="color:green">includeSupertypes ]</span></span>
|0..1
|<span title="boolean true or false">[https://www.w3.org/TR/xmlschema-2/#boolean xsd:boolean]</span>
|When used in a with or where clause, whether to include the supertypes of this entity e.g. when ascending a hierrchy to look for a property
|-


|}
Internally, where a query definition is applied to the IM itself (e.g. concept sets or IMAPI) then instances of the classes are converted to SPARQL. When the query definition is applied to health records then the instances are converted to SQL using an entity table map.
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23PropertyShape/ Property shape] ===
Defines the target class : null


Is a subtype of [[#Entity shape|Entity shape]]
A query model definition generally falls into one of 4 patterns


data model for properties
a) From one or more "focus" concept, with role groups and roles (supporting and / or / minus, as well as optional subtypes), select the concepts entailed by the definition.  
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23inverseOf/ <span style="color:green">inverseOf ]</span></span>
|0..*
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23Property/ rdf:Property]</span>
|A property that this property is an inverse of
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23domain/ <span style="color:green">domain ]</span></span>
|0..*
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23Class/ rdfs:Class]</span>
|The classes or concepts that may have this property as a property, or a role, or a role within a role group
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23range/ <span style="color:green">range ]</span></span>
|0..*
|<span title="">[[#class_Class|Class]]</span>
|the type of value for this property.
|-


|}
b) From a cohort of objects of a certain type. with certain property values, ordered if required, as well as related objects with property values, select the objects entailed by the definition


== Query Model and Set definition shapes ==
c) From the set defined by b) List properties of those objects (and related objects)  
These shapes form the model for defining sets (also known as query definitions) for retrieving data from the IM or health records.
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23QueryShape/ Query /Set shape] ===
Defines the target class : org.endeavourhealth.imapi.model.tripletree.TTEntity@9700a18


Is a subtype of [[#Entity shape|Entity shape]]
d) From the set defined by c) List groups of characteristics further filtered by property values. (i.e. multi group data sets)


A query that is stored as an entity in a query library
Data sets are defined as a collection of set definitions and thus the data set can include features of many entity types.  
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="The query definition itself">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23definition/ <span style="color:green">definition ]</span></span>
|0..1
|<span title="A set definition holding the logical definition of a set. Usually referred to as a Query as these are used to retrieve data.Includes most of the main logical query constructs used in mainstream query languages, thus is a constrained version of mainstream languages that is schema independent.">[[#class_QueryDefinition|QueryDefinition]]</span>
|The query definition itself
|-


|}
=== Concept mappings ===
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23QueryDefinition/ Query /Set definition] ===
Health data from systems that hold coded or text values should, where possible, be mapped to a core concept.


Is a subtype of [[#IriAlias|IriAlias]]
Linked Health records store more than a simple concept reference, as the original meaning, including its context, should be retained in the record following any mapping.


A set definition holding the logical definition of a set. Usually referred to as a Query as these are used to retrieve data.<br>Includes most of  the main logical query constructs used in mainstream query languages, thus is a constrained version of mainstream languages that is schema independent.
There are two structures that may be needed in mapping a source code to a core concept and the result is an instance of a codeable concept as an entry in a health record
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="Optional description for clause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23description/ <span style="color:green">description ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Optional description of the query definition for support purposes.
|-
|colspan="2"|<span title="The base type, or base population/ set , or single object instance that this query is operating on.The result of the query contains subsets of this set.">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23With/ <span style="color:green">With ]</span></span>
|0..1
|<span title="A clause defining a base cohort, or set , or a base type(s), or an object instance, on which the query operates">[[#class_WithClause|WithClause]]</span>
|The base type, or base population/ set , or single object instance that this query is operating on.<br>The result of the query contains subsets of this set.
|-
|colspan="2"|<span title="A chained where clause operating on the property value object. Equivalent to a join in SQL or '.' in sparql">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23where/ <span style="color:green">where ]</span></span>
|0..1
|<span title="A clause containing criteria which the objects must conform to. Equivalent to a from/join where clause in SQL and where/filter in sparql.Supports graph traversal filtering and inference for subsumption query">[[#class_WhereClause|WhereClause]]</span>
|Tests properties and property paths and applies filters. Equivalent to SQL Join/ Where and SPARQL Where<br>Bollean where clauses supported.
|-
|colspan="2"|<span title="Nested select property clauses from the objects that are values of this select's property Note that if the value is null then this select would be absent">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23select/ <span style="color:green">select ]</span></span>
|1..1
|<span title="Defines the objects and properties to retrieve from a graph, subject to a mach clause. Supports graphql type nesting and sub selects for column groups">[[#class_SelectClause|SelectClause]]</span>
|Select query clause logically similar to SQL/SPARQL select but with GraphQL nesting ability
|-
|colspan="2"|<span title="If the results need to be grouped, the grouping properties.">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23groupBy/ <span style="color:green">groupBy ]</span></span>
|0..*
|<span title="An IRI with a name and an optional alias  and a variable name when the iri is passed in as an argument (e.g. $this">[[#class_IriAlias|IriAlias]]</span>
|If the results need to be grouped, the grouping properties.
|-
|colspan="2"|<span title="Ordering of instances via a property value in order to further test in another where clause.">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23orderBy/ <span style="color:green">orderBy ]</span></span>
|0..*
|<span title="An IRI with a name and an optional alias  and a variable name when the iri is passed in as an argument (e.g. $this">[[#class_IriAlias|IriAlias]]</span>
|Ordering of instances via a property value returned.
|-
|colspan="2"|<span title="direction of ordering (DESC or ASC) .">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23direction/ <span style="color:green">direction ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|direction of ordering (DESC or ASC) .
|-
|colspan="2"|<span title="Number of entities to return. Normally used with order by">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23limit/ <span style="color:green">limit ]</span></span>
|0..1
|<span title="whole number">[https://www.w3.org/TR/xmlschema-2/#integer xsd:integer]</span>
|Number of entities to return. Normally used with order by
|-
|colspan="2"|<span title="SubQueries used to group columns in multi group reports. The sub queries are all subsets of the main query clauses">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23subQuery/ <span style="color:green">subQuery ]</span></span>
|0..*
|<span title="A set definition holding the logical definition of a set. Usually referred to as a Query as these are used to retrieve data.Includes most of  the main logical query constructs used in mainstream query languages, thus is a constrained version of mainstream languages that is schema independent.">[[#class_QueryDefinition|QueryDefinition]]</span>
|SubQueries used to group columns in multi group reports. The sub queries are all subsets of the main query clauses
|-
|colspan="2"|<span title="Prefixe used in the rest of the document">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23prefix/ <span style="color:green">prefix ]</span></span>
|0..0
|<span title="The model of a class containing an iri prefix map">[[#class_PrefixShape|PrefixShape]]</span>
|list of prefix to namespace expansion to enable readability of iris
|-
|colspan="2"|<span title="true if you want the results to use IRI prefixes">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23usePrefixes/ <span style="color:green">usePrefixes ]</span></span>
|0..1
|<span title="boolean true or false">[https://www.w3.org/TR/xmlschema-2/#boolean xsd:boolean]</span>
|true if you want the results to use IRI prefixes
|-
|colspan="2"|<span title="Whether only active entities are included in the match clauses or select clauses">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23activeOnly/ <span style="color:green">activeOnly ]</span></span>
|0..1
|<span title="boolean true or false">[https://www.w3.org/TR/xmlschema-2/#boolean xsd:boolean]</span>
|Whether only active entities are included in the match clauses or select clauses
|-


|}
==== Legacy concept to core concept match ====
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23WithClause/ WithClause] ===
A legacy concept is generated from a code scheme (e.g. local codes, OPCS, ICD10) and in many cases there is a direct 'matched to' property which points to the core concept. This match can be used directly when the source scheme and source code is known.
A clause defining a base cohort, or set , or a base type(s), or an object instance, on which the query operates
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|rowspan="2"|or<br>1..1
|<span title="If the query is derived from instances of certain type (or types) then these are the types.">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23type/ <span style="color:green">type ]</span></span>
|1..*
|<span title="An IRI with a name and an optional alias  and a variable name when the iri is passed in as an argument (e.g. $this">[[#class_IriAlias|IriAlias]]</span>
|If the query is derived from instances of certain type (or types) then these are the types.
|-


|
==== Source context ====
<span title="If the query is based on a single instance then this is the id of the instance">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23instance/ <span style="color:green">instance ]</span></span>
Often, more context is needed to effectively match a source code to a core concept. A  'source context' will often be required to further disambiguate the concept. Source context includes one or more of the following.
|1..1
|<span title="An IRI with a name and an optional alias  and a variable name when the iri is passed in as an argument (e.g. $this">[[#class_IriAlias|IriAlias]]</span>
|If the query is based on a single instance then this is the id of the instance
|-
|colspan="2"|<span title="The query definition itself">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23definition/ <span style="color:green">definition ]</span></span>
|1..1
|<span title="A set definition holding the logical definition of a set. Usually referred to as a Query as these are used to retrieve data.Includes most of the main logical query constructs used in mainstream query languages, thus is a constrained version of mainstream languages that is schema independent.">[[#class_QueryDefinition|QueryDefinition]]</span>
|If the query is based on the result set of another query then this is define here either as an iri or an inline definition
|-


|}
# Source system
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23WhereClause/ WhereClause] ===
# Source organisation
A clause containing criteria which the objects must conform to. Equivalent to a from/join where clause in SQL and where/filter in sparql.<br>Supports graph traversal filtering and inference for subsumption query
# Source schema (e,g, a database schema or extract name)
{| class="wikitable"
# Source table (or other entity type such as a FHIR resource)
|+
# Source field (or property depending on the source syntax)
|colspan="2"|Property
# Dependent fields (other field values that affect the context of the value of the field)
|Card.
# Source scheme. The scheme of the original code (same as the legacy concept code scheme)
|Value type
|Description
|-
|colspan="2"|<span title="The column name in a select clause for this property, or a variable used to reference the result set of the values matched">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23alias/ <span style="color:green">alias ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Used to define the clause with a readable term and also used in other clauses for further refinement
|-
|colspan="2"|<span title="Optional description for clause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23description/ <span style="color:green">description ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Optional description for clause
|-
|colspan="2"|<span title="The value comparison for lower end of the range">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23from/ <span style="color:green">from ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Refers to the alias of another where clause to indicate the set of objects defined by the referenced clause, which will be further refined by this where clause.<br>Equivalent to accessing a temporary or derived table in SQL
|-
|colspan="2"|<span title="The graph to which these entities apply by default. This may be overridden by the entitiesThis means you can add predicates to any entity without affecting the original authored entity, those predicates belonging only to this module or graph">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23graph/ <span style="color:green">graph ]</span></span>
|0..1
|<span title="Core graphs for core ontologies such as the health information model, Discovery and Snomed">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Graph/ im:Graph]</span>
|The iri of a graph if the query is limited to a particular data set
|-
|colspan="2"|<span title="A property path made up of space delimited iri strings, from the outer entity to the entity on which this clause operates.Equivalent to an inner join in SQL">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23path/ <span style="color:green">path ]</span></span>
|0..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23Resource/ rdfs:Resource]</span>
|A property path made up of space delimited iri strings, from the outer entity to the entity on which this clause operates.<br>Equivalent to an inner join in SQL
|-
|colspan="2"|<span title="Points to a nested where clause. If the nested clause returns results then the entity referenced by the outer where clause is excluded.In other words, for the outer entity to be included, the nested entity must have no results. This contrasts with 'not'">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23notExist/ <span style="color:green">notExist ]</span></span>
|0..1
|<span title="A clause containing criteria which the objects must conform to. Equivalent to a from/join where clause in SQL and where/filter in sparql.Supports graph traversal filtering and inference for subsumption query">[[#class_WhereClause|WhereClause]]</span>
|Points to a nested where clause. If the nested clause returns results then the entity referenced by the outer where clause is excluded.<br>In other words, for the outer entity to be included, the nested entity must have no results. This contrasts with 'not'
|-
|colspan="2"|<span title="Boolean operator OR on subclauses">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23or/ <span style="color:green">or ]</span></span>
|2..*
|<span title="A clause containing criteria which the objects must conform to. Equivalent to a from/join where clause in SQL and where/filter in sparql.Supports graph traversal filtering and inference for subsumption query">[[#class_WhereClause|WhereClause]]</span>
|Boolean operator OR on subclauses
|-
|colspan="2"|<span title="Boolean operator AND on subclauses">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23and/ <span style="color:green">and ]</span></span>
|2..*
|<span title="A clause containing criteria which the objects must conform to. Equivalent to a from/join where clause in SQL and where/filter in sparql.Supports graph traversal filtering and inference for subsumption query">[[#class_WhereClause|WhereClause]]</span>
|Boolean operator AND on subclauses
|-
|colspan="2"|<span title="The property of the objects in the result set (as indicated by the alias) to test">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23property/ <span style="color:green">property ]</span></span>
|0..*
|<span title="An IRI with a name and an optional alias  and a variable name when the iri is passed in as an argument (e.g. $this">[[#class_IriAlias|IriAlias]]</span>
|a property tgo test. Note that this is applied to the entity after the path has been resolved.
|-
|colspan="2"|<span title="Whether the value is in this list of sets or concepts (including any sub types)">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23in/ <span style="color:green">in ]</span></span>
|0..*
|<span title="A reference to resource with an iri and optional name to enable readability">[[#class_IriRef|IriRef]]</span>
|Whether the value is in this list of sets or concepts (including any sub types)
|-
|colspan="2"|<span title="Whether the value is this concept (and optionally if set to include sub or supertypes)">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23is/ <span style="color:green">is ]</span></span>
|0..*
|<span title="An IRI with a name and an optional alias  and a variable name when the iri is passed in as an argument (e.g. $this">[[#class_IriAlias|IriAlias]]</span>
|Whether the value is this concept (and optionally if set to include sub or supertypes)
|-
|colspan="2"|<span title="Testing for the value as a not. Note that this filters out the instances but does not exclude the outer entity (see not exist)">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23not/ <span style="color:green">not ]</span></span>
|0..1
|<span title="boolean true or false">[https://www.w3.org/TR/xmlschema-2/#boolean xsd:boolean]</span>
|Testing for the value as a not. Note that this filters out the instances but does not exclude the outer entity (see not exist)
|-
|colspan="2"|<span title="A function that operates on the property value (and other parameters) prior to a compare or range or inclusion test. For example a time difference function operating on the date and a reference date.Note that properties that ARE functions do not need functions included for example age. For these simply supply the arguments.">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23function/ <span style="color:green">function ]</span></span>
|1..1
|<span title="A function used in a query consisting of the function iri and one or more arguments to pass in at run time">[[#class_FunctionClause|FunctionClause]]</span>
|A function that operates on the property value (and other parameters) prior to a compare or range or inclusion test. For example a time difference function operating on the date and a reference date.<br>Note that properties that ARE functions do not need functions included for example age. For these simply supply the arguments.
|-
|colspan="2"|<span title="Arguments to pass into the function. They should match the parameter definitions of the function">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23argument/ <span style="color:green">argument ]</span></span>
|0..1
|<span title="A named parameter and a value for passing into a function">[[#class_Argument|Argument]]</span>
|Arguments to pass into a function when the property is a function property.<br>Note that if the test is a function then the argument list would be in the function clause
|-
|colspan="2"|<span title="The value of the property used in a test. This is a string which will be cast to a number or date, depending on the data type of the property value">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23value/ <span style="color:green">value ]</span></span>
|1..1
|<span title="Tests a value, whether equal, greater than, less than etc. optionally including a value to compare against">[[#class_ValueClause|ValueClause]]</span>
|If testing a property value as equal greater than ete. use compare
|-
|colspan="2"|<span title="Test foe a value being between two absolute or relative values">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23range/ <span style="color:green">range ]</span></span>
|1..1
|<span title="A range for use in property value testing">[[#class_RangeClause|RangeClause]]</span>
|Test foe a value being between two absolute or relative values
|-
|colspan="2"|<span title="A chained where clause operating on the property value object. Equivalent to a join in SQL or '.' in sparql">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23where/ <span style="color:green">where ]</span></span>
|1..1
|<span title="A clause containing criteria which the objects must conform to. Equivalent to a from/join where clause in SQL and where/filter in sparql.Supports graph traversal filtering and inference for subsumption query">[[#class_WhereClause|WhereClause]]</span>
|A chained where clause operating on the property value object.<br> Equivalent to a join in SQL or '.' in sparql
|-
|colspan="2"|<span title="Ordering of instances via a property value in order to further test in another where clause.">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23orderBy/ <span style="color:green">orderBy ]</span></span>
|0..*
|<span title="An IRI with a name and an optional alias  and a variable name when the iri is passed in as an argument (e.g. $this">[[#class_IriAlias|IriAlias]]</span>
|Ordering of instances via a property value in order to further test in another where clause.
|-
|colspan="2"|<span title="direction of ordering (DESC or ASC) .">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23direction/ <span style="color:green">direction ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|direction of ordering (DESC or ASC) .
|-
|colspan="2"|<span title="Number of entities to return. Normally used with order by">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23limit/ <span style="color:green">limit ]</span></span>
|0..1
|<span title="whole number">[https://www.w3.org/TR/xmlschema-2/#integer xsd:integer]</span>
|Number of entities to return. Normally used with order by
|-


|}
==== Codeable concept ====
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23SelectClause/ SelectClause] ===
This is the structure generated by a mapping exercise that includes both the core matched concept and its original representation. A codeable concept are instances of the codeable concept IM meta model class as well as structures within health record classes.  A codeable concept includes some of the following
Defines the objects and properties to retrieve from a graph, subject to a mach clause. Supports graphql type nesting and sub selects for column groups
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="If the query result is simply a sum of the main entities found. equivalent to COUNT(id)">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23count/ <span style="color:green">count ]</span></span>
|0..1
|<span title="boolean true or false">[https://www.w3.org/TR/xmlschema-2/#boolean xsd:boolean]</span>
|If the query result is simply a sum of the main entities found. equivalent to COUNT(id)
|-
|colspan="2"|<span title="A property path made up of space delimited iri strings, from the outer entity to the entity on which this clause operates.Equivalent to an inner join in SQL">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23path/ <span style="color:green">path ]</span></span>
|0..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23Resource/ rdfs:Resource]</span>
|A property path made up of space delimited iri strings, from the outer entity to the entity on which this clause operates.<br> Shortcut for nested selects
|-
|colspan="2"|<span title="The property of the objects in the result set (as indicated by the alias) to test">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23property/ <span style="color:green">property ]</span></span>
|1..1
|<span title="An IRI with a name and an optional alias  and a variable name when the iri is passed in as an argument (e.g. $this">[[#class_IriAlias|IriAlias]]</span>
|Information about a property or field to include in the results. Property select supports nesting with selects for the objects that may be values of the property
|-
|colspan="2"|<span title="Nested select property clauses from the objects that are values of this select's property Note that if the value is null then this select would be absent">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23select/ <span style="color:green">select ]</span></span>
|0..*
|<span title="Defines the objects and properties to retrieve from a graph, subject to a mach clause. Supports graphql type nesting and sub selects for column groups">[[#class_SelectClause|SelectClause]]</span>
|Nested select property clauses from the objects that are values of this select's property Note that if the value is null then this select would be absent
|-
|colspan="2"|<span title="A chained where clause operating on the property value object. Equivalent to a join in SQL or '.' in sparql">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23where/ <span style="color:green">where ]</span></span>
|0..*
|<span title="A clause containing criteria which the objects must conform to. Equivalent to a from/join where clause in SQL and where/filter in sparql.Supports graph traversal filtering and inference for subsumption query">[[#class_WhereClause|WhereClause]]</span>
|Nested where clause operating on the values of this select's property<br>Enables multi- level filtering as used in JOIN where clauses in SQL
|-
|rowspan="3"|or<br>0..1
|<span title="Whether the result is a summation of this property's values">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23sum/ <span style="color:green">sum ]</span></span>
|0..1
|<span title="boolean true or false">[https://www.w3.org/TR/xmlschema-2/#boolean xsd:boolean]</span>
|Whether the result is a summation of this property's values
|-


|
# Original code. Whatever code was present in the relevant field in the original resource. The code may be from a scheme, an enumerated type or some other table specific code.
<span title="Whether the result is an average of this property's values">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23average/ <span style="color:green">average ]</span></span>
# Original code scheme. In many cases the code is derived from a code scheme, which may be an international, national, system specific, or organisational specific code scheme.
|0..1
# Original code term. This is the 'look up' display term for the code. This may or may not be the term that the user sees.
|<span title="boolean true or false">[https://www.w3.org/TR/xmlschema-2/#boolean xsd:boolean]</span>
# Original qualifier term. This may be a text term for an entry which typically qualifies or modifies the meaning of the entry and results in a different concept map. Typical examples may be 'negative' or 'not present' etc.
|Whether the result is an average of this property's values
# Original text. This (if present) is the term that the user would see in relation to this code. In many systems this is absent as the term is included in the text entry,
|-
# Matched to concept. The concept that this codeable concept matches too ''in this instance. '''Note that this is not the same as the simpler more direct concept to concept match.'''''


|
=== Health record maps ===
<span title="Whether the result is the maximum of this property's values">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23max/ <span style="color:green">max ]</span></span>
This is a class model of source to target maps for entities, fields and values, taking account of source context. This is used as the basis of data transformation from source messages or files into the target common data model.
|0..1
<br />
|<span title="boolean true or false">[https://www.w3.org/TR/xmlschema-2/#boolean xsd:boolean]</span>
|Whether the result is the maximum of this property's values
|-
|colspan="2"|<span title="A function that operates on the property value (and other parameters) prior to a compare or range or inclusion test. For example a time difference function operating on the date and a reference date.Note that properties that ARE functions do not need functions included for example age. For these simply supply the arguments.">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23function/ <span style="color:green">function ]</span></span>
|0..1
|<span title="A function definition with optional parameters">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Function/ im:Function]</span>
|The iri of a function indicating that the result is the result of a function operating on the property values, and any arguments passed in
|-
|colspan="2"|<span title="Arguments to pass into the function. They should match the parameter definitions of the function">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23argument/ <span style="color:green">argument ]</span></span>
|0..*
|<span title="A named parameter and a value for passing into a function">[[#class_Argument|Argument]]</span>
|Arguments to pass into the function
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23PrefixShape/ Prefix shape] ===
The model of a class containing an iri prefix map
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="Prefixe used in the rest of the document">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23prefix/ <span style="color:green">prefix ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Prefixe used in the rest of the document
|-
|colspan="2"|<span title="The iri or namespace or graph iri this prefix refers to">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23iri/ <span style="color:green">iri ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The iri or namespace or graph iri this prefix refers to
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23FunctionClause/ FunctionClause] ===
 
Is a subtype of [[#IrirRef|IrirRef]]
 
A function used in a query consisting of the function iri and one or more arguments to pass in at run time
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="Arguments to pass into the function. They should match the parameter definitions of the function">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23argument/ <span style="color:green">argument ]</span></span>
|0..*
|<span title="A named parameter and a value for passing into a function">[[#class_Argument|Argument]]</span>
|Arguments to pass into the function. They should match the parameter definitions of the function
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Argument/ Argument] ===
A named parameter and a value for passing into a function
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="A list of parameters and data types used in this function">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23parameter/ <span style="color:green">parameter ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Parameter name for a function or the parameter name for an argument
|-
|rowspan="2"|or<br>1..1
|<span title="Value that is a literal such as a string or number">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23valueData/ <span style="color:green">valueData ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Value that is a literal such as a string or number
|-
 
|
<span title="argument value which is a variable name to be resolved at run time">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23valueVariable/ <span style="color:green">valueVariable ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|argument value which is a variable name to be resolved at run time
|-
|colspan="2"|<span title="Passes in the result set from a previous where clause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23valueFrom/ <span style="color:green">valueFrom ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Passes in the result set from a previous where clause
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23ValueClause/ ValueClause] ===
Tests a value, whether equal, greater than, less than etc. optionally including a value to compare against
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="Comparison operators : =, <, <=, >, >=">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23comparison/ <span style="color:green">comparison ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Comparison operators : =, <, <=, >, >=
|-
|colspan="2"|<span title="The value of the property used in a test. This is a string which will be cast to a number or date, depending on the data type of the property value">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23value/ <span style="color:green">value ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The value of the property used in a test. This is a string which will be cast to a number or date, depending on the data type of the property value
|-
|colspan="2"|<span title="When the range values are relative to another value , information about the other value (e.g. variable or property of the results defined in another clause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23relativeTo/ <span style="color:green">relativeTo ]</span></span>
|0..1
|<span title="">[[#class_CompareClause|CompareClause]]</span>
|The result to compare the property value against is derived from a variable value or property of an object (identified by its alias) defined another where clause
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23RangeClause/ RangeClause] ===
A range for use in property value testing
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="The value comparison for lower end of the range">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23from/ <span style="color:green">from ]</span></span>
|1..1
|<span title="Tests a value, whether equal, greater than, less than etc. optionally including a value to compare against">[[#class_ValueClause|ValueClause]]</span>
|The value comparison for lower end of the range
|-
|colspan="2"|<span title="The value comparison of upper end of the range">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23to/ <span style="color:green">to ]</span></span>
|1..1
|<span title="Tests a value, whether equal, greater than, less than etc. optionally including a value to compare against">[[#class_ValueClause|ValueClause]]</span>
|The value comparison of upper end of the range
|-
|colspan="2"|<span title="When the range values are relative to another value , information about the other value (e.g. variable or property of the results defined in another clause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23relativeTo/ <span style="color:green">relativeTo ]</span></span>
|1..1
|<span title="">[[#class_CompareClause|CompareClause]]</span>
|When the range values are relative to another value , information about the other value (e.g. variable or property of the results defined in another clause
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23CompareClause/ CompareClause] ===
null
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="The column name in a select clause for this property, or a variable used to reference the result set of the values matched">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23alias/ <span style="color:green">alias ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The alias of the result set from another where clause
|-
|colspan="2"|<span title="The property of the objects in the result set (as indicated by the alias) to test">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23property/ <span style="color:green">property ]</span></span>
|0..1
|<span title="An IRI with a name and an optional alias  and a variable name when the iri is passed in as an argument (e.g. $this">[[#class_IriAlias|IriAlias]]</span>
|The property of the objects in the result set (as indicated by the alias) to test
|-
|colspan="2"|<span title="The name of a variable, passed as an argument to the query, which is resolved to the IRI">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23variable/ <span style="color:green">variable ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|If a value is being compared against a variable passed in as an argument, the name of the variable
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23FunctionShape/ FunctionShape] ===
Defines the target class : org.endeavourhealth.imapi.model.tripletree.TTEntity@2e45a6f9
 
Is a subtype of [[#Entity shape|Entity shape]]
 
null
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="A list of parameters and data types used in this function">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23parameter/ <span style="color:green">parameter ]</span></span>
|0..*
|<span title="">[[#class_Parameter|Parameter]]</span>
|A list of parameters and data types used in this function
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Parameter/ Parameter] ===
null
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label/ <span style="color:green">label ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The name of the parameter
|-
|rowspan="2"|or<br>1..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23datatype/ <span style="color:green">datatype ]</span></span>
|1..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23Resource/ rdfs:Resource]</span>
|The iri of The data type of the parameter when the data type is a literal
|-
 
|
<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23class/ <span style="color:green">class ]</span></span>
|1..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23Resource/ rdfs:Resource]</span>
|The iri of the class of the parameter when the argument is an object
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23PathQueryShape/ PathQueryShape] ===
Defines the target class : null
A query that returns a set pf paths between a source and target entity, traversing to a certain level
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="the source entity at the start of the path.">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23source/ <span style="color:green">source ]</span></span>
|1..1
|<span title="A reference to resource with an iri and optional name to enable readability">[[#class_IriRef|IriRef]]</span>
|the source entity at the start of the path.
|-
|colspan="2"|<span title="the target entity at the end of the path.">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23target/ <span style="color:green">target ]</span></span>
|1..1
|<span title="A reference to resource with an iri and optional name to enable readability">[[#class_IriRef|IriRef]]</span>
|the target entity at the end of the path.
|-
|colspan="2"|<span title="How many hops to be taken in the graph between source and target">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23depth/ <span style="color:green">depth ]</span></span>
|0..1
|<span title="whole number">[https://www.w3.org/TR/xmlschema-2/#integer xsd:integer]</span>
|How many hops to be taken in the graph between source and target
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23SetShape/ Set shape] ===
Defines the target class : org.endeavourhealth.imapi.model.tripletree.TTEntity@429b6e4d
 
Is a subtype of [[#Query /Set shape|Query /Set shape]]
 
data model for concept sets and value sets
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="points to a member of the set">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23hasMember/ <span style="color:green">hasMember ]</span></span>
|0..*
|<span title="Top level information concept for all codeable concepts">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Concept/ im:Concept]</span>
|The flat list of leaf concepts when generated from the definition, or for many national sets, simple list of concepts
|-
 
|}
 
== Data Model shapes ==
These shapes are the meta classes of the data modelling entities within the information model.
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23DataModelShape/ Data model shape] ===
Defines the target class : null
 
Is a subtype of [[#Entity shape|Entity shape]]
 
The meta class for a data model type, using a SHACL node shape for both definition and validation
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="Parameter name for a function or the parameter name for an argument">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23property/ <span style="color:green">property ]</span></span>
|0..*
|<span title="The data model of a shacl node shape describing a property of a data model entity">[[#class_PropertyNodeShape|PropertyNodeShape]]</span>
|The list of properties for this shape
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23PropertyNodeShape/ PropertyNodeShape] ===
 
Is a subtype of [[#Entity shape|Entity shape]]
 
The data model of a shacl node shape describing a property of a data model entity
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23path/ <span style="color:green">path ]</span></span>
|1..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23Property/ rdf:Property]</span>
|The iri of the property
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23minCount/ <span style="color:green">minCount ]</span></span>
|0..1
|<span title="whole number">[https://www.w3.org/TR/xmlschema-2/#integer xsd:integer]</span>
|Minimum cardinality,if null assuming any number including zero
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23maxCount/ <span style="color:green">maxCount ]</span></span>
|0..1
|<span title="whole number">[https://www.w3.org/TR/xmlschema-2/#integer xsd:integer]</span>
|The maximum number allowed. If null then any number
|-
|rowspan="3"|or<br>1..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23class/ <span style="color:green">class ]</span></span>
|1..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23Resource/ rdfs:Resource]</span>
|The iri for the class range of the property. The range of this property is a subclass of this class
|-
 
|
<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23datatype/ <span style="color:green">datatype ]</span></span>
|1..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23Resource/ rdfs:Resource]</span>
|The range of the property is a data type of this type
|-
 
|
<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23node/ <span style="color:green">node ]</span></span>
|1..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23Resource/ rdfs:Resource]</span>
|The property points to a node shape
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23comment/ <span style="color:green">comment ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Description of the property
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23name/ <span style="color:green">name ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The name of the property used for ease of recognition
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23order/ <span style="color:green">order ]</span></span>
|0..1
|<span title="whole number">[https://www.w3.org/TR/xmlschema-2/#integer xsd:integer]</span>
|The property order for display
|-
|colspan="2"|<span title="The shape that this property is inherited from (used in the inferred instance of the information model">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23inheritedFrom/ <span style="color:green">inheritedFrom ]</span></span>
|0..1
|<span title="">[[#class_NodeShape|NodeShape]]</span>
|The shape that this property is inherited from (used in the inferred instance of the information model
|-
 
|}
 
== Concept shapes ==
These shapes are the meta classes of the terminology concepts used within the information model.
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23ConceptShape/ Concept shape] ===
Defines the target class : org.endeavourhealth.imapi.model.tripletree.TTEntity@2d5a412d
 
Is a subtype of [[#Entity shape|Entity shape]]
 
data model for terminology concepts
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="a code for a codeable concept">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23code/ <span style="color:green">code ]</span></span>
|1..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The code for this concept, which may be a local code if local concept, or a core code such as a snomed identifier
|-
|colspan="2"|<span title="links a an alternative term code to a concept">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23hasTermCode/ <span style="color:green">hasTermCode ]</span></span>
|0..*
|<span title="data model for a term code">[[#class_TermCodeShape|TermCodeShape]]</span>
|Alternative terms or synonyms for this concept. A term may also have a description id.
|-
|colspan="2"|<span title="weighting to help in search retrieval">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23weighting/ <span style="color:green">weighting ]</span></span>
|0..1
|<span title="whole number">[https://www.w3.org/TR/xmlschema-2/#integer xsd:integer]</span>
|A number indicating a weighting for this concept which can be used in free text search
|-
|colspan="2"|<span title="Points to the definitional status of this entity e.g. full defined as an equivalent class">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23definitionalStatus/ <span style="color:green">definitionalStatus ]</span></span>
|0..1
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23VSET_Definitionalstatus/ im:VSET_Definitionalstatus]</span>
|Indicates the authoring status of this concept, whether necessary only, or both necessary and sufficient. OWL would use Equivalent class axiom to indicate this.
|-
|colspan="2"|<span title="points to one or more maps that matches this concept to another concept">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23hasMap/ <span style="color:green">hasMap ]</span></span>
|0..*
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Any backward maps from core to legacy. This is limited to complex maps rather than simple matches and are 'backward' matches not suitable for automatic inclusion in subsumption queries
|-
|colspan="2"|<span title="usage total for a stats report">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23usageTotal/ <span style="color:green">usageTotal ]</span></span>
|0..1
|<span title="whole number">[https://www.w3.org/TR/xmlschema-2/#integer xsd:integer]</span>
|The approximate number of times this concept has been used in around 1 million primary care and acute care records
|-
|colspan="2"|<span title="the old identifier from im1">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23im1Id/ <span style="color:green">im1Id ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|pointer the original identifer in IM1
|-
|colspan="2"|<span title="Points to a match between the concept and a legacy concept as part of a map">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23matchedTo/ <span style="color:green">matchedTo ]</span></span>
|0..*
|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23VSET_Unspecified/ im:VSET_Unspecified]</span>
|For a legacy concept, one or more concept this concept matches to. A query for the matched to concepts would entail this concept normally, but NOT the children of this concept
|-
|colspan="2"|<span title="Points to the context object holding information about the source of this concept">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23sourceContext/ <span style="color:green">sourceContext ]</span></span>
|0..*
|<span title="Data model for source context for a concept e.g. source system, field etc">[[#class_SourceContextShape|SourceContextShape]]</span>
|The source context object for this concept indicating the system, table, field and organisation that published this legacy concept
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fsnomed.info%2Fsct%23370124000/ <span style="color:green">370124000 ]</span></span>
|0..*
|<span title="Top level information concept for all codeable concepts">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Concept/ im:Concept]</span>
|Indicates the concepts that this concept has been replaced by
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23isChildOf/ <span style="color:green">isChildOf ]</span></span>
|0..*
|<span title="Top level information concept for all codeable concepts">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Concept/ im:Concept]</span>
|points to the parent legacy concept that this concept is in. Note that it may or may not be a true subtype. Reflects the original taxonomy
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23TermCodeShape/ Term code shape] ===
data model for a term code
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label/ <span style="color:green">label ]</span></span>
|0..*
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The term or synonym for the concept
|-
|colspan="2"|<span title="a code for a codeable concept">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23code/ <span style="color:green">code ]</span></span>
|0..*
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Descriptionid or code for this particular term
|-
|colspan="2"|<span title="Status of relationship">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23status/ <span style="color:green">status ]</span></span>
|0..*
|<span title="A status that is in active or active">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Status/ im:Status]</span>
|The status of this particular term code, may be active or inactive
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23SourceContextShape/ Source context shape] ===
 
Is a subtype of [[#Entity shape|Entity shape]]
 
Data model for source context for a concept e.g. source system, field etc
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="Points to the source system that published this concept">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23sourceSystem/ <span style="color:green">sourceSystem ]</span></span>
|1..*
|<span title="A named computer system considered a type of device">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23ComputerSystem/ im:ComputerSystem]</span>
|the name of the system that was responsible for sending the message or extract, usually referring to the health care record system
|-
|colspan="2"|<span title="Points to the source organisation that published this concept">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23sourcePublisher/ <span style="color:green">sourcePublisher ]</span></span>
|1..*
|<span title="A record of an organisation and its relationships. Named collections of people that have come together to achieve an objective">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Organisation/ im:Organisation]</span>
|The organisation (usually a provider) that was the source of this message or extract
|-
|colspan="2"|<span title="Points to the source extract or message type that published this concept">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23sourceSchema/ <span style="color:green">sourceSchema ]</span></span>
|1..*
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The schema or data set or other identifier that identifies the format of this extract
|-
|colspan="2"|<span title="Points to the source table or resource or message segment that published this concept">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23sourceTable/ <span style="color:green">sourceTable ]</span></span>
|1..*
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|If a table or message the name of the source table or source message type
|-
|colspan="2"|<span title="Points to the source field, element or message field that published this concept">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23sourceField/ <span style="color:green">sourceField ]</span></span>
|1..*
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The source field containing this data item
|-
|colspan="2"|<span title="Points to the source regex or other pattern match used when creating the concept from a mix of code and term">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23sourceRegex/ <span style="color:green">sourceRegex ]</span></span>
|1..*
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|In the case of text, the nature of a regex expression or nlp algorithm used to parse the source text
|-
|colspan="2"|<span title="the source code or term that acts as the heading for a text qualifier such as negative or positive">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23sourceHeading/ <span style="color:green">sourceHeading ]</span></span>
|1..*
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|For an item that depends on the context in which it appears, the heading which provides context
|-
|colspan="2"|<span title="the source text for a text map">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23sourceText/ <span style="color:green">sourceText ]</span></span>
|1..*
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|Source text or term for coded or non coded data
|-
|colspan="2"|<span title="The orignal field value used to create the concept">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23sourceValue/ <span style="color:green">sourceValue ]</span></span>
|1..*
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|The value or code for this concept. Note that a scheme for the code can be inferred from the other context information. In the event of a scheme/code pair, use different fields in the source context
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23RefinedConceptShape/ Refined concept shape] ===
 
Is a subtype of [[#Concept shape|Concept shape]]
 
A concept with role groups with roles
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="An anonymous property connecting to an anonymous class that has an intersection of sub roles">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23roleGroup/ <span style="color:green">roleGroup ]</span></span>
|0..*
|<span title="data model for a role group">[[#class_RoleGroupShape|RoleGroupShape]]</span>
|Zero or many role groups, each group containing one or more roles. These represent constraints on the super types i.e. more specific. Generated by inference making sure to remove duplicate properties or super properties.
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23RoleGroupShape/ Role group shape] ===
data model for a role group
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23Property/ <span style="color:green">Property ]</span></span>
|0..*
|<span title="Top level information concept for all codeable concepts">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Concept/ im:Concept]</span>
|The concept identifier of the concept that is the role. Role Groups are unique in that their properties are any properties from an ontology,usually concepts
|-
 
|}
 
== Transactional shapes ==
These shapes form the meta classes for structures pass into APIs for query of, or filing into, the model or health records.
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23EntityFileTransaction/ EntityFileTransaction] ===
 
Is a subtype of [[#Entity shape|Entity shape]]
 
An entity with the additional CRUD indicators to enable deletes updates, adding quads etc
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="Indicates the nature of the default CRUD transaction for entities in thisdocument. Thes can be overridden in each entity. Must be  one of: im:DeleteAll, im:AddQuads (adds in additional triples), im:UpdateAll (replaces all the predicates for this entity in the graph with te ones submitted), im:UpdatePredicates ( replaces all the objects of these submitted predicates for this graph">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23crud/ <span style="color:green">crud ]</span></span>
|1..1
|<span title="Operations that Update delete and and triples">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23CrudOperation/ im:CrudOperation]</span>
|Indicates the nature of the CRUD transaction which must be one of im:DeleteAll, im:AddQuads (adds in additional triples), im:UpdateAll (replaces all the predicates for this entity in the graph with te ones submitted), im:UpdatePredicates ( replaces all the objects of these submitted predicates for this graph
|-
|colspan="2"|<span title="The graph to which these entities apply by default. This may be overridden by the entitiesThis means you can add predicates to any entity without affecting the original authored entity, those predicates belonging only to this module or graph">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23graph/ <span style="color:green">graph ]</span></span>
|1..1
|<span title="Core graphs for core ontologies such as the health information model, Discovery and Snomed">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Graph/ im:Graph]</span>
|The graph to which these triples apply. <br>This means you can add predicates to any entity without affecting the original authored entity, those predicates belonging only to this module or graph
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23EntityDocument/ EntityDocument] ===
A document containing any number of triples to file as a batch.<br>Note that if the document is sent as Json-LD with prefixed iris, a @context object will be required
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="Indicates the nature of the default CRUD transaction for entities in thisdocument. Thes can be overridden in each entity. Must be  one of: im:DeleteAll, im:AddQuads (adds in additional triples), im:UpdateAll (replaces all the predicates for this entity in the graph with te ones submitted), im:UpdatePredicates ( replaces all the objects of these submitted predicates for this graph">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23crud/ <span style="color:green">crud ]</span></span>
|1..1
|<span title="Operations that Update delete and and triples">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23CrudOperation/ im:CrudOperation]</span>
|Indicates the nature of the default CRUD transaction for entities in thisdocument. Thes can be overridden in each entity. Must be  one of: im:DeleteAll, im:AddQuads (adds in additional triples), im:UpdateAll (replaces all the predicates for this entity in the graph with te ones submitted), im:UpdatePredicates ( replaces all the objects of these submitted predicates for this graph
|-
|colspan="2"|<span title="The graph to which these entities apply by default. This may be overridden by the entitiesThis means you can add predicates to any entity without affecting the original authored entity, those predicates belonging only to this module or graph">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23graph/ <span style="color:green">graph ]</span></span>
|1..1
|<span title="Core graphs for core ontologies such as the health information model, Discovery and Snomed">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Graph/ im:Graph]</span>
|The graph to which these entities apply by default. <br>This may be overridden by the entities<br>This means you can add predicates to any entity without affecting the original authored entity, those predicates belonging only to this module or graph
|-
|colspan="2"|<span title="Set of entities to file. If the entities do not have crud or graphs oftheir own then the default from the document are used">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23entities/ <span style="color:green">entities ]</span></span>
|1..*
|<span title="The super class and data model for all named resources in the model i.e. the data model of the entities that are labelled with iri label and status">[[#class_EntityShape|EntityShape]]</span>
|Set of entities to file. If the entities do not have crud or graphs oftheir own then the default from the document are used
|-
 
|}
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23QueryRequest/ Query Request] ===
A request for data sent as a  body (json in local name format) to the /queryIM API.<br>Contains a query as an iri or inline query with run time variable values as arguments for use in the query
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="optional name for debugging purposes. Is not used in the query process">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23name/ <span style="color:green">name ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|optional name for debugging purposes. Is not used in the query process
|-
|colspan="2"|<span title="optional page number and size if the client is looking for paged results">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23page/ <span style="color:green">page ]</span></span>
|0..1
|<span title="Information about paging if the client wishes to page results, including page number and page size">[[#class_PageInformation|PageInformation]]</span>
|optional page number and size if the client is looking for paged results
|-
|colspan="2"|<span title="If a free text search is part of the query">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23textSearch/ <span style="color:green">textSearch ]</span></span>
|0..1
|<span title="any valid json value characters with json escapes">[https://www.w3.org/TR/xmlschema-2/#string xsd:string]</span>
|If a free text search is part of the query
|-
|colspan="2"|<span title="Arguments to pass into the function. They should match the parameter definitions of the function">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23argument/ <span style="color:green">argument ]</span></span>
|0..*
|<span title="A named parameter and a value for passing into a function">[[#class_Argument|Argument]]</span>
|arguments to pass in to the query as parameters. Parameter name and value pairs. Values ,may be strings, numbers or IRIs
|-
|rowspan="1"|or<br>1..1
|<span title="The requested query, either by iri reference or inline definition If the query is already defined, use the queryIri. Arguments may be used in eoither approach">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23query/ <span style="color:green">query ]</span></span>
|1..1
|<span title="A set definition holding the logical definition of a set. Usually referred to as a Query as these are used to retrieve data.Includes most of  the main logical query constructs used in mainstream query languages, thus is a constrained version of mainstream languages that is schema independent.">[[#class_QueryDefinition|QueryDefinition]]</span>
|The requested query, either by iri reference or inline definition If the query is already defined, use the queryIri. Arguments may be used in eoither approach
|-
|colspan="2"|<span title="reference date for date ranges that use reference date. (Note that it could be passed in as an argument)">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23referenceDate/ <span style="color:green">referenceDate ]</span></span>
|0..1
|<span title="im date time format">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23DateTime/ im:DateTime]</span>
|reference date for date ranges that use reference date. (Note that it could be passed in as an argument)
|-


|}
=== Transactional classes ===
=== [https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23PageInformation/ PageInformation] ===
Used to update or carry requests to and from the information model or record store.
Information about paging if the client wishes to page results, including page number and page size
{| class="wikitable"
|+
|colspan="2"|Property
|Card.
|Value type
|Description
|-
|colspan="2"|<span title="Page number (starting at 1)">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23pageNumber/ <span style="color:green">pageNumber ]</span></span>
|1..1
|<span title="whole number">[https://www.w3.org/TR/xmlschema-2/#integer xsd:integer]</span>
|Page number (starting at 1)
|-
|colspan="2"|<span title="number of entries per page">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23pageSize/ <span style="color:green">pageSize ]</span></span>
|1..1
|<span title="whole number">[https://www.w3.org/TR/xmlschema-2/#integer xsd:integer]</span>
|number of entries per page
|-


|}
== Meta model class specification ==
The meta model is specified in the article [[meta model class specification]]<br />

Latest revision as of 12:05, 24 November 2022


Scope of the meta model

The model meta model consists of a set of specialised classes or 'shapes', made interoperable via the use of the semantic web languages, which use either RDF grammar and syntax (turtle) or JSON-LD as the exchange formats, with options for other inpout and output formats such as OWL functional syntax, Snomed compositional grammar or Snomed expression constraint language.

The shapes cover the following areas:

  1. An ontology of terminology concepts, 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's leading ontology Snomed-CT, with a London extension and supplemented with additional concepts for data modelling. Whether concepts or Snomed-CT concepts, or the London extension, or any legacy code based concept (e.g. ICD10 or EMIS local codes or Read codes), the class structure is the same.
  2. 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 to a data service that uses these models. The data model is part of the overall ontology and there is seamless boundary between the data model shapes and the terminology concepts, as both use RDF. The data model meta model uses SHACL shapes and thus conforms to the W3C SHACL recommendation.
  3. A library of business specific concept and value sets, which are expression constraints on the ontology for the purpose of query. This uses a specialised "query" or "set definition" class, and encompasses the Snomed-CT expression constraint language with which it is compatible, using a simple translation API
  4. A catalogue of reference data such as geographical areas, organisations and people derived and updated from public resources.
  5. A library of Queries for querying and extracting instance data from reference data or health records. This uses a more extended class model than 3) but fundamentally is a set definition which is mapped to mainstream query languages to get actual data.
  6. 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. This uses a context class.
  7. A set of form generators that are used by the IM application to create forms for the creation and editing of the IM entities which are instances of a meta model class.


General approach

The information model language uses RDF triples as its basic grammar i.e. subject, predicate, and object with graph making up quadruples of an RDF data set.

When viewed from the perspective of data modelling or an ontology these could also be referred to as object, property and value or class property and type.

Thus, RDF is used for the meta model and the W3C language used for the metal model is SHACL. In other words, SHACL is used to define all the meta classes, and the meta classes are used to hold the instances which are the content of the model.

The paradox of the information model content is that the instances of the meta model classes are themselves considered classes in the real world. For example when noting that a patient has 'chest pain' this is recorded as a concept which is an instance of the concept model. But 'chest pain' is also the class of all chest pains, so the same identifiers can be used for subsumption query. Likewise a clinical event in a health record is an instance of a data model meta class, but the clinical event is also a class of all clinical events such as an observation or encounter!

The model itself can be exchanged in JSON-LD, but JSON-LD can be somewhat tedious (as RDF predicates cannot directly map to standard programming language class properties) , so the use of 'local names' for business related APIs (e.g. query) is supported. In this case the JSON field names can use the local names without the full IRI, as long as the JSON complies with the model classes as described here.

Consequently, in order to make the documentation clearer, local names are used in this documentation also with links to the IM viewer or W3C equivalent.

This documentation is auto generated from the information model folders and shapes themselves, and thus the shapes can also be viewed more fully in the Information Model Directory viewing application

Types and shapes

Types (as represented as the value of the rdf: type predicate), are used to indicate the class structure of an object in the model. Thus each meta model class is marked as an RDF TYPE.

Shapes are made up of SHACL node shapes and property shapes. A 'type' is defined in the form of a shape.

Shapes are also classes (i.e. also are rdf:type -> rdf:Class), so that any shape that is a subclass of another shape inherits its properties unless overridden by sub properties, or subclass values of the parent properties.

Model categories

Given the RDF nature of the class models, it is also reasonable to consider each area of the model as a "language". For example, the W3C OWL,SHACL, SPARQL etc are referred to as "languages" by dint of the types and properties being arranged as a grammar with a vocabulary.

The information model considers the model as a set of class descriptions. Thus things like ontological concepts, data models, and query definitions are modelled as SHACL RDF shapes, but implemented in programming languages such as Java and JavaScript, as classes and objects, mapped precisely to the triples..

To bridge RDF into programming languages requires some constraints on the triple design. For example, a predicate in a triple would normally be represented as a property in JSON or C# or Java, using the local name element of the IRI as the property name, thus the triple predicates should have local names which are unique for the class.

The IM meta model can be broadly divided into the following:

Ontology of concepts

These are classes that have an IRI, a term (name), a description, a code, one or more synonyms (that may also be coded), a set of subclass axioms, and one or more role groups with roles (property value pairs) which represent existential quantifications from Description Logic. OWL Equivalent axioms t(hat represent concepts whose definition are both necessary and sufficient) are classified via a reasoner prior to ingestion into the IM. Transitive relationships such as subclass, sub property, together with replacement maps, generate a transitive "is a" closure structure for efficient subsumption query.

External language support includes OWL functional syntax and Snomed-CT compositional grammar.

Data model shapes

These are entities that have an IRI, a name, a description, a subclass relationship with another entity, and one or more properties with range types and cardinality. i.e. a very straightforward entity definition with entity to entity relationships modelled as properties that point to other entities (sh:node), and properties whose value types may be literals (sh:dataType) or value set concepts (sh:class).

Set and Query definitions

This is a class model of a logical query expressed in the form of "from a thing, or a set of things, where the thing has characteristics, select properties of the thing and related things". In other words from, where, select. The model classes cover all the main query language constructs but arranged in a way that flows top to bottom in a series of steps. The effect of this is that the model supports multiple and nested sub queries as well as hierarchical results (of the kind described in GraphQL).

The set definition model supports translation from Snomed expression constraint language.

Internally, where a query definition is applied to the IM itself (e.g. concept sets or IMAPI) then instances of the classes are converted to SPARQL. When the query definition is applied to health records then the instances are converted to SQL using an entity table map.

A query model definition generally falls into one of 4 patterns

a) From one or more "focus" concept, with role groups and roles (supporting and / or / minus, as well as optional subtypes), select the concepts entailed by the definition.

b) From a cohort of objects of a certain type. with certain property values, ordered if required, as well as related objects with property values, select the objects entailed by the definition

c) From the set defined by b) List properties of those objects (and related objects)

d) From the set defined by c) List groups of characteristics further filtered by property values. (i.e. multi group data sets)

Data sets are defined as a collection of set definitions and thus the data set can include features of many entity types.

Concept mappings

Health data from systems that hold coded or text values should, where possible, be mapped to a core concept.

Linked Health records store more than a simple concept reference, as the original meaning, including its context, should be retained in the record following any mapping.

There are two structures that may be needed in mapping a source code to a core concept and the result is an instance of a codeable concept as an entry in a health record

Legacy concept to core concept match

A legacy concept is generated from a code scheme (e.g. local codes, OPCS, ICD10) and in many cases there is a direct 'matched to' property which points to the core concept. This match can be used directly when the source scheme and source code is known.

Source context

Often, more context is needed to effectively match a source code to a core concept. A 'source context' will often be required to further disambiguate the concept. Source context includes one or more of the following.

  1. Source system
  2. Source organisation
  3. Source schema (e,g, a database schema or extract name)
  4. Source table (or other entity type such as a FHIR resource)
  5. Source field (or property depending on the source syntax)
  6. Dependent fields (other field values that affect the context of the value of the field)
  7. Source scheme. The scheme of the original code (same as the legacy concept code scheme)

Codeable concept

This is the structure generated by a mapping exercise that includes both the core matched concept and its original representation. A codeable concept are instances of the codeable concept IM meta model class as well as structures within health record classes. A codeable concept includes some of the following

  1. Original code. Whatever code was present in the relevant field in the original resource. The code may be from a scheme, an enumerated type or some other table specific code.
  2. Original code scheme. In many cases the code is derived from a code scheme, which may be an international, national, system specific, or organisational specific code scheme.
  3. Original code term. This is the 'look up' display term for the code. This may or may not be the term that the user sees.
  4. Original qualifier term. This may be a text term for an entry which typically qualifies or modifies the meaning of the entry and results in a different concept map. Typical examples may be 'negative' or 'not present' etc.
  5. Original text. This (if present) is the term that the user would see in relation to this code. In many systems this is absent as the term is included in the text entry,
  6. Matched to concept. The concept that this codeable concept matches too in this instance. Note that this is not the same as the simpler more direct concept to concept match.

Health record maps

This is a class model of source to target maps for entities, fields and values, taking account of source context. This is used as the basis of data transformation from source messages or files into the target common data model.

Transactional classes

Used to update or carry requests to and from the information model or record store.

Meta model class specification

The meta model is specified in the article meta model class specification