I have an archetype with two CONSTRAINT_REF, one with a binding (URI) and one without a binding.
1. In the archetype, each CONSTRAINT_REF has a correspondent constraint_definition.
2. In the archetype, the CONSTRAINT_REF with the URI, has also a constraint_binding.
3. When exporting the OPT, the node that has the URI, is C_CODE_REFERENCE in the OPT, and the node that doesn't have the URI CONSTRAINT_REF.
4. On the exported OPT, the constraint_definition for the CONSTRAINT_REF is not exported.
About 3: I think this is a type mismatch, since both nodes should be CONSTRAINT_REF, and the C_CODE_REFERENCE appears to be a type of C_CODE_PHRASE in the OPT XSD. Also can't find C_CODE_REFERENCE in the AOM or OAP (C_CODE_PHRASE is defined in the OAP http://www.openehr.org/releases/1.0.2/architecture/am/openehr_archetype_profile.pdf).
About 4: this is linked to
I'm working with TD 2.8.94b