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
)

Arguments

original_data

data to add on

reop_map

predefined re-operation and ICD map

std_data_root

data path to the standardized data folder

year

select one year to process, e.g. 2007

fac_codes_folder

names of the fac_clm_code data folder for inpatient medpar claims; or .sas files for only testing

emergent_admission_medpar_claim_ids

a list of all emergent MedPAR admission claim IDs

max_year

the most recent medicare year we have; for example, in 2020, we have Medpar processed up to 2018

Value

Details

  1. Looking through the procedure codes across multiple admissions;

  2. Create the ICD9/10 procedure codes to re-operation mapping using pre-defined operation types;

  3. Get the re-operation flags if defined re operation happened within <=30 days

  4. emergent admission only