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)
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 |
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
# \donttest{ data("hospital_actlog") detect_incomplete_cases(activitylog = hospital_actlog, activities = c("Registration","Triage","Clinical exam","Treatment","Treatment evaluation"))#>#>#>#>#>#> # 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# }