readmission.Rd
using facility claim data, left join by member id
readmission(
original_data,
std_data_root = wd$std_data_root,
fac_clm_folder = "fac_clm",
emergent_admission_medpar_claim_ids,
year = 2007,
max_year = 2018
)
data to add on
data path to the standardized data folder
facility claim folder name
a list of all emergent MedPAR admission claim IDs
select one year to process, e.g. 2007
the most recent medicare year we have; for example, in 2020, we have Medpar processed up to 2018
Find the 30-day readmission, maybe multiple readmission
Roll up to a single row per member_id & prof_calim_id
Merge the 30-day readmission flag back to the main analytic file
readmission to emergent inpatient admission