Given a data frame of claims created with a get_*_ICD command, this function
will keep the date of either the second outpatient or
first inpatient claim with that code, using the HCFASAF variable to classify claims as outpatient
or inpatient.
Examples
if (FALSE) {
cryptococcus_icd <- c("1175", "B45")
# Retrieve claims for all patients in selected years
result <- get_IN_ICD(icd_codes = cryptococcus_icd, years = 2013:2018)
establish_dx_date(result)
}
