reoperation.Rd
use procedure code ICD code to define reop
reoperation(
original_data,
reop_map,
std_data_root = wd$std_data_root,
year,
fac_codes_folder = "fac_clm_code",
emergent_admission_medpar_claim_ids,
max_year = 2018
)
data to add on
predefined re-operation and ICD map
data path to the standardized data folder
select one year to process, e.g. 2007
names of the fac_clm_code data folder for inpatient medpar claims; or .sas files for only testing
a list of all emergent MedPAR admission claim IDs
the most recent medicare year we have; for example, in 2020, we have Medpar processed up to 2018
Looking through the procedure codes across multiple admissions;
Create the ICD9/10 procedure codes to re-operation mapping using pre-defined operation types;
Get the re-operation flags if defined re operation happened within <=30 days
emergent admission only