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

(v2.1.1.9277) mdro fix

This commit is contained in:
2025-05-15 13:07:47 +02:00
parent 4b171745de
commit b8d7c8af7f
4 changed files with 25 additions and 22 deletions

View File

@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 2.1.1.9276 Version: 2.1.1.9277
Date: 2025-05-15 Date: 2025-05-15
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR) Description: Functions to simplify and standardise antimicrobial resistance (AMR)

View File

@ -1,4 +1,4 @@
# AMR 2.1.1.9276 # AMR 2.1.1.9277
*(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://amr-for-r.org/#get-this-package).)* *(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://amr-for-r.org/#get-this-package).)*

View File

@ -80,7 +80,7 @@
#' #'
#' The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7; \doi{10.1186/s13756-015-0047-6} #' The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7; \doi{10.1186/s13756-015-0047-6}
#' #'
#' * `guideline = "BRMO"` #' * `guideline = "BRMO 2024"` (or simply `guideline = "BRMO"`)
#' #'
#' The Dutch national guideline - Samenwerkingverband Richtlijnen Infectiepreventie (SRI) (2024) "Bijzonder Resistente Micro-Organismen (BRMO)" ([link](https://www.sri-richtlijnen.nl/brmo)) #' The Dutch national guideline - Samenwerkingverband Richtlijnen Infectiepreventie (SRI) (2024) "Bijzonder Resistente Micro-Organismen (BRMO)" ([link](https://www.sri-richtlijnen.nl/brmo))
#' #'
@ -220,8 +220,10 @@ mdro <- function(x = NULL,
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1) meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
if (!isTRUE(only_sir_columns) && (!any(is.sir(x)) || !any(is_sir_eligible(x)))) { if (isTRUE(only_sir_columns) && !any(is.sir(x))) {
stop_("There were no possible SIR columns found in the data set. Transform columns with `as.sir()` for valid antimicrobial interpretations.") stop_("There were no SIR columns found in the data set, despite `only_sir_columns` being `TRUE`. Transform columns with `as.sir()` for valid antimicrobial interpretations.")
} else if (!isTRUE(only_sir_columns) && !any(is.sir(x)) && !any(is_sir_eligible(x))) {
stop_("There were no eligible SIR columns found in the data set. Transform columns with `as.sir()` for valid antimicrobial interpretations.")
} }
# get gene values as TRUE/FALSE # get gene values as TRUE/FALSE
@ -382,14 +384,15 @@ mdro <- function(x = NULL,
# turn into latest EUCAST guideline # turn into latest EUCAST guideline
guideline <- "eucast3.3" guideline <- "eucast3.3"
} }
if (guideline == "nl") { if (guideline %in% c("nl", "brmo")) {
guideline <- "brmo" # turn into latest BRMO guideline
guideline <- "brmo2024"
} }
if (guideline == "de") { if (guideline == "de") {
guideline <- "mrgn" guideline <- "mrgn"
} }
stop_ifnot( stop_ifnot(
guideline %in% c("brmo", "mrgn", "eucast3.1", "eucast3.2", "eucast3.3", "tb", "cmi2012"), guideline %in% c("brmo2017", "brmo2024", "mrgn", "eucast3.1", "eucast3.2", "eucast3.3", "tb", "cmi2012"),
"invalid guideline: ", guideline.bak "invalid guideline: ", guideline.bak
) )
guideline <- list(code = guideline) guideline <- list(code = guideline)
@ -447,7 +450,7 @@ mdro <- function(x = NULL,
guideline$version <- NA_character_ guideline$version <- NA_character_
guideline$source_url <- paste0("Antimicrobial Resistance and Infection Control 4:7, 2015; ", font_url("https://doi.org/10.1186/s13756-015-0047-6", "doi: 10.1186/s13756-015-0047-6")) guideline$source_url <- paste0("Antimicrobial Resistance and Infection Control 4:7, 2015; ", font_url("https://doi.org/10.1186/s13756-015-0047-6", "doi: 10.1186/s13756-015-0047-6"))
guideline$type <- "MRGNs" guideline$type <- "MRGNs"
} else if (guideline$code == "brmo") { } else if (guideline$code == "brmo2024") {
combine_SI <- TRUE # I must not be considered resistant combine_SI <- TRUE # I must not be considered resistant
guideline$name <- "Bijzonder Resistente Micro-organismen (BRMO)" guideline$name <- "Bijzonder Resistente Micro-organismen (BRMO)"
guideline$author <- "Samenwerkingsverband Richtlijnen Infectiepreventie (SRI)" guideline$author <- "Samenwerkingsverband Richtlijnen Infectiepreventie (SRI)"
@ -1520,7 +1523,7 @@ mdro <- function(x = NULL,
x[which(x$MDRO == 3), "reason"] <- "4MRGN" x[which(x$MDRO == 3), "reason"] <- "4MRGN"
} }
if (guideline$code == "brmo") { if (guideline$code == "brmo2024") {
# Netherlands 2024 -------------------------------------------------------- # Netherlands 2024 --------------------------------------------------------
aminoglycosides <- c(GEN, TOB, AMK) # note 4: gentamicin or tobramycin or amikacin aminoglycosides <- c(GEN, TOB, AMK) # note 4: gentamicin or tobramycin or amikacin
aminoglycosides_serratia_marcescens <- GEN # note 4: TOB and AMK do not count towards S. marcescens aminoglycosides_serratia_marcescens <- GEN # note 4: TOB and AMK do not count towards S. marcescens

View File

@ -118,7 +118,7 @@ The international guideline for multi-drug resistant tuberculosis - World Health
\item \code{guideline = "MRGN"} \item \code{guideline = "MRGN"}
The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7; \doi{10.1186/s13756-015-0047-6} The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7; \doi{10.1186/s13756-015-0047-6}
\item \code{guideline = "BRMO"} \item \code{guideline = "BRMO 2024"} (or simply \code{guideline = "BRMO"})
The Dutch national guideline - Samenwerkingverband Richtlijnen Infectiepreventie (SRI) (2024) "Bijzonder Resistente Micro-Organismen (BRMO)" (\href{https://www.sri-richtlijnen.nl/brmo}{link}) The Dutch national guideline - Samenwerkingverband Richtlijnen Infectiepreventie (SRI) (2024) "Bijzonder Resistente Micro-Organismen (BRMO)" (\href{https://www.sri-richtlijnen.nl/brmo}{link})