Check if cases start with an activity

starts(activity)

Arguments

activity

The start activity. Character vector of length one. This should be an activity of the event log supplied to `check_rule`.

See also

Examples

library(bupaR) library(eventdataR) # Each patients should first be registered. patients %>% check_rule(starts("Registration"))
#> Log of 5442 events consisting of: #> 7 traces #> 500 cases #> 2721 instances of 7 activities #> 7 resources #> Events occurred from 2017-01-02 11:41:53 until 2018-05-05 07:16:02 #> #> Variables were mapped as follows: #> Case identifier: patient #> Activity identifier: handling #> Resource identifier: employee #> Activity instance identifier: handling_id #> Timestamp: time #> Lifecycle transition: registration_type #> #> # A tibble: 5,442 x 8 #> handling patient employee handling_id registration_ty~ time #> <fct> <chr> <fct> <chr> <fct> <dttm> #> 1 Registr~ 1 r1 1 start 2017-01-02 11:41:53 #> 2 Registr~ 2 r1 2 start 2017-01-02 11:41:53 #> 3 Triage ~ 1 r2 501 start 2017-01-02 12:40:20 #> 4 Registr~ 1 r1 1 complete 2017-01-02 12:40:20 #> 5 Registr~ 2 r1 2 complete 2017-01-02 15:16:38 #> 6 Triage ~ 2 r2 502 start 2017-01-02 22:32:25 #> 7 Triage ~ 1 r2 501 complete 2017-01-02 22:32:25 #> 8 Triage ~ 2 r2 502 complete 2017-01-03 12:34:01 #> 9 Registr~ 4 r1 4 start 2017-01-04 01:34:04 #> 10 Registr~ 3 r1 3 start 2017-01-04 01:34:05 #> # ... with 5,432 more rows, and 2 more variables: .order <int>, #> # starts_with_Registration <lgl>