diff --git a/R/cim-10-fr.R b/R/cim-10-fr.R index ec8419ae..5cf4eefa 100644 --- a/R/cim-10-fr.R +++ b/R/cim-10-fr.R @@ -8,7 +8,7 @@ "https://www.atih.sante.fr", "plateformes-de-transmission-et-logiciels", "logiciels-espace-de-telechargement", - "telecharger/gratuit/11616/456" + "telecharger/gratuit/12713/456" ), file_name = "LIBCIM10MULTI.TXT", dl_msg = "Working on ICD-10-FR (CIM-10-FR)", diff --git a/R/icd10be.R b/R/icd10be.R index f2972741..30006c42 100644 --- a/R/icd10be.R +++ b/R/icd10be.R @@ -6,7 +6,7 @@ ...) { site_file_2017 <- "fy2017_reflist_icd-10-be.xlsx_last_updatet_28-07-2017_1.xlsx" - fnp <- .download_to_data_raw( + fnp <- .download_to_data_cache( paste(.icd10be_site, .icd10be_url_path, site_file_2017, @@ -28,7 +28,7 @@ } site_file <- "fy2014_reflist_icd-10-be.xlsx" .msg("Downloading or getting cached icd10be2014 data") - .download_to_data_raw( + .download_to_data_cache( paste(.icd10be_site, .icd10be_url_path, site_file, @@ -58,7 +58,7 @@ #' \url{https://www.health.belgium.be/sites/default/files/uploads/fields/fpshealth_theme_file/fy2017_reflist_icd-10-be.xlsx_last_updatet_28-07-2017_1.xlsx} # nolint end #' \url{https://www.health.belgium.be/fr/fy2014reflisticd-10-bexlsx} -#' @param ... passed to \code{.download_to_data_raw}, e.g., \code{offline = +#' @param ... passed to \code{.download_to_data_cache}, e.g., \code{offline = #' FALSE}. #' @seealso \code{link{parse_icd10be2014_be}} #' @keywords internal @@ -133,7 +133,7 @@ #' \url{https://www.health.belgium.be/fr/sante/organisation-des-soins-de-sante/hopitaux/systemes-denregistrement/icd-10-be} # nolint end #' \url{https://www.health.belgium.be/fr/fy2014reflisticd-10-bexlsx} -#' @param ... passed to \code{.download_to_data_raw}, e.g., \code{offline = +#' @param ... passed to \code{.download_to_data_cache}, e.g., \code{offline = #' FALSE}. #' @seealso \code{link{parse_icd10be2014_be}} #' @keywords internal diff --git a/R/util.R b/R/util.R index b6f6ddde..12b1e359 100644 --- a/R/util.R +++ b/R/util.R @@ -398,7 +398,8 @@ capitalize_first <- function(x) { #' @noRd #' @keywords internal get_raw_data_dir <- function() { - system.file("data-raw", package = "icd") + # use mustWork = TRUE to throw an error if the directory is not found + system.file("data-raw", package = "icd", mustWork = TRUE) } .stopifnot_year <- function(year) { diff --git a/R/who.R b/R/who.R index b1c8cdfd..34117cb9 100644 --- a/R/who.R +++ b/R/who.R @@ -19,7 +19,7 @@ # memoise package has given me problems and crashes. DIY mem_file_name <- paste( "WHO", year, lang, - gsub("JsonGetChildrenConcepts\\?ConceptId=|&useHtml=false", "", resource), + gsub("JsonGetChildrenConcepts\\?ConceptId=|(&|\\?)useHtml=false", "", resource), "json", sep = "." )