TL;DR
This paper introduces the Advanced Cohort Engine (ACE), a novel system designed for fast and expressive searching of longitudinal patient records. ACE overcomes limitations of traditional relational databases by using an in-memory patient object datastore and a temporal query language (TQL), enabling complex cohort discovery and analysis at unprecedented speeds.
What Problem Does This Paper Address?
Searching through vast amounts of longitudinal patient data is crucial for learning health systems, clinical research, and quality improvement. However, existing tools often fall into two camps: form-based interfaces that are expressive but cumbersome, or simple search engines that lack precision. Traditional relational databases struggle with temporal queries, requiring computationally expensive joins and lacking an inherent understanding of time. This makes it difficult and slow to identify patient cohorts based on complex sequences of events, temporal relationships, and clinical concepts. The paper aims to bridge this gap by providing a system that is both fast and capable of handling complex temporal queries.
Methods
The core of ACE is its temporal query language (TQL), which allows users to express complex temporal relationships between clinical events in a human-readable format. This language is schema-agnostic, meaning it can work with data from different sources. TQL operates over an in-memory datastore of patient objects. Instead of storing data in separate tables by feature (like diagnoses or medications), ACE groups all data for a single patient into an object, indexed by feature and time. This patient-centric, in-memory approach drastically speeds up lookups.
ACE also incorporates knowledge graphs to automatically expand queries. For example, if a query searches for a specific ICD code, ACE can also include related parent codes from a hierarchy, broadening the search without explicit user input. The system is designed to be compatible with the Observational Medical Outcomes Partnership (OMOP) Common Data Model (CDM) and offers APIs for integration with various programming languages (R, Python, Java) and a web UI.
Datasets
The paper evaluates ACE using two primary datasets:
- Stanford Medicine's clinical data warehouse (CDW): This dataset contains approximately 2.8 million patient records.
- Optum Clinformatics Datamart: This dataset comprises approximately 65 million health insurance claims records.
The paper does not introduce new benchmark datasets but rather uses existing, large-scale real-world datasets to demonstrate ACE's performance.
Key Insights and Ideas
- Patient Object-Centricity is Key to Speed: By storing all data for a patient in a single object in memory, ACE eliminates the need for slow joins across multiple tables, a major bottleneck in relational databases.
- Temporal Query Language (TQL) Unlocks Expressivity: TQL provides a powerful and intuitive way to define complex temporal relationships (e.g., "event A happened before event B within a specific timeframe"), which is essential for clinical research.
- Knowledge Graphs Enhance Search Without Extra Effort: Automatic query expansion using ontologies and hierarchies (like ICD codes) allows for more comprehensive searches with less user effort.
- Conversational Data Exploration: ACE facilitates an iterative, "conversational" approach to data analysis, where users can quickly refine queries based on immediate feedback and visualized results.
Key Results
ACE demonstrates remarkable performance improvements over traditional methods:
- Speed: Query execution times are consistently in the milliseconds range, often less than 1 second, even for complex queries on millions of patient records. This is orders of magnitude faster than SQL queries on similar datasets. For example, a complex cohort definition that took an experienced engineer 2.5 hours in SQL took under 5 minutes in TQL.
- Scalability: ACE's in-memory datastore, when sharded and distributed, can handle large datasets efficiently. The system requires significantly less RAM per data row compared to traditional relational databases.
- Expressivity: The TQL allows for the definition of highly complex temporal relationships, as illustrated by the example of identifying patients with type II diabetes, no history of stroke, who then received glipizide and subsequently had a stroke within three months.
Limitations and Future Work
The authors acknowledge several limitations:
- No Built-in Data Error Checking: ACE assumes that the ingested data has already been cleaned and quality-checked.
- Temporal Resolution: ACE's temporal analysis is limited by the resolution of the source data. Extracting finer temporal information from unstructured clinical notes would require separate text processing tools.
- Qualitative User Study: The current evaluation focuses on performance and functionality, but a formal qualitative study to assess user information needs and satisfaction is a planned future step.
- Setup Complexity: While ACE is powerful, setting up an ACE endpoint requires a software engineer, and users need to learn TQL. However, the authors argue this is comparable to other advanced clinical data search tools.
Future work will likely involve further development of the user interface, integration with more data sources, and exploring more advanced machine learning applications powered by ACE's data labeling capabilities.
Summary updated