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

Ziyong Ma, Richard D Boyce, Adam Perer, Venkatesh Sivaraman

Published: 27 Nov 2025, Last Modified: 09 Dec 2025ML4H 2025 PosterEveryoneRevisionsBibTeXCC BY 4.0
Keywords: Electronic Health Records, Temporal Queries, Cohort Extraction, Data Visualization, Large Language Models
TL;DR: TempoQL is an open-source query language and interactive visual interface for extracting time-series healthcare data with LLM assistance.
Track: Proceedings
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.
General Area: Applications and Practice
Specific Subject Areas: HCI & Data Visualization, Time Series
Data And Code Availability: Yes
Ethics Board Approval: No
Entered Conflicts: I confirm the above
Anonymity: I confirm the above
Submission Number: 187
Loading