{"id":48754030,"url":"https://github.com/matthewhmaxwell/trialsim","last_synced_at":"2026-04-16T00:01:29.452Z","repository":{"id":350110336,"uuid":"1205140760","full_name":"matthewhmaxwell/trialsim","owner":"matthewhmaxwell","description":"Interactive clinical trial enrollment simulator — model recruitment strategies, site portfolios, and startup timelines","archived":false,"fork":false,"pushed_at":"2026-04-12T23:16:33.000Z","size":203,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T23:26:07.922Z","etag":null,"topics":["clinical-trials","enrollment","healthcare","react","recruitment","simulator"],"latest_commit_sha":null,"homepage":"https://trialsim.aimronline.org","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matthewhmaxwell.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-08T17:13:45.000Z","updated_at":"2026-04-12T23:16:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/matthewhmaxwell/trialsim","commit_stats":null,"previous_names":["matthewhmaxwell/trialsim"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/matthewhmaxwell/trialsim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewhmaxwell%2Ftrialsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewhmaxwell%2Ftrialsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewhmaxwell%2Ftrialsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewhmaxwell%2Ftrialsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewhmaxwell","download_url":"https://codeload.github.com/matthewhmaxwell/trialsim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewhmaxwell%2Ftrialsim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31865078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clinical-trials","enrollment","healthcare","react","recruitment","simulator"],"created_at":"2026-04-12T23:20:32.002Z","updated_at":"2026-04-16T00:01:29.446Z","avatar_url":"https://github.com/matthewhmaxwell.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trialsim\n\n**Interactive clinical trial enrollment simulator**\n\nModel how different recruitment strategies, site configurations, and protocol designs affect your enrollment timeline. Built by the [American Institute for Medical Research](https://aimronline.org).\n\n**[Launch Trialsim](https://trialsim.aimronline.org)**\n\n---\n\n## What is Trialsim?\n\nTrialsim is a browser-based enrollment simulator for clinical trials. It helps sponsors, CROs, and research teams answer questions like:\n\n- \"If we use these recruitment sources with these conversion rates, when do we hit our enrollment target?\"\n- \"Given these 40 sites with these rates, when do we finish?\"\n- \"What happens to our timeline if we add agentic AI outreach?\"\n- \"How does this site's 6-week IRB compare to a research site with a 2-week IRB?\"\n\nNo login. No install. No backend. Just open `index.html` in a browser.\n\n## Features\n\n### Three Simulation Views\n\n| View | Purpose | Use When |\n|------|---------|----------|\n| **Study View** | Model recruitment source mix and patient funnel | Early planning: \"What sources should we use?\" |\n| **Multi-Site View** | Model enrollment across a site portfolio | Execution planning: \"Given these sites, when do we finish?\" |\n| **Single Site View** | Model one site's startup timeline and patient pipeline | Site-level detail: \"When does this site get to FPI?\" |\n\n### Study View\n- 4 trial templates (Phase 1, Phase 2/3, Rare Disease, Decentralized/Hybrid)\n- 9 patient source types across Clinical, Digital, and Agentic AI categories\n- Configurable funnel stages with conversion rate, throughput capacity, dropout rate\n- Snapshot/compare mode to overlay baseline vs modified scenarios\n- Source contribution analysis and stage utilization heatmap\n\n### Multi-Site View\n- Editable site table with 80+ real hospital/research center names\n- CSV import for your own feasibility lists\n- Per-site enrollment rate, activation week, screen failure rate, dropout, and capacity cap\n- Site contribution waterfall chart (top 25 performers)\n- Drill-in arrow on each row to open Single Site View with bidirectional sync\n\n### Single Site View\n- Gantt startup timeline with 3 parallel tracks (Regulatory, Legal, Operational)\n- 9 configurable milestones with auto-cascade within tracks\n- First Patient In (FPI) auto-computed from critical path\n- Referral source pipeline with editable names and volumes\n- Patient funnel with add/remove stages and inline slider editing\n- Capacity modeling (max concurrent patients, coordinator FTEs)\n- 3 site type templates (Academic Medical Center, Community Hospital, Dedicated Research Site)\n- Bidirectional sync back to Multi-Site table on drill-in\n\n### Simulation Engine\n- Real-time recalculation on every parameter change\n- Animated week-by-week playback with speed control (0.25x to 5x)\n- Particle flow animation through the pipeline during simulation\n- Milestone callouts at 25%, 50%, 75%, and 100% enrollment\n- Animated stat counters with easeOutCubic easing\n\n### Data Management\n- JSON export/import for full configuration persistence (all three views)\n- CSV import for site lists\n- Confirmation dialogs to prevent accidental data loss on template switch\n\n## Quick Start\n\n### Option 1: Use the hosted version\nVisit **[trialsim.aimronline.org](https://trialsim.aimronline.org)**\n\n### Option 2: Run locally\n```bash\n# Clone the repo\ngit clone https://github.com/matthewhmaxwell/trialsim.git\ncd trialsim\n\n# Open in your browser (no build step needed)\nopen index.html\n# or\npython3 -m http.server 8080\n# then visit http://localhost:8080\n```\n\nThat's it. No `npm install`, no build tools, no dependencies to manage.\n\n## How It Works\n\n1. **Pick a template** - Choose Phase 1, Phase 2/3, Rare Disease, or Decentralized. Pre-loads appropriate sources, funnel stages, and targets.\n2. **Customize parameters** - Add/remove sources, adjust conversion rates, change target N. Click any card to edit.\n3. **See results instantly** - Enrollment timeline, rate, screen failure, and cost update in real-time.\n4. **Compare scenarios** - Snapshot your baseline, make changes, and see the difference overlaid on the enrollment curve.\n\n## Technical Details\n\n- **Single HTML file** (~1,700 lines) - entire app in one file, no build step\n- **React 18** + **Recharts** loaded from CDN via UMD\n- **Babel standalone** for JSX compilation in-browser\n- **Zero backend** - all computation runs client-side\n- **No cookies, no tracking, no data sent anywhere**\n\n## CSV Import Format\n\nFor Multi-Site View, import a CSV with these columns (flexible matching - partial names work):\n\n| Column | Description | Example |\n|--------|-------------|---------|\n| `name` or `site` | Site name | Memorial Sloan Kettering |\n| `rate` or `enroll` | Patients per week | 2.5 |\n| `activation` or `start` | Activation week | 4 |\n| `screen` or `fail` | Screen failure % | 35 |\n| `drop` | Dropout % | 3 |\n| `cap` | Max patients (optional) | 20 |\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **Conversion Rate** | % of patients who pass a stage and advance |\n| **Throughput** | Max patients a stage can process per week |\n| **Dropout Rate** | % who leave voluntarily mid-stage |\n| **Screen Failure** | Overall % of identified patients who never reach enrollment |\n| **Ramp-up** | Weeks for a source to reach full volume |\n| **FPI** | First Patient In - week when a site enrolls its first patient |\n| **Activation Week** | Week a site comes online and starts enrolling |\n| **Max Concurrent** | Max patients a site can manage simultaneously |\n\n## Sister Projects\n\n- **[Trialibre](https://trialibre.aimronline.org)** - Open-source clinical trial matching\n- **[Trialearn](https://trialearn.aimronline.org)** - Clinical research training\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n\n## About\n\nDeveloped by the [American Institute for Medical Research](https://aimronline.org) (AIMR), a non-profit organization dedicated to making clinical research tools accessible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewhmaxwell%2Ftrialsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewhmaxwell%2Ftrialsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewhmaxwell%2Ftrialsim/lists"}