Example simulation for a patient handover workflow (assignment & delegation).
Created by Petros Papapanagiotou |
Artificial Intelligence Modelling Lab |
Artificial Intelligence and its Applications Institute |
School of Informatics, University of Edinburgh |
This is part of the WorkflowFM framework for correct-by-construction process and resource workflows.
Dependencies:
- Java 8, Scala 2.12.12
- sbt v1.4.3 (or later)
- Proter v0.6: Clone the repo and run
sbt publishLocal
. - PEW v1.5: Clone the repo and run
sbt publishLocal
.
Execute using sbt run
. This will run 5
assignment and 5
delegation workflows.
You can change the number of workflows by providing an argument to run
. For example, sbt "run 10"
will run 10
of each of the 2 workflows.
The workflow models describe 2 modes of patient handover from one medical staff to another for a particular healthcare service:
- Assignment: responsibility is fully transferred to the service provider
- Delegation: the requester retains responsibility of checking the result of the service
The workflow models are described in more detail in the following 2 publications:
- Papapanagiotou, P & Fleuriot, J 2014, Formal verification of collaboration patterns in healthcare. Behaviour and Information Technology, vol 33, no. 12, pp. 1278-1293.
- Papapanagiotou, P, Fleuriot, J & Grando, A 2012, Rigorous process-based modelling of patterns for collaborative work in healthcare teams. 25th International Symposium on Computer-Based Medical Systems (CBMS), 1-6.
The simulation model contains the following elements as a toy example:
- Services: diagnosis, haemodialysis
- Patients: Patient1, Patient2, Patient3
- Medical staff: Petros (diagnosis), Blah (diagnosis), Orphen (diagnosis, haemodialysis)
Each workflow will attempt to assign/delegate diagnosis (80%) or haemodialysis (20%) for a random patient, choosing a random medical staff member as the requester.
The contract will be rejected if no capable actors are found, which only happens if Orphen requests a haemodialysis. Otherwise, a medical staff member is selected at random to provide the service.
There is a 30% chance that an obstacle will occur and the service will fail.
AwardContract
takes 1 unit of time, ProvideService
takes 5 units of time, and CheckOutcome
takes 2 units of time.
Results are provided in 3 forms of output in the output/
directory:
- A printed output with all the results.
- CSV files with results on resources, tasks, and simulations (workflows).
- A timeline.
To view the timeline, make sure you load submodules using:
git submodule update --init
Then open HealthcareHandoverStateful-timeline.html
in your browser.
Petros Papapanagiotou - pe.p@ed.ac.uk - @PetrosPapapa
A big thank you to the following contributors in order of appearance:
- Jacques Fleuriot
Distributed under the Apache 2.0 license. See LICENSE for more information.
Copyright © 2012-2021 The University of Edinburgh and contributors