Skip to content

Commit

Permalink
fixes for jackwasey#185, jackwasey#189, icd10be2014 download
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmdnet committed May 7, 2020
1 parent cebf16c commit e57880c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion R/cim-10-fr.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
8 changes: 4 additions & 4 deletions R/icd10be.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion R/util.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion R/who.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "."
)
Expand Down

0 comments on commit e57880c

Please sign in to comment.