mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 13:01:59 +02:00
(v2.1.1.9159) new approach as.ab()
This commit is contained in:
@ -27,20 +27,22 @@
|
||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
ab_reset_session()
|
||||
|
||||
expect_identical(
|
||||
ab_from_text("28/03/2020 regular amoxicilliin 500mg po tds")[[1]],
|
||||
ab_from_text("28/03/2020 amoxicilliin 500mg po tds")[[1]],
|
||||
as.ab("Amoxicillin")
|
||||
)
|
||||
expect_identical(
|
||||
ab_from_text("28/03/2020 regular amoxicilliin 500mg po tds", thorough_search = TRUE)[[1]],
|
||||
ab_from_text("28/03/2020 amoxicilliin 500mg po tds", thorough_search = TRUE)[[1]],
|
||||
as.ab("Amoxicillin")
|
||||
)
|
||||
expect_identical(
|
||||
ab_from_text("28/03/2020 regular amoxicilliin 500mg po tds", thorough_search = FALSE)[[1]],
|
||||
ab_from_text("28/03/2020 amoxicilliin 500mg po tds", thorough_search = FALSE)[[1]],
|
||||
as.ab("Amoxicillin")
|
||||
)
|
||||
expect_identical(
|
||||
ab_from_text("28/03/2020 regular amoxicilliin 500mg po tds", translate_ab = TRUE)[[1]],
|
||||
ab_from_text("28/03/2020 amoxicilliin 500mg po tds", translate_ab = TRUE)[[1]],
|
||||
"Amoxicillin"
|
||||
)
|
||||
expect_identical(
|
||||
@ -49,10 +51,10 @@ expect_identical(
|
||||
)
|
||||
|
||||
expect_identical(
|
||||
ab_from_text("28/03/2020 regular amoxicilliin 500mg po tds", type = "dose")[[1]],
|
||||
ab_from_text("28/03/2020 amoxicilliin 500mg po tds", type = "dose")[[1]],
|
||||
500
|
||||
)
|
||||
expect_identical(
|
||||
ab_from_text("28/03/2020 regular amoxicilliin 500mg po tds", type = "admin")[[1]],
|
||||
ab_from_text("28/03/2020 amoxicilliin 500mg po tds", type = "admin")[[1]],
|
||||
"oral"
|
||||
)
|
||||
|
Reference in New Issue
Block a user