This task processes patient data from MIMIC-IV to predict whether a patient will be readmitted within 30 days after discharge. It uses sequences of conditions, procedures, and drugs as input features.
Public Fields
task_nameCharacter. The name of the task ("Readmission30DaysMIMIC4").
input_schemaList. Input schema, including:
conditions: Sequence of condition codes.procedures: Sequence of procedure codes.drugs: Sequence of drug codes.
output_schemaList. Output schema:
readmission: Binary indicator of readmission within 30 days.
Public Methods
initialize()Initializes the task by setting the task name, input and output schema.
call(patient)Generate samples from a patient object.
patientAn object that implements
get_events()for MIMIC-IV.- Returns
A list of named lists with features and 30-day readmission label.
Super class
RHealth::BaseTask -> Readmission30DaysMIMIC4
Methods
Inherited methods
Method new()
Initialize the Readmission30DaysMIMIC4 task. Sets the task name and defines the expected input/output schema.
Usage
Readmission30DaysMIMIC4$new()Method call()
Generate samples by processing a patient object. Excludes patients under 18 years old and visits without complete data. For each valid admission, extracts condition, procedure, and drug codes as feature sequences and computes a binary readmission label within 30 days.