openEHR / adl2-core

ADL / AOM 2 (previously known as '1.5') core libs and parser
GNU Affero General Public License v3.0
6 stars 8 forks source link

Problem with ArchetypeMerge on element with choice #3

Closed bjornna closed 9 years ago

bjornna commented 9 years ago

There is a problem with merge of parent-child archetype. This is related to element with CHOICE.

One example is the two archetypes: openEHR-EHR-CLUSTER.amount.v1 openEHR-EHR-CLUSTER.amount-range.v1

I think the problem is related to the following method in org.openehr.adl.flattener.ArchetypeMerger: ... @Nullable private CObject findSpecializedConstraintOfParentNode ...

I found a solution for the archetypes above, but that introduced failure on other tests. The proposed fix was to check for both nodeId and rmTypeName.

I am still looking on this.

markopi commented 9 years ago

I fixed the flattening of CHOICE elements. You were right about the proposed fix, I just had to add special handling for intermediate nodes of differential paths.

bjornna commented 9 years ago

Great!