Turn a clinical-trial protocol into a Brazil feasibility map in seconds — with Claude's reasoning shown for every eligibility criterion, and no patient record ever leaving the site.
Sponsors paste a ClinicalTrials.gov trial and get state-by-state eligible-population estimates from public health data; sites answer feasibility requests privately. A two-sided bridge for the market the industry is racing toward but pricing on outdated information.
Built entirely with Claude Code during the Built with Claude: Life Sciences hackathon (Builder Track), by a founder who has never written a line of code.
| Criterion | How TrialBridge earns it | Verify |
|---|---|---|
| Impact — 25% | Brazil: 214M people, and Lei 14.874/2024 cut trial approval from >12 months to ~90 business days. Our hackathon survey (N=50; 31 qualified pharma/biotech/CRO) found 70% had never heard of the law, and one paragraph about it lifted intent to run trials in Brazil +1.39 pts among buyers (p<.001). TrialBridge closes that exact gap with provable numbers, at the feasibility stage where 60% of buyers lock their country list. | docs/SURVEY.md · live URLs |
| Claude Use — 25% | Claude is in the product (parses eligibility into typed rules with per-criterion reasoning), the platform (ships as an MCP server — same query answered inside Claude), the builder (a non-programmer used Claude Code multi-agent workflows to ETL 163GB of DataSUS, write 50+ test files, run the market survey via MCP). | CLAUDE_USE.md |
| Depth — 20% | 163GB DataSUS + a 6.68M-record private base → PHI-safe aggregates; direct-standardized estimator with 95% CIs; bearer-token gating; provenance layer; 50+ test files; and a calibration finding we report against ourselves (below). | estimator/ · PROVENANCE.md · tests/ |
| Demo — 30% | One unbroken flow on live infrastructure: paste NCT → Claude parses criteria with reasoning → Brazil map lights up with real DataSUS estimates → ranked site shortlist → same query answered inside Claude via MCP. | 🎥 video above · live URLs |
Honest limits, stated up front (a Depth signal, not a weakness). State-level coverage today is a documented placeholder, not calibration-earned. Our harness found the model calibrates almost perfectly in-distribution (ECE ≈ 0.0002) but breaks across hospital sites (ECE 0.18–0.22). We report this openly and treat cross-site calibration as the named next step — see Honest limits.
AI-driven drug discovery is flooding an already-scarce US/EU patient pool. 86% of international trials miss their recruitment target on time, and eligibility criteria have grown 58% more complex in two decades. Sponsors are pushed toward new markets; Brazil grew from 25 registered studies in 2000 to 403 in 2024. But both sides of the trade are broken: sites can't prove patient capacity fast enough to win incoming trials, and sponsors have no fast, structured way to discover which sites can actually deliver against a protocol. It's manual RFIs and weeks of waiting — in both directions.
- Sponsor side. Paste a ClinicalTrials.gov NCT id (or free-text criteria) → Claude parses it
into typed
Criterion[]with reasoning shown for every criterion → the estimator returns state-by-state eligible-population estimates from public DataSUS data, with 95% CIs and honest coverage labels → interactive Brazil map + ranked site/state shortlist. A protocol softening panel shows, live, how loosening one criterion changes the candidate pool. - Site side. A site runs the sponsor's criteria against its own patients, privately, and
responds with a de-identified proof of capacity. The sponsor sees only aggregated cross-site
counts (small cells suppressed as
<5) — never row-level patient data.
- Paste a ClinicalTrials.gov NCT id for a Phase III breast-cancer trial.
- Claude parses the eligibility criteria into typed rules — each with its reasoning and a confidence; low-confidence rows are flagged for a human to confirm before they count.
- The Brazil map lights up with eligible-population estimates per state, from real DataSUS data, each labeled with what's calibrated and what isn't.
- A ranked site/state shortlist appears; the softening panel shows how relaxing one criterion grows the pool.
- The same question, answered inside Claude via the MCP server — the governed answer, natively.
Full writeup with commit evidence in CLAUDE_USE.md. In short:
- Claude in the product.
claude-opus-4-8parses protocol eligibility into typed, auditable rules via structured outputs; the LLM does the ambiguous linguistic work and is kept out of the deterministic counting path — its weakest step is the one a human checks. →src/lib/parse.ts - Claude as the platform. The estimator ships as an MCP server (
scripts/mcp-cohort-server.ts) so a coordinator gets the same governed answer inside Claude. - Claude as the builder. A non-programmer used Claude Code multi-agent workflows to materialize 163GB of DataSUS into PHI-safe aggregates, build the governance/provenance layer, and author 50+ test files. The build itself is the proof.
- Claude for market evidence. A Claude Code session connected via MCP to Prolific ran and
analyzed the survey below. →
docs/SURVEY.md
cd trialbridge
npm install
npm run generate-data # 3 synthetic site datasets (seeded, reproducible)
npm run db:seed # hero consultation + pre-seeded responded sites
npm run demo # headless proof: prints the whole pipeline
npm run dev # http://localhost:3000 → / /sponsor /site /scorecard
npm test # unit tests (the matcher is the source of truth)Estimator (Python; standard library only for the demo):
cd estimator
python3 demo.py # end-to-end estimator demo
python3 tests/test_estimator.py # method sanity checksSet ANTHROPIC_API_KEY to run the live Claude parse; without a key it falls back to cached,
human-verified criteria (clearly labelled) so the flow always works.
NCT id / free-text criteria
│
▼ Claude (claude-opus-4-8, structured outputs) → typed Criterion[] + per-criterion reasoning
│ (low-confidence rows flagged for human review)
▼ Deterministic matcher ── checkable criteria run exactly; no LLM in the counting path
│
▼ Estimator: eligible[site] = Σ_strata ( DataSUS_base[site,stratum] × depth_rate[stratum] )
│ direct-standardized to the national population · 95% CI · honest coverage labels
▼
Brazil choropleth + ranked shortlist ── also exposed as an MCP tool (same governed answer in Claude)
Design decisions are recorded as ADRs in docs/ (ADR-001 system architecture,
ADR-002 managed-agents orchestration).
Detail in DATA.md and PROVENANCE.md.
- Public & shipped: DataSUS (Brazil's unified public-health dataset) as PHI-safe, cell-suppressed aggregates; ClinicalTrials.gov protocol data (public API).
- Local & private, never in this repo: the iHealth proprietary base. No redistribution rights, so it stays local and gitignored; served aggregates carry no proprietary-only cells.
- License: MIT.
We would rather you trust the numbers we publish than oversell the ones we don't.
- State coverage is a labeled placeholder, not calibration-earned. The
/queryresponses say so in-band. Making it defensible is our documented next track (calibration → geographic holdout → external epi benchmark → drift monitoring). - Calibration transfers within-distribution but breaks across sites. Measured: ECE ≈ 0.0002 in-distribution vs. 0.18–0.22 cross-site on real breast-cancer data (LOHO + k-fold). A real finding, reported against our own interest, that defines the roadmap.
- Oncology only (v1). Breast/HER2 depth extracted; other tumor types are base-cohort only.
trialbridge/ Next.js web app (sponsor + site flows, matcher, MCP cohort server)
src/ app routes, lib (ctgov intake, parse, omop, feasibility-autofill)
scripts/ mcp-cohort-server.ts, seed + e2e drivers
tests/ 50+ test files
estimator/ Python feasibility estimator (standardized rates, CIs, softening)
docs/ ADRs, survey results, provenance map, vocabulary mapping
CLAUDE_USE.md how Claude built and powers this (read this for the Claude-Use criterion)
DATA.md what is public vs. private, and why
PROVENANCE.md data lineage for every number shown
LICENSE MIT
TrialBridge — built with Claude Code. Better science, and access to treatments for people who could never dream of them.