Function that detects activity frequency anomalies per case

detect_activity_frequency_violations(
  activitylog,
  ...,
  details,
  filter_condition
)

Arguments

activitylog

The activity log

...

Named vectors with name of the activity, and value of the threshold.

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

Value

tbl_df providing an overview of cases for which activities are executed too many times

Examples

# \donttest{ data("hospital_actlog") detect_activity_frequency_violations(activitylog = hospital_actlog, "Registration" = 1, "Clinical exam" = 1)
#> *** OUTPUT ***
#> For 3 cases in the activity log (13.6363636363636%) an anomaly is detected.
#> The anomalies are spread over the following cases:
#> # A tibble: 3 x 3 #> patient_visit_nr activity n #> <dbl> <chr> <int> #> 1 518 Registration 3 #> 2 512 Clinical exam 2 #> 3 535 Registration 2
# }