>  I agree that they are not user friendly and hard to write - is there a
> syntax for calculation we could use for the calculation aspect which many
> would be happy to use?

I don't think its possible to go down the road of having computation
in the archetypes unless it is very strictly controlled (even then I'm
not sure its possible). As soon as you have invariant statements
with sideeffects (i.e. the ability to calculate the value of a field rather
than just check its validity) you then introduce problem with ordering
(the order the invariants are executed now matters), cycles (an
invariant changes a value that was previously ok'ed by another
invariant - do we go back to check it again) and indeed whether all
this checking will ever terminate.

Whilst it may seem like a subtle difference between an invariant
that says "the scores must sum up to the total", and "make this total
be the sum of the scores", it is a huge difference computationally.
It may be possible to write code that analyses invariants and
tries to construct corresponding code for calculation that is useable in the
user interface "template" for that archetype.

Andrew
_______________________________________________
openEHR-clinical mailing list
openEHR-clinical at openehr.org
http://www.chime.ucl.ac.uk/mailman/listinfo/openehr-clinical



Reply via email to