1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-12 11:01:52 +02:00

(v0.7.1.9005) new rsi calculations, atc class removal

This commit is contained in:
2019-07-01 14:03:15 +02:00
parent 65c6702b21
commit 156d550895
78 changed files with 1169 additions and 911 deletions

View File

@ -33,20 +33,22 @@ test_that("counts work", {
library(dplyr)
expect_equal(septic_patients %>% count_S(AMC), 1342)
expect_equal(septic_patients %>% count_S(AMC, GEN), 1660)
expect_equal(septic_patients %>% count_all(AMC, GEN), 1798)
expect_identical(septic_patients %>% count_all(AMC, GEN),
septic_patients %>% count_S(AMC, GEN) +
septic_patients %>% count_IR(AMC, GEN))
expect_equal(septic_patients %>% count_S(AMC, GEN, only_all_tested = TRUE), 1660)
expect_equal(septic_patients %>% count_S(AMC, GEN, only_all_tested = FALSE), 1728)
expect_equal(septic_patients %>% count_all(AMC, GEN, only_all_tested = TRUE), 1798)
expect_equal(septic_patients %>% count_all(AMC, GEN, only_all_tested = FALSE), 1936)
expect_identical(septic_patients %>% count_all(AMC, GEN, only_all_tested = TRUE),
septic_patients %>% count_S(AMC, GEN, only_all_tested = TRUE) +
septic_patients %>% count_IR(AMC, GEN, only_all_tested = TRUE))
# count of cases
expect_equal(septic_patients %>%
group_by(hospital_id) %>%
summarise(cipro = count_S(CIP),
genta = count_S(GEN),
combination = count_S(CIP, GEN)) %>%
summarise(cipro = count_SI(CIP),
genta = count_SI(GEN),
combination = count_SI(CIP, GEN)) %>%
pull(combination),
c(192, 446, 184, 474))
c(253, 465, 192, 558))
# count_df
expect_equal(