pyhealth

Build healthcare AI models from electronic health records for clinical prediction tasks.

783|65|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill pyhealth-leonchaox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pyhealth
Source: https://github.com/LeonChaoX/qinyan-academic-skills/tree/main/skills/07-%E4%B8%B4%E5%BA%8A%E5%8C%BB%E5%AD%A6%E4%B8%8E%E7%B2%BE%E5%87%86%E5%8C%BB%E7%96%97/pyhealth
Command: npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill pyhealth-leonchaox

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you develop clinical machine learning models by providing an end-to-end toolkit for working with electronic health records, physiological signals, medical coding, and healthcare datasets.

Core Features & Use Cases

  • Unified healthcare modeling pipeline: standardizes loading, task definition, model selection, training, and deployment for common clinical prediction scenarios.
  • Clinical prediction across modalities: supports mortality/readmission/length-of-stay/drug recommendation using EHR, plus sleep/EEG tasks and image/text-based clinical tasks.
  • Medical coding interoperability: translates and standardizes diagnosis and medication codes across ICD and drug vocabularies to create consistent model inputs.

Quick Start

Train a patient-mortality risk model on MIMIC-IV by loading a dataset, setting the mortality task, selecting an EHR transformer model, then training and evaluating it with the built-in Trainer workflow.

Frequently Asked Questions about pyhealth

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

FAQPage Schema
How do I train clinical ML models on electronic health records for mortality prediction?

You can train clinical ML models on electronic health records by loading datasets like MIMIC-III or MIMIC-IV, defining the mortality prediction task, selecting an EHR model, and using the built-in training and evaluation pipeline. This standardizes the healthcare modeling workflow end-to-end.

What healthcare datasets are supported for building clinical prediction models?

Supported healthcare datasets include MIMIC-III, MIMIC-IV, eICU, and OMOP. These datasets provide electronic health records, clinical codes, and physiological data required for clinical prediction and drug recommendation tasks.

Can I use this to translate and standardize medical coding for model inputs?

Yes, medical coding interoperability is supported to translate and standardize diagnosis and medication codes across ICD and drug vocabularies. This creates consistent model inputs for clinical machine learning workflows.

How do I build a drug recommendation model using clinical health data?

Build a drug recommendation model by loading a supported clinical dataset, setting the drug recommendation task, and selecting a model through the unified healthcare pipeline. The toolkit handles patient-level splitting and evaluation compatible with clinical metrics.

Does this toolkit support multimodal healthcare modeling tasks?

Yes, multimodal healthcare modeling is supported alongside EHR-based tasks. You can apply clinical prediction across modalities including sleep, EEG, image, and text-based clinical tasks using the standardized training and evaluation pipeline.

What is the best way to handle patient-level data splitting for clinical ML training?

Patient-level splitting utilities are provided to correctly partition clinical health data for model training. This prevents data leakage across patient records and ensures evaluation metrics accurately reflect model performance on unseen patients.