Learn R Programming

icd (version 3.3)

icd9_parse_quan_deyo_sas: parse original SAS code defining Quan's update of Deyo comorbidities.

Description

As with parseAhrqSas, this function reads SAS code, and in, a very limited way, extracts definitions. In this case the code uses LET statements, with strings or lists of strings. This saves and invisibly returns a list with names corresponding to the comorbidities and values as a vector of 'short' form (i.e. non-decimal) ICD9 codes. Unlike icd9_parse_ahrq_sas, there are no ranges defined, so this interpretation is simpler.

Usage

icd9_parse_quan_deyo_sas(save_data = FALSE, offline = TRUE)

Arguments

save_data

logical whether to save the result in the source tree. Defaults to FALSE.

offline

single logical, if TRUE then don't pull the file from internet, only return path and file name if the file already exists in the raw data directory. This is helpful for testing without using the internet.

condense

Deprecated. The map is not condensed by default. If required, it can reduced to a smaller set of codes using icd_condense.

Value

invisibly returns the list of vectors, where a co-morbidity name is associated with a character vector of ICD-9 codes.

Details

With thanks to Dr. Quan, I have permission to distribute his SAS code. Previously, the SAS code would be downloaded from the University of Manitoba at http://mchp-appserv.cpe.umanitoba.ca/concept/ICD9_E_Charlson.sas.txt. There are structural differences between this version and the version directly from Dr. Quan, however, the parsing results in identical data.