diff --git a/R/parse-comorbid.R b/R/parse-comorbid.R index 1ee1ccdd..288afd2f 100644 --- a/R/parse-comorbid.R +++ b/R/parse-comorbid.R @@ -44,7 +44,7 @@ icd9_fetch_ahrq_sas <- function() { ) } -icd10_fetch_ahrq_sas <- function(ver = "2016") { +icd10_fetch_ahrq_sas <- function(ver = "2018") { if (!ver %in% c("2016","2017","2018")) { stop(ver," not currently available") } @@ -141,10 +141,10 @@ icd9_parse_ahrq_sas <- function(save_pkg_data = FALSE) { # This is in some ways simpler than that ICD-9 equivalent because I make no # attempt to find all the child codes. -icd10_parse_ahrq_sas <- function(save_pkg_data = FALSE, - offline = TRUE, ver = "2016") { +icd10_parse_ahrq_sas <- function(version = "2018", save_pkg_data = FALSE, + offline = TRUE) { assert_flag(save_pkg_data) - ahrq_info <- icd10_fetch_ahrq_sas(ver = ver) + ahrq_info <- icd10_fetch_ahrq_sas(ver = version) ahrq_sas_lines <- readLines(ahrq_info$file_path, warn = FALSE) icd10_map_ahrq <- sas_format_extract_rcomfmt(ahrq_sas_lines) unun <- function(x) unname(unlist(x)) diff --git a/R/update.R b/R/update.R index 123c2f62..1849d4bf 100644 --- a/R/update.R +++ b/R/update.R @@ -39,7 +39,7 @@ icd9_generate_map_elix(save_pkg_data = TRUE) # ICD 10 .parse_icd10cm_all(save_pkg_data = TRUE) - icd10_parse_ahrq_sas(save_pkg_data = TRUE) + icd10_parse_ahrq_sas(version = "2018", save_pkg_data = TRUE) .parse_icd10cm_cc(save_pkg_data = TRUE) icd10_generate_map_quan_elix(save_pkg_data = TRUE) icd10_generate_map_quan_deyo(save_pkg_data = TRUE)