R/detect_activity_order_violations.R
    detect_activity_order_violations.RdFunction detecting violations in activity order. Having additional or less activity types than those specified in activity_order is no violation, but the activity types present should occur in the specified order, and only once.
detect_activity_order_violations( activitylog, activity_order, timestamp, details, filter_condition ) # S3 method for activitylog detect_activity_order_violations( activitylog, activity_order, timestamp = c("both", "start", "complete"), details = TRUE, filter_condition = NULL )
| activitylog | The activity log  | 
    
|---|---|
| activity_order | Vector expressing the activity order that needs to be checked (using activity names)  | 
    
| timestamp | Type of timestamp that needs to be taken into account in the analysis (either "start", "complete" or "both)  | 
    
| 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 detected activity orders which violate the specified activity order
activitylog: Detect activity order_violations in activity log.
# \donttest{ data("hospital_actlog") detect_activity_order_violations(activitylog = hospital_actlog, activity_order = c( "Registration", "Triage", "Clinical exam", "Treatment", "Treatment evaluation"))#> Warning: Some activity instances within the same case overlap. Use detect_overlaps to investigate further.#> Warning: Not all specified activities occur in each case. Use detect_incomplete_cases to investigate further.#> #>#>#>#>#>#> # A tibble: 4 x 3 #> activity_list n case_ids #> <chr> <int> <chr> #> 1 Registration - Registration - Registration 1 518 #> 2 Registration - Registration - Triage - Clinical exam - Treatme~ 1 535 #> 3 Registration - Triage - Clinical exam - Clinical exam 1 512 #> 4 Triage - Registration 1 521# }