pyhealth

Build clinical deep learning pipelines using PyHealth’s unified workflow.

4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/shushuzn/Rairos --skill pyhealth-shushuzn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pyhealth
Source: https://github.com/shushuzn/Rairos/tree/main/skills/pyhealth
Command: npx skills add https://github.com/shushuzn/Rairos --skill pyhealth-shushuzn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This skill solves the pain of building end-to-end clinical machine learning pipelines from EHR/signal/imaging data without manually wiring datasets, tasks, models, training loops, and metrics.

Core Features & Use Cases

  • Dataset → Task → Model → Trainer → Metrics pipeline for consistent, modular PyHealth workflows.
  • Clinical prediction tasks such as mortality, readmission, length-of-stay, drug recommendation, sleep staging, ICD/EEG labeling, and more across common benchmarks.
  • Medical code utilities to look up and cross-map ICD/ATC/NDC/RxNorm/CCS codes for labeling and feature engineering.
  • Practical guidance on critical pitfalls like patient-level splitting and using the correct Dataset type for models.

Quick Start

Use the pyhealth skill to help you assemble a full pipeline for predicting mortality on MIMIC-III by choosing the right dataset, task, model, Trainer monitor metric, and evaluation metrics.

Frequently Asked Questions about pyhealth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a clinical machine learning pipeline for EHR data?

Building a clinical ML pipeline for EHR data requires assembling a unified Dataset, Task, Model, Trainer, and Metrics workflow. This approach ensures consistent processing for clinical prediction tasks like mortality and readmission.

What is the best way to predict patient mortality using MIMIC-III data?

To predict patient mortality using MIMIC-III, you need to select a compatible dataset and task pair, instantiate a model with the resulting SampleDataset, apply patient-safe splitting, and train using a task-appropriate clinical metric.

How do I cross-map medical codes like ICD and NDC for feature engineering?

Cross-mapping medical codes like ICD, ATC, NDC, and RxNorm uses built-in medical code utilities. These tools look up and translate code systems for clinical data labeling and feature engineering tasks.

Does clinical deep learning require patient-level data splitting for training?

Patient-level data splitting is required for clinical deep learning to prevent data leakage. You must use patient-safe splitting techniques when generating your SampleDataset before training models.

Can I use a single workflow for sleep staging and drug recommendation tasks?

A single unified workflow supports sleep staging and drug recommendation tasks. You can process physiological signals or EHR data by selecting compatible dataset and task pairs within the same pipeline structure.

Why should I use a unified clinical ML workflow instead of manual model wiring?

A unified clinical ML workflow avoids manually wiring datasets, tasks, models, and metrics. It provides practical guidance on critical pitfalls like selecting the correct Dataset type for models and computing task-appropriate clinical metrics.