Modeling case question: quantity units depending on the element name coded value

The first capability we have to address this is ADL rules (see here in ADL2 spec).

The second one is tuples that allow paths from different objects, not just attribute names from the same object. I did a proposal for CIMI years ago on this, that would allow LOINC-based tuples for lab quantities, with exactly the kind of constraint you mention in the example. I can’t seem to lay my hands on it right now, but I think it is worth adding to ADL2 anyway.