diff --git a/advanced_maps.html b/advanced_maps.html index ab0e746..8ca6fa0 100644 --- a/advanced_maps.html +++ b/advanced_maps.html @@ -666,8 +666,8 @@
%>%
patients process_map(type_nodes = frequency("relative_case"),
type_edges = performance(mean))
%>%
patients process_map(type = frequency("relative_case"),
sec = frequency("absolute"))
Both primary and secondary layers can be differentiated between nodes and edges.
%>%
@@ -685,8 +685,8 @@ patients Adding secondary information
type_edges = performance(units = "hours"),
sec_nodes = frequency("absolute"),
sec_edges = performance(FUN = max, units = "hours"))
%>%
patients process_map(type_nodes = frequency("relative_case", color_scale = "PuBu"),
type_edges = performance(mean, color_edges = "dodgerblue4"))
eventdataR
package.
A basic animation with static color and token size:
animate_process(patients)
Default token color, size, or image can be changed as follows:
animate_process(patients, mapping = token_aes(size = token_scale(12), shape = "rect"))
animate_process(patients, mapping = token_aes(color = token_scale("red")))
The example animation on the top of this site:
animate_process(patients, mode = "relative", jitter = 10, legend = "color",
mapping = token_aes(color = token_scale("employee",
scale = "ordinal",
range = RColorBrewer::brewer.pal(7, "Paired"))))
Tokens can also be assigned images, for example:
animate_process(patients,
mapping = token_aes(shape = "image",
size = token_scale(10),
image = token_scale("https://upload.wikimedia.org/wikipedia/en/5/5f/Pacman.gif")))
It is possible to use a secondary data frame to determine the @@ -730,8 +730,8 @@
processanimateR
animation can be also used interactively
as part of a (Shiny) web-application. Here, an example application that
expects attributes are of an appropriate data type and automatically
@@ -997,8 +997,8 @@
The colors can be adjusted by the Source: https://bupaverse.github.io/processanimateR/ In this map, we can observe several unique directly follows
relations, as well as flows occurring only 2 or 3 times. Using the
filter, we can remove the cases that lead to these flows as follows: We can immediately observe less very infrequent flows in the process
map. It is important to note that Let’s say we want to combine the activities Blood test,
MRI SCAN and X-Ray scan into a single
Examination activity. This can be done as follows: Read more: Note that we need an range
argument. In
this case the scale is reversed with rev()
to go from blue
to red. See Ordinal scales
mapping = token_aes(color = token_scale("employee",
scale = "ordinal",
range = RColorBrewer::brewer.pal(8, "Paired"))))
-
-
+
+
Linear scales
@@ -1040,8 +1040,8 @@ Time scales
mapping = token_aes(color = token_scale("time",
scale = "time",
range = c("blue","red"))))
diff --git a/case_filters.html b/case_filters.html
index edfa581..4cdfcf9 100644
--- a/case_filters.html
+++ b/case_filters.html
@@ -1055,8 +1055,8 @@ Endpoints
%>%
patients filter_endpoints(start_activities = "Registration", end_activities = "Check-out") %>%
process_map()
Endpoints Condition
@@ -1323,16 +1323,16 @@ Infrequent Flows
href="https://bupaverse.github.io/docs/frequency_maps.html">process
map below.
%>% process_map() traffic_fines
%>%
traffic_fines filter_infrequent_flows(min_n = 5) %>%
process_map()
filter_infrequent_flows()
diff --git a/collapse.html b/collapse.html
index 7d51c0e..188e3bd 100644
--- a/collapse.html
+++ b/collapse.html
@@ -576,16 +576,16 @@ Collapse Activities
the process map of patients
data set.
%>%
patients process_map()
%>%
patients act_collapse(Examination = c("Blood test","MRI SCAN","X-Ray")) %>%
process_map()
Scenario 2
-
250
+59
Registration
r1
-250
+59
started
-2017-09-05 22:47:50
+2017-03-07 02:53:18
-
+250
+59
+Triage and Assessment
+r2
+559
+started
+2017-03-07 04:27:53
+
+
-59
Registration
r1
-250
+59
completed
-2017-09-06 01:44:44
+2017-03-07 04:27:53
- 250
+
+
+59
Triage and Assessment
r2
-750
+559
+completed
+2017-03-07 18:45:53
+
+
59
+Blood test
+r3
+1027
started
-2017-09-06 13:21:57
+2017-03-08 04:52:55
-
250
-Triage and Assessment
-r2
-750
+59
+Blood test
+r3
+1027
completed
-2017-09-07 00:05:12
+2017-03-08 12:23:02
-
250
-X-Ray
-r5
-1607
+59
+MRI SCAN
+r4
+1264
started
-2017-09-08 04:16:50
+2017-03-11 19:31:13
-
250
-X-Ray
-r5
-1607
+59
+MRI SCAN
+r4
+1264
completed
-2017-09-08 06:52:53
+2017-03-12 01:24:26
-
250
+59
Discuss Results
r6
-1984
+1793
started
-2017-09-13 14:26:06
+2017-03-12 06:50:13
-
-250
-Discuss Results
-r6
-1984
-completed
-2017-09-13 17:28:40
-
-
+250
+59
Check-out
r7
-2479
+2288
started
-2017-09-13 22:17:12
+2017-03-12 08:49:18
+
+
59
+Discuss Results
+r6
+1793
+completed
+2017-03-12 08:49:18
-
@@ -1204,100 +1220,84 @@ 250
+59
Check-out
r7
-2479
+2288
completed
-2017-09-14 00:56:35
+2017-03-12 10:24:35
Scenario 3
-
93
+182
Registration
-r7
-93
+r1
+182
started
-2017-04-06 06:57:39
+2017-06-25 11:18:08
-
93
+182
Registration
-r2
-93
+r6
+182
completed
-2017-04-06 11:23:27
+2017-06-25 15:01:00
-
93
+182
Triage and Assessment
-r1
-593
+r7
+682
started
-2017-04-07 11:53:24
+2017-06-25 22:36:32
-
-93
+182
Triage and Assessment
-r4
-593
-completed
-2017-04-08 05:11:37
-
-
-93
-Blood test
-r3
-1045
-started
-2017-04-08 16:00:50
-
-
93
-Blood test
-r4
-1045
+r2
+682
completed
-2017-04-08 19:26:41
+2017-06-26 16:03:00
-
93
-MRI SCAN
-r6
-1282
+182
+X-Ray
+r5
+1568
started
-2017-04-22 00:00:07
+2017-06-28 07:03:55
-
93
-MRI SCAN
-r7
-1282
+182
+X-Ray
+r5
+1568
completed
-2017-04-22 04:55:57
+2017-06-28 11:30:00
-
93
+182
Discuss Results
-r1
-1827
+r7
+1916
started
-2017-04-22 11:14:53
+2017-07-02 11:16:08
-
93
+182
Discuss Results
-r6
-1827
+r1
+1916
completed
-2017-04-22 14:45:58
+2017-07-02 14:19:52
-
93
+182
Check-out
r2
-2322
+2411
started
-2017-04-23 00:16:15
+2017-07-03 03:39:52
-
@@ -1325,13 +1325,13 @@ 93
+182
Check-out
-r3
-2322
+r6
+2411
completed
-2017-04-23 02:20:34
+2017-07-03 06:45:20
Scenario 3
timestamp = "time",
resource_id = "employee")
-## Warning in validate_eventlog(eventlog): The following activity instances are
-## connected to more than one resource: 1045,1282,1827,2322,593,93
+## # Log of 12 events consisting of:
+## connected to more than one resource: 182,1916,2411,682
## # Log of 10 events consisting of:
## 1 trace
## 1 case
-## 6 instances of 6 activities
-## 6 resources
-## Events occurred from 2017-04-06 06:57:39 until 2017-04-23 02:20:34
+## 5 instances of 5 activities
+## 5 resources
+## Events occurred from 2017-06-25 11:18:08 until 2017-07-03 06:45:20
##
## # Variables were mapped as follows:
## Case identifier: patient
@@ -1341,21 +1341,19 @@
Scenario 3
## Timestamp: time
## Lifecycle transition: registration_type
##
-## # A tibble: 12 × 7
+## # A tibble: 10 × 7
## patient handling emplo…¹ handl…² regis…³ time .order
## <chr> <fct> <fct> <chr> <fct> <dttm> <int>
-## 1 93 Registration r7 93 start 2017-04-06 06:57:39 1
-## 2 93 Registration r2 93 comple… 2017-04-06 11:23:27 2
-## 3 93 Triage and Assess… r1 593 start 2017-04-07 11:53:24 3
-## 4 93 Triage and Assess… r4 593 comple… 2017-04-08 05:11:37 4
-## 5 93 Blood test r3 1045 start 2017-04-08 16:00:50 5
-## 6 93 Blood test r4 1045 comple… 2017-04-08 19:26:41 6
-## 7 93 MRI SCAN r6 1282 start 2017-04-22 00:00:07 7
-## 8 93 MRI SCAN r7 1282 comple… 2017-04-22 04:55:57 8
-## 9 93 Discuss Results r1 1827 start 2017-04-22 11:14:53 9
-## 10 93 Discuss Results r6 1827 comple… 2017-04-22 14:45:58 10
-## 11 93 Check-out r2 2322 start 2017-04-23 00:16:15 11
-## 12 93 Check-out r3 2322 comple… 2017-04-23 02:20:34 12
+## 1 182 Registration r1 182 start 2017-06-25 11:18:08 1
+## 2 182 Registration r6 182 comple… 2017-06-25 15:01:00 2
+## 3 182 Triage and Assess… r7 682 start 2017-06-25 22:36:32 3
+## 4 182 Triage and Assess… r2 682 comple… 2017-06-26 16:03:00 4
+## 5 182 X-Ray r5 1568 start 2017-06-28 07:03:55 5
+## 6 182 X-Ray r5 1568 comple… 2017-06-28 11:30:00 6
+## 7 182 Discuss Results r7 1916 start 2017-07-02 11:16:08 7
+## 8 182 Discuss Results r1 1916 comple… 2017-07-02 14:19:52 8
+## 9 182 Check-out r2 2411 start 2017-07-03 03:39:52 9
+## 10 182 Check-out r6 2411 comple… 2017-07-03 06:45:20 10
## # … with abbreviated variable names ¹employee, ²handling_id, ³registration_typeeventlog
irrespective of which
attribute values are differing, i.e. it can be resources, but also any
@@ -1502,111 +1500,111 @@ Inconsistent Resources
-
26
+139
Registration
-r1
-26
+r7
+139
start
-2017-01-25 02:03:36
+2017-05-17 08:37:35
1
-
26
-Registration
+139
+Triage and Assessment
r4
-26
-complete
-2017-01-25 04:21:08
+639
+start
+2017-05-17 10:33:49
2
-
26
-Triage and Assessment
-r4
-526
-start
-2017-01-26 15:08:41
+139
+Registration
+r1
+139
+complete
+2017-05-17 10:33:49
3
-
26
+139
Triage and Assessment
-r2
-526
+r6
+639
complete
-2017-01-27 05:21:17
+2017-05-18 02:32:38
4
-
26
+139
Blood test
r6
-1014
+1068
start
-2017-02-02 05:59:23
+2017-05-18 23:10:39
5
-
26
+139
Blood test
r1
-1014
+1068
complete
-2017-02-02 12:19:53
+2017-05-19 03:57:40
6
-
26
+139
MRI SCAN
-r3
-1251
+r2
+1305
start
-2017-02-02 15:55:05
+2017-05-19 07:57:18
7
-
26
+139
MRI SCAN
-r7
-1251
+r2
+1305
complete
-2017-02-02 19:29:35
+2017-05-19 11:34:01
8
-
26
+139
Discuss Results
r7
-1760
+1873
start
-2017-02-03 00:47:39
+2017-05-19 17:20:52
9
-
26
+139
Discuss Results
-r2
-1760
+r3
+1873
complete
-2017-02-03 03:55:37
+2017-05-19 20:41:58
10
-
26
+139
Check-out
-r6
-2255
+r3
+2368
start
-2017-02-07 03:24:35
+2017-05-21 17:29:34
11
-
@@ -1617,15 +1615,14 @@ 26
+139
Check-out
-r3
-2255
+r4
+2368
complete
-2017-02-07 05:47:44
+2017-05-21 18:44:55
12
Inconsistent Resources
function.
%>%
log detect_resource_inconsistencies()
## # A tibble: 6 × 5
+## # A tibble: 5 × 5
## patient handling handling_id complete start
## <chr> <fct> <chr> <chr> <chr>
-## 1 26 Blood test 1014 r1 r6
-## 2 26 Check-out 2255 r3 r6
-## 3 26 Discuss Results 1760 r2 r7
-## 4 26 MRI SCAN 1251 r7 r3
-## 5 26 Registration 26 r4 r1
-## 6 26 Triage and Assessment 526 r2 r4
+## 1 139 Blood test 1068 r1 r6
+## 2 139 Check-out 2368 r4 r3
+## 3 139 Discuss Results 1873 r3 r7
+## 4 139 Registration 139 r1 r7
+## 5 139 Triage and Assessment 639 r6 r4
If you want to remove these inconsistencies, a quick fix is to merge
the resource labels together with
fix_resource_inconsistencies()
. Note that this is not
@@ -1638,24 +1635,23 @@
%>%
log fix_resource_inconsistencies()
## *** OUTPUT ***
-## A total of 6 activity executions in the event log are classified as inconsistencies.
+## A total of 5 activity executions in the event log are classified as inconsistencies.
## They are spread over the following cases and activities:
-## # A tibble: 6 × 5
+## # A tibble: 5 × 5
## patient handling handling_id complete start
## <chr> <fct> <chr> <chr> <chr>
-## 1 26 Blood test 1014 r1 r6
-## 2 26 Check-out 2255 r3 r6
-## 3 26 Discuss Results 1760 r2 r7
-## 4 26 MRI SCAN 1251 r7 r3
-## 5 26 Registration 26 r4 r1
-## 6 26 Triage and Assessment 526 r2 r4
+## 1 139 Blood test 1068 r1 r6
+## 2 139 Check-out 2368 r4 r3
+## 3 139 Discuss Results 1873 r3 r7
+## 4 139 Registration 139 r1 r7
+## 5 139 Triage and Assessment 639 r6 r4
## Inconsistencies solved succesfully.
## # Log of 12 events consisting of:
## 1 trace
## 1 case
## 6 instances of 6 activities
## 6 resources
-## Events occurred from 2017-01-25 02:03:36 until 2017-02-07 05:47:44
+## Events occurred from 2017-05-17 08:37:35 until 2017-05-21 18:44:55
##
## # Variables were mapped as follows:
## Case identifier: patient
@@ -1668,18 +1664,18 @@ Inconsistent Resources
## # A tibble: 12 × 7
## patient handling emplo…¹ handl…² regis…³ time .order
## <chr> <fct> <chr> <chr> <fct> <dttm> <int>
-## 1 26 Registration r4 - r1 26 start 2017-01-25 02:03:36 1
-## 2 26 Registration r4 - r1 26 comple… 2017-01-25 04:21:08 2
-## 3 26 Triage and Assess… r2 - r4 526 start 2017-01-26 15:08:41 3
-## 4 26 Triage and Assess… r2 - r4 526 comple… 2017-01-27 05:21:17 4
-## 5 26 Blood test r1 - r6 1014 start 2017-02-02 05:59:23 5
-## 6 26 Blood test r1 - r6 1014 comple… 2017-02-02 12:19:53 6
-## 7 26 MRI SCAN r7 - r3 1251 start 2017-02-02 15:55:05 7
-## 8 26 MRI SCAN r7 - r3 1251 comple… 2017-02-02 19:29:35 8
-## 9 26 Discuss Results r2 - r7 1760 start 2017-02-03 00:47:39 9
-## 10 26 Discuss Results r2 - r7 1760 comple… 2017-02-03 03:55:37 10
-## 11 26 Check-out r3 - r6 2255 start 2017-02-07 03:24:35 11
-## 12 26 Check-out r3 - r6 2255 comple… 2017-02-07 05:47:44 12
+## 1 139 Registration r1 - r7 139 start 2017-05-17 08:37:35 1
+## 2 139 Triage and Assess… r6 - r4 639 start 2017-05-17 10:33:49 2
+## 3 139 Registration r1 - r7 139 comple… 2017-05-17 10:33:49 3
+## 4 139 Triage and Assess… r6 - r4 639 comple… 2017-05-18 02:32:38 4
+## 5 139 Blood test r1 - r6 1068 start 2017-05-18 23:10:39 5
+## 6 139 Blood test r1 - r6 1068 comple… 2017-05-19 03:57:40 6
+## 7 139 MRI SCAN r2 1305 start 2017-05-19 07:57:18 7
+## 8 139 MRI SCAN r2 1305 comple… 2017-05-19 11:34:01 8
+## 9 139 Discuss Results r3 - r7 1873 start 2017-05-19 17:20:52 9
+## 10 139 Discuss Results r3 - r7 1873 comple… 2017-05-19 20:41:58 10
+## 11 139 Check-out r4 - r3 2368 start 2017-05-21 17:29:34 11
+## 12 139 Check-out r4 - r3 2368 comple… 2017-05-21 18:44:55 12
## # … with abbreviated variable names ¹employee, ²handling_id, ³registration_type
Read more:
diff --git a/event_filters.html b/event_filters.html index 42bd541..0facb61 100644 --- a/event_filters.html +++ b/event_filters.html @@ -792,8 +792,8 @@%>%
patients filter_trim(start_activities = "Registration", end_activities = c("MRI SCAN","X-Ray")) %>%
process_map(type = performance())
Each of these flavors can be configured by passing
-type = frequency()
to process_map()
,
+type = frequency()
to process_map()
, and
additionally specifying the type of frequency()
(ex.
“absolute”, “absolute-case”, etc.)
In the examples below, we will use a slightly filtered versions of @@ -728,14 +728,14 @@
%>%
tmp process_map(frequency("absolute"))
Note that this is the default process map configuration, and is thus equivalent to the following.
%>%
tmp process_map()
%>%
tmp process_map(frequency("absolute-case"))
%>%
tmp process_map(frequency("relative"))
%>%
tmp process_map(frequency("relative-case"))
%>%
tmp process_map(frequency("relative-consequent"))
Read more:
frequency()
.
%>%
patients process_map(performance())
There are three different parameters specific to the
performance()
configuration: the aggregation function, the
time units, and the flow time type.
%>%
patients process_map(performance(FUN = max))
Any function that takes a numerical vector and returns a single value can be used. For example, let’s say we want to show the 0.90 percentile.
@@ -686,8 +686,8 @@Note that the ...
is mandatory as
process_map()
will automatically add na.rm = T
to the aggregation function call.
%>%
patients process_map(performance(mean, "days"))
%>%
patients process_map(performance(mean, "hours"))