mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 13:21:50 +02:00
(v0.9.0.9016) Support SNOMED codes
This commit is contained in:
@ -38,6 +38,7 @@ test_that("as.mo works", {
|
||||
expect_equal(as.character(as.mo("Escherichia coli")), "B_ESCHR_COLI")
|
||||
expect_equal(as.character(as.mo("Escherichia coli")), "B_ESCHR_COLI")
|
||||
expect_equal(as.character(as.mo(22242416)), "B_ESCHR_COLI")
|
||||
expect_equal(as.character(as.mo(112283007)), "B_ESCHR_COLI")
|
||||
expect_equal(as.character(as.mo("Escherichia species")), "B_ESCHR")
|
||||
expect_equal(as.character(as.mo("Escherichia")), "B_ESCHR")
|
||||
expect_equal(as.character(as.mo("Esch spp.")), "B_ESCHR")
|
||||
@ -240,7 +241,7 @@ test_that("as.mo works", {
|
||||
expect_output(print(mo_uncertainties()))
|
||||
|
||||
# Salmonella (City) are all actually Salmonella enterica spp (City)
|
||||
expect_equal(mo_name(c("Salmonella Goettingen", "Salmonella Typhimurium", "Salmonella Group A")),
|
||||
expect_equal(suppressWarnings(mo_name(c("Salmonella Goettingen", "Salmonella Typhimurium", "Salmonella Group A"))),
|
||||
c("Salmonella enterica", "Salmonella typhimurium", "Salmonella"))
|
||||
|
||||
# no virusses
|
||||
|
@ -93,6 +93,9 @@ test_that("mo_property works", {
|
||||
expect_identical(suppressWarnings(mo_ref("Chlamydia psittaci")), "Page, 1968")
|
||||
expect_identical(mo_ref("Chlamydophila psittaci"), "Everett et al., 1999")
|
||||
|
||||
expect_equal(mo_snomed("Escherichia coli"),
|
||||
c(112283007, 116395006, 116396007, 103429008, 83285000, 116394005, 407166006, 457914007))
|
||||
|
||||
# old codes must throw a warning in mo_* family
|
||||
expect_warning(mo_name(c("B_ESCHR_COL", "B_STPHY_AUR")))
|
||||
|
||||
|
Reference in New Issue
Block a user