pyhealth

Comprehensive healthcare AI toolkit for developing, testing, and deploying machine learning models with clinical data. This skill should be used when working with electronic health records (EHR), clinical prediction tasks (mortality, readmission, drug recommendation), medical coding systems (ICD, NDC, ATC), physiological signals (EEG, ECG), healthcare datasets (MIMIC-III/IV, eICU, OMOP), or implementing deep learning models for healthcare applications (RETAIN, SafeDrug, Transformer, GNN).

Install

Hot:2

Download and extract to your skills directory

Copy command and send to OpenClaw for auto-install:

Download and install this skill https://openskills.cc/api/download?slug=k-dense-ai-scientific-skills-pyhealth&locale=en&source=copy

PyHealth: Medical AI Toolkit - Clinical Machine Learning and Medical Data Processing Framework

Overview of Capabilities


PyHealth is a Python toolkit designed for medical AI that helps developers quickly process electronic health records (EHR), build clinical prediction models, and perform medical coding conversions. It supports the full workflow from data loading to model deployment.

Use Cases

1. Medical Dataset Analysis and Processing


When you need to work with mainstream medical datasets such as MIMIC-III/IV, eICU, and OMOP, PyHealth provides a unified standardized interface, supports a three-level data structure (patient, visit, event), and delivers data processing performance up to 3x faster than pandas, letting you focus on model development rather than data cleaning.

2. Clinical Predictive Model Development


When you need to build clinical tasks such as mortality prediction, readmission risk, drug recommendation, and length-of-stay prediction, PyHealth includes 20+ predefined tasks and 33+ models (including medical-specific models like RETAIN, SafeDrug, and Transformer), simplifying the modeling process and accelerating research iteration.

3. Medical Coding Conversion and Standardization


When you need to convert between different medical coding systems (e.g., ICD-9/10, NDC, ATC, RxNorm), PyHealth provides InnerMap and CrossMap tools to support cross-system translation and hierarchical classification, eliminating the need to manually maintain complex code mapping tables.

Core Features

1. One-Stop Medical Data Loading


Supports automatic loading and standardization for 10+ medical datasets, including EHR data (MIMIC, eICU, OMOP), physiological signals (sleep EEG, ECG), medical imaging, and clinical text. Offers patient-wise train/validation/test splits to effectively prevent data leakage.

2. Rich Set of Clinical Prediction Tasks


Built-in support for 20+ clinical tasks such as mortality prediction, hospital readmission, drug recommendation, length-of-stay, and medical coding, with support for custom task definitions. Each task automatically handles input/output formats, label filtering, and sample generation, adapting to different data types (EHR, signals, imaging, text).

3. Medical-Specific Deep Learning Models


Provides 33+ model options, including general baselines (logistic regression, MLP, CNN, RNN, Transformer) and medical-specific models (RETAIN, SafeDrug, GAMENet, StageNet, AdaCare). Supports interpretability analysis, model calibration, uncertainty quantification, and other features essential for clinical deployment.

Frequently Asked Questions

What is PyHealth? What is it mainly used for?


PyHealth is an open-source medical AI toolkit for processing clinical data and developing medical machine learning models. It is mainly used for electronic health record (EHR) analysis, clinical prediction tasks (such as mortality prediction and drug recommendation), medical coding conversion (ICD, NDC, ATC, etc.), and physiological signal processing (EEG, ECG). Compared to general machine learning frameworks, PyHealth is optimized for the characteristics of medical data and provides standardized interfaces and prebuilt models.

Which medical datasets does PyHealth support?


PyHealth supports 10+ mainstream medical datasets, including: EHR data (MIMIC-III, MIMIC-IV, eICU, OMOP CDM), physiological signals (SleepEDF, SHHS sleep EEG data), medical imaging (COVID-19 chest X-rays), and clinical text (MIMIC clinical notes). All datasets are loaded via a unified interface that automatically handles data format differences, facilitating cross-dataset research.

What prerequisites are needed to use PyHealth?


PyHealth is suitable for users with a basic knowledge of Python and machine learning concepts. While medical domain knowledge helps to understand the use cases, it is not required—PyHealth’s documentation provides detailed domain explanations. Technically, PyHealth requires Python ≥ 3.7 and PyTorch ≥ 1.8, and GPU acceleration is recommended for deep learning training. If you are familiar with PyTorch, you can get started with PyHealth very quickly.