Recruitment is the main bottleneck of clinical research: many trials miss enrolment targets or timelines because eligible patients are not found. Eligibility criteria are free text, patient facts sit in unstructured notes. LLM-based matching reads both, ranks patients and trials with criterion-level explanations and leaves the final decision to the investigator. The same data foundations support trial optimisation on the sponsor side: feasibility, central statistical monitoring and smaller control arms through prognostic digital twins.
Problem & value
- Today: research nurses and study coordinators screen charts manually against long inclusion/ exclusion lists, or rely on structured-data queries (diagnosis codes, labs) that miss facts stored only in notes. Patients are rarely told about trials they might qualify for. Sponsors choose sites from past experience and monitor with frequent on-site visits.
- AI value: faster pre-screening, higher recall of eligible patients, transparent evidence per criterion, better site feasibility estimates, earlier detection of data-quality or fraud signals, and fewer patients needed in control arms.
- Evidence: the TrialGPT study (NIH, published in Nature Communications 2024) reports that an LLM pipeline for retrieval, criterion-level matching and ranking approaches expert-level criterion accuracy and reduces screening time in a user study [1]. Treat published figures as results on curated benchmarks, not as guarantees for your hospital's records.
- Regulatory pull: ICH E6(R3) (adopted 2025; applicable in the EU from 23 July 2025) requires risk-proportionate, quality-by-design trial conduct, which favours centralised and risk-based monitoring [2].
Variants
- Patient-to-trial matching (site side): screening of a hospital's EHR for open trials; the core use case.
- Trial-to-patient matching (patient side): portals helping patients find trials, built on CTIS or ClinicalTrials.gov [3].
- Protocol design and feasibility (sponsor side): simulating how many patients meet draft criteria in real-world data, flagging overly restrictive criteria, selecting sites.
- Central statistical monitoring and data-anomaly detection (RBQM): statistical tests across all sites and variables of the EDC data to find outlier sites, fabricated or copied data, unreported adverse events and protocol deviations; the approach behind platforms such as CluePoints and recognised in ICH E6(R3) and EMA reflection papers on risk-based quality management [2][4].
- Real-world evidence and external or synthetic control arms (trial digital twins): Unlearn's PROCOVA method uses a prognostic model trained on historical data to adjust the analysis and reduce the control-arm size; the EMA issued a qualification opinion for it in 2022 for phase 2/3 trials with continuous outcomes [5]. Related to HLTH-033. Real-world data is also used for HTA submissions.
How it works
- trial protocol (eligibility text) ─► criteria parsing
- structured criteria (+ OMOP/SNOMED/LOINC concepts) patient record (notes + FHIR/OMOP data) ─► de-identified or in-house pseudonymised index
- retrieval (hybrid search + embeddings: candidate trials per patient / candidate patients per trial)
- criterion-level LLM judgement (met / not met / unknown, with quoted evidence)
- aggregation + ranking + reranker
- coordinator review screen (evidence highlighted)
- investigator confirmation
- patient contact and informed consent (human only) Sponsor side: EDC data
- statistical tests per site/variable
- risk indicators
- monitoring plan
- Criteria parsing: LLM converts free-text criteria into logical structures; ambiguous items (e.g. "adequate organ function") are flagged instead of guessed.
- Matching: retrieval narrows thousands of trials or patients, a reasoning model judges each criterion with citations from the record, "unknown" is an explicit answer.
- Human-in-the-loop: the AI only suggests. Eligibility confirmation, approach to the patient and consent remain with qualified staff under GCP; all suggestions and decisions are logged.
Data preparation
Matching needs two data sets: machine-readable trial protocols (ClinicalTrials.gov, CTIS) and patient facts from the EHR. Structured data (diagnoses, labs, medication) usually sits in the hospital information system or a clinical data warehouse; the decisive facts (histology, prior therapies, performance status) hide in free-text notes, scanned external letters and PDFs. Typical gaps are missing OMOP/FHIR mapping, duplicated patient records, scans without OCR, inconsistent abbreviations and unclear consent and access rights per research purpose.
Preparation steps: (1) inventory sources and owners (PREP-001, PREP-004); (2) export from the clinical systems through FHIR or ETL (PREP-005); (3) digitise and OCR scanned letters (PREP-006); (4) map to OMOP/FHIR and define a glossary of clinical terms (PREP-012, PREP-015); (5) pseudonymise before any model sees the notes (PREP-022); (6) check purpose and legal basis for secondary use (PREP-025); (7) build a gold set of patient-criterion judgements with research nurses (PREP-018). Tools: HAPI FHIR, OHDSI tools, Tesseract or similar OCR, Presidio-style de-identification.
Expect roughly half of the total effort in data access, mapping and de-identification, far more than model work. See GUIDE-003 for a readiness check.
Implementation paths
Which path for whom
- Enterprise (hospitals, sponsors, CROs): Path C, because patient notes should not leave the hospital and the stack (OMOP, FHIR, open-weight LLM) is reusable; sponsors and CROs buy the RBQM/EDC suites (A) for the monitoring side.
- Developer: Path B, because cloud LLM APIs with pseudonymised test data allow the fastest build of matching and criterion-verdict pipelines.
- Public (university hospitals, data-integration centres): Path C on in-house or sovereign infrastructure, because research data and procurement rules favour control over notes and models.
Path A — Buy (off-the-shelf)
- Site and hospital side: TriNetX, Deep 6 AI (now part of Tempus), Paradigm Health, Tempus (TIME network), Carebox, Antidote (patient-facing matching); clinical research modules in EHR systems (Epic, Cerner/Oracle). EU-origin: Clinerion (CH), Climedo (DE), Trialbee (SE), and German Medical Informatics Initiative data-integration centres with FHIR feasibility queries. Check EU hosting and DPA.
- Sponsor and CRO side: CluePoints (BE) for risk-based quality management and central monitoring, Medidata (Detect, Clinical Data Studio), Veeva Vault CDMS/CTMS, Oracle Clinical One, IQVIA, Unlearn (digital twins), Saama, Medable.
- Choose A when: no research-informatics team exists; most sponsors buy RBQM/EDC suites.
Path B — Build on cloud APIs
- Models: frontier reasoning LLMs (Claude, GPT, Gemini, Mistral) in EU regions with zero data retention and a signed DPA, via Azure OpenAI EU, Google Vertex AI EU, AWS Bedrock Frankfurt, or Mistral (EU provider). Only de-identified or pseudonymised notes should leave the hospital.
- Stack: FHIR server (HAPI FHIR, Azure Health Data Services, Google Cloud Healthcare API), trial registry feeds (ClinicalTrials.gov API v2, CTIS/EUCT data), embeddings plus reranker, structured output for criterion verdicts, orchestration (LangGraph, n8n).
- Choose B when: a research IT group exists and notes are already pseudonymised in a cloud region.
Path C — Self-host (open source)
- Open-weight LLMs: Llama 3.x/4, Qwen3, Mistral/Mixtral, gpt-oss; medical models such as MedGemma and the TrialGPT reference code (open source) [1].
- Data: OHDSI OMOP CDM with ATLAS cohort definitions, FHIR via HAPI; embeddings with BGE-M3 or multilingual-e5; vector search in pgvector or OpenSearch.
- Hardware: HW3 (one 48-80 GB GPU) for 30-120B models, in-hospital with no data egress. Notes stay on premises, the main reason hospitals choose C.
Path D — Custom training
Fine-tune a smaller model on locally annotated eligibility judgements (hundreds to thousands of patient-criterion pairs, labelled by research nurses) to cut cost and improve German-language clinical notes. Prognostic digital twins require large historical trial datasets (data-sharing consortia such as TransCelerate or Project Data Sphere) and qualification discussions with regulators.
State of the art (2026)
- LLM matching reaches strong criterion-level accuracy on public benchmarks (TREC Clinical Trials track, SIGIR 2016 cohort, TrialGPT) but benchmark patients are short synthetic summaries. Real records are long, contradictory and multilingual, so the main failure modes are missed temporal context (a lab value from years ago), negation, abbreviations and treating "not documented" as "not met" [1].
- RBQM is moving from optional to expected under ICH E6(R3); central statistical monitoring can find fabricated data and site anomalies that on-site visits miss [2][4].
- Digital twins reduce control-arm size in phase 2/3 trials with continuous endpoints under the EMA-qualified method; broad generalisation to other designs is still being established [5].
- Limits: bias towards patients with rich documentation (under-representation of migrants, rural and uninsured patients), unstructured data heterogeneity, EU fragmentation of languages, coding systems and national research-data rules.
Shared resources & combinations
- Same stack (llm-reasoning + embedding-text + vector-db + FHIR/OMOP): HLTH-018 chart summarisation, HLTH-004 decision support, HLTH-028 terminology mapping, KNOW-001 RAG.
- Sponsor side: HLTH-017 protocol and regulatory writing, HLTH-033 digital twins, HLTH-010 pharmacovigilance (safety signals from the same trial data).
Effort, cost & KPIs
- Path A: weeks to months (contract, security review, EHR integration); licence per site or study.
- Path B/C: 6-12 months for a validated pipeline including data-protection approval, concept mapping and clinical evaluation; ongoing curation effort by research staff.
- KPIs: pre-screening time per patient, recall and precision of eligible-patient identification against coordinator gold standard, screen-failure rate, enrolment rate and time to first-patient-in/last-patient-in, share of explained "unknown" criteria, and for RBQM the number of critical findings per site, monitoring visits avoided and data-query rate.
People & change
Involve management and the research or medical director first (budget, risk appetite), then the department lead of clinical research, data owners of the hospital information system, IT and IT security (integration, hosting), and the data protection officer from the start. Research nurses and study coordinators are the daily users; bring them into pilot design and the gold set.
Works council: depends. If the system only matches patients to trials it is not aimed at staff, but any logging of coordinator work or productivity metrics falls under §87(1) no. 6 BetrVG (objective suitability suffices), and §90(1) no. 3 requires timely information about AI-supported work processes. In public hospitals the staff council (Personalrat) applies. Consider an expert under §80(3). See GUIDE-004.
Data protection: health data are special-category data, so a DPIA (Art. 35 GDPR), an AVV with every processor and a clear legal basis for secondary use are needed (GUIDE-005). Patient contact stays with the treating physician.
AI literacy: support staff skills through short trainings on reading criterion evidence and spotting errors (GUIDE-006). Start with one trial area as pilot, communicate that the system suggests and humans decide, and address fears of extra workload by showing time saved on screening (GUIDE-008, GUIDE-009).
Risks, regulation & compliance
- EU AI Act: depends on role. Pure recruitment support for research staff is usually not Annex III and falls under minimal or limited risk. If the tool influences care pathways or treatment access for individual patients, or qualifies as medical device software under MDR (Annex I route, Art. 6(1)), it is high-risk [6]. Sponsor analytics for trial conduct is typically not high-risk. Confirm intended purpose with legal counsel. AI literacy (Art. 4) applies in all cases; no Art. 5 prohibited practice.
- GDPR: health data is special category (Art. 9). Screening patients' records for a study needs a legal basis (typically national hospital law, research exemption Art. 9(2)(j) with safeguards, or consent). The European Health Data Space regulation (EU 2025/327) will shape secondary use of health data. DPIA required; prefer pseudonymisation, on-premises or EU hosting, no use of identifiable data to train third-party models [7].
- Clinical Trials Regulation (EU) 536/2014 and ICH E6(R3): informed consent, investigator responsibility, auditable computerised systems (validation, audit trail, EMA guideline on computerised systems and electronic data in clinical trials) [2][8].
- Mitigations: human review of every match, no contact with patients before investigator approval, logging, periodic recall audits, validation on local records before go-live.
Getting started
- Pick one disease area and 3-5 open trials; collect coordinator-confirmed screening outcomes as gold standard.
- Check the legal basis and data-protection route with the data-protection officer and ethics board.
- Run a retrospective pilot: let the tool rank patients for these trials and measure recall against the gold standard.
- Add the review screen with evidence highlighting and the "unknown" category; train coordinators.
- For sponsors, start with a risk assessment and central monitoring on one running study.
Sources
- Jin Q. et al. — Matching patients to clinical trials with large language models (TrialGPT), Nature Communications 2024 — https://www.nature.com/articles/s41467-024-53081-z
- ICH — E6(R3) Guideline for Good Clinical Practice — https://www.ich.org/page/efficacy-guidelines
- European Medicines Agency — Clinical Trials Information System (CTIS) — https://euclinicaltrials.eu/
- CluePoints — Central statistical monitoring / RBQM — https://www.cluepoints.com/
- EMA — Qualification opinion on PROCOVA (Unlearn.AI), 2022 — https://www.ema.europa.eu/en/human-regulatory-overview/r-and-d, quality/scientific-advice-protocol-assistance/qualification-novel-methodologies-medicine-development-0
- Regulation (EU) 2024/1689 (AI Act) — https://eur-lex.europa.eu/eli/reg/2024/1689/oj
- Regulation (EU) 2025/327 (European Health Data Space) — https://eur-lex.europa.eu/eli/reg/2025/327/oj
- Regulation (EU) 536/2014 on clinical trials — https://eur-lex.europa.eu/eli/reg/2014/536/oj