Excludes planned readmissions based on CMS procedure categories (chemotherapy, transplants, elective procedures).
Usage
planned_readmission_filter(
con,
cohort_table,
readmission_table = NULL,
procedure_table = "procedure_occurrence",
condition_table = "condition_occurrence",
planned_procedure_concepts = NULL,
by = "site",
target_table = NULL
)Arguments
- con
DuckDB connection.
- cohort_table
Name of table containing cohort index stays.
- readmission_table
Optional separate readmission table.
- procedure_table
Name of procedure table (default 'procedure_occurrence').
- condition_table
Name of condition table (default 'condition_occurrence').
- planned_procedure_concepts
Vector of concept IDs for planned procedures.
- by
Stratification column (default 'site').
- target_table
Optional clean table to create in DuckDB.
