1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-10 01:02:47 +02:00

support veterinary MIC/disk translation

This commit is contained in:
2024-02-24 15:16:52 +01:00
parent 74ea6c8c60
commit 7be4dabbc0
69 changed files with 34521 additions and 30207 deletions

View File

@ -310,7 +310,10 @@ ab_url <- function(x, open = FALSE, ...) {
ab <- as.ab(x = x, ...)
atcs <- ab_atc(ab, only_first = TRUE)
u <- paste0("https://www.whocc.no/atc_ddd_index/?code=", atcs, "&showdescription=no")
u <- character(length(atcs))
# veterinary codes
u[atcs %like% "^Q"] <- paste0("https://www.whocc.no/atcvet/atcvet_index/?code=", atcs[atcs %like% "^Q"], "&showdescription=no")
u[atcs %unlike% "^Q"] <- paste0("https://www.whocc.no/atc_ddd_index/?code=", atcs[atcs %unlike% "^Q"], "&showdescription=no")
u[is.na(atcs)] <- NA_character_
names(u) <- ab_name(ab)