...
For the most pedantic form of down-conversion of ADL2 codes, id-codes on nodes that don't need them in ADL 1.4 should be removed (rather than converted down to at-codes).
Synthesizing codes
Synthesizing new codes for constraints that did not have a code in ADL 1.4 presents a small problem. Once the ADL 1.4 gets edited, the new codes added in the ADL 1.4 edit should not conflict with the converted ADL 2. So, it should be done as follows:
- Generate the numeric part of the top level of any codes from a single range, starting at 9000, so id9000, at9001, ac9002, etc
- If adding a new code at a specialization level, also start from that range, so id0.9000, at0.9001, ac0.9002
Editing ADL 1.4: keeping the ADL 2 conversion backwards compatible
To keep the ADL 2 conversion backwards compatible after the ADL 1.4 form of the archetype has been edited, the same codes should be generated at the same path at subsequent conversions. To do this, the Archie project created a separate conversion log, to be stored together with the ADL 2 archetype. It is not specified and standardized yet, but its implementation can be found at https://github.com/openEHR/archie/tree/master/aom/src/main/java/com/nedap/archie/adl14/log