TempoQL: A Readable, Precise, and Portable Query System for Electronic Health Record Data

📅 2025-11-12
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Existing EHR query tools struggle to balance expressiveness and usability, and most are constrained to a single data standard (e.g., OMOP), limiting flexible, portable time-series querying required for modern machine learning modeling. This paper introduces MedQL—a unified temporal query language for EHRs—natively supporting major standards including OMOP and MEDS. Leveraging domain-specific language design augmented by LLM-assisted query generation and semantic validation, MedQL significantly improves query readability, authoring efficiency, and semantic correctness. Implemented in Python, it features an interactive Jupyter Notebook interface. Experiments across multiple real-world EHR datasets demonstrate that MedQL reduces cohort construction time by 62% on average. It enables reproducible, multi-center, cross-standard clinical analyses, thereby bridging the data gap between clinical research and AI-driven modeling.

Technology Category

Application Category

📝 Abstract
Electronic health record (EHR) data is an essential data source for machine learning for health, but researchers and clinicians face steep barriers in extracting and validating EHR data for modeling. Existing tools incur trade-offs between expressivity and usability and are typically specialized to a single data standard, making it difficult to write temporal queries that are ready for modern model-building pipelines and adaptable to new datasets. This paper introduces TempoQL, a Python-based toolkit designed to lower these barriers. TempoQL provides a simple, human-readable language for temporal queries; support for multiple EHR data standards, including OMOP, MEDS, and others; and an interactive notebook-based query interface with optional large language model (LLM) authoring assistance. Through a performance evaluation and two use cases on different datasets, we demonstrate that TempoQL simplifies the creation of cohorts for machine learning while maintaining precision, speed, and reproducibility.
Problem

Research questions and friction points this paper is trying to address.

Extracting and validating EHR data for machine learning modeling faces steep barriers
Existing tools trade off between expressivity and usability across data standards
Writing temporal queries adaptable to modern pipelines and datasets remains difficult
Innovation

Methods, ideas, or system contributions that make the work stand out.

Python-based toolkit for temporal EHR queries
Human-readable language supporting multiple data standards
Interactive notebook interface with LLM assistance
🔎 Similar Papers
2024-05-27International Conference on Information and Knowledge ManagementCitations: 4