Abstract
Computable phenotypes are increasingly important tools for patient cohort identification. As part of a study of risk of chronic opioid use after surgery, we used a Resource Description Framework (RDF) triplestore as our computable phenotyping platform, hypothesizing that the unique affordances of triplestores may aid in making complex computable phenotypes more interoperable and reproducible than traditional relational database queries. To identify and model risk for new chronic opioid users post-surgery, we loaded several heterogeneous data sources into a Blazegraph triplestore: (1) electronic health record data; (2) claims data; (3) American Community Survey data; and (4) Centers for Disease Control Social Vulnerability Index, opioid prescription rate, and drug poisoning rate data. We then ran a series of queries to execute each of the rules in our “new chronic opioid user” phenotype definition to ultimately arrive at our qualifying cohort. Of the 4,163 patients in the denominator, our computable phenotype identified 248 patients as new chronic opioid users after their index surgical procedure. After validation against charts, 228 of the 248 were revealed to be true positive cases, giving our phenotype a PPV of 0.92. We successfully used the triplestore to execute the new chronic opioid user phenotype logic, and in doing so noted some advantages of the triplestore in terms of schemalessness, interoperability, and reproducibility.
Introduction
Accurately identifying specific patient populations—a process known as computable phenotyping—is a cornerstone of clinical research and precision medicine. However, traditional methods often rely exclusively on Electronic Health Record (EHR) data, which is frequently siloed, semantically ambiguous, and incomplete.
To identify complex cohorts, such as "new chronic opioid users" following surgery, researchers require a holistic view that includes insurance claims (to capture prescriptions filled outside the hospital system) and community-level socioeconomic data. Integrating these heterogeneous sources in a standard relational (SQL) database is challenging due to rigid schemas and the inherent "impedance mismatch" between different data models. This study investigates whether a triplestore (a graph database optimized for RDF) can provide a more flexible, interoperable engine for complex phenotyping queries.
Methodology
The research team developed a robust data transformation pipeline to unify diverse data sources into the Resource Description Framework (RDF) format.
- Standardization: Clinical data from EHR and insurance claims were first mapped to the FHIR (Fast Healthcare Interoperability Resources) standard.
- Conversion: FHIR-formatted JSON was converted into RDF triples (subject-predicate-object statements).
- Integration: Socioeconomic data and drug ontologies (RxNorm and the VA National Drug File) were ingested directly into a Blazegraph triplestore.
- Querying: The team utilized SPARQL to execute phenotype logic across the integrated graph, bypassing the limitations of traditional table-based joins.
Data Integration and Scale
The study integrated four primary data types to build a comprehensive patient profile:
- EHR Data: Demographics, encounters, and medications from the UNC Health Care System.
- Claims Data: Longitudinal medication and procedure data from a major commercial insurer.
- Socioeconomic & Public Health Data: American Community Survey (ACS) data, CDC Social Vulnerability Index (SVI), and county-level opioid prescription/poisoning rates.
- Ontologies: RxNorm and the VA National Drug File (VANDF) for semantic medication categorization.
The resulting triplestore managed over 300 million triples, providing a high-resolution dataset for analysis.
Key Results and Insights
The computable phenotype successfully identified a final cohort of 4,163 patients. Within this group, 248 were flagged as new chronic opioid users. Manual chart review confirmed 228 of these as true positives, yielding a Positive Predictive Value (PPV) of 0.92.
Several critical advantages of the triplestore approach emerged:
- Closing the "Claims Gap": EHR data alone proved insufficient; 78% (193 of 248) of the identified cohort were found via claims data alone. The triplestore's ability to seamlessly merge these sources was vital.
- Schemaless Flexibility: Unlike SQL, the triplestore allowed for the ingestion of community-level data with minimal transformation, facilitating the addition of new data sources without redesigning a database schema.
- Semantic Reasoning: By linking to the VANDF ontology, researchers could query broad drug categories (e.g., "opioids") without manually maintaining exhaustive lists of individual codes.
- Interoperability: The use of FHIR and RDF ensures that the phenotype logic is theoretically portable across institutions capable of outputting FHIR data.
Conclusion and Future Directions
While the "triple explosion" associated with FHIR-RDF conversion presents storage and performance challenges at scale, the triplestore proved to be a powerful engine for complex phenotyping. Future work will leverage OWL (Web Ontology Language) reasoning to automate the discovery of hidden patterns, such as drug-drug interactions, and further refine risk models for chronic opioid use.
Summary updated