The Problem
15–30 min
to manually screen one patient against one trial protocol — and there are thousands recruiting at any given time. A time-and-motion study found eligibility screening consumed over 30% of clinical coordinators’ working hours
Clinicians want to refer eligible patients to trials. The time cost means most skip it entirely — so patients who could benefit never get referred.
Eligibility criteria are written in dense clinical language with complex logical conditions. Matching them against a patient chart requires careful cross-referencing, every time, for every trial. This tool reduces that to a single SOAP note paste.
What It Does
Two tools in one. Start from any note — rough or structured.
- Note Translator — paste any rough clinical note and Claude rewrites it into SOAP format; missing fields flagged automatically so the clinician knows exactly what to fill in
- Searches live ClinicalTrials.gov data — real government records, thousands of active recruiting trials, not a curated index
- Returns per-criterion verdicts with the patient’s value shown alongside each result
- UNKNOWN when chart data is missing — the tool never guesses
- Score zeroing on any FAIL — one disqualifying criterion eliminates a trial, mirroring real clinical screening
- Optional location filter narrows results to trials recruiting nearby
Design Decisions
Every architectural choice was driven by what clinical use actually requires.
- Claude Haiku for all LLM calls — up to 40 calls per run across 5–10 trials. Haiku is 6× cheaper than Sonnet with no quality loss on structured extraction and PASS/FAIL/UNKNOWN judgment.
- ReAct agent over a fixed pipeline — a fixed chain evaluates every result in sequence. The ReAct agent re-queries when early results are irrelevant, before spending calls on eligibility checks.
- UNKNOWN ≠ FAIL — missing chart data is flagged, not assumed ineligible. Clinicians see exactly what’s absent and decide whether to retrieve it.
- Score zeroing on FAIL — one hard exclusion eliminates the trial. Partial matches never surface.
Iterations
What changed after the first working build.
- Note Translator — added post-launch — initial build assumed clean SOAP notes. POST /optimize rewrites anything to SOAP and flags missing fields inline: “Missing: HbA1c, FPG, eGFR — fill in what you have.”
- CT.gov relevance noise — search returns T2D-adjacent trials (obstetrics, metabolic studies). Search tool now passes condition-specific terms to query.cond to narrow the pool before eligibility evaluation runs.
- Railway → Fly.dev — cold starts added 3–5 seconds to first requests. Same container, Fly.dev, consistently warm.
Outcome
LangGraph ReAct agent. Two tools. Live government data.
- Agentic orchestration — the agent decides when to call the note optimizer and when to call the screener; no fixed pipeline
- Live data — operates on ClinicalTrials.gov directly, not a cached subset; trials that closed yesterday are gone today
- UNKNOWN > guess — the system flags missing data rather than inferring it, matching the epistemic standard of actual clinical decision-making