Releases: openEHR/archie
Archie 1.0.7
- Fixed an Exception during rule evaluation when an implies is used inside a for_all: backport Disable lazy evaluation implies (#417)
Archie 2.0.2
Archie 2.0.1
Release notes Archie 2.0.1
- Bugfix in Mean evaluation that could result in NullPointerExceptions.
- Bump Jackson version to 2.13.2
Archie 1.0.6
Release notes Archie 1.0.6
- Bump Jackson version to 2.13.2
Archie 1.0.5
Release notes Archie 1.0.5
- Bugfix in Mean evaluation that could result in NullPointerExceptions.
Archie 2.0.0
Release notes Archie 2.0.0
Archie 2.0.0 brings the most recent ADL 2 features such as constraint binding strength and the rm_overlay, better JSON and XML compliancy for the AOM, many bug fixes, better Android support and more.
ADL/AOM features
Constraint binding strength
Archie now supports defining a constraint binding strength in a C_TERMINOLOGY_CODE, as per the spec. This makes required, extensible, preferred or example value sets possible.
Using value sets in another valuesets
As part of supporting constraint binding strength, it is now possible to use a value set within another value set, for example:
value_sets = <
["ac1.1"] = <
id=<"ac0.1”>
members = <“ac2”, "at0.1">
>
Meaning that the new value set ac0.1 contains all values from ac1, plus the new value at0.1.
RM overlay and Visibility section
The rm_visibility section has been implemented in ADL and AOM, including JSON and XML mappings and flattening and OPT creation. It is now possible to hide or show paths in an archetype or template, and to define aliases for attributes in the Archetype, as defined in the latest ADL 2 specification
Archetype validation (breaking change)
https://openehr.atlassian.net/browse/SPECAM-76 was fixed, for now with the most restrictive fix. This allows for a mandatory node to be replaced with another mandatory node in a specialisation, which was impossible before. This can break existing archetypes, mainly if they specialise a node that must occur only once in a parent with several nodes in a child archetype.
Annotations in archetypes are now correctly validated: they must match to a possible path in the RM, or a validation error will be added.
AOM Compliancy
The AOM has been changed to more closely resemble the specification, both in JSON, XML and the object model.
JSON (breaking change)
- Boolean fields now have a correct
is_
prefix- ARCHETYPE.is_differential
- ARCHETYPE.is_generated
- ARCHETYPE_SLOT.is_closed
- AUTHORED_RESOURCE.is_controlled
- C_OBJECT.is_deprecated
- C_PRIMITIVE_OBJECT.is_enumerated_type_constraint
- patterned_constraint renamed to pattern_constraint
- The expression json now has EXPR_ added to its type names, matching the current spec
- Operators no longer have the operator property, which was a OPERATOR_KIND enum. Now there is an operator_def, which adheres to the OpenEHR specification
- Binary Operators still have a left_operand and right_operand, but unary operator and for_all do no longer
This behaviour is configurable. It can be set back to the old format by using ArchieJacksonConfiguration.createLegacyConfiguration()
as input to JacksonUtil
. The only thing that is not configurable is that the left_operand and right_operand for a unary operator and a for all will no longer be serialised in the legacy format.
XML for the AOM (breaking change)
Operational templates and templates got serialised as type ARCHETYPE instead of OPERATIONAL_TEMPLATE and TEMPLATE
- some map fields get marshalled as a default java map - should be StringDictionaryItem according to XSD
- Archetype.otherMetaData
- OperationalTemplate.componentTerminologies
- OperationalTemplate.terminologyExtracts
- Some classes were removed from the JAXBContext that Archie provided, that could never be marshalled or unmarshalled
Note that this is a breaking change, without a legacy configuration to provide backwards compatibility. However, due to the nature of the problems, the XML for the AOM was likely not used.
The XML format for the RM is not changed.
Archetype Object model:
- Many Nullable annotations are added to the AOM, meaning that the ArchieAOMInfoLookup correctly will make them as optional
- CTemporal.getPatternedConstraint() is renamed to CTemporal.getPatternConstraint()
Breaking code changes:
- ArchieRMJacksonConfiguration is renamed to ArchieJacksonConfiguration
JacksonUtil.getObjectMapper()
andJacksonUtil.configureObjectMapper()
without parameters now return a standards compliant object mapper, instead of a legacy one. Use the variants with a configuration parameter to customise the json serialisation- The constructor of ArchieJacksonConfiguration is now marked private. Change any instances to
ArchieJacksonConfiguration.createLegacyConfiguration()
for a direct replacement - The type property name for the OdinToJsonConverter now is _type
- The default type property name for the ExampleJsonInstanceGenerator is now _type
Flat JSON for the RM (breaking change)
The flat json format for the RM, generated with FlatJsonGenerator
, can now be minified by providing an Operational Template of the data being converted, as well as the data. Any type names or name properties already defined in the Archetype will be omitted from the flat format. This behaviour can be disabled or enabled by setting FlatJsonFormatConfiguration.setFilterNames() and FlatJsonFormatConfiguration.setFilterTypes(). They both default to true.
Partial path queries in AOM
AOMPathQuery.findPartial()
allows for finding a partial match to paths in an archetype, returning the matching part, what was found and the path that was left to match
JDK 17 support
Archie now compiles and runs with JDK17. Due to Jackson and Kryo being used in Archie, several —add-opens parameters must be added as JVM parameters to make Archie work in JDK 17. If and when Jackson and Kryo have changed this, these parameters can be removed. See https://github.com/openEHR/archie/blob/df01d7157282f7cffff811790e2c3fc6a1d2cfc8/build.gradle#L101-L110 for the list of parameters
As part of this, Gradle, plus the included cradle wrapper have been updated to version 7.3.3
Android support
It is now possible to run the Rule Evaluation and Terminology Access and Invariant validation on Android, by removing the dependency on JAXB for those features.
getMagnitude for date, date time and duration classes (breaking change)
The epoch for DV_DATE and DV_DATE_TIME getMagnitude has been changed from 1-1-1970 to 1-1-0001, conforming to specs.
DV_DURATION.getMagnitude has been correctly implemented instead of always returning null. Note that this implementation follows the specification, and thus is
Dependencies moved from api to implementation configuration (breaking change)
The following dependencies are now no longer considered part of the API of Archie, and have been moved to the implementation configuration of the java plugin in Gradle:
Google Guava
org.reflections
Kryo
Apache Commons IO, Text and Lang
Json Schema generator
The json Schema output has been changed so it is now used as the official json schema output of OpenEHR. This means the following changes:
- Generics have been removed from the type parameter values in json schema, as per specification
- The JSON Schema can now be split into multiple files, instead of one big json schema
- $id has been added to all classes in the schema
- A grade script to generate the official JSON Schema has been added
Bug fixes
- ArchetypeParsePostProcessor now correctly sets the tuple parents
- A NullPointerException in CTerminologyCode.getValueSetExpanded() was fixed
- In Rule Evaluation, DV_ORDINALS now correctly have their symbol set
- In Rule Evaluation, Single Assertions leading to multiple changes in the RM now have correct output
- In Rule Evaluation, created objects matching Archetype Roots have their archetype_details set correctly
- The ArchetypeValidator will no longer end up in an infinite loop created by specialising archetypes in a loop
- different from the java reference implementation, which has not implemented converting months and years to seconds correctly
- BMM package names are correctly set when converted from P_BMM
- Json of the RM serialised using
ArchieJacksonConfiguration.setAddPathProperty(true)
can now be parsed again - Empty strings are now serialised as empty strings in json
- A map containing only an empty map is now correctly serialised as non-empty to json
- ACTIVITY.getPath() always returned ‘/‘, also fixed in version 1.0.4
- A NullPointerException in the ArchetypeValidator reported in #351 has been fixed
- Invariant validation, bug #345, NullPointerException in EHR_URI invariant when the scheme was null
- Json serialised of ObjectRefs failed, #337, also fixed in version 1.0.3
Dependency updates
- Apache Commons io updated from 2.8.0 to 2.11.0
- SLFJ updated from 1.7.30 to 1.7.36
- Kryo updated from 5.2.1 to 5.3.0
- Threaten-extra updated from 1.6.0 to 1.7.0
- ANTLR and ANTLR-runtime updated from 4.9.2 to 4.9.3
- Jackson updated from 2.12.3 to 2.12.5
1.0.4 - Activity description rm_object-path bugfix
This release fixes a bug where, within an RM_OBJECT, the path of a description of an ACTIVITY was set to "/". Now the full path is shown again.
1.0.3 - RM JSON/YAML/ODIN Serialization bugfix
The json serialization had a problem where ObjectRefs were not correctly serialized, because the id field did not have a "_type" property in the resulting json, odin or yaml. The consequence is that they could no longer be parsed after that. This release fixes that problem.
Note that this has been fixed by changing ObjectRef<?> into ObjectRef<? extends ObjectId>, and that this can mean a minor breaking change in your code. This is still a patch release, as not upgrading if you are using this is is probably not an option.
1.0.2 - odin attribute name bug fix
In previous releases of the openEHR specification, odin attribute names could start with an upper case character, a lower case character or an underscore. Archie, and the latest ADL 2 spec, only accepted attribute names starting with a lower case in ODIN.
This release now again accepts the other two cases, so that ADL 1.4 archetypes can again be parsed and correctly converted to ADL 2. The official grammar and specification has been updated as well. Note that the attribute names in the definition part of ADL are unaffected, and they can still only start with a lowercase character.
1.0.1 - two bug fixes
- The ADL serializer did not serialize other_items in terms in the terminology.
- Section was not a @XmlRootElement in JAXB, causing errors when using XPath-queries on these objects.