SPARQLer
SPARQL
SPARQL Protocol and RDF Query Language (SPARQL) is a query language defined by the W3C standard for querying RDF data. For further information on SPARQL, see background-sparql.
The SPARQLer
tool
The SPHN SPARQL Queries Generator
(SPARQLer
) is a Python tool that accepts as input an SPHN RDF Schema
(Turtle format) and generates a series of SPARQL queries in a standard RDF/OWL
format based on the concepts present in the schema.
The tool is integrated into the SPHN Framework Schema Visualization Tool.
The automatically generated queries could be executed against a SPARQL endpoint by data managers and hospitals to retrieve the content of the RDF data in a tabular format.
Note
For more details about installation instruction and the usage of the tool, check the SPARQLer README.md.
For more details about concepts flattening and the statistical queries, check the Concept Flattening in the SPARQLer.
Available SPARQL Queries
‘Concept flattening’ queries:
Composed of one query per concept/class. The output is a table that ‘flattens’ the data. Each query gives the list of resources defined for that concept together with the direct property values (see Concept Flattening in the SPARQLer).
Statistical queries:
Query per concept/class: Counting the instances per concept and predicate
Query per concept/class: Minimum and maximum of predicates (dates or values)
Query per concept/class: List and count of all used codes for hasCode
Manually built queries, based on the hospIT statistics queries - simply adapted prefixes, class and property names to fit the SPHN RDF Schema 2021-1
Availability and usage rights
© Copyright 2022, Personalized Health Informatics Group (PHI), SIB Swiss Institute of Bioinformatics.
The SPARQLer is available at (send request to DCC - dcc@sib.swiss):
Version 1.0 (supports SPHN 2021-1 and SPHN 2021-2).
Version 2.0 (supports SPHN 2021-1 and SPHN 2021-2).
Version 3.0 (supports SPHN 2021-1 to SPHN 2022-2)
The SPARQL queries for the SPHN RDF Schema 2021-2 and 2022-2 are available at sparql-queries.
The SPARQLer is licensed under the GPLv3 (see License).
For any question or comment, please contact the Data Coordination Center (DCC) at dcc@sib.swiss.