Medical Research Skills for Claude Code, Codex, Cursor & Copilot
58 open-source skills for the full medical research lifecycle. Built by physicians, tested on real publications.
Replay real held-out ICU patients hour by hour against a sepsis early-warning model, including the cases where it fails.
Translation pending
HealthHTML · PythonGitHub @ShawnJoshua03OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Hourly ICU sepsis early-warning model scored on the official PhysioNet 2019 Challenge utility metric, with a live demo
Taken from the repository README
Loading the full README.
Read the full README ↗A model that scores ICU patients every hour from routine vitals and labs and tries to flag sepsis up to 12 hours before onset.
Live demo | Write-up | Portfolio
It's trained on the PhysioNet 2019 Challenge data and scored with the Challenge's own utility metric.
I wanted to build something in healthcare and learn the tools along the way. The task, data and scoring all come from the 2019 PhysioNet/CinC Challenge paper (Reyna et al., cited at the bottom). It was a heavy task for a laptop. Mine kept breaking.
Live demo: replays held-out patients hour by hour and shows when the alert would have fired.
4,441 held-out patients, split by patient so none of them were seen in training. The alert threshold was picked by cross-validation on the training patients only.
| Metric | Value |
|---|---|
| Normalized utility (official Challenge metric) | 0.424 |
| AUROC / AUPRC (hourly) | 0.817 / 0.092 |
| Septic patients flagged in the useful window (−12h to +3h of onset) | 370 / 398 (93%) |
| Median warning before onset, among those flagged | 12 h |
| Non-septic patients with at least one alarm | 2,381 / 4,043 (59%) |
| Septic patients who also alarmed before the useful window | 271 / 398 (68%) |
Read the last two rows before the first four. The model catches most septic patients partly because it alarms on a lot of people. The 12h median is also the most the window allows: many of those patients were already alarming when the window opened.
The threshold cross-validation picked (0.32) sits at the peak of the test curve.
flowchart LR
A[".psv files<br/>one row per ICU hour"] --> B["load.py"]
B --> C["features.py<br/>causal features"]
C --> D["train.py<br/>patient split,<br/>CV-tuned threshold"]
D --> M[("model.joblib")]
D --> E["evaluate.py<br/>utility, AUROC, lead time"]
M --> F["app.py<br/>FastAPI POST /score"]
F --> G["build_pages.py<br/>pre-scores demo patients"]
G --> H["GitHub Pages"]
Python 3.13, pandas, scikit-learn's HistGradientBoostingClassifier, FastAPI,
a plain JS demo page, pytest, ruff, Docker, GitHub Actions.
Choices that matter:
compute_prediction_utility, copied
unchanged into src/sepsis_utility.py. It gives the most credit for alerts
6 to 12h before onset, penalizes late or missed cases hard, and charges 0.05
for every false-alarm hour.tests/test_features.py appends and corrupts future
hours and checks that nothing earlier changes.make setup # pinned dependencies
make run # demo + API at http://localhost:8000
make test
make lint
Without make (plain Windows, for example):
pip install -r requirements-dev.txt
export PYTHONPATH=src # PowerShell: $env:PYTHONPATH="src"
uvicorn app:app --app-dir src --reload
pytest -q
The trained model (artifacts/model.joblib) is committed, so the demo runs
without training anything.
To reproduce the results, download the Challenge training data (open access, CC BY 4.0) from https://physionet.org/content/challenge-2019/1.0.0/, then:
python src/train.py --data training_setA # ~15 min
python src/evaluate.py
python scripts/export_demo.py # picks the demo patients
python scripts/make_figures.py
python data/make_sample.py followed by python src/train.py runs the whole
pipeline on synthetic patients in the real schema, no download needed. The
scores it prints are near-perfect and mean nothing.
POST /score takes one patient's hourly rows with the Challenge column names.
Interactive docs are at /docs when running locally.
curl -X POST localhost:8000/score -H "Content-Type: application/json" \
-d '{"records": [{"ICULOS": 1, "HR": 92, "Temp": 38.4, "Resp": 24},
{"ICULOS": 2, "HR": 104, "MAP": 63, "Lactate": 2.9}]}'
The response has hourly_risk, threshold, first_alert_hour and a
recommendation string. ICULOS is required, an integer ≥ 1 and unique per
row. Every measurement is optional. Unknown fields get a 422, so a typo like
"hr" can't quietly be scored as "never measured". Empty payloads and more
than 2,000 rows are rejected too.
The live demo is static. scripts/build_pages.py runs each demo patient
through the real /score endpoint at build time and saves the responses next
to the page, so the numbers on the site come from the committed model. CI
(ruff, tests, a Docker smoke test) has to pass on main before
.github/workflows/pages.yml publishes it.
I tried Hugging Face Spaces first, but Docker Spaces need a paid plan now. The Dockerfile still works on any host that sets $PORT (Render, Fly.io,
Cloud Run) if you want the live API. Don't point it at real patient data: that
needs authentication, audit logging and a hospital network.
src/config.py the 40-column Challenge schema and shared constants
src/load.py read per-patient .psv files
src/features.py causal feature engineering
src/train.py training, CV threshold tuning
src/evaluate.py utility and lead-time report
src/sepsis_utility.py the Challenge's metric (see NOTICE.md)
src/app.py FastAPI scorer + demo page
src/static/ demo page and 7 held-out demo patients
scripts/ demo-patient export, README figures, Pages build
tests/ causality, metric, loader and API tests
data/make_sample.py synthetic patients in the real schema
PhysioNet/CinC Challenge 2019 data, CC BY 4.0. Full citations and the metric's license are in NOTICE.md.
Reyna MA, et al. Early Prediction of Sepsis From Clinical Data: The PhysioNet/Computing in Cardiology Challenge 2019. Critical Care Medicine 48(2):210-217 (2020).