Skip to content

[CS598 DL4H] Adding patient_readmission.py task, patient_readmission_eicu ablation, test_patient_readmission test, and pyhealth.tasks.patient_readmission rst doc#1022

Open
dylan-g12 wants to merge 7 commits intosunlabuiuc:masterfrom
dylan-g12:master

Conversation

@dylan-g12
Copy link
Copy Markdown

Contributor: Dylan Guo (dylanlg3@illinois.edu)

Paper Title and Link: A Case Study Exploring the Current Landscape of Synthetic Medical Record Generation with Commercial LLMs (https://arxiv.org/abs/2504.14657)

Contribution Type: New Task Contribution

Description: This PR adds a task as described by Lin, Yu, and Lee in A Case Study Exploring the Current Landscape of Synthetic Medical Record Generation with Commercial LLMs that predicts the readmission of patients based on patient data from the eICU database.

The task performs the following:

  1. Gathers the ICU stays of a given patient and sorts them in chronological order.
  2. Iterates through the stays using a sliding window of size 2 and creates a data sample for each pair of consecutive stays.
  3. Extracts the conditions, procedures, and drugs from the stays.
  4. Defines readmission as if the immediately following ICU stay occurs within the same day as the current stay.
  5. Excludes minors, discards ICU stays that don't have the features (conditions, procedures, drugs), and mimics real-world clinical support systems.

Files to Review:

  1. pyhealth/tasks/patient_readmission.py - Main task implementation
  2. examples/readmission/patient_readmission_eicu - Example/ablation task
  3. tests/core/test_patient_readmission.py - Test cases for task
  4. doc/api/tasks/pyhealth.tasks.patient_readmission.rst - rst doc for the task

@joshuasteier joshuasteier self-requested a review April 20, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant