diff --git a/DESCRIPTION b/DESCRIPTION index 6b5bc3f9..f55b129e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 2.1.1.9110 -Date: 2024-11-21 +Version: 2.1.1.9111 +Date: 2024-12-06 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) data analysis and to work with microbial and antimicrobial properties by diff --git a/NAMESPACE b/NAMESPACE index 3bc19d75..8d9c9d34 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -182,6 +182,7 @@ export(av_tradenames) export(av_url) export(availability) export(betalactams) +export(betalactams_with_inhibitor) export(brmo) export(bug_drug_combinations) export(carbapenems) diff --git a/NEWS.md b/NEWS.md index b19d7812..1abc798c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 2.1.1.9110 +# AMR 2.1.1.9111 *(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://msberends.github.io/AMR/#latest-development-version).)* diff --git a/PythonPackage/AMR/AMR.egg-info/PKG-INFO b/PythonPackage/AMR/AMR.egg-info/PKG-INFO index a834e1c0..266bfe76 100644 --- a/PythonPackage/AMR/AMR.egg-info/PKG-INFO +++ b/PythonPackage/AMR/AMR.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: AMR -Version: 2.1.1.9110 +Version: 2.1.1.9111 Summary: A Python wrapper for the AMR R package Home-page: https://github.com/msberends/AMR Author: Dr. Matthijs Berends diff --git a/PythonPackage/AMR/AMR/__init__.py b/PythonPackage/AMR/AMR/__init__.py index 5a6fef0b..248b12c0 100644 --- a/PythonPackage/AMR/AMR/__init__.py +++ b/PythonPackage/AMR/AMR/__init__.py @@ -31,6 +31,7 @@ from .functions import aminopenicillins from .functions import antifungals from .functions import antimycobacterials from .functions import betalactams +from .functions import betalactams_with_inhibitor from .functions import carbapenems from .functions import cephalosporins from .functions import cephalosporins_1st diff --git a/PythonPackage/AMR/AMR/functions.py b/PythonPackage/AMR/AMR/functions.py index 1536b209..37decdf6 100644 --- a/PythonPackage/AMR/AMR/functions.py +++ b/PythonPackage/AMR/AMR/functions.py @@ -123,6 +123,9 @@ def antimycobacterials(only_sir_columns = False, *args, **kwargs): def betalactams(only_sir_columns = False, *args, **kwargs): """See our website of the R package for the manual: https://msberends.github.io/AMR/index.html""" return convert_to_python(amr_r.betalactams(only_sir_columns = False, *args, **kwargs)) +def betalactams_with_inhibitor(only_sir_columns = False, *args, **kwargs): + """See our website of the R package for the manual: https://msberends.github.io/AMR/index.html""" + return convert_to_python(amr_r.betalactams_with_inhibitor(only_sir_columns = False, *args, **kwargs)) def carbapenems(only_sir_columns = False, *args, **kwargs): """See our website of the R package for the manual: https://msberends.github.io/AMR/index.html""" return convert_to_python(amr_r.carbapenems(only_sir_columns = False, *args, **kwargs)) diff --git a/PythonPackage/AMR/dist/AMR-2.1.1.9110-py3-none-any.whl b/PythonPackage/AMR/dist/AMR-2.1.1.9110-py3-none-any.whl deleted file mode 100644 index 5a97c131..00000000 Binary files a/PythonPackage/AMR/dist/AMR-2.1.1.9110-py3-none-any.whl and /dev/null differ diff --git a/PythonPackage/AMR/dist/AMR-2.1.1.9111-py3-none-any.whl b/PythonPackage/AMR/dist/AMR-2.1.1.9111-py3-none-any.whl new file mode 100644 index 00000000..2b71496e Binary files /dev/null and b/PythonPackage/AMR/dist/AMR-2.1.1.9111-py3-none-any.whl differ diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9110.tar.gz b/PythonPackage/AMR/dist/amr-2.1.1.9110.tar.gz deleted file mode 100644 index 30117d72..00000000 Binary files a/PythonPackage/AMR/dist/amr-2.1.1.9110.tar.gz and /dev/null differ diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9111.tar.gz b/PythonPackage/AMR/dist/amr-2.1.1.9111.tar.gz new file mode 100644 index 00000000..977033fd Binary files /dev/null and b/PythonPackage/AMR/dist/amr-2.1.1.9111.tar.gz differ diff --git a/PythonPackage/AMR/setup.py b/PythonPackage/AMR/setup.py index 7346dc9c..8a8cb7f8 100644 --- a/PythonPackage/AMR/setup.py +++ b/PythonPackage/AMR/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='AMR', - version='2.1.1.9110', + version='2.1.1.9111', packages=find_packages(), install_requires=[ 'rpy2', diff --git a/R/ab_selectors.R b/R/ab_selectors.R index 9d9804d8..369de342 100755 --- a/R/ab_selectors.R +++ b/R/ab_selectors.R @@ -62,102 +62,88 @@ #' \donttest{ #' # dplyr ------------------------------------------------------------------- #' -#' if (require("dplyr")) { -#' example_isolates %>% select(carbapenems()) -#' } -#' -#' if (require("dplyr")) { -#' # select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB' -#' example_isolates %>% select(mo, aminoglycosides()) -#' } -#' -#' if (require("dplyr")) { -#' # select only antibiotic columns with DDDs for oral treatment -#' example_isolates %>% select(administrable_per_os()) -#' } -#' -#' if (require("dplyr")) { -#' # get AMR for all aminoglycosides e.g., per ward: -#' example_isolates %>% -#' group_by(ward) %>% -#' summarise(across(aminoglycosides(), -#' resistance)) -#' } -#' if (require("dplyr")) { -#' # You can combine selectors with '&' to be more specific: -#' example_isolates %>% -#' select(penicillins() & administrable_per_os()) -#' } -#' if (require("dplyr")) { -#' # get AMR for only drugs that matter - no intrinsic resistance: -#' example_isolates %>% -#' filter(mo_genus() %in% c("Escherichia", "Klebsiella")) %>% -#' group_by(ward) %>% -#' summarise_at(not_intrinsic_resistant(), -#' resistance) -#' } -#' if (require("dplyr")) { -#' # get susceptibility for antibiotics whose name contains "trim": -#' example_isolates %>% -#' filter(first_isolate()) %>% -#' group_by(ward) %>% -#' summarise(across(ab_selector(name %like% "trim"), susceptibility)) -#' } -#' if (require("dplyr")) { -#' # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem): -#' example_isolates %>% -#' select(carbapenems()) -#' } -#' if (require("dplyr")) { -#' # this will select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB': -#' example_isolates %>% -#' select(mo, aminoglycosides()) -#' } -#' if (require("dplyr")) { -#' # any() and all() work in dplyr's filter() too: -#' example_isolates %>% -#' filter( -#' any(aminoglycosides() == "R"), -#' all(cephalosporins_2nd() == "R") -#' ) -#' } -#' if (require("dplyr")) { -#' # also works with c(): -#' example_isolates %>% -#' filter(any(c(carbapenems(), aminoglycosides()) == "R")) -#' } -#' if (require("dplyr")) { -#' # not setting any/all will automatically apply all(): -#' example_isolates %>% -#' filter(aminoglycosides() == "R") -#' } -#' if (require("dplyr")) { -#' # this will select columns 'mo' and all antimycobacterial drugs ('RIF'): -#' example_isolates %>% -#' select(mo, ab_class("mycobact")) -#' } -#' if (require("dplyr")) { -#' # get bug/drug combinations for only glycopeptides in Gram-positives: -#' example_isolates %>% -#' filter(mo_is_gram_positive()) %>% -#' select(mo, glycopeptides()) %>% -#' bug_drug_combinations() %>% -#' format() -#' } -#' if (require("dplyr")) { -#' data.frame( -#' some_column = "some_value", -#' J01CA01 = "S" -#' ) %>% # ATC code of ampicillin -#' select(penicillins()) # only the 'J01CA01' column will be selected -#' } -#' if (require("dplyr")) { -#' # with recent versions of dplyr, this is all equal: -#' x <- example_isolates[carbapenems() == "R", ] -#' y <- example_isolates %>% filter(carbapenems() == "R") -#' z <- example_isolates %>% filter(if_all(carbapenems(), ~ .x == "R")) -#' identical(x, y) && identical(y, z) -#' } +#' library(dplyr, warn.conflicts = FALSE) +#' +#' example_isolates %>% select(carbapenems()) +#' +#' # select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB' +#' example_isolates %>% select(mo, aminoglycosides()) +#' +#' # you can combine selectors like you are used with tidyverse +#' # e.g., for betalactams, but not the ones with an enzyme inhibitor: +#' example_isolates |> select(betalactams(), -betalactams_with_inhibitor()) +#' +#' # select only antibiotic columns with DDDs for oral treatment +#' example_isolates %>% select(administrable_per_os()) +#' +#' # get AMR for all aminoglycosides e.g., per ward: +#' example_isolates %>% +#' group_by(ward) %>% +#' summarise(across(aminoglycosides(), +#' resistance)) +#' +#' # You can combine selectors with '&' to be more specific: +#' example_isolates %>% +#' select(penicillins() & administrable_per_os()) +#' +#' # get AMR for only drugs that matter - no intrinsic resistance: +#' example_isolates %>% +#' filter(mo_genus() %in% c("Escherichia", "Klebsiella")) %>% +#' group_by(ward) %>% +#' summarise_at(not_intrinsic_resistant(), +#' resistance) +#' +#' # get susceptibility for antibiotics whose name contains "trim": +#' example_isolates %>% +#' filter(first_isolate()) %>% +#' group_by(ward) %>% +#' summarise(across(ab_selector(name %like% "trim"), susceptibility)) +#' +#' # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem): +#' example_isolates %>% +#' select(carbapenems()) +#' +#' # this will select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB': +#' example_isolates %>% +#' select(mo, aminoglycosides()) +#' +#' # any() and all() work in dplyr's filter() too: +#' example_isolates %>% +#' filter( +#' any(aminoglycosides() == "R"), +#' all(cephalosporins_2nd() == "R") +#' ) +#' +#' # also works with c(): +#' example_isolates %>% +#' filter(any(c(carbapenems(), aminoglycosides()) == "R")) +#' +#' # not setting any/all will automatically apply all(): +#' example_isolates %>% +#' filter(aminoglycosides() == "R") +#' +#' # this will select columns 'mo' and all antimycobacterial drugs ('RIF'): +#' example_isolates %>% +#' select(mo, ab_class("mycobact")) +#' +#' # get bug/drug combinations for only glycopeptides in Gram-positives: +#' example_isolates %>% +#' filter(mo_is_gram_positive()) %>% +#' select(mo, glycopeptides()) %>% +#' bug_drug_combinations() %>% +#' format() +#' +#' data.frame( +#' some_column = "some_value", +#' J01CA01 = "S" +#' ) %>% # ATC code of ampicillin +#' select(penicillins()) # only the 'J01CA01' column will be selected +#' +#' # with recent versions of dplyr, this is all equal: +#' x <- example_isolates[carbapenems() == "R", ] +#' y <- example_isolates %>% filter(carbapenems() == "R") +#' z <- example_isolates %>% filter(if_all(carbapenems(), ~ .x == "R")) +#' identical(x, y) && identical(y, z) #' #' #' # base R ------------------------------------------------------------------ @@ -312,6 +298,13 @@ betalactams <- function(only_sir_columns = FALSE, only_treatable = TRUE, ...) { ab_select_exec("betalactams", only_sir_columns = only_sir_columns, only_treatable = only_treatable) } +#' @rdname antibiotic_class_selectors +#' @export +betalactams_with_inhibitor <- function(only_sir_columns = FALSE, ...) { + meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1) + ab_select_exec("betalactams_with_inhibitor", only_sir_columns = only_sir_columns) +} + #' @rdname antibiotic_class_selectors #' @export carbapenems <- function(only_sir_columns = FALSE, only_treatable = TRUE, ...) { @@ -595,7 +588,7 @@ ab_select_exec <- function(function_name, only_treatable = FALSE, ab_class_args = NULL) { # get_current_data() has to run each time, for cases where e.g., filter() and select() are used in same call - # but it only takes a couple of milliseconds + # it only takes a couple of milliseconds, so no problem vars_df <- get_current_data(arg_name = NA, call = -3) # to improve speed, get_column_abx() will only run once when e.g. in a select or group call ab_in_data <- get_column_abx(vars_df, @@ -605,7 +598,7 @@ ab_select_exec <- function(function_name, # untreatable drugs if (only_treatable == TRUE) { - untreatable <- AMR_env$AB_lookup[which(AMR_env$AB_lookup$name %like% "-high|EDTA|polysorbate|macromethod|screening|nacubactam"), "ab", drop = TRUE] + untreatable <- AMR_env$AB_lookup[which(AMR_env$AB_lookup$name %like% "(-high|EDTA|polysorbate|macromethod|screening|nacubactam)"), "ab", drop = TRUE] if (any(untreatable %in% names(ab_in_data))) { if (message_not_thrown_before(function_name, "ab_class", "untreatable")) { warning_( @@ -644,7 +637,7 @@ ab_select_exec <- function(function_name, custom_ab <- AMR_env$AB_lookup[which(AMR_env$AB_lookup$ab %in% AMR_env$custom_ab_codes), ] check_string <- paste0(custom_ab$group, custom_ab$atc_group1, custom_ab$atc_group2) if (function_name == "betalactams") { - find_group <- "beta-lactams" + find_group <- "beta[-]?lactams" } else if (function_name %like% "cephalosporins_") { find_group <- gsub("_(.*)$", paste0(" (\\1 gen.)"), function_name) } else { diff --git a/R/sysdata.rda b/R/sysdata.rda index 6eccb842..ff4c32aa 100755 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/data-raw/_pre_commit_checks.R b/data-raw/_pre_commit_checks.R index 64b18e27..cafb9965 100644 --- a/data-raw/_pre_commit_checks.R +++ b/data-raw/_pre_commit_checks.R @@ -440,6 +440,9 @@ pre_commit_lst$AB_TRIMETHOPRIMS <- antibiotics %>% pull(ab) pre_commit_lst$AB_UREIDOPENICILLINS <- as.ab(c("PIP", "TZP", "AZL", "MEZ")) pre_commit_lst$AB_BETALACTAMS <- c(pre_commit_lst$AB_PENICILLINS, pre_commit_lst$AB_CEPHALOSPORINS, pre_commit_lst$AB_CARBAPENEMS) +pre_commit_lst$AB_BETALACTAMS_WITH_INHIBITOR <- antibiotics %>% + filter(name %like% "/" & name %unlike% "EDTA" & ab %in% pre_commit_lst$AB_BETALACTAMS) %>% + pull(ab) # this will be used for documentation: pre_commit_lst$DEFINED_AB_GROUPS <- sort(names(pre_commit_lst)[names(pre_commit_lst) %like% "^AB_" & names(pre_commit_lst) != "AB_LOOKUP"]) create_AB_AV_lookup <- function(df) { @@ -638,7 +641,7 @@ suppressMessages(set_AMR_locale("English")) # Update URLs ------------------------------------------------------------- usethis::ui_info("Checking URLs for redirects") -invisible(capture.output(urlchecker::url_update())) +invisible(urlchecker::url_update(".")) # Document pkg ------------------------------------------------------------ diff --git a/data-raw/eucast_rules.tsv b/data-raw/eucast_rules.tsv index 5be538cb..aa76c816 100644 --- a/data-raw/eucast_rules.tsv +++ b/data-raw/eucast_rules.tsv @@ -1,6 +1,6 @@ # ------------------------------------------------------------------------------------------------------------------------------- # For editing this EUCAST reference file, these values can all be used for targeting antibiotics: -# aminoglycosides, aminopenicillins, antifungals, antimycobacterials, betalactams, carbapenems, cephalosporins, cephalosporins_1st, cephalosporins_2nd, cephalosporins_3rd, cephalosporins_4th, cephalosporins_5th, cephalosporins_except_CAZ, fluoroquinolones, glycopeptides, glycopeptides_except_lipo, lincosamides, lipoglycopeptides, macrolides, oxazolidinones, penicillins, polymyxins, quinolones, streptogramins, tetracyclines, tetracyclines_except_TGC, trimethoprims, ureidopenicillins +# aminoglycosides, aminopenicillins, antifungals, antimycobacterials, betalactams, betalactams_with_inhibitor, carbapenems, cephalosporins, cephalosporins_1st, cephalosporins_2nd, cephalosporins_3rd, cephalosporins_4th, cephalosporins_5th, cephalosporins_except_CAZ, fluoroquinolones, glycopeptides, glycopeptides_except_lipo, lincosamides, lipoglycopeptides, macrolides, oxazolidinones, penicillins, polymyxins, quinolones, streptogramins, tetracyclines, tetracyclines_except_TGC, trimethoprims, ureidopenicillins # and all separate EARS-Net letter codes such as AMC. They can be separated by comma: 'AMC, fluoroquinolones'. # The 'if_mo_property' column can be any column name from the AMR::microorganisms data set, or 'genus_species' or 'gramstain'. # The like.is.one_of column must be 'like' or 'is' or 'one_of' ('like' will read the 'this_value' column as regular expression) @@ -11,7 +11,7 @@ if_mo_property like.is.one_of this_value and_these_antibiotics have_these_values order is Enterobacterales AMP S AMX S Enterobacterales (Order) Breakpoints 10 order is Enterobacterales AMP I AMX I Enterobacterales (Order) Breakpoints 10 order is Enterobacterales AMP R AMX R Enterobacterales (Order) Breakpoints 10 -genus is Staphylococcus PEN, FOX S AMP, AMX, PIP, TIC S Staphylococcus Breakpoints 10 +genus is Staphylococcus PEN, FOX S betalactams_with_inhibitor S Staphylococcus Breakpoints 10 genus is Staphylococcus PEN, FOX R, S OXA, FLC S Staphylococcus Breakpoints 10 genus is Staphylococcus FOX R betalactams R Staphylococcus Breakpoints 10 genus_species is Staphylococcus saprophyticus AMP S AMX, AMC, PIP, TZP S Staphylococcus Breakpoints 10 @@ -117,7 +117,7 @@ genus_species is Burkholderia pseudomallei TCY R DOX R Burkholderia pseudomallei order is Enterobacterales AMP S AMX S Enterobacterales (Order) Breakpoints 11 order is Enterobacterales AMP I AMX I Enterobacterales (Order) Breakpoints 11 order is Enterobacterales AMP R AMX R Enterobacterales (Order) Breakpoints 11 -genus is Staphylococcus PEN, FOX S AMP, AMX, PIP, TIC S Staphylococcus Breakpoints 11 +genus is Staphylococcus PEN, FOX S betalactams_with_inhibitor S Staphylococcus Breakpoints 11 genus is Staphylococcus PEN, FOX R, S OXA, FLC S Staphylococcus Breakpoints 11 genus is Staphylococcus FOX R betalactams R Staphylococcus Breakpoints 11 genus_species is Staphylococcus saprophyticus AMP S AMX, AMC, PIP, TZP S Staphylococcus Breakpoints 11 @@ -226,7 +226,7 @@ genus is Bacillus NOR R fluoroquinolones R Bacillus Breakpoints 11 added in 11 order is Enterobacterales AMP S AMX S Enterobacterales (Order) Breakpoints 12 order is Enterobacterales AMP I AMX I Enterobacterales (Order) Breakpoints 12 order is Enterobacterales AMP R AMX R Enterobacterales (Order) Breakpoints 12 -genus is Staphylococcus PEN, FOX S AMP, AMX, PIP, TIC S Staphylococcus Breakpoints 12 +genus is Staphylococcus PEN, FOX S betalactams_with_inhibitor S Staphylococcus Breakpoints 12 genus is Staphylococcus PEN, FOX R, S OXA, FLC S Staphylococcus Breakpoints 12 genus is Staphylococcus FOX R betalactams R Staphylococcus Breakpoints 12 genus_species is Staphylococcus saprophyticus AMP S AMX, AMC, PIP, TZP S Staphylococcus Breakpoints 12 @@ -500,8 +500,8 @@ genus is Salmonella aminoglycosides R Expert Rules on Salmonella Expert Rules genus is Salmonella PEF R CIP R Expert Rules on Salmonella Expert Rules 3.2 genus_species is Staphylococcus aureus FOX1 R betalactams R Expert Rules on Staphylococcus Expert Rules 3.2 genus_species is Staphylococcus aureus FOX R betalactams R Expert Rules on Staphylococcus Expert Rules 3.2 -genus_species is Staphylococcus aureus FOX1 S betalactams S Expert Rules on Staphylococcus Expert Rules 3.2 -genus_species is Staphylococcus aureus FOX S betalactams S Expert Rules on Staphylococcus Expert Rules 3.2 +genus_species is Staphylococcus aureus FOX1 S betalactams_with_inhibitor S Expert Rules on Staphylococcus Expert Rules 3.2 +genus_species is Staphylococcus aureus FOX S betalactams_with_inhibitor S Expert Rules on Staphylococcus Expert Rules 3.2 genus_species one_of Staphylococcus aureus, Staphylococcus lugdunensis PEN R AMP, AMX, AZL, BAM, CRB, CRN, EPC, HET, MEC, MEZ, MTM, PIP, PME, PVM, SBC, TAL, TEM, TIC R Expert Rules on Staphylococcus Expert Rules 3.2 all penicillins without beta-lactamse inhibitor genus is Staphylococcus ERY, CLI S macrolides, lincosamides S Expert Rules on Staphylococcus Expert Rules 3.2 genus is Staphylococcus NOR S CIP, LVX, MFX, OFX S Expert Rules on Staphylococcus Expert Rules 3.2 @@ -620,8 +620,8 @@ genus is Salmonella aminoglycosides R Expert Rules on Salmonella Expert Rules genus is Salmonella PEF R CIP R Expert Rules on Salmonella Expert Rules 3.3 genus_species is Staphylococcus aureus FOX1 R betalactams R Expert Rules on Staphylococcus Expert Rules 3.3 genus_species is Staphylococcus aureus FOX R betalactams R Expert Rules on Staphylococcus Expert Rules 3.3 -genus_species is Staphylococcus aureus FOX1 S betalactams S Expert Rules on Staphylococcus Expert Rules 3.3 -genus_species is Staphylococcus aureus FOX S betalactams S Expert Rules on Staphylococcus Expert Rules 3.3 +genus_species is Staphylococcus aureus FOX1 S betalactams_with_inhibitor S Expert Rules on Staphylococcus Expert Rules 3.3 +genus_species is Staphylococcus aureus FOX S betalactams_with_inhibitor S Expert Rules on Staphylococcus Expert Rules 3.3 genus_species one_of Staphylococcus aureus, Staphylococcus lugdunensis PEN R AMP, AMX, AZL, BAM, CRB, CRN, EPC, HET, MEC, MEZ, MTM, PIP, PME, PVM, SBC, TAL, TEM, TIC R Expert Rules on Staphylococcus Expert Rules 3.3 all penicillins without beta-lactamse inhibitor genus is Staphylococcus ERY, CLI S macrolides, lincosamides S Expert Rules on Staphylococcus Expert Rules 3.3 genus is Staphylococcus NOR S CIP, LVX, MFX, OFX S Expert Rules on Staphylococcus Expert Rules 3.3 diff --git a/data-raw/gpt_training_text_v2.1.1.9110.txt b/data-raw/gpt_training_text_v2.1.1.9111.txt similarity index 99% rename from data-raw/gpt_training_text_v2.1.1.9110.txt rename to data-raw/gpt_training_text_v2.1.1.9111.txt index af11f1af..65332989 100644 --- a/data-raw/gpt_training_text_v2.1.1.9110.txt +++ b/data-raw/gpt_training_text_v2.1.1.9111.txt @@ -1,5 +1,5 @@ This files contains all context you must know about the AMR package for R. -First and foremost, you are trained on version 2.1.1.9110. Remember this whenever someone asks which AMR package version you’re at. +First and foremost, you are trained on version 2.1.1.9111. Remember this whenever someone asks which AMR package version you’re at. -------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'NAMESPACE': @@ -189,6 +189,7 @@ export(av_tradenames) export(av_url) export(availability) export(betalactams) +export(betalactams_with_inhibitor) export(brmo) export(bug_drug_combinations) export(carbapenems) @@ -1935,6 +1936,7 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/antibiotic_class_selectors.R \alias{antifungals} \alias{antimycobacterials} \alias{betalactams} +\alias{betalactams_with_inhibitor} \alias{carbapenems} \alias{cephalosporins} \alias{cephalosporins_1st} @@ -1976,6 +1978,8 @@ antimycobacterials(only_sir_columns = FALSE, ...) betalactams(only_sir_columns = FALSE, only_treatable = TRUE, ...) +betalactams_with_inhibitor(only_sir_columns = FALSE, ...) + carbapenems(only_sir_columns = FALSE, only_treatable = TRUE, ...) cephalosporins(only_sir_columns = FALSE, ...) @@ -2075,6 +2079,7 @@ The \code{\link[=not_intrinsic_resistant]{not_intrinsic_resistant()}} function c \item \code{\link[=antifungals]{antifungals()}} can select: \cr amorolfine (AMO), amphotericin B (AMB), amphotericin B-high (AMH), anidulafungin (ANI), butoconazole (BUT), caspofungin (CAS), ciclopirox (CIX), clotrimazole (CTR), econazole (ECO), fluconazole (FLU), flucytosine (FCT), fosfluconazole (FFL), griseofulvin (GRI), hachimycin (HCH), ibrexafungerp (IBX), isavuconazole (ISV), isoconazole (ISO), itraconazole (ITR), ketoconazole (KET), manogepix (MGX), micafungin (MIF), miconazole (MCZ), nystatin (NYS), oteseconazole (OTE), pimaricin (PMR), posaconazole (POS), rezafungin (RZF), ribociclib (RBC), sulconazole (SUC), terbinafine (TRB), terconazole (TRC), and voriconazole (VOR) \item \code{\link[=antimycobacterials]{antimycobacterials()}} can select: \cr 4-aminosalicylic acid (AMA), calcium aminosalicylate (CLA), capreomycin (CAP), clofazimine (CLF), delamanid (DLM), enviomycin (ENV), ethambutol (ETH), ethambutol/isoniazid (ETI), ethionamide (ETI1), isoniazid (INH), isoniazid/sulfamethoxazole/trimethoprim/pyridoxine (IST), morinamide (MRN), p-aminosalicylic acid (PAS), pretomanid (PMD), protionamide (PTH), pyrazinamide (PZA), rifabutin (RIB), rifampicin (RIF), rifampicin/ethambutol/isoniazid (REI), rifampicin/isoniazid (RFI), rifampicin/pyrazinamide/ethambutol/isoniazid (RPEI), rifampicin/pyrazinamide/isoniazid (RPI), rifamycin (RFM), rifapentine (RFP), simvastatin/fenofibrate (SMF), sodium aminosalicylate (SDA), streptomycin/isoniazid (STI), terizidone (TRZ), thioacetazone (TAT), thioacetazone/isoniazid (THI1), tiocarlide (TCR), and viomycin (VIO) \item \code{\link[=betalactams]{betalactams()}} can select: \cr amoxicillin (AMX), amoxicillin/clavulanic acid (AMC), amoxicillin/sulbactam (AXS), ampicillin (AMP), ampicillin/sulbactam (SAM), apalcillin (APL), aspoxicillin (APX), avibactam (AVB), azidocillin (AZD), azlocillin (AZL), aztreonam (ATM), aztreonam/avibactam (AZA), aztreonam/nacubactam (ANC), bacampicillin (BAM), benzathine benzylpenicillin (BNB), benzathine phenoxymethylpenicillin (BNP), benzylpenicillin (PEN), biapenem (BIA), carbenicillin (CRB), carindacillin (CRN), cefacetrile (CAC), cefaclor (CEC), cefadroxil (CFR), cefalexin (LEX), cefaloridine (RID), cefalotin (CEP), cefamandole (MAN), cefapirin (HAP), cefatrizine (CTZ), cefazedone (CZD), cefazolin (CZO), cefcapene (CCP), cefcapene pivoxil (CCX), cefdinir (CDR), cefditoren (DIT), cefditoren pivoxil (DIX), cefepime (FEP), cefepime/clavulanic acid (CPC), cefepime/nacubactam (FNC), cefepime/tazobactam (FPT), cefetamet (CAT), cefetamet pivoxil (CPI), cefetecol (CCL), cefetrizole (CZL), cefiderocol (FDC), cefixime (CFM), cefmenoxime (CMX), cefmetazole (CMZ), cefodizime (DIZ), cefonicid (CID), cefoperazone (CFP), cefoperazone/sulbactam (CSL), ceforanide (CND), cefoselis (CSE), cefotaxime (CTX), cefotaxime/clavulanic acid (CTC), cefotaxime/sulbactam (CTS), cefotetan (CTT), cefotiam (CTF), cefotiam hexetil (CHE), cefovecin (FOV), cefoxitin (FOX), cefoxitin screening (FOX1), cefozopran (ZOP), cefpimizole (CFZ), cefpiramide (CPM), cefpirome (CPO), cefpodoxime (CPD), cefpodoxime proxetil (CPX), cefpodoxime/clavulanic acid (CDC), cefprozil (CPR), cefquinome (CEQ), cefroxadine (CRD), cefsulodin (CFS), cefsumide (CSU), ceftaroline (CPT), ceftaroline/avibactam (CPA), ceftazidime (CAZ), ceftazidime/avibactam (CZA), ceftazidime/clavulanic acid (CCV), cefteram (CEM), cefteram pivoxil (CPL), ceftezole (CTL), ceftibuten (CTB), ceftiofur (TIO), ceftizoxime (CZX), ceftizoxime alapivoxil (CZP), ceftobiprole (BPR), ceftobiprole medocaril (CFM1), ceftolozane/tazobactam (CZT), ceftriaxone (CRO), ceftriaxone/beta-lactamase inhibitor (CEB), cefuroxime (CXM), cefuroxime axetil (CXA), cephradine (CED), ciclacillin (CIC), clometocillin (CLM), cloxacillin (CLO), dicloxacillin (DIC), doripenem (DOR), epicillin (EPC), ertapenem (ETP), flucloxacillin (FLC), hetacillin (HET), imipenem (IPM), imipenem/EDTA (IPE), imipenem/relebactam (IMR), latamoxef (LTM), lenampicillin (LEN), loracarbef (LOR), mecillinam (MEC), meropenem (MEM), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), metampicillin (MTM), meticillin (MET), mezlocillin (MEZ), mezlocillin/sulbactam (MSU), nacubactam (NAC), nafcillin (NAF), oxacillin (OXA), panipenem (PAN), penamecillin (PNM), penicillin/novobiocin (PNO), penicillin/sulbactam (PSU), pheneticillin (PHE), phenoxymethylpenicillin (PHN), piperacillin (PIP), piperacillin/sulbactam (PIS), piperacillin/tazobactam (TZP), piridicillin (PRC), pivampicillin (PVM), pivmecillinam (PME), procaine benzylpenicillin (PRB), propicillin (PRP), razupenem (RZM), ritipenem (RIT), ritipenem acoxil (RIA), sarmoxicillin (SRX), sulbactam (SUL), sulbenicillin (SBC), sultamicillin (SLT6), talampicillin (TAL), tazobactam (TAZ), tebipenem (TBP), temocillin (TEM), ticarcillin (TIC), and ticarcillin/clavulanic acid (TCC) +\item \code{\link[=betalactams_with_inhibitor]{betalactams_with_inhibitor()}} can select: \cr amoxicillin/clavulanic acid (AMC), amoxicillin/sulbactam (AXS), ampicillin/sulbactam (SAM), aztreonam/avibactam (AZA), aztreonam/nacubactam (ANC), cefepime/clavulanic acid (CPC), cefepime/nacubactam (FNC), cefepime/tazobactam (FPT), cefoperazone/sulbactam (CSL), cefotaxime/clavulanic acid (CTC), cefotaxime/sulbactam (CTS), cefpodoxime/clavulanic acid (CDC), ceftaroline/avibactam (CPA), ceftazidime/avibactam (CZA), ceftazidime/clavulanic acid (CCV), ceftolozane/tazobactam (CZT), ceftriaxone/beta-lactamase inhibitor (CEB), imipenem/relebactam (IMR), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), mezlocillin/sulbactam (MSU), penicillin/novobiocin (PNO), penicillin/sulbactam (PSU), piperacillin/sulbactam (PIS), piperacillin/tazobactam (TZP), and ticarcillin/clavulanic acid (TCC) \item \code{\link[=carbapenems]{carbapenems()}} can select: \cr biapenem (BIA), doripenem (DOR), ertapenem (ETP), imipenem (IPM), imipenem/EDTA (IPE), imipenem/relebactam (IMR), meropenem (MEM), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), panipenem (PAN), razupenem (RZM), ritipenem (RIT), ritipenem acoxil (RIA), and tebipenem (TBP) \item \code{\link[=cephalosporins]{cephalosporins()}} can select: \cr cefacetrile (CAC), cefaclor (CEC), cefadroxil (CFR), cefalexin (LEX), cefaloridine (RID), cefalotin (CEP), cefamandole (MAN), cefapirin (HAP), cefatrizine (CTZ), cefazedone (CZD), cefazolin (CZO), cefcapene (CCP), cefcapene pivoxil (CCX), cefdinir (CDR), cefditoren (DIT), cefditoren pivoxil (DIX), cefepime (FEP), cefepime/clavulanic acid (CPC), cefepime/tazobactam (FPT), cefetamet (CAT), cefetamet pivoxil (CPI), cefetecol (CCL), cefetrizole (CZL), cefiderocol (FDC), cefixime (CFM), cefmenoxime (CMX), cefmetazole (CMZ), cefodizime (DIZ), cefonicid (CID), cefoperazone (CFP), cefoperazone/sulbactam (CSL), ceforanide (CND), cefoselis (CSE), cefotaxime (CTX), cefotaxime/clavulanic acid (CTC), cefotaxime/sulbactam (CTS), cefotetan (CTT), cefotiam (CTF), cefotiam hexetil (CHE), cefovecin (FOV), cefoxitin (FOX), cefoxitin screening (FOX1), cefozopran (ZOP), cefpimizole (CFZ), cefpiramide (CPM), cefpirome (CPO), cefpodoxime (CPD), cefpodoxime proxetil (CPX), cefpodoxime/clavulanic acid (CDC), cefprozil (CPR), cefquinome (CEQ), cefroxadine (CRD), cefsulodin (CFS), cefsumide (CSU), ceftaroline (CPT), ceftaroline/avibactam (CPA), ceftazidime (CAZ), ceftazidime/avibactam (CZA), ceftazidime/clavulanic acid (CCV), cefteram (CEM), cefteram pivoxil (CPL), ceftezole (CTL), ceftibuten (CTB), ceftiofur (TIO), ceftizoxime (CZX), ceftizoxime alapivoxil (CZP), ceftobiprole (BPR), ceftobiprole medocaril (CFM1), ceftolozane/tazobactam (CZT), ceftriaxone (CRO), ceftriaxone/beta-lactamase inhibitor (CEB), cefuroxime (CXM), cefuroxime axetil (CXA), cephradine (CED), latamoxef (LTM), and loracarbef (LOR) \item \code{\link[=cephalosporins_1st]{cephalosporins_1st()}} can select: \cr cefacetrile (CAC), cefadroxil (CFR), cefalexin (LEX), cefaloridine (RID), cefalotin (CEP), cefapirin (HAP), cefatrizine (CTZ), cefazedone (CZD), cefazolin (CZO), cefroxadine (CRD), ceftezole (CTL), and cephradine (CED) @@ -2116,102 +2121,88 @@ example_isolates \donttest{ # dplyr ------------------------------------------------------------------- -if (require("dplyr")) { - example_isolates \%>\% select(carbapenems()) -} +library(dplyr, warn.conflicts = FALSE) -if (require("dplyr")) { - # select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB' - example_isolates \%>\% select(mo, aminoglycosides()) -} +example_isolates \%>\% select(carbapenems()) -if (require("dplyr")) { - # select only antibiotic columns with DDDs for oral treatment - example_isolates \%>\% select(administrable_per_os()) -} +# select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB' +example_isolates \%>\% select(mo, aminoglycosides()) -if (require("dplyr")) { - # get AMR for all aminoglycosides e.g., per ward: - example_isolates \%>\% - group_by(ward) \%>\% - summarise(across(aminoglycosides(), - resistance)) -} -if (require("dplyr")) { - # You can combine selectors with '&' to be more specific: - example_isolates \%>\% - select(penicillins() & administrable_per_os()) -} -if (require("dplyr")) { - # get AMR for only drugs that matter - no intrinsic resistance: - example_isolates \%>\% - filter(mo_genus() \%in\% c("Escherichia", "Klebsiella")) \%>\% - group_by(ward) \%>\% - summarise_at(not_intrinsic_resistant(), - resistance) -} -if (require("dplyr")) { - # get susceptibility for antibiotics whose name contains "trim": - example_isolates \%>\% - filter(first_isolate()) \%>\% - group_by(ward) \%>\% - summarise(across(ab_selector(name \%like\% "trim"), susceptibility)) -} -if (require("dplyr")) { - # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem): - example_isolates \%>\% - select(carbapenems()) -} -if (require("dplyr")) { - # this will select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB': - example_isolates \%>\% - select(mo, aminoglycosides()) -} -if (require("dplyr")) { - # any() and all() work in dplyr's filter() too: - example_isolates \%>\% - filter( - any(aminoglycosides() == "R"), - all(cephalosporins_2nd() == "R") - ) -} -if (require("dplyr")) { - # also works with c(): - example_isolates \%>\% - filter(any(c(carbapenems(), aminoglycosides()) == "R")) -} -if (require("dplyr")) { - # not setting any/all will automatically apply all(): - example_isolates \%>\% - filter(aminoglycosides() == "R") -} -if (require("dplyr")) { - # this will select columns 'mo' and all antimycobacterial drugs ('RIF'): - example_isolates \%>\% - select(mo, ab_class("mycobact")) -} -if (require("dplyr")) { - # get bug/drug combinations for only glycopeptides in Gram-positives: - example_isolates \%>\% - filter(mo_is_gram_positive()) \%>\% - select(mo, glycopeptides()) \%>\% - bug_drug_combinations() \%>\% - format() -} -if (require("dplyr")) { - data.frame( - some_column = "some_value", - J01CA01 = "S" - ) \%>\% # ATC code of ampicillin - select(penicillins()) # only the 'J01CA01' column will be selected -} -if (require("dplyr")) { - # with recent versions of dplyr, this is all equal: - x <- example_isolates[carbapenems() == "R", ] - y <- example_isolates \%>\% filter(carbapenems() == "R") - z <- example_isolates \%>\% filter(if_all(carbapenems(), ~ .x == "R")) - identical(x, y) && identical(y, z) -} +# you can combine selectors like you are used with tidyverse +# e.g., for betalactams, but not the ones with an enzyme inhibitor: +example_isolates |> select(betalactams(), -betalactams_with_inhibitor()) + +# select only antibiotic columns with DDDs for oral treatment +example_isolates \%>\% select(administrable_per_os()) + +# get AMR for all aminoglycosides e.g., per ward: +example_isolates \%>\% + group_by(ward) \%>\% + summarise(across(aminoglycosides(), + resistance)) + +# You can combine selectors with '&' to be more specific: +example_isolates \%>\% + select(penicillins() & administrable_per_os()) + +# get AMR for only drugs that matter - no intrinsic resistance: +example_isolates \%>\% + filter(mo_genus() \%in\% c("Escherichia", "Klebsiella")) \%>\% + group_by(ward) \%>\% + summarise_at(not_intrinsic_resistant(), + resistance) + +# get susceptibility for antibiotics whose name contains "trim": +example_isolates \%>\% + filter(first_isolate()) \%>\% + group_by(ward) \%>\% + summarise(across(ab_selector(name \%like\% "trim"), susceptibility)) + +# this will select columns 'IPM' (imipenem) and 'MEM' (meropenem): +example_isolates \%>\% + select(carbapenems()) + +# this will select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB': +example_isolates \%>\% + select(mo, aminoglycosides()) + +# any() and all() work in dplyr's filter() too: +example_isolates \%>\% + filter( + any(aminoglycosides() == "R"), + all(cephalosporins_2nd() == "R") + ) + +# also works with c(): +example_isolates \%>\% + filter(any(c(carbapenems(), aminoglycosides()) == "R")) + +# not setting any/all will automatically apply all(): +example_isolates \%>\% + filter(aminoglycosides() == "R") + +# this will select columns 'mo' and all antimycobacterial drugs ('RIF'): +example_isolates \%>\% + select(mo, ab_class("mycobact")) + +# get bug/drug combinations for only glycopeptides in Gram-positives: +example_isolates \%>\% + filter(mo_is_gram_positive()) \%>\% + select(mo, glycopeptides()) \%>\% + bug_drug_combinations() \%>\% + format() + +data.frame( + some_column = "some_value", + J01CA01 = "S" +) \%>\% # ATC code of ampicillin + select(penicillins()) # only the 'J01CA01' column will be selected + +# with recent versions of dplyr, this is all equal: +x <- example_isolates[carbapenems() == "R", ] +y <- example_isolates \%>\% filter(carbapenems() == "R") +z <- example_isolates \%>\% filter(if_all(carbapenems(), ~ .x == "R")) +identical(x, y) && identical(y, z) # base R ------------------------------------------------------------------ @@ -4291,13 +4282,14 @@ x #> amoxicillin (AMX), ampicillin (AMP), azlocillin (AZL), mezlocillin (MEZ), piperacillin (PIP), piperacillin/tazobactam (TZP) }\if{html}{\out{}} -These 30 antibiotic groups are allowed in the rules (case-insensitive) and can be used in any combination: +These 31 antibiotic groups are allowed in the rules (case-insensitive) and can be used in any combination: \itemize{ \item aminoglycosides\cr(amikacin, amikacin/fosfomycin, apramycin, arbekacin, astromicin, bekanamycin, dibekacin, framycetin, gentamicin, gentamicin-high, habekacin, hygromycin, isepamicin, kanamycin, kanamycin-high, kanamycin/cephalexin, micronomicin, neomycin, netilmicin, pentisomicin, plazomicin, propikacin, ribostamycin, sisomicin, streptoduocin, streptomycin, streptomycin-high, tobramycin, and tobramycin-high) \item aminopenicillins\cr(amoxicillin and ampicillin) \item antifungals\cr(amorolfine, amphotericin B, amphotericin B-high, anidulafungin, butoconazole, caspofungin, ciclopirox, clotrimazole, econazole, fluconazole, flucytosine, fosfluconazole, griseofulvin, hachimycin, ibrexafungerp, isavuconazole, isoconazole, itraconazole, ketoconazole, manogepix, micafungin, miconazole, nystatin, oteseconazole, pimaricin, posaconazole, rezafungin, ribociclib, sulconazole, terbinafine, terconazole, and voriconazole) \item antimycobacterials\cr(4-aminosalicylic acid, calcium aminosalicylate, capreomycin, clofazimine, delamanid, enviomycin, ethambutol, ethambutol/isoniazid, ethionamide, isoniazid, isoniazid/sulfamethoxazole/trimethoprim/pyridoxine, morinamide, p-aminosalicylic acid, pretomanid, protionamide, pyrazinamide, rifabutin, rifampicin, rifampicin/ethambutol/isoniazid, rifampicin/isoniazid, rifampicin/pyrazinamide/ethambutol/isoniazid, rifampicin/pyrazinamide/isoniazid, rifamycin, rifapentine, simvastatin/fenofibrate, sodium aminosalicylate, streptomycin/isoniazid, terizidone, thioacetazone, thioacetazone/isoniazid, tiocarlide, and viomycin) \item betalactams\cr(amoxicillin, amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin, ampicillin/sulbactam, apalcillin, aspoxicillin, avibactam, azidocillin, azlocillin, aztreonam, aztreonam/avibactam, aztreonam/nacubactam, bacampicillin, benzathine benzylpenicillin, benzathine phenoxymethylpenicillin, benzylpenicillin, biapenem, carbenicillin, carindacillin, cefacetrile, cefaclor, cefadroxil, cefalexin, cefaloridine, cefalotin, cefamandole, cefapirin, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/clavulanic acid, cefepime/nacubactam, cefepime/tazobactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefiderocol, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, cefuroxime, cefuroxime axetil, cephradine, ciclacillin, clometocillin, cloxacillin, dicloxacillin, doripenem, epicillin, ertapenem, flucloxacillin, hetacillin, imipenem, imipenem/EDTA, imipenem/relebactam, latamoxef, lenampicillin, loracarbef, mecillinam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, metampicillin, meticillin, mezlocillin, mezlocillin/sulbactam, nacubactam, nafcillin, oxacillin, panipenem, penamecillin, penicillin/novobiocin, penicillin/sulbactam, pheneticillin, phenoxymethylpenicillin, piperacillin, piperacillin/sulbactam, piperacillin/tazobactam, piridicillin, pivampicillin, pivmecillinam, procaine benzylpenicillin, propicillin, razupenem, ritipenem, ritipenem acoxil, sarmoxicillin, sulbactam, sulbenicillin, sultamicillin, talampicillin, tazobactam, tebipenem, temocillin, ticarcillin, and ticarcillin/clavulanic acid) +\item betalactams_with_inhibitor\cr(amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin/sulbactam, aztreonam/avibactam, aztreonam/nacubactam, cefepime/clavulanic acid, cefepime/nacubactam, cefepime/tazobactam, cefoperazone/sulbactam, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefpodoxime/clavulanic acid, ceftaroline/avibactam, ceftazidime/avibactam, ceftazidime/clavulanic acid, ceftolozane/tazobactam, ceftriaxone/beta-lactamase inhibitor, imipenem/relebactam, meropenem/nacubactam, meropenem/vaborbactam, mezlocillin/sulbactam, penicillin/novobiocin, penicillin/sulbactam, piperacillin/sulbactam, piperacillin/tazobactam, and ticarcillin/clavulanic acid) \item carbapenems\cr(biapenem, doripenem, ertapenem, imipenem, imipenem/EDTA, imipenem/relebactam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, panipenem, razupenem, ritipenem, ritipenem acoxil, and tebipenem) \item cephalosporins\cr(cefacetrile, cefaclor, cefadroxil, cefalexin, cefaloridine, cefalotin, cefamandole, cefapirin, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/clavulanic acid, cefepime/tazobactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefiderocol, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, cefuroxime, cefuroxime axetil, cephradine, latamoxef, and loracarbef) \item cephalosporins_1st\cr(cefacetrile, cefadroxil, cefalexin, cefaloridine, cefalotin, cefapirin, cefatrizine, cefazedone, cefazolin, cefroxadine, ceftezole, and cephradine) diff --git a/man/antibiotic_class_selectors.Rd b/man/antibiotic_class_selectors.Rd index 77cc920e..fdb3f0ee 100644 --- a/man/antibiotic_class_selectors.Rd +++ b/man/antibiotic_class_selectors.Rd @@ -9,6 +9,7 @@ \alias{antifungals} \alias{antimycobacterials} \alias{betalactams} +\alias{betalactams_with_inhibitor} \alias{carbapenems} \alias{cephalosporins} \alias{cephalosporins_1st} @@ -50,6 +51,8 @@ antimycobacterials(only_sir_columns = FALSE, ...) betalactams(only_sir_columns = FALSE, only_treatable = TRUE, ...) +betalactams_with_inhibitor(only_sir_columns = FALSE, ...) + carbapenems(only_sir_columns = FALSE, only_treatable = TRUE, ...) cephalosporins(only_sir_columns = FALSE, ...) @@ -149,6 +152,7 @@ The \code{\link[=not_intrinsic_resistant]{not_intrinsic_resistant()}} function c \item \code{\link[=antifungals]{antifungals()}} can select: \cr amorolfine (AMO), amphotericin B (AMB), amphotericin B-high (AMH), anidulafungin (ANI), butoconazole (BUT), caspofungin (CAS), ciclopirox (CIX), clotrimazole (CTR), econazole (ECO), fluconazole (FLU), flucytosine (FCT), fosfluconazole (FFL), griseofulvin (GRI), hachimycin (HCH), ibrexafungerp (IBX), isavuconazole (ISV), isoconazole (ISO), itraconazole (ITR), ketoconazole (KET), manogepix (MGX), micafungin (MIF), miconazole (MCZ), nystatin (NYS), oteseconazole (OTE), pimaricin (PMR), posaconazole (POS), rezafungin (RZF), ribociclib (RBC), sulconazole (SUC), terbinafine (TRB), terconazole (TRC), and voriconazole (VOR) \item \code{\link[=antimycobacterials]{antimycobacterials()}} can select: \cr 4-aminosalicylic acid (AMA), calcium aminosalicylate (CLA), capreomycin (CAP), clofazimine (CLF), delamanid (DLM), enviomycin (ENV), ethambutol (ETH), ethambutol/isoniazid (ETI), ethionamide (ETI1), isoniazid (INH), isoniazid/sulfamethoxazole/trimethoprim/pyridoxine (IST), morinamide (MRN), p-aminosalicylic acid (PAS), pretomanid (PMD), protionamide (PTH), pyrazinamide (PZA), rifabutin (RIB), rifampicin (RIF), rifampicin/ethambutol/isoniazid (REI), rifampicin/isoniazid (RFI), rifampicin/pyrazinamide/ethambutol/isoniazid (RPEI), rifampicin/pyrazinamide/isoniazid (RPI), rifamycin (RFM), rifapentine (RFP), simvastatin/fenofibrate (SMF), sodium aminosalicylate (SDA), streptomycin/isoniazid (STI), terizidone (TRZ), thioacetazone (TAT), thioacetazone/isoniazid (THI1), tiocarlide (TCR), and viomycin (VIO) \item \code{\link[=betalactams]{betalactams()}} can select: \cr amoxicillin (AMX), amoxicillin/clavulanic acid (AMC), amoxicillin/sulbactam (AXS), ampicillin (AMP), ampicillin/sulbactam (SAM), apalcillin (APL), aspoxicillin (APX), avibactam (AVB), azidocillin (AZD), azlocillin (AZL), aztreonam (ATM), aztreonam/avibactam (AZA), aztreonam/nacubactam (ANC), bacampicillin (BAM), benzathine benzylpenicillin (BNB), benzathine phenoxymethylpenicillin (BNP), benzylpenicillin (PEN), biapenem (BIA), carbenicillin (CRB), carindacillin (CRN), cefacetrile (CAC), cefaclor (CEC), cefadroxil (CFR), cefalexin (LEX), cefaloridine (RID), cefalotin (CEP), cefamandole (MAN), cefapirin (HAP), cefatrizine (CTZ), cefazedone (CZD), cefazolin (CZO), cefcapene (CCP), cefcapene pivoxil (CCX), cefdinir (CDR), cefditoren (DIT), cefditoren pivoxil (DIX), cefepime (FEP), cefepime/clavulanic acid (CPC), cefepime/nacubactam (FNC), cefepime/tazobactam (FPT), cefetamet (CAT), cefetamet pivoxil (CPI), cefetecol (CCL), cefetrizole (CZL), cefiderocol (FDC), cefixime (CFM), cefmenoxime (CMX), cefmetazole (CMZ), cefodizime (DIZ), cefonicid (CID), cefoperazone (CFP), cefoperazone/sulbactam (CSL), ceforanide (CND), cefoselis (CSE), cefotaxime (CTX), cefotaxime/clavulanic acid (CTC), cefotaxime/sulbactam (CTS), cefotetan (CTT), cefotiam (CTF), cefotiam hexetil (CHE), cefovecin (FOV), cefoxitin (FOX), cefoxitin screening (FOX1), cefozopran (ZOP), cefpimizole (CFZ), cefpiramide (CPM), cefpirome (CPO), cefpodoxime (CPD), cefpodoxime proxetil (CPX), cefpodoxime/clavulanic acid (CDC), cefprozil (CPR), cefquinome (CEQ), cefroxadine (CRD), cefsulodin (CFS), cefsumide (CSU), ceftaroline (CPT), ceftaroline/avibactam (CPA), ceftazidime (CAZ), ceftazidime/avibactam (CZA), ceftazidime/clavulanic acid (CCV), cefteram (CEM), cefteram pivoxil (CPL), ceftezole (CTL), ceftibuten (CTB), ceftiofur (TIO), ceftizoxime (CZX), ceftizoxime alapivoxil (CZP), ceftobiprole (BPR), ceftobiprole medocaril (CFM1), ceftolozane/tazobactam (CZT), ceftriaxone (CRO), ceftriaxone/beta-lactamase inhibitor (CEB), cefuroxime (CXM), cefuroxime axetil (CXA), cephradine (CED), ciclacillin (CIC), clometocillin (CLM), cloxacillin (CLO), dicloxacillin (DIC), doripenem (DOR), epicillin (EPC), ertapenem (ETP), flucloxacillin (FLC), hetacillin (HET), imipenem (IPM), imipenem/EDTA (IPE), imipenem/relebactam (IMR), latamoxef (LTM), lenampicillin (LEN), loracarbef (LOR), mecillinam (MEC), meropenem (MEM), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), metampicillin (MTM), meticillin (MET), mezlocillin (MEZ), mezlocillin/sulbactam (MSU), nacubactam (NAC), nafcillin (NAF), oxacillin (OXA), panipenem (PAN), penamecillin (PNM), penicillin/novobiocin (PNO), penicillin/sulbactam (PSU), pheneticillin (PHE), phenoxymethylpenicillin (PHN), piperacillin (PIP), piperacillin/sulbactam (PIS), piperacillin/tazobactam (TZP), piridicillin (PRC), pivampicillin (PVM), pivmecillinam (PME), procaine benzylpenicillin (PRB), propicillin (PRP), razupenem (RZM), ritipenem (RIT), ritipenem acoxil (RIA), sarmoxicillin (SRX), sulbactam (SUL), sulbenicillin (SBC), sultamicillin (SLT6), talampicillin (TAL), tazobactam (TAZ), tebipenem (TBP), temocillin (TEM), ticarcillin (TIC), and ticarcillin/clavulanic acid (TCC) +\item \code{\link[=betalactams_with_inhibitor]{betalactams_with_inhibitor()}} can select: \cr amoxicillin/clavulanic acid (AMC), amoxicillin/sulbactam (AXS), ampicillin/sulbactam (SAM), aztreonam/avibactam (AZA), aztreonam/nacubactam (ANC), cefepime/clavulanic acid (CPC), cefepime/nacubactam (FNC), cefepime/tazobactam (FPT), cefoperazone/sulbactam (CSL), cefotaxime/clavulanic acid (CTC), cefotaxime/sulbactam (CTS), cefpodoxime/clavulanic acid (CDC), ceftaroline/avibactam (CPA), ceftazidime/avibactam (CZA), ceftazidime/clavulanic acid (CCV), ceftolozane/tazobactam (CZT), ceftriaxone/beta-lactamase inhibitor (CEB), imipenem/relebactam (IMR), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), mezlocillin/sulbactam (MSU), penicillin/novobiocin (PNO), penicillin/sulbactam (PSU), piperacillin/sulbactam (PIS), piperacillin/tazobactam (TZP), and ticarcillin/clavulanic acid (TCC) \item \code{\link[=carbapenems]{carbapenems()}} can select: \cr biapenem (BIA), doripenem (DOR), ertapenem (ETP), imipenem (IPM), imipenem/EDTA (IPE), imipenem/relebactam (IMR), meropenem (MEM), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), panipenem (PAN), razupenem (RZM), ritipenem (RIT), ritipenem acoxil (RIA), and tebipenem (TBP) \item \code{\link[=cephalosporins]{cephalosporins()}} can select: \cr cefacetrile (CAC), cefaclor (CEC), cefadroxil (CFR), cefalexin (LEX), cefaloridine (RID), cefalotin (CEP), cefamandole (MAN), cefapirin (HAP), cefatrizine (CTZ), cefazedone (CZD), cefazolin (CZO), cefcapene (CCP), cefcapene pivoxil (CCX), cefdinir (CDR), cefditoren (DIT), cefditoren pivoxil (DIX), cefepime (FEP), cefepime/clavulanic acid (CPC), cefepime/tazobactam (FPT), cefetamet (CAT), cefetamet pivoxil (CPI), cefetecol (CCL), cefetrizole (CZL), cefiderocol (FDC), cefixime (CFM), cefmenoxime (CMX), cefmetazole (CMZ), cefodizime (DIZ), cefonicid (CID), cefoperazone (CFP), cefoperazone/sulbactam (CSL), ceforanide (CND), cefoselis (CSE), cefotaxime (CTX), cefotaxime/clavulanic acid (CTC), cefotaxime/sulbactam (CTS), cefotetan (CTT), cefotiam (CTF), cefotiam hexetil (CHE), cefovecin (FOV), cefoxitin (FOX), cefoxitin screening (FOX1), cefozopran (ZOP), cefpimizole (CFZ), cefpiramide (CPM), cefpirome (CPO), cefpodoxime (CPD), cefpodoxime proxetil (CPX), cefpodoxime/clavulanic acid (CDC), cefprozil (CPR), cefquinome (CEQ), cefroxadine (CRD), cefsulodin (CFS), cefsumide (CSU), ceftaroline (CPT), ceftaroline/avibactam (CPA), ceftazidime (CAZ), ceftazidime/avibactam (CZA), ceftazidime/clavulanic acid (CCV), cefteram (CEM), cefteram pivoxil (CPL), ceftezole (CTL), ceftibuten (CTB), ceftiofur (TIO), ceftizoxime (CZX), ceftizoxime alapivoxil (CZP), ceftobiprole (BPR), ceftobiprole medocaril (CFM1), ceftolozane/tazobactam (CZT), ceftriaxone (CRO), ceftriaxone/beta-lactamase inhibitor (CEB), cefuroxime (CXM), cefuroxime axetil (CXA), cephradine (CED), latamoxef (LTM), and loracarbef (LOR) \item \code{\link[=cephalosporins_1st]{cephalosporins_1st()}} can select: \cr cefacetrile (CAC), cefadroxil (CFR), cefalexin (LEX), cefaloridine (RID), cefalotin (CEP), cefapirin (HAP), cefatrizine (CTZ), cefazedone (CZD), cefazolin (CZO), cefroxadine (CRD), ceftezole (CTL), and cephradine (CED) @@ -190,102 +194,88 @@ example_isolates \donttest{ # dplyr ------------------------------------------------------------------- -if (require("dplyr")) { - example_isolates \%>\% select(carbapenems()) -} +library(dplyr, warn.conflicts = FALSE) -if (require("dplyr")) { - # select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB' - example_isolates \%>\% select(mo, aminoglycosides()) -} +example_isolates \%>\% select(carbapenems()) -if (require("dplyr")) { - # select only antibiotic columns with DDDs for oral treatment - example_isolates \%>\% select(administrable_per_os()) -} +# select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB' +example_isolates \%>\% select(mo, aminoglycosides()) -if (require("dplyr")) { - # get AMR for all aminoglycosides e.g., per ward: - example_isolates \%>\% - group_by(ward) \%>\% - summarise(across(aminoglycosides(), - resistance)) -} -if (require("dplyr")) { - # You can combine selectors with '&' to be more specific: - example_isolates \%>\% - select(penicillins() & administrable_per_os()) -} -if (require("dplyr")) { - # get AMR for only drugs that matter - no intrinsic resistance: - example_isolates \%>\% - filter(mo_genus() \%in\% c("Escherichia", "Klebsiella")) \%>\% - group_by(ward) \%>\% - summarise_at(not_intrinsic_resistant(), - resistance) -} -if (require("dplyr")) { - # get susceptibility for antibiotics whose name contains "trim": - example_isolates \%>\% - filter(first_isolate()) \%>\% - group_by(ward) \%>\% - summarise(across(ab_selector(name \%like\% "trim"), susceptibility)) -} -if (require("dplyr")) { - # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem): - example_isolates \%>\% - select(carbapenems()) -} -if (require("dplyr")) { - # this will select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB': - example_isolates \%>\% - select(mo, aminoglycosides()) -} -if (require("dplyr")) { - # any() and all() work in dplyr's filter() too: - example_isolates \%>\% - filter( - any(aminoglycosides() == "R"), - all(cephalosporins_2nd() == "R") - ) -} -if (require("dplyr")) { - # also works with c(): - example_isolates \%>\% - filter(any(c(carbapenems(), aminoglycosides()) == "R")) -} -if (require("dplyr")) { - # not setting any/all will automatically apply all(): - example_isolates \%>\% - filter(aminoglycosides() == "R") -} -if (require("dplyr")) { - # this will select columns 'mo' and all antimycobacterial drugs ('RIF'): - example_isolates \%>\% - select(mo, ab_class("mycobact")) -} -if (require("dplyr")) { - # get bug/drug combinations for only glycopeptides in Gram-positives: - example_isolates \%>\% - filter(mo_is_gram_positive()) \%>\% - select(mo, glycopeptides()) \%>\% - bug_drug_combinations() \%>\% - format() -} -if (require("dplyr")) { - data.frame( - some_column = "some_value", - J01CA01 = "S" - ) \%>\% # ATC code of ampicillin - select(penicillins()) # only the 'J01CA01' column will be selected -} -if (require("dplyr")) { - # with recent versions of dplyr, this is all equal: - x <- example_isolates[carbapenems() == "R", ] - y <- example_isolates \%>\% filter(carbapenems() == "R") - z <- example_isolates \%>\% filter(if_all(carbapenems(), ~ .x == "R")) - identical(x, y) && identical(y, z) -} +# you can combine selectors like you are used with tidyverse +# e.g., for betalactams, but not the ones with an enzyme inhibitor: +example_isolates |> select(betalactams(), -betalactams_with_inhibitor()) + +# select only antibiotic columns with DDDs for oral treatment +example_isolates \%>\% select(administrable_per_os()) + +# get AMR for all aminoglycosides e.g., per ward: +example_isolates \%>\% + group_by(ward) \%>\% + summarise(across(aminoglycosides(), + resistance)) + +# You can combine selectors with '&' to be more specific: +example_isolates \%>\% + select(penicillins() & administrable_per_os()) + +# get AMR for only drugs that matter - no intrinsic resistance: +example_isolates \%>\% + filter(mo_genus() \%in\% c("Escherichia", "Klebsiella")) \%>\% + group_by(ward) \%>\% + summarise_at(not_intrinsic_resistant(), + resistance) + +# get susceptibility for antibiotics whose name contains "trim": +example_isolates \%>\% + filter(first_isolate()) \%>\% + group_by(ward) \%>\% + summarise(across(ab_selector(name \%like\% "trim"), susceptibility)) + +# this will select columns 'IPM' (imipenem) and 'MEM' (meropenem): +example_isolates \%>\% + select(carbapenems()) + +# this will select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB': +example_isolates \%>\% + select(mo, aminoglycosides()) + +# any() and all() work in dplyr's filter() too: +example_isolates \%>\% + filter( + any(aminoglycosides() == "R"), + all(cephalosporins_2nd() == "R") + ) + +# also works with c(): +example_isolates \%>\% + filter(any(c(carbapenems(), aminoglycosides()) == "R")) + +# not setting any/all will automatically apply all(): +example_isolates \%>\% + filter(aminoglycosides() == "R") + +# this will select columns 'mo' and all antimycobacterial drugs ('RIF'): +example_isolates \%>\% + select(mo, ab_class("mycobact")) + +# get bug/drug combinations for only glycopeptides in Gram-positives: +example_isolates \%>\% + filter(mo_is_gram_positive()) \%>\% + select(mo, glycopeptides()) \%>\% + bug_drug_combinations() \%>\% + format() + +data.frame( + some_column = "some_value", + J01CA01 = "S" +) \%>\% # ATC code of ampicillin + select(penicillins()) # only the 'J01CA01' column will be selected + +# with recent versions of dplyr, this is all equal: +x <- example_isolates[carbapenems() == "R", ] +y <- example_isolates \%>\% filter(carbapenems() == "R") +z <- example_isolates \%>\% filter(if_all(carbapenems(), ~ .x == "R")) +identical(x, y) && identical(y, z) # base R ------------------------------------------------------------------ diff --git a/man/custom_eucast_rules.Rd b/man/custom_eucast_rules.Rd index af7b5072..3260f1b7 100644 --- a/man/custom_eucast_rules.Rd +++ b/man/custom_eucast_rules.Rd @@ -86,13 +86,14 @@ x #> amoxicillin (AMX), ampicillin (AMP), azlocillin (AZL), mezlocillin (MEZ), piperacillin (PIP), piperacillin/tazobactam (TZP) }\if{html}{\out{}} -These 30 antibiotic groups are allowed in the rules (case-insensitive) and can be used in any combination: +These 31 antibiotic groups are allowed in the rules (case-insensitive) and can be used in any combination: \itemize{ \item aminoglycosides\cr(amikacin, amikacin/fosfomycin, apramycin, arbekacin, astromicin, bekanamycin, dibekacin, framycetin, gentamicin, gentamicin-high, habekacin, hygromycin, isepamicin, kanamycin, kanamycin-high, kanamycin/cephalexin, micronomicin, neomycin, netilmicin, pentisomicin, plazomicin, propikacin, ribostamycin, sisomicin, streptoduocin, streptomycin, streptomycin-high, tobramycin, and tobramycin-high) \item aminopenicillins\cr(amoxicillin and ampicillin) \item antifungals\cr(amorolfine, amphotericin B, amphotericin B-high, anidulafungin, butoconazole, caspofungin, ciclopirox, clotrimazole, econazole, fluconazole, flucytosine, fosfluconazole, griseofulvin, hachimycin, ibrexafungerp, isavuconazole, isoconazole, itraconazole, ketoconazole, manogepix, micafungin, miconazole, nystatin, oteseconazole, pimaricin, posaconazole, rezafungin, ribociclib, sulconazole, terbinafine, terconazole, and voriconazole) \item antimycobacterials\cr(4-aminosalicylic acid, calcium aminosalicylate, capreomycin, clofazimine, delamanid, enviomycin, ethambutol, ethambutol/isoniazid, ethionamide, isoniazid, isoniazid/sulfamethoxazole/trimethoprim/pyridoxine, morinamide, p-aminosalicylic acid, pretomanid, protionamide, pyrazinamide, rifabutin, rifampicin, rifampicin/ethambutol/isoniazid, rifampicin/isoniazid, rifampicin/pyrazinamide/ethambutol/isoniazid, rifampicin/pyrazinamide/isoniazid, rifamycin, rifapentine, simvastatin/fenofibrate, sodium aminosalicylate, streptomycin/isoniazid, terizidone, thioacetazone, thioacetazone/isoniazid, tiocarlide, and viomycin) \item betalactams\cr(amoxicillin, amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin, ampicillin/sulbactam, apalcillin, aspoxicillin, avibactam, azidocillin, azlocillin, aztreonam, aztreonam/avibactam, aztreonam/nacubactam, bacampicillin, benzathine benzylpenicillin, benzathine phenoxymethylpenicillin, benzylpenicillin, biapenem, carbenicillin, carindacillin, cefacetrile, cefaclor, cefadroxil, cefalexin, cefaloridine, cefalotin, cefamandole, cefapirin, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/clavulanic acid, cefepime/nacubactam, cefepime/tazobactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefiderocol, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, cefuroxime, cefuroxime axetil, cephradine, ciclacillin, clometocillin, cloxacillin, dicloxacillin, doripenem, epicillin, ertapenem, flucloxacillin, hetacillin, imipenem, imipenem/EDTA, imipenem/relebactam, latamoxef, lenampicillin, loracarbef, mecillinam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, metampicillin, meticillin, mezlocillin, mezlocillin/sulbactam, nacubactam, nafcillin, oxacillin, panipenem, penamecillin, penicillin/novobiocin, penicillin/sulbactam, pheneticillin, phenoxymethylpenicillin, piperacillin, piperacillin/sulbactam, piperacillin/tazobactam, piridicillin, pivampicillin, pivmecillinam, procaine benzylpenicillin, propicillin, razupenem, ritipenem, ritipenem acoxil, sarmoxicillin, sulbactam, sulbenicillin, sultamicillin, talampicillin, tazobactam, tebipenem, temocillin, ticarcillin, and ticarcillin/clavulanic acid) +\item betalactams_with_inhibitor\cr(amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin/sulbactam, aztreonam/avibactam, aztreonam/nacubactam, cefepime/clavulanic acid, cefepime/nacubactam, cefepime/tazobactam, cefoperazone/sulbactam, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefpodoxime/clavulanic acid, ceftaroline/avibactam, ceftazidime/avibactam, ceftazidime/clavulanic acid, ceftolozane/tazobactam, ceftriaxone/beta-lactamase inhibitor, imipenem/relebactam, meropenem/nacubactam, meropenem/vaborbactam, mezlocillin/sulbactam, penicillin/novobiocin, penicillin/sulbactam, piperacillin/sulbactam, piperacillin/tazobactam, and ticarcillin/clavulanic acid) \item carbapenems\cr(biapenem, doripenem, ertapenem, imipenem, imipenem/EDTA, imipenem/relebactam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, panipenem, razupenem, ritipenem, ritipenem acoxil, and tebipenem) \item cephalosporins\cr(cefacetrile, cefaclor, cefadroxil, cefalexin, cefaloridine, cefalotin, cefamandole, cefapirin, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/clavulanic acid, cefepime/tazobactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefiderocol, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, cefuroxime, cefuroxime axetil, cephradine, latamoxef, and loracarbef) \item cephalosporins_1st\cr(cefacetrile, cefadroxil, cefalexin, cefaloridine, cefalotin, cefapirin, cefatrizine, cefazedone, cefazolin, cefroxadine, ceftezole, and cephradine)