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

freq update

This commit is contained in:
2019-01-29 20:20:09 +01:00
parent 6aae206320
commit 3efb54d016
110 changed files with 1240 additions and 531 deletions

View File

@ -206,7 +206,14 @@ first_isolate <- function(tbl,
# -- patient id
if (is.null(col_patient_id)) {
if (all(c("First name", "Last name", "Sex", "Identification number") %in% colnames(tbl))) {
# WHONET support
tbl <- tbl %>% mutate(patient_id = paste(`First name`, `Last name`, Sex))
col_patient_id <- "patient_id"
message(blue(paste0("NOTE: Using combined columns ", bold("`First name`, `Last name` and `Sex`"), " as input for `col_patient_id`.")))
} else {
col_patient_id <- search_type_in_df(tbl = tbl, type = "patient_id")
}
}
if (is.null(col_patient_id)) {
stop("`col_patient_id` must be set.", call. = FALSE)