Function detecting multi-registration for the same case or by the same resource at the same point in time

detect_multiregistration(
  activitylog,
  level_of_aggregation,
  timestamp,
  threshold_in_seconds,
  details,
  filter_condition
)

Arguments

activitylog

The activity log (renamed/formatted using functions rename_activity_log and convert_timestamp_format)

level_of_aggregation

Level of aggregation at which multi-registration should be detected (either "resource" or "case")

timestamp

Type of timestamp that needs to be taken into account in the analysis (either "start", "complete" or "both")

threshold_in_seconds

Threshold which is applied to determine whether multi-registration occurs (expressed in seconds) (time gaps smaller than threshold are considered as multi-registration)

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

activitylog containing the rows of the original activity log for which multi-registration is present

Examples

# \donttest{ data("hospital_actlog") detect_multiregistration(activitylog = hospital_actlog, threshold_in_seconds = 10)
#> Selected level of aggregation: resource
#> Selected timestamp parameter value: complete
#> *** OUTPUT ***
#> Multi-registration is detected for 4 of the 12 resources (33.33%). These resources are:
#> Doctor 7 - Nurse 5 - Nurse 27 - NA
#>
#> For the following rows in the activity log, multi-registration is detected:
#> # A tibble: 9 x 7 #> patient_visit_nr activity originator start complete #> <dbl> <chr> <chr> <dttm> <dttm> #> 1 512 Clinica~ Doctor 7 2017-11-20 11:27:12 2017-11-20 11:33:57 #> 2 512 Clinica~ Doctor 7 NA 2017-11-20 11:33:57 #> 3 524 Triage Nurse 5 2017-11-21 17:04:03 2017-11-21 17:06:05 #> 4 525 Triage Nurse 5 2017-11-21 17:04:13 2017-11-21 17:06:08 #> 5 526 Triage Nurse 5 2017-11-21 17:04:15 2017-11-21 17:06:10 #> 6 536 Triage Nurse 27 2017-11-22 15:15:39 2017-11-22 15:25:01 #> 7 536 Treatme~ Nurse 27 2017-11-22 15:15:41 2017-11-22 15:25:03 #> 8 533 0 NA 2017-11-22 18:35:00 2017-11-22 18:37:00 #> 9 534 Registr~ NA 2017-11-22 18:35:00 2017-11-22 18:37:00 #> # ... with 2 more variables: triagecode <dbl>, specialization <chr>
# }