Generating patient cohorts from electronic health records using two-step retrieval-augmented text-to-SQL generation

Angelo Ziletti, Leonardo D'Ambrosi
2/28/2025
cs.CL

No confident code implementation found for this paper.

Abstract

Clinical cohort definition is crucial for patient recruitment and observational studies, yet translating inclusion/exclusion criteria into SQL queries remains challenging and manual. We present an automated system utilizing large language models that combines criteria parsing, two-level retrieval augmented generation with specialized knowledge bases, medical concept standardization, and SQL generation to retrieve patient cohorts with patient funnels. The system achieves 0.75 F1-score in cohort identification on EHR data, effectively capturing complex temporal and logical relationships. These results demonstrate the feasibility of automated cohort generation for epidemiological research.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ziletti2025generating,
  title  = {Generating patient cohorts from electronic health records using two-step retrieval-augmented text-to-SQL generation},
  author = {Angelo Ziletti and Leonardo D'Ambrosi},
  year   = {2025},
  eprint = {2502.21107},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.21107v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.21107.svg)](https://codeofpaper.com/paper/2502.21107)

Discussion