Inspiration
Between trial visits, patients feel side effects and start new medicines, and most of it reaches the trial record late, from memory or from an outside hospital note. Physicians under-report patient-reported toxicities 40.7–74.4% of the time (Di Maio et al., JCO 2015), serious events must reach the sponsor within 24 hours of the site becoming aware, and research coordinators spend hours retyping chart data into the trial database. We started from Regeneron's starter sheet "How Are You Feeling?" and, after mentor feedback, expanded it to the coordinator's whole safety-data week.
What it does
Interim is a safety-data desk for clinical trial sites. It follows one side effect through every step:
- Patient check-in kiosk: short PRO-CTCAE-style questions in plain words ("in the last 7 days"), scored with the published Basch 2021 composite algorithm.
- Three intakes: kiosk check-ins, pasted chart notes (clinic, urgent care, ER), and logged phone calls. Notes and calls are scanned, and every finding quotes the exact words, with negation ("denies cough"), history and hypotheticals excluded and the reason shown.
- One urgency queue with 24-hour report clocks for serious events and events of special interest, started when the site becomes aware.
- Pre-filled trial records (CDISC SDTM AE, CM, VS). Every field links to the answer, words or rule it came from. Confirm, edit or reject, then post to a mock EDC.
- Report packets for 24-hour reports: pre-filled, a list of what's still missing, and a drafted narrative where every sentence cites evidence. Only the investigator can decide seriousness and causality, or sign.
- Sponsor queries answered with a suggested reply that cites evidence, and a visit brief summarizing everything since the last visit.
- A time-saved estimate, a hash-chained audit log, and an eval page where anyone can change an input and watch the output change.
The demo study is a real, public Regeneron trial (EMPOWER-Lung 1, cemiplimab), with protocol rules cited to page numbers. Every participant is synthetic.
Gemini as a second reader: Gemini reads chart notes, call summaries and patient comments alongside our rule-based scanner. It can only add findings, and each one must quote the source word for word; code rejects any quote it can't find. Rules still decide grade, urgency and report clocks, and a person confirms everything.
How we built it
- A pure-Python rules package: grading, escalation, protocol rules, chart-note scanner, medication matcher, de-duplication, SDTM drafting. Every number lives in a JSON table with its source.
- FastAPI + SQLModel API, React + TypeScript + Tailwind web app, and a Node vitals bridge with a mock source plus a Presage adapter.
- Docker Compose and GitHub Actions CI.
- Public data from ClinicalTrials.gov, openFDA and NCI CTCAE; synthetic charts from Synthea.
- Evaluation: 36/36 check-in personas and 38/38 chart-note cases pass through the live API. A separate Synthea cohort measures the scanner independently.
Challenges we ran into
- Reading clinical text with rules has limits. Our Synthea eval measured medication recall at 0.18, and in our own playtest the scanner missed "hypothyroidism, likely immune-related." That's why we added a verified second reader instead of trusting free-form AI output.
- Camera vitals (Presage) aren't reliable enough to drive decisions, so we made them optional context that never changes a grade.
- Designing the patient's urgent path: "I can't breathe right now" has to stop the check-in and point to 911 immediately.
Accomplishments that we're proud of
Evidence behind every field, investigator-only decisions enforced by the server, one-command startup from a clean clone, and honest labels on everything simulated vs. measured. We playtested it as a patient, a coordinator and a judge.
What we learned
How trial safety reporting actually works (CTCAE grades, events of special interest, the 24-hour clock from awareness, sponsor queries), and that AI in a regulated workflow has to show its source and leave the decision to a person.
What's next
Live EHR (FHIR / SMART on FHIR) and EDC integration, an E2B-style handoff to the sponsor's safety database, routing packets to the investigator, multilingual voice check-ins, and a timed study with real coordinators.
Built With
- cdisc-sdtm
- clinicaltrials.gov-api
- docker
- fastapi
- gemini-api
- github-actions
- hl7-fhir
- nci-ctcae
- node.js
- openfda
- playwright
- pydantic
- pytest
- python
- react
- sqlite
- sqlmodel
- synthea
- tailwindcss
- typescript
- vite
- websockets
Log in or sign up for Devpost to join the conversation.