Abstract
Extracting patient phenotypes from routinely collected health data (such as Electronic Health Records) requires translating clinically-sound phenotype definitions into queries/computations executable on the underlying data sources by clinical researchers. This requires significant knowledge and skills to deal with heterogeneous and often imperfect data. Translations are time-consuming, error-prone and, most importantly, hard to share and reproduce across different settings. This paper proposes a knowledge driven framework that (1) decouples the specification of phenotype semantics from underlying data sources; (2) can automatically populate and conduct phenotype computations on heterogeneous data spaces. We report preliminary results of deploying this framework on five Scottish health datasets.
Introduction
In the world of big data healthcare, "phenotyping" is the process of identifying patients with specific traits—such as a certain disease, a reaction to a medication, or a specific lab result—within Electronic Health Records (EHRs). Currently, this is a manual, "bespoke" process. A clinical researcher defines a phenotype (e.g., "Type 2 Diabetes"), and a data scientist must then translate that definition into complex SQL queries tailored to a specific database.
This traditional approach suffers from three major flaws:
- Heterogeneity: Different hospitals use different coding systems (ICD-9 vs. ICD-10) and database schemas.
- Fragility: Queries are error-prone and time-consuming to write.
- Reproducibility Crisis: Because these queries are often tied to sensitive, private database structures, they are rarely shared, making it nearly impossible for other researchers to verify or replicate the study.
Methodology
The authors propose a framework based on Ontology-Based Data Access (OBDA). Instead of querying the database directly, researchers query a "knowledge layer." This approach decouples the clinical meaning (the "what") from the data storage (the "how").
Key components of the framework include:
- Semantic Web Technologies: The system uses DL-Lite ontologies to represent medical hierarchies and SWRL (Semantic Web Rule Language) to define phenotype logic.
- Automated Mapping: The framework uses a tool called OnTop to act as a reasoner. It takes a high-level clinical query (SPARQL) and automatically translates it into the appropriate SQL for the specific database it’s connected to.
- Custom Rule Engine: To handle complex rules that standard OBDA tools might struggle with, the authors implemented a rule engine that converts SWRL rules into new data mappings on the fly.
Experimental Setup
To evaluate the framework without compromising patient privacy, the authors used BadMedicine, a tool that generates synthetic datasets. They deployed the framework on five synthetic Scottish health datasets that mimic real-world characteristics of Regional Laboratory Datasets (Glasgow, Tayside, Aberdeen) and Scottish National Health Datasets (Hospital Admissions and Prescriptions).
Key Results and Insights
The framework leverages medical hierarchies and cross-terminology translation to simplify research. For instance, the ontology "knows" the hierarchy of diseases; asking for a parent code automatically includes all sub-codes. Furthermore, the system can automatically map between different standards, such as translating a global SNOMED CT code into a British BNF code.
The authors compared their semantic queries (SPARQL) against traditional manual queries (SQL) across three scenarios:
- Terminology Mapping: To find patients on a specific drug, the SPARQL query was just 2 lines, whereas SQL required hard-coding specific drug identifiers.
- Inference: To find Type 2 Diabetes patients, SPARQL required only one predicate. The SQL query required an exhaustive list of approximately 20 different codes.
- Inconsistency Checking: Detecting coding errors (e.g., a patient coded with both Type 1 and Type 2 diabetes) required a single line in SPARQL but a complex inner join in SQL.
As shown in the comparison, the framework reduces dozens of lines of brittle, manual code into single, human-readable logical assertions.
Discussion and Future Work
While the framework significantly simplifies querying, it faces a "cold start" problem: an expert must still create the initial "core mapping" between the medical ontology and the database schema. Additionally, while preliminary results on synthetic data are promising, further research is needed to evaluate performance at the scale of real-world, national-level health databases. Future work will also focus on tighter integration of SWRL rules into the underlying reasoner to improve efficiency.
Summary updated