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

(v0.7.1.9035) cephalosporins and unit tests

This commit is contained in:
2019-08-11 19:07:26 +02:00
parent 3f5828e74a
commit 1d423cca89
38 changed files with 382 additions and 361 deletions

View File

@ -294,6 +294,8 @@ antibiotics[which(antibiotics$ab == "RIF"), "name"] <- "Rifampicin"
# PME and PVM1 (the J0 one) both mean 'Pivmecillinam', so:
antibiotics <- filter(antibiotics, ab != "PME")
antibiotics[which(antibiotics$ab == "PVM1"), "ab"] <- "PME"
# Remove Sinecatechins
antibiotics <- filter(antibiotics, ab != "SNC")
# ESBL E-test codes:
antibiotics[which(antibiotics$ab == "CCV"), "abbreviations"][[1]] <- list(c("xtzl"))
antibiotics[which(antibiotics$ab == "CAZ"), "abbreviations"][[1]] <- list(c(antibiotics[which(antibiotics$ab == "CAZ"), "abbreviations"][[1]], "xtz", "cefta"))
@ -304,6 +306,44 @@ antibiotics[which(antibiotics$ab == "CTX"), "abbreviations"][[1]] <- list(c(anti
antibiotics <- antibiotics %>% arrange(name)
# set cephalosporins groups for the ones that could not be determined automatically:
antibiotics <- antibiotics %>%
mutate(group = case_when(
name == "Cefcapene" ~ "Cephalosporins (3rd gen.)",
name == "Cefcapene pivoxil" ~ "Cephalosporins (3rd gen.)",
name == "Cefditoren pivoxil" ~ "Cephalosporins (3rd gen.)",
name == "Cefepime/clavulanic acid" ~ "Cephalosporins (4th gen.)",
name == "Cefepime/tazobactam" ~ "Cephalosporins (4th gen.)",
name == "Cefetamet pivoxil" ~ "Cephalosporins (3rd gen.)",
name == "Cefetecol (Cefcatacol)" ~ "Cephalosporins (4th gen.)",
name == "Cefetrizole" ~ "Cephalosporins (unclassified gen.)",
name == "Cefoselis" ~ "Cephalosporins (4th gen.)",
name == "Cefotaxime/clavulanic acid" ~ "Cephalosporins (3rd gen.)",
name == "Cefotaxime/sulbactam" ~ "Cephalosporins (3rd gen.)",
name == "Cefotiam hexetil" ~ "Cephalosporins (3rd gen.)",
name == "Cefovecin" ~ "Cephalosporins (3rd gen.)",
name == "Cefozopran" ~ "Cephalosporins (4th gen.)",
name == "Cefpimizole" ~ "Cephalosporins (3rd gen.)",
name == "Cefpodoxime proxetil" ~ "Cephalosporins (3rd gen.)",
name == "Cefpodoxime/clavulanic acid" ~ "Cephalosporins (3rd gen.)",
name == "Cefquinome" ~ "Cephalosporins (4th gen.)",
name == "Cefsumide" ~ "Cephalosporins (unclassified gen.)",
name == "Ceftaroline" ~ "Cephalosporins (5th gen.)",
name == "Ceftaroline/avibactam" ~ "Cephalosporins (5th gen.)",
name == "Ceftazidime/avibactam" ~ "Cephalosporins (3rd gen.)",
name == "Cefteram" ~ "Cephalosporins (3rd gen.)",
name == "Cefteram pivoxil" ~ "Cephalosporins (3rd gen.)",
name == "Ceftiofur" ~ "Cephalosporins (3rd gen.)",
name == "Ceftizoxime alapivoxil" ~ "Cephalosporins (3rd gen.)",
name == "Ceftobiprole" ~ "Cephalosporins (5th gen.)",
name == "Ceftobiprole medocaril" ~ "Cephalosporins (5th gen.)",
name == "Ceftolozane/enzyme inhibitor" ~ "Cephalosporins (5th gen.)",
name == "Ceftolozane/tazobactam" ~ "Cephalosporins (5th gen.)",
name == "Cefuroxime axetil" ~ "Cephalosporins (2nd gen.)",
TRUE ~ group))
# set as data.frame again
antibiotics <- as.data.frame(antibiotics, stringsAsFactors = FALSE)
class(antibiotics$ab) <- "ab"
dim(antibiotics) # for R/data.R

View File

@ -368,6 +368,8 @@ nl Cephalosporins (1st gen.) Cefalosporines (1e gen.) TRUE FALSE
nl Cephalosporins (2nd gen.) Cefalosporines (2e gen.) TRUE FALSE
nl Cephalosporins (3rd gen.) Cefalosporines (3e gen.) TRUE FALSE
nl Cephalosporins (4th gen.) Cefalosporines (4e gen.) TRUE FALSE
nl Cephalosporins (5th gen.) Cefalosporines (5e gen.) TRUE FALSE
nl Cephalosporins (unclassified gen.) Cefalosporines (ongeclassificeerd) TRUE FALSE
nl Cephalosporins Cefalosporines TRUE FALSE
nl Glycopeptides Glycopeptiden TRUE FALSE
nl Macrolides/lincosamides Macroliden/lincosamiden TRUE FALSE

Can't render this file because it has a wrong number of fields in line 159.