differential path constraint handling deeper than root node gives unexpected validaty error

Description

Sorry about the large number of problem reports at once

When opening the attached two archetypes, the child archetype raises an error on items not being a valid property of OBSERVATION. Of course, that's true. But the /items constraint is on an ITEM_TREE, not an OBSERVATION. It would seem it does the path lookup from the root of the archetype somewhere. Changing the path to /protocol[id2]/items correctly mentions that protocol is not a valid attribute in the RM.

The error displayed is:

ERROR (VCARM) attribute name 'items' in object node at /items (type=OBSERVATION) not among flat set of properties in reference model
ERROR (VCARM) attribute name 'items' in object node at /protocol[id2.1]/items[id6.1|observation|] (type=OBSERVATION) not among flat set of properties in reference model

Changing /items to items makes the archetype pass validity tests and flattening.

Of course I'm assuming here that differential paths are allowed in other places than just below the root of the archetype - I cannot find anything in the spec related to this. If it's not allowed this bug report would be about a better error message.

Environment

None

Reporter

Pieter Bos

Labels

None

Priority

Major
Configure