I stumpled upon the “Using Other Constraints in Slots” section in the spec (http://www.openehr.org/releases/AM/latest/docs/ADL1.4/ADL1.4.html#_using_other_constraints_in_slots). When taking a look at the tools (ADL Editor, LinkEHR, ADL Designer), there does not seem to be real support for this expressions. Therefore, I tried to create it by hand but have not been able to successfully parse anything using the Workbench that looks different from the typical “archetype_id/value matches…” statements. Do you have any working real-life examples? Would such expressions be supported in the Template Designer?
at the moment, no expressions other than the ‘archetype_id/value matches’ one are in use to my knowledge.
At the moment, only identifiers are used as the criterion; this is lexical matching and for obvious reasons not very good, however it has survived in use simply because the Archetype ids happen to be meaningful well-structured ids.
This would ideally be replaced by ontological matching, where expressions like “< lab_instrument” in a CLUSTER slot means openEHR-EHR-CLUSTER.lab_instrument.v* or any specialisation child.
Additionally, I have the intention to add ‘conditional slots’ to ADL2, which will enable various types of slot fillers to be specified under condition expressions that refer to other paths in the same archetype (and possibly more powerful runtime-resolvable expressions).This would enable a slot to be conditional on an expression of the logical form /path/to/smoking_status/value /= non-smoker, with filler archetypes specified as “< tobacco_use_details” or similar.
We don’t have this yet, but I think the design is fairly clear. You won’t find any of this in current tools.