Querying Data with SPARQL
Training delivered by: PHI Data Interoperability Team
SPHN projects having data in RDF can benefit from the graph technologies to answer specific research questions with the use of queries. SPARQL is the standard querying languages that enables to explore RDF graphs and retrieve wanted results. In this training, we provide a short introduction to SPARQL before showcasing two concrete examples of queries that answer the following questions:
- Which patients are allergic to a certain substance?
- Which patients had a certain lab test done?
With these questions, we explore the use of knowledge provided in external terminologies (SNOMED CT and LOINC) as well as reasoning possibilities offered in RDF (inference).
Prerequisites
This video assumes that your data is loaded into your triplestore (in our example, GraphDB). If you need instructions on this step, please watch our training “RDF Schema and Data Visualization” or read our user guide.
Training Contents (with time stamps):
- Introduction to SPARQL (00:44)
- Query of patient allergic to Peanuts (from SNOMED CT) (06:48)
- Query of patient allergic to Pulse Vegetable (from SNOMED CT) (12:51)
- RDF Reasoning (17:08)
- Patient with lab test code 6690-2 (from LOINC) (22:08)
- Patient with lab test on Leukocytes in Blood (from LOINC) (24:16)
- References (27:41)
Training Resources
- All resources are available on this training’s GitLab space.