Validation fixes and more
Feature
-
Namespace added to ArchetypeID in the reference model, so you can now refer to namespaced archetypes from EHR data
-
added AssumedValueFiller, which adds assumed values to the AOM in all cases where only one value is possible to fulfill a primitice object constraint
-
added a flat_sum function to the expression language, which sums all input to one result
-
Archie can now compile on JDK versions 10 and 11. There may be some layout issues in the javadoc output, they will be fixed at a later time
-
Two minor obsolete and no longer used classes have been removed
Bugs
- In some setups the BuiltinReferenceModels did not work, most notably android and people with complicated classloader setup. This has been fixed.
Flat sum feature
The flat sum feature requires a bit of explanation. The OpenEHR expression language is a bit tricky with multiplicites: paths that refer to one element in an archetype can actually refer to more than one element in data. Archie solves this automatically in most cases, so clinicians can write simple expressions without having to think about that problem.
However, sometimes you cannot avoid this. For example if you would write:
/some/path = sum(/some/other/path[id3], /some/other/path[id4])
It is possible that there are two instances of some
. The sum result will not be a single number, but will be a list of two numbers, and /some/path will be two fields that will be set with this integer.
We added flat_sum, which always adds all numbers, and always produces a single result. This is useful if you do not know how many instances there will be in data, but do want to sum all of them into a single number.
There will likely be more flat_ functions in the future.