Task planning implementation using executable flows

I made some progress on implementing task planning for RCHOPS-21.

I managed to complete the first drug regimen diagram. It should be the same as the version on openEHR site (Figure 4. RCHOPS21 administration phase).

This diagram is executable(!).

The platform I’m using has support for creating simple UI dashboards (similar to the ones found on medical equipment). It can also use any web or mobile framework and connect it to the process model.
This enables human interaction where it is needed in the plan. I used the Camunda workflow engine and its tasks app for interacting with humans. More advanced implementations would use a dedicated web/mobile app for assigning tasks to humans.

The language used for calculating doses is JavaScript.
There is support for running JavaScript code as part of the diagram. I added openEHR’s DV_ classes and helper functions to the library. I’ll use openEHR’s instruction action archetypes for things like administering medications and other required actions.

In the ZIP file on my site are configuration files and the input file I use for testing.
The “calculate_doses.js” is a JavaScript file that does the calculations which are used in the plan definition.

At the moment the platform for creating and running clinical guidelines workflows (there are so many different names to describe what these diagrams represent) is independent of openEHR Task Planning. However it is using openEHR’s RM, some of PROC and archetypes. This way it should be compatible with TP when it is ready.
Once the openEHR Task Planning is finished, I will convert it into these diagrams and EL into JavaScript. It would be a quick way to a Task Planning implementation if it all works.

The NHS Thames Valley Cancer Network document is describing a more complicated plan. I wonder if I’ll be able to decipher it with my limited medical knowledge.