complication_flags.Rd
complication flag and complication excluding POA
complication_flags(
original_data = analytic_readmit,
std_data_root = wd$std_data_root,
fac_codes_folder = "fac_clm_code",
year = 2007,
max_year = 2018,
cmp_pr,
cmp_dx,
all_n
)
data name for the data you want to add the info to
data path to the standardized data folder
folder name for fac_code
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
procedure ICD code list used to define complication
diagnosis ICD code list used to define complication
number of digits to match with ICD code
add two variables; complication and complication w/o POA
POA var only available after 2010-01-01.(no poa var recorded before)
Create the ICD9/10 Dx/PR to complications mapping format
Create the complication flags at the DX/PR code level (poa and w/o poa) note: both DX and pr code are used to define complication, however pr should be within 30days, dx has no time frame.