Our EHR Server end-user consultants report that sometimes filtering by object type would be useful in AQL. As an example they point out laboratory results where archetypes and templates allow for many data-value types at the leaf level, and sometimes a query might want to only include DV_QUANTITYs and DV_SCALEs. They propose a solution in a sense of adding an implicit attribute @class
which could be used like this: myResult/@class MATCHES {"DV_QUANTITY","DV_SCALE"}
.
I must say I prefer a solution that was mentioned in passing in the Safety features in AQL: subject topic, which is a function that would also take inheritance into account: is_type(myResult, "DV_QUANTITY") OR is_type(myResult, "DV_SCALE")
.
We have a habit of “move fast and break standardisation” due to market forces, so at this point I’m not pushing for any de-iure solution; I’d just like to check with other implementors, particularly @bna, if anyone already has such a functionality and what their syntax is; and if nobody has this, what syntax do others prefer.