Skip to main content

Table 2 Comprehensive list of constraints used in the SHACLer

From: The SPHN Schema Forge – transform healthcare semantics from human-readable to machine-readable by leveraging semantic web technologies

Type of constraint

SHACL component used

Verification made by the SHACL

Cardinality constraint

sh:minCount; sh:maxCount; sh:path

Data must comply with the cardinalities defined in the schema (e.g. minimum cardinality is 1)

Class restriction

sh:class, sh:or

Data must comply with the class restrictions applied to a property

SPARQL target constraint

sh:SPARQLTarget

Used when parent and children’s classes have different validation rules (i.e. restrictions applied)

Sequence path

sh:path

Data must comply with restrictions applied on specific paths of a class

Literal type constraint

sh:datatype

Data of data properties data properties must comply with the expected types (e.g. a'hasName'property must be a xsd:string)

Restriction on individuals and instances

sh:in

Existing instance data must be reused (e.g. SPHN value sets are defined as instances and used in specific contexts as values)

Restriction on date times

sh:SPARQLConstraint

A start date time must occur before an end date time in a specific class instance context

Naming convention constraint

sh:SPARQLConstraint

Data should comply with naming conventions defined in SPHN or warnings will be retrieved (using SPARQL constraints)

Validity of terminology codes

sh:SPARQLConstraint; sh:SPARQLTarget

For ATC, CHOP and ICD-10-GM terminologies, SPHN has applied a versioning strategy. Here, it retrieves either info or error messages depending on the validity of a specific version of a code

  1. The table shows for each type of constraints, the SHACL components and targets used and provides information on the type of verification that is made with the generated rule. Note that 'CHOP' refers to the Swiss Classification of Procedures used as a terminology in SPHN and which provided as an RDF file