Hi all
Somewhat late reply due to vacation…
We have come across that same problem and for us it actually was a show stopper for which we had to invent a work around.
First a remark about the tools:
We saw that ArchetypeEditor did not add the transition. So we tried to add I manually to the adl-file. We found however that AE ignores it and after saving again from AE it is gone. Further we tried to use the modified adl in a template using Template Designer, but it was ignored and no trace of it in the resulting opt.
These are very serious limitations in the tools and forces a work around that we should very much like to abandon (see below). It raises the question how the community should go forward to make sure there are appropriate tools. Who owns the tools? Who pays for their maintenance?
The ISM is potentially a very powerful asset of openEHR. Missing the transition property mutilates it to very limited value.
Then a remark to Silje’s reply:
“Solving” the problem in the business logic is only possible when recoding after the fact. Given that the current state is so and so and the new state is so and so we can deduce (in most cases) the transition.
Our problem:
Our problem is the opposite of solving after the fact. We want to present to the user only the transitions valid at any moment in time. Given the ISM and completely defined ISM_TRANSITIONs this would be possible and easy. But not so without the transition! Without that information it is not possible to distinguish the transitions having the same current state.
To see the problem, assume a simple state machine with one of each of these transitions: active_step, suspend and resume. Let the current state be SUSPENDED (last recorded action was suspend). In this state we only want to give the user the option to resume. However, without the transition property in the ISM_TRANSITION we cannot distinguish resume from active_step. Both have ACTIVE as their current step and careflow_step is only descriptive and not usable. The only option is to give the user all choices and assume he does the right thing. Not a good option. After all, resuming a suspended drug and administering the drug are quite different things and we do not want an erroneous administering to take place as result of our system suggesting it!
Our work around:
Fortunately each ISM_TRANSITION has a unique id. Based on this id we add the missing transition, from our own local configuration, to the archetypes we use after having loaded them. This information is transient and only lives in our memory instances of the archetype. But at least we have it available so that we can make a full state machine evaluation and find only the relevant transitions to present to the user.
Some questions:
What if the user inadvertently administers a drug that has been suspended? In that case he surely needs to have this transition anyway, doesn’t he? Well, yes, but not as a suggestion from our system! This situation must be handled separately from guiding the user through the states. In fact, it could be argued that this be recorded as an ad hoc action.
With regards,
Ivar Yrke
Senior systemutvikler
DIPS AS
Telephone +47 75 59 24 06
Mobile +47 90 78 89 33