Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data download fixes #203

Merged
merged 2 commits into from
May 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/13697/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