Function detecting incomplete cases in terms of the activities that need to be recorded for a case. The function only checks the presence of activities, not the completeness of the rows describing the activity executions.

detect_incomplete_cases(activitylog, activities, details, filter_condition)

Arguments

activitylog

The activity log

activities

A vector of activity names which should be present for a case

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 the traces (i.e. the activities executed for a particular case) in which the specified activities are not present, together with its occurrence frequency and cases having this trace

Examples

# \donttest{ data("hospital_actlog") detect_incomplete_cases(activitylog = hospital_actlog, activities = c("Registration","Triage","Clinical exam","Treatment","Treatment evaluation"))
#> *** OUTPUT ***
#> It was checked whether the activities Clinical exam, Registration, Treatment, Treatment evaluation, Triage are present for cases.
#> These activities are present for 4 (39.62%) of the cases and are not present for 18 (60.38%) of the cases.
#> Note: this function only checks the presence of activities for a particular case, not the completeness of these entries in the activity log or the order of activities.
#> For cases for which the aforementioned activities are not all present, the following activities are recorded (ordered by decreasing frequeny of occurrence):
#> # A tibble: 9 x 3 #> activity n case_ids #> <chr> <int> <chr> #> 1 Triage 11 510 - 512 - 517 - 521 - 524 - 525 - 526 - 527 - 528 ~ #> 2 Registration 9 512 - 518 - 518 - 518 - 521 - 522 - 527 - 528 - 534 #> 3 Clinical exam 5 512 - 510 - 527 - 528 - 512 #> 4 Treatment evaluat~ 2 529 - 532 #> 5 0 1 533 #> 6 registration 1 510 #> 7 Trage 1 520 #> 8 Treatment 1 532 #> 9 Triaga 1 522
# }