Protocol To Data
protocol-to-data turns a clinical trial protocol into a validated, analyzable synthetic SDTM dataset in one Claude-driven agentic loop.
Core trick
Claude extracts a typed study design from the protocol, deterministic code generates SDTM tables, and a validator sends failures back for Claude to repair.
Description
protocol-to-data turns a clinical trial protocol into a validated, analyzable synthetic SDTM dataset in one Claude-driven agentic loop.
Drop in a protocol (PDF/HTML/text) and Claude reads the prose into a typed study design — arms, visit schedule, endpoints mapped to the right SDTM domains — then deterministic Python generates SDTM-shaped synthetic CSVs, validates them (schema, referential + temporal integrity, physiologic ranges, planned-domain coverage), and on any failure Claude repairs its own design and regenerates. A second Claude agent then injects controlled data-quality defects and hunts them down, scored against ground truth.
What I found: the loop generalizes from a toy cardiology sample to a real 179-page oncology protocol (Amgen AMG 510 vs docetaxel) with no code changes — extracting cycle-based visits and self-repairing 8 unproducible oncology domains in one pass. The generated data is biologically responsive: it models docetaxel-induced myelosuppression, and the Copilot's "average NEUT per arm" chart shows the docetaxel arm's neutrophils sitting well below the sotorasib arm — real pharmacology, not random distributions. The detector even flags a grade-4 neutrophil count on its own.
Why it matters: clinical data managers and biostatisticians spend days-to-weeks hand-building SDTM test data before an EDC (Medidata/Veeva) is stood up. This collapses that to minutes and produces Databricks-ready, reproducible, PHI-free data they can stress-test analysis and edit-check pipelines against before first patient in — turning sequential setup into parallel work. It ships with a two-tab web UI (pipeline + a memory-safe DuckDB Data Copilot with charts), a Registry Cross-Check against ClinicalTrials.gov, a clean HTTP/MCP API, and a live cloud deployment.
README excerpt
# protocol-to-data > **From a clinical trial protocol to an analyzable synthetic dataset — in one agentic loop, driven by Claude.** **🔗 Live demo → [protocol-to-data.onrender.com](https://protocol-to-data.onrender.com)** · _free tier — first load takes ~30–60 s to wake, then it's instant._ **🎥 Demo video → [youtu.be/JJXIagmZX3Q](https://youtu.be/JJXIagmZX3Q)** · _2.5-min walkthrough: protocol PDF → live agentic loop → SDTM data → Data Copilot chart._ A researcher, clinical data manager, or biotech engineer drops in a study protocol (PDF / HTML / text). Claude reads it, extracts the trial design, and a deterministic engine generates a **therapeutic-area-aware, dictionary-coded, referentially-sound SDTM dataset** — validated, self-repaired on failure, and (optionally) stress-tested by a second agent that injects and detects data-quality defects. No real patient data. No manual schema wiring. Just: **protocol in → analyzable data out** — as **Databricks-ready Parquet, before an EDC is ever stood up.** Built for **[Built with Claude: Life Sciences](https://cerebralvalley.ai/e/built-with-claude-life-sciences)** (Cerebral Valley × Anthropic × Gladstone Institutes, July 7–13, 2026) — **Build Track**. --- ## The magic moment ``` $ ptd run examples/sample_protocol.md --subjects 40 --seed 42 --anomalies 3 🧬 Reading protocol ... 🧩 Extracting protocol design (Validation Engine) ... → ONC-101: 2 arms, 8 visits, 12 endpoints, 13 domains 🏭 Generating syn