pyhealth

Build clinical deep-learning pipelines for healthcare datasets in PyHealth.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/jasrajtulsi/GRAD-SCOPE --skill pyhealth-jasrajtulsi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pyhealth
Source: https://github.com/jasrajtulsi/GRAD-SCOPE/tree/main/.claude/skills/pyhealth
Command: npx skills add https://github.com/jasrajtulsi/GRAD-SCOPE --skill pyhealth-jasrajtulsi

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

PyHealth helps you turn messy healthcare data into reusable deep-learning pipelines without hand-wiring the entire workflow. It reduces the friction of loading EHR, signal, or imaging datasets, matching them to the right prediction task, and training a clinically meaningful model with the right evaluation metrics.

Core Features & Use Cases

  • Dataset loading: Work with clinical sources such as MIMIC-III, MIMIC-IV, eICU, OMOP, SleepEDF, ChestXray14, and EHRShot.
  • Task selection: Set up common healthcare objectives like mortality prediction, readmission, length of stay, drug recommendation, sleep staging, ICD coding, and EEG event detection.
  • Model and training workflow: Pair datasets with PyHealth models, train through the unified trainer, and monitor the correct metric for binary, multiclass, or multilabel outputs.
  • Medical code utilities: Look up ICD, ATC, NDC, RxNorm, and CCS codes or cross-map between coding systems for feature engineering and interpretation.
  • Use case: A researcher can load MIMIC-III, define a mortality task, train a Transformer or RETAIN model, and evaluate the result with clinically appropriate metrics in a single pipeline.

Quick Start

Ask me to build, troubleshoot, or explain a PyHealth pipeline for your healthcare dataset, task, model, and metric, and I will produce the correct end-to-end setup.

Frequently Asked Questions about pyhealth

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

FAQPage Schema
How do I build a deep learning pipeline for MIMIC-III mortality prediction?

To build a MIMIC-III mortality prediction pipeline, you align the Dataset, Task, Model, Trainer, and Metrics components. You load MIMIC-III, define the mortality task, train a model like Transformer or RETAIN, and evaluate with clinically appropriate metrics.

Can I use PyHealth for sleep staging and EEG event detection?

Yes, you can use PyHealth for sleep staging and EEG event detection. The framework supports signal datasets like SleepEDF, allowing you to set up EEG event detection tasks, pair them with appropriate models, and train through the unified trainer.

Does this workflow support medical code mapping for ICD and ATC codes?

Yes, the workflow supports medical code mapping for ICD, ATC, NDC, RxNorm, and CCS codes. You can look up these medical codes or cross-map between different coding systems for feature engineering and clinical interpretation.

What's the best way to train models on multilabel ICD coding tasks?

For multilabel ICD coding tasks, the best way is to align your Dataset, Task, Model, and Trainer, then select the correct monitor for multilabel training. This ensures the model is evaluated with the appropriate metrics for multiple output labels.

Why do I need patient-level splitting for healthcare machine learning datasets?

Patient-level splitting is required for healthcare machine learning datasets to prevent data leakage. By splitting data at the patient level, you ensure that records from the same patient do not appear in both training and validation sets, maintaining valid evaluation.

Can I train a readmission prediction model using eICU and OMOP datasets?

Yes, you can train a readmission prediction model using eICU and OMOP datasets. PyHealth provides dataset-specific constructors to load these EHR sources, define the readmission task, and train the model using the unified trainer.