mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 02:20:49 +01:00
(v3.0.1.9147) Keep EUCAST blocking rows for infections other than UTI where EUCAST only gives a UTI breakpoint, e.g. breakpoints in brackets for aminoglycosides in Acinetobacter, and let as.sir() with unknown uti consistently prefer non-UTI breakpoints, use UTI breakpoints only if no others exist and note this in sir_interpretation_history() every time
The pruning of blocking rows in the EUCAST reproduction script now compares UTI status too, and the script is fixed for the renamed column of the as.ab() coercion cache. In clinical_breakpoints, only the blocking rows were replaced (356 organism/agent/method combinations newly blocked, none unblocked); other changes of a full rebuild, caused by taxonomy updates in the WHONET-based rows, are not included.
This commit is contained in:
1 parent
d69e7fa740
commit
fcfaa87f5d
16 files changed
+2002
-845
No files matched your search
@@ -640,9 +640,9 @@ test_that("custom reference_data: host = NA acts as host-agnostic fallback", {
|
||||
|
||||
test_that("EUCAST blocking rows prevent falling back to broader breakpoints", {
|
||||
skip_on_cran()
|
||||
sir <- function(x, mo, ab, guideline, include_screening = FALSE) {
|
||||
sir <- function(x, mo, ab, guideline, include_screening = FALSE, uti = NA) {
|
||||
as.character(suppressMessages(suppressWarnings(
|
||||
as.sir(x, mo = mo, ab = ab, guideline = guideline, include_screening = include_screening)
|
||||
as.sir(x, mo = mo, ab = ab, guideline = guideline, include_screening = include_screening, uti = uti)
|
||||
)))
|
||||
}
|
||||
# IE for V. fluvialis, while Vibrio spp. has breakpoints
|
||||
@@ -678,4 +678,21 @@ test_that("EUCAST blocking rows prevent falling back to broader breakpoints", {
|
||||
expect_identical(sir(as.mic(0.064), "Haemophilus influenzae", "LVX", "EUCAST 2026"), "S")
|
||||
# high-level gentamicin resistance (screening test given in the notes)
|
||||
expect_identical(sir(as.mic(256), "Enterococcus faecium", "GEH", "EUCAST 2026"), "R")
|
||||
# breakpoints in brackets for systemic infections are not replaced by the UTI breakpoint if uti is unknown
|
||||
expect_identical(sir(as.mic(4), "Acinetobacter baumannii", "AMK", "EUCAST 2026"), NA_character_)
|
||||
expect_identical(sir(as.mic(4), "Acinetobacter baumannii", "AMK", "EUCAST 2026", uti = FALSE), NA_character_)
|
||||
expect_identical(sir(as.mic(4), "Acinetobacter baumannii", "AMK", "EUCAST 2026", uti = TRUE), "S")
|
||||
# UTI breakpoints are only used for unknown uti if there are no non-UTI breakpoints, which is noted every time
|
||||
for (i in 1:2) {
|
||||
sir_interpretation_history(clean = TRUE)
|
||||
expect_identical(sir(as.mic(16), "Escherichia coli", "NTR", "EUCAST 2026"), "S")
|
||||
sir_history <- sir_interpretation_history(clean = TRUE)
|
||||
expect_match(sir_history$notes, "only available for (uncomplicated) urinary tract infections", fixed = TRUE)
|
||||
}
|
||||
expect_identical(sir(as.mic(16), "Escherichia coli", "NTR", "EUCAST 2026", uti = FALSE), NA_character_)
|
||||
# the blocking row of Enterobacterales does not override the UTI breakpoint for E. coli itself
|
||||
expect_identical(sir(as.mic(2), "Escherichia coli", "CZO", "EUCAST 2026"), "I")
|
||||
# with UTI and non-UTI breakpoints, unknown uti takes the non-UTI breakpoint
|
||||
expect_identical(sir(as.mic(c(2, 8, 32)), "Escherichia coli", "CZO", "CLSI 2025"), c("S", "R", "R"))
|
||||
expect_identical(sir(as.mic(c(2, 8, 32)), "Escherichia coli", "CZO", "CLSI 2025", uti = TRUE), c("S", "S", "R"))
|
||||
})
|
||||
Reference in new issue
Block a user