mirror of
https://github.com/msberends/AMR.git
synced 2025-06-07 19:14:01 +02:00
(v2.1.1.9277) mdro fix
This commit is contained in:
parent
4b171745de
commit
b8d7c8af7f
@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 2.1.1.9276
|
||||
Version: 2.1.1.9277
|
||||
Date: 2025-05-15
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
|
2
NEWS.md
2
NEWS.md
@ -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).)*
|
||||
|
||||
|
19
R/mdro.R
19
R/mdro.R
@ -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}
|
||||
#'
|
||||
#' * `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))
|
||||
#'
|
||||
@ -220,8 +220,10 @@ mdro <- function(x = NULL,
|
||||
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)))) {
|
||||
stop_("There were no possible SIR columns found in the data set. Transform columns with `as.sir()` for valid antimicrobial interpretations.")
|
||||
if (isTRUE(only_sir_columns) && !any(is.sir(x))) {
|
||||
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
|
||||
@ -382,14 +384,15 @@ mdro <- function(x = NULL,
|
||||
# turn into latest EUCAST guideline
|
||||
guideline <- "eucast3.3"
|
||||
}
|
||||
if (guideline == "nl") {
|
||||
guideline <- "brmo"
|
||||
if (guideline %in% c("nl", "brmo")) {
|
||||
# turn into latest BRMO guideline
|
||||
guideline <- "brmo2024"
|
||||
}
|
||||
if (guideline == "de") {
|
||||
guideline <- "mrgn"
|
||||
}
|
||||
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
|
||||
)
|
||||
guideline <- list(code = guideline)
|
||||
@ -447,7 +450,7 @@ mdro <- function(x = NULL,
|
||||
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$type <- "MRGNs"
|
||||
} else if (guideline$code == "brmo") {
|
||||
} else if (guideline$code == "brmo2024") {
|
||||
combine_SI <- TRUE # I must not be considered resistant
|
||||
guideline$name <- "Bijzonder Resistente Micro-organismen (BRMO)"
|
||||
guideline$author <- "Samenwerkingsverband Richtlijnen Infectiepreventie (SRI)"
|
||||
@ -1520,7 +1523,7 @@ mdro <- function(x = NULL,
|
||||
x[which(x$MDRO == 3), "reason"] <- "4MRGN"
|
||||
}
|
||||
|
||||
if (guideline$code == "brmo") {
|
||||
if (guideline$code == "brmo2024") {
|
||||
# Netherlands 2024 --------------------------------------------------------
|
||||
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
|
||||
|
@ -118,7 +118,7 @@ The international guideline for multi-drug resistant tuberculosis - World Health
|
||||
\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}
|
||||
\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})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user