DavidStables (talk | contribs) |
DavidStables (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
== Basic shapes == | == Basic shapes == | ||
These shapes are the meta classes of the named entities within the information model. | These shapes are the meta classes of the named entities within the information model. | ||
=== IrirRef === | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
Line 10: | Line 11: | ||
|- | |- | ||
|rowspan="2"|<span id="class_IrirRef">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23IriRef/ <span style="color:navy"> '''IrirRef'''</span>]</span> | |rowspan="2"|<span id="class_IrirRef">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23IriRef/ <span style="color:navy"> '''IrirRef'''</span>]</span> | ||
| | |colspan="3"|A resource with an iri and name | ||
|A resource with an iri and name | |||
|- | |- | ||
|colspan="2"|<span style="color:green">label</span> | |colspan="2"|<span style="color:green">label</span> | ||
Line 24: | Line 21: | ||
|} | |} | ||
=== Entity === | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
Line 33: | Line 31: | ||
|- | |- | ||
|rowspan="5"|<span id="class_Entity">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Entity/ <span style="color:navy"> '''Entity'''</span>]<br> (subtype of [[#class_IrirRef|IrirRef]])</span> | |rowspan="5"|<span id="class_Entity">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Entity/ <span style="color:navy"> '''Entity'''</span>]<br> (subtype of [[#class_IrirRef|IrirRef]])</span> | ||
| | |colspan="3"|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 | ||
|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 | |||
|- | |- | ||
|colspan="2"|<span style="color:green">comment</span> | |colspan="2"|<span style="color:green">comment</span> | ||
|0..1 | |0..1 | ||
Line 64: | Line 59: | ||
|- | |- | ||
|}== Query language shapes == | |} | ||
== Query language shapes == | |||
These shapes form the query language DSL for retrieving data from the IM or health records. | These shapes form the query language DSL for retrieving data from the IM or health records. | ||
=== Query Request === | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
Line 75: | Line 73: | ||
|- | |- | ||
|rowspan="7"|<span id="class_Query Request">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23QueryRequest/ <span style="color:navy"> '''Query Request'''</span>]</span> | |rowspan="7"|<span id="class_Query Request">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23QueryRequest/ <span style="color:navy"> '''Query Request'''</span>]</span> | ||
| | |colspan="3"|A request for data sent as a body (json in local name format) to the /queryIM API.<br>Contains either a query or query iri with run time variable values for use in the query | ||
|A request for data sent as a body (json in local name format) to the /queryIM API.<br>Contains either a query or query iri with run time variable values for use in the query | |||
|- | |- | ||
|colspan="2"|<span style="color:green">page</span> | |colspan="2"|<span style="color:green">page</span> | ||
|0..1 | |0..1 | ||
Line 120: | Line 115: | ||
|- | |- | ||
|rowspan="3"|<span id="class_PageInformation">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23PageInformation/ <span style="color:navy"> '''PageInformation'''</span>]</span> | |rowspan="3"|<span id="class_PageInformation">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23PageInformation/ <span style="color:navy"> '''PageInformation'''</span>]</span> | ||
| | |colspan="3"|Information about paging if the client wishes to page results, including page number and page size | ||
|Information about paging if the client wishes to page results, including page number and page size | |||
|- | |- | ||
|colspan="2"|<span style="color:green">pageNumber</span> | |colspan="2"|<span style="color:green">pageNumber</span> | ||
|1..1 | |1..1 | ||
Line 139: | Line 131: | ||
|- | |- | ||
|rowspan="6"|<span id="class_Argument">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Argument/ <span style="color:navy"> '''Argument'''</span>]</span> | |rowspan="6"|<span id="class_Argument">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Argument/ <span style="color:navy"> '''Argument'''</span>]</span> | ||
| | |colspan="3"|A named parameter and a value for passing into a function | ||
|A named parameter and a value for passing into a function | |||
|- | |- | ||
|colspan="2"|<span style="color:green">parameter</span> | |colspan="2"|<span style="color:green">parameter</span> | ||
|1..1 | |1..1 | ||
Line 180: | Line 169: | ||
|- | |- | ||
|rowspan="7"|<span id="class_Query">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Query/ <span style="color:navy"> '''Query'''</span>]<br> (subtype of [[#class_ModelHeading|ModelHeading]])</span> | |rowspan="7"|<span id="class_Query">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23Query/ <span style="color:navy"> '''Query'''</span>]<br> (subtype of [[#class_ModelHeading|ModelHeading]])</span> | ||
| | |colspan="3"|A Query definition holding the logical definition of a query in a standard language | ||
|A Query definition holding the logical definition of a query in a standard language | |||
|- | |- | ||
|colspan="2"|<span style="color:green">resultFormat</span> | |colspan="2"|<span style="color:green">resultFormat</span> | ||
|0..1 | |0..1 | ||
Line 225: | Line 211: | ||
|- | |- | ||
|rowspan="12"|<span id="class_SelectClause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23SelectClause/ <span style="color:navy"> '''SelectClause'''</span>]<br> (subtype of [[#class_ModelHeading|ModelHeading]])</span> | |rowspan="12"|<span id="class_SelectClause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23SelectClause/ <span style="color:navy"> '''SelectClause'''</span>]<br> (subtype of [[#class_ModelHeading|ModelHeading]])</span> | ||
| | |colspan="3"|null | ||
|null | |||
|- | |- | ||
|colspan="2"|<span style="color:green">count</span> | |colspan="2"|<span style="color:green">count</span> | ||
|0..1 | |0..1 | ||
Line 303: | Line 286: | ||
|- | |- | ||
|rowspan="2"|<span id="class_ModelHeading">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23ModelHeading/ <span style="color:navy"> '''ModelHeading'''</span>]<br> (subtype of [[#class_Entity|Entity]])</span> | |rowspan="2"|<span id="class_ModelHeading">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23ModelHeading/ <span style="color:navy"> '''ModelHeading'''</span>]<br> (subtype of [[#class_Entity|Entity]])</span> | ||
| | |colspan="3"|General headings such as name description and alias | ||
|General headings such as name description and alias | |||
|- | |- | ||
|colspan="2"|<span style="color:green">alias</span> | |colspan="2"|<span style="color:green">alias</span> | ||
|1..1 | |1..1 | ||
Line 316: | Line 296: | ||
|- | |- | ||
|<span id="class_MatchClause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23MatchClause/ <span style="color:navy"> '''MatchClause'''</span>]</span> | |<span id="class_MatchClause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23MatchClause/ <span style="color:navy"> '''MatchClause'''</span>]</span> | ||
| | |colspan="3"|A clause that matches a path to entity, its properties and its values or intersections unions or negation. Equivalent to a sparql wheew filter clause | ||
|A clause that matches a path to entity, its properties and its values or intersections unions or negation. Equivalent to a sparql wheew filter clause | |||
|- | |- | ||
| | | | ||
|- | |- | ||
Line 327: | Line 304: | ||
|- | |- | ||
|rowspan="8"|<span id="class_PropertySelectClause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23PropertySelectClause/ <span style="color:navy"> '''PropertySelectClause'''</span>]<br> (subtype of [[#class_ConceptReference|ConceptReference]])</span> | |rowspan="8"|<span id="class_PropertySelectClause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23PropertySelectClause/ <span style="color:navy"> '''PropertySelectClause'''</span>]<br> (subtype of [[#class_ConceptReference|ConceptReference]])</span> | ||
| | |colspan="3"|null | ||
|null | |||
|- | |- | ||
|rowspan="3"|or<br>0..1 | |rowspan="3"|or<br>0..1 | ||
|<span style="color:green">sum</span> | |<span style="color:green">sum</span> | ||
Line 379: | Line 353: | ||
|- | |- | ||
|rowspan="2"|<span id="class_PathTargetClause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23PathTargetClause/ <span style="color:navy"> '''PathTargetClause'''</span>]<br> (subtype of [[#class_IrirRef|IrirRef]])</span> | |rowspan="2"|<span id="class_PathTargetClause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23PathTargetClause/ <span style="color:navy"> '''PathTargetClause'''</span>]<br> (subtype of [[#class_IrirRef|IrirRef]])</span> | ||
| | |colspan="3"|null | ||
|null | |||
|- | |- | ||
|colspan="2"|<span style="color:green">depth</span> | |colspan="2"|<span style="color:green">depth</span> | ||
|0..1 | |0..1 | ||
Line 392: | Line 363: | ||
|- | |- | ||
|rowspan="5"|<span id="class_ConceptReference">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23ConceptReference/ <span style="color:navy"> '''ConceptReference'''</span>]<br> (subtype of [[#class_IrirRef|IrirRef]])</span> | |rowspan="5"|<span id="class_ConceptReference">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23ConceptReference/ <span style="color:navy"> '''ConceptReference'''</span>]<br> (subtype of [[#class_IrirRef|IrirRef]])</span> | ||
| | |colspan="3"|null | ||
|null | |||
|- | |- | ||
|colspan="2"|<span style="color:green">includeSubtypes</span> | |colspan="2"|<span style="color:green">includeSubtypes</span> | ||
|0..1 | |0..1 | ||
Line 423: | Line 391: | ||
|- | |- | ||
|<span id="class_OrderLimitClause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23OrderLimitClause/ <span style="color:navy"> '''OrderLimitClause'''</span>]</span> | |<span id="class_OrderLimitClause">[https://im.endeavourhealth.net/viewer/#/concept/http%3A%2F%2Fendhealth.info%2Fim%23OrderLimitClause/ <span style="color:navy"> '''OrderLimitClause'''</span>]</span> | ||
| | |colspan="3"|null | ||
|null | |||
|- | |- | ||
| | | | ||
|- | |- | ||
Line 440: | Line 405: | ||
|- | |- | ||
|}== Data Model shapes == | |} | ||
== Data Model shapes == | |||
These shapes are the meta classes of the data modelling entities within the information model. | These shapes are the meta classes of the data modelling entities within the information model. | ||
== Transactional entity filing shapes == | == Transactional entity filing shapes == | ||
These shapes form the meta classes for entities to be filed into the model or health records. | These shapes form the meta classes for entities to be filed into the model or health records. |
Revision as of 09:19, 25 August 2022
Basic shapes
These shapes are the meta classes of the named entities within the information model.
IrirRef
Class | Field | Card. | Type | Comment | |
---|---|---|---|---|---|
IrirRef | A resource with an iri and name | ||||
label | 1..1 | xsd:string | The name of the entity |
Entity
Class | Field | Card. | Type | Comment | |
---|---|---|---|---|---|
Entity (subtype of IrirRef) |
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 | ||||
comment | 0..1 | xsd:string | The description of the entity | ||
type | 1..1 | rdfs:Resource | The base type of the entity i.e. one of the high level entity types | ||
status | 1..1 | im:Status | The status of the entity being active, inactive, draft or unassigned | ||
scheme | 1..1 | im:Graph | The code scheme or graph which the entity belongs to |
Query language shapes
These shapes form the query language DSL for retrieving data from the IM or health records.
Query Request
Class | Field | Card. | Type | Comment | |
---|---|---|---|---|---|
Query Request | A request for data sent as a body (json in local name format) to the /queryIM API. Contains either a query or query iri with run time variable values for use in the query | ||||
page | 0..1 | PageInformation | optional page number and size if the client is looking for paged results | ||
textSearch | 0..1 | xsd:string | If a free text search is part of the query | ||
argument | 0..* | Argument | arguments to pass in to the query as parameters. Parameter name and value pairs. Values ,may be strings, numbers or IRIs | ||
or 1..1 |
query | 1..1 | Query | The query definition for an inline dynamic query. If the query is already defined, use the queryIri. Arguments may be used in eoither approach | |
queryIri |
1..1 | sh:IRI | The IRI of a predefined query in the information model. i.e. request the system to run query X | ||
referenceDate | 0..1 | im:DateTime | reference date for date ranges that use reference date. Note that it could be passed in as an argeument | ||
PageInformation | Information about paging if the client wishes to page results, including page number and page size | ||||
pageNumber | 1..1 | xsd:integer | Page number (starting at 1) | ||
pageSize | 1..1 | xsd:integer | number of entries per page | ||
Argument | A named parameter and a value for passing into a function | ||||
parameter | 1..1 | xsd:string | Parameter name for a function or the parameter name for an argument | ||
or 1..1 |
valueData | 1..1 | xsd:string | Vaue that is a literal such as a string or number | |
valueVariable |
1..1 | xsd:string | argumenT value which is a variable name to be resolved at run time | ||
valueSelect |
1..1 | SelectClause | Argument value that is the result of a select query | ||
valueIri |
1..1 | sh:IRI | Argument value that is an iri | ||
Query (subtype of ModelHeading) |
A Query definition holding the logical definition of a query in a standard language | ||||
resultFormat | 0..1 | xsd:string | Whether the result set is required flat select style json or a nested graphql json object style 'RELATIONAL' or 'OBJECT. Default is OBJECT | ||
usePrefixes | 0..1 | xsd:boolean | true if you want the results to use IRI prefixes | ||
activeOnly | 0..1 | xsd:boolean | Whether only active entities are included in the match clauses or select clauses | ||
or 1..1 |
select | 1..1 | SelectClause | Select query clause logically similar to SQL/SPARQL select but with GraphQL nesting ability | |
ask |
0..1 | MatchClause | If the query is a boolean true or false use match clauses as an ask | ||
mainEntity | 0..1 | sh:NodeShape | The main entity to which all matches must be related e.g. Patient or organisation. i.e. the IRI of a data model entity (SHACL shape) | ||
SelectClause (subtype of ModelHeading) |
null | ||||
count | 0..1 | xsd:boolean | If the query result is simply a sum of the main entities found. equivalent to COUNT(id) | ||
or 0..1 |
property | 1..* | PropertySelectClause | Information about a property or field to includein the results. Property select supports nesting with selects for the objects that may be values of the property | |
pathToTarget |
1..1 | PathTargetClause | Special function for path query. Information about the target entity when the query is looking to return paths between a source and a target. Both are likely to be passed in as parameters | ||
match | 0..* | MatchClause | The match pattern to which the select clause must comply. Equivalent to a where/filter in SPARQL and JOIN/WHERE in SQL | ||
distinct | 0..1 | xsd:boolean | Whether the entity objects returned should be distinct | ||
or 0..1 |
entityType | 1..1 | ConceptReference | The entity type for instances this select clause operates on. Options include including subtypes. | |
entityId |
1..1 | ConceptReference | An instance of an enttu for which this select clause operates. As in entity type, optionally to include subtypes, where the entity id is a concept | ||
entityIn |
1..1 | rdfs:Resource | The consept set, value set, or query result set that forms the base population of instances on which the select clause operates. e.g. a parent cohort. | ||
groupBy | 0..* | PropertySelectClause | If the results need to be grouped, the grouping properties. | ||
orderLimit | 0..* | OrderLimitClause | Ordering of instances via a property value and limiting th enumber returned. | ||
subselect | 0..* | SelectClause | For a query with column groups such as a list report, the select query for each group | ||
ModelHeading (subtype of Entity) |
General headings such as name description and alias | ||||
alias | 1..1 | xsd:string | An alias or reference term that can be used throughout a query as shorthand for the result set | ||
MatchClause | A clause that matches a path to entity, its properties and its values or intersections unions or negation. Equivalent to a sparql wheew filter clause | ||||
PropertySelectClause (subtype of ConceptReference) |
null | ||||
or 0..1 |
sum | 0..1 | xsd:boolean | Whether the result is a summation of this property's values | |
average |
0..1 | xsd:boolean | Whether the result is an average of this property's values | ||
max |
0..1 | xsd:boolean | Whether the result is the maximum of this property's values | ||
select | 0..1 | SelectClause | Nested select clause for graphql style results format | ||
inverseOf | 0..1 | xsd:boolean | Indicates if true that the selected property is an inverse relationship with the target object | ||
function | 0..1 | im:Function | 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 | ||
argument | 0..* | Argument | Arguments to pass into the function | ||
PathTargetClause (subtype of IrirRef) |
null | ||||
depth | 0..1 | xsd:integer | How many hops to be taken in the graph between source and target | ||
ConceptReference (subtype of IrirRef) |
null | ||||
includeSubtypes | 0..1 | xsd:boolean | Whether to include the subtypes of the entites selected or matched | ||
includeSupertypes | 0..1 | xsd:boolean | Whether to include the supertypes of the entity in a match clause. Used for ascending the hierarch to look for properties inherited | ||
excludeSelf | 0..1 | xsd:boolean | Whether to exclude this entity when either include supbtypes or include suprtypes is set. Rarely used but sometimes found in ECL definitions | ||
alias | 0..1 | xsd:string | The column name in a select clause for this property, or a variable used to reference the result set of the values matched | ||
OrderLimitClause | null | ||||
Data Model shapes
These shapes are the meta classes of the data modelling entities within the information model.
Transactional entity filing shapes
These shapes form the meta classes for entities to be filed into the model or health records.