{"doi":"10.1093/jamia/ocad149","title":"LeafAI: query generator for clinical cohort discovery rivaling a human programmer","abstract":"OBJECTIVE: Identifying study-eligible patients within clinical databases is a critical step in clinical research. However, accurate query design typically requires extensive technical and biomedical expertise. We sought to create a system capable of generating data model-agnostic queries while also providing novel logical reasoning capabilities for complex clinical trial eligibility criteria. MATERIALS AND METHODS: The task of query creation from eligibility criteria requires solving several text-processing problems, including named entity recognition and relation extraction, sequence-to-sequence transformation, normalization, and reasoning. We incorporated hybrid deep learning and rule-based modules for these, as well as a knowledge base of the Unified Medical Language System (UMLS) and linked ontologies. To enable data-model agnostic query creation, we introduce a novel method for tagging database schema elements using UMLS concepts. To evaluate our system, called LeafAI, we compared the capability of LeafAI to a human database programmer to identify patients who had been enrolled in 8 clinical trials conducted at our institution. We measured performance by the number of actual enrolled patients matched by generated queries. RESULTS: LeafAI matched a mean 43% of enrolled patients with 27 225 eligible across 8 clinical trials, compared to 27% matched and 14 587 eligible in queries by a human database programmer. The human programmer spent 26 total hours crafting queries compared to several minutes by LeafAI. CONCLUSIONS: Our work contributes a state-of-the-art data model-agnostic query generation system capable of conditional reasoning using a knowledge base. We demonstrate that LeafAI can rival an experienced human programmer in finding patients eligible for clinical trials.","journal":"Journal of the American Medical Informatics Association","year":2023,"id":349909,"datarank":0.0,"base_score":0.0,"endowment":0.0,"self_citation_contribution":0.0,"citation_network_contribution":0.0,"self_endowment_contribution":0.0,"citer_contribution":0.0,"corpus_percentile":null,"corpus_rank":null,"citation_count":10,"citer_count":0,"citers_with_citation_signal":0,"citers_with_endowment":0,"datacite_reuse_total":0,"is_dataset":false,"is_dataset_confidence":0.9323,"is_data_producer":false,"deposit_databanks":null,"is_oa":true,"file_count":0,"downloads":0,"has_version_chain":false,"published_date":"2023-01-01","fair_score":null,"fair_percentile":null,"algorithm_id":"datarank_citation_only_1hop_v6","ranking_scope":"data_only","authors":[{"id":1093455,"name":"Bin Han","orcid":"0000-0003-2086-2487","position":1,"is_corresponding":false},{"id":1093456,"name":"Weipeng Zhou","orcid":"0000-0003-1215-8043","position":2,"is_corresponding":false},{"id":959962,"name":"Kristine F Lan","orcid":null,"position":3,"is_corresponding":false},{"id":496105,"name":"H. Nina Kim","orcid":"0000-0001-6710-9666","position":4,"is_corresponding":false},{"id":95181,"name":"Robert A. Harrington","orcid":"0000-0001-5450-8676","position":5,"is_corresponding":false},{"id":401880,"name":"Özlem Uzuner","orcid":"0000-0001-8011-9850","position":6,"is_corresponding":false},{"id":296384,"name":"Meliha Yetişgen","orcid":"0000-0001-9919-9811","position":7,"is_corresponding":false},{"id":819785,"name":"Nicholas J Dobbins","orcid":"0000-0002-3598-8747","position":0,"is_corresponding":true}],"reference_count":47,"raw_metadata":null,"created_at":"2026-07-19T01:12:19.059218Z","pmid":"37550244","pmcid":null,"fwci":null,"citation_percentile":null,"influential_citations":0,"oa_status":null,"license":null,"views":0,"total_file_size_bytes":0,"version_count":0,"fair_f":null,"fair_a":null,"fair_i":null,"fair_r":null,"fair_zscore":null,"fair_rationale":null,"fair_model":null,"fair_agent_version":null,"fair_fulltext_source":null,"fair_has_llm":null,"fair_computed_at":null,"clinical_trials":[],"software_tools":[],"db_accessions":[],"linked_datasets":[],"topics":[]}