R/detect_incorrect_activity_names.R
detect_incorrect_activity_names.Rd
Function returning the incorrect activity labels in the log as indicated by the user. If details are requested, the entire activity log's rows containing incorrect activities are returned.
detect_incorrect_activity_names( activitylog, allowed_activities, details, filter_condition )
activitylog | The activity log |
---|---|
allowed_activities | Vector with correct activity labels. If NULL, user input will be asked. |
details | Boolean indicating wheter details of the results need to be shown |
filter_condition | Condition that is used to extract a subset of the activity log prior to the application of the function |
activitylog containing the rows of the original activity log having incorrect activity labels
# \donttest{ data("hospital_actlog") detect_incorrect_activity_names(activitylog = hospital_actlog, allowed_activities = c( "Registration", "Triage", "Clinical exam", "Treatment", "Treatment evaluation"))#>#>#>#>#>#> # A tibble: 4 x 7 #> patient_visit_nr activity originator start complete #> <dbl> <chr> <chr> <dttm> <dttm> #> 1 510 registr~ Clerk 9 2017-11-20 10:18:17 2017-11-20 10:20:06 #> 2 520 Trage Nurse 17 2017-11-21 13:43:16 2017-11-21 13:39:00 #> 3 522 Triaga Nurse 5 2017-11-21 15:15:25 2017-11-21 15:18:04 #> 4 533 0 NA 2017-11-22 18:35:00 2017-11-22 18:37:00 #> # ... with 2 more variables: triagecode <dbl>, specialization <chr># }