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

(v2.1.1.9241) fix sir

This commit is contained in:
2025-04-18 13:25:59 +02:00
parent cf91e677c6
commit 579025f678
9 changed files with 143 additions and 89 deletions

View File

@ -126,6 +126,12 @@ test_that("test-sir.R", {
# Human -------------------------------------------------------------------
# allow for guideline length > 1
expect_equal(
get_guideline(c("CLSI", "CLSI", "CLSI2023", "EUCAST", "EUCAST2020"), AMR::clinical_breakpoints),
c("CLSI 2024", "CLSI 2024", "CLSI 2023", "EUCAST 2024", "EUCAST 2020")
)
# these are used in the script
expect_true(all(c("B_GRAMN", "B_GRAMP", "B_ANAER-NEG", "B_ANAER-POS", "B_ANAER") %in% AMR::microorganisms$mo))
@ -341,6 +347,12 @@ test_that("test-sir.R", {
# Veterinary --------------------------------------------------------------
# multiple guidelines
sir_history <- sir_interpretation_history(clean = TRUE)
x <- as.sir(as.mic(c(16, 16)), mo = "B_STRPT_CANS", ab = "AMK", host = "dog", guideline = c("CLSI 2024", "CLSI 2014"))
expect_equal(x, as.sir(c("R", NA)))
sir_history <- sir_interpretation_history(clean = TRUE)
expect_equal(sir_history$guideline, c("CLSI 2024", "CLSI 2014"))
sir_history <- sir_interpretation_history(clean = TRUE)
mics <- as.mic(2^c(-4:6)) # 0.0625 to 64 in factors of 2