# Archetype based query **Category:** [Technical (archive)](https://discourse.openehr.org/c/technical-archive/156) **Created:** 2004-11-03 22:33 UTC **Views:** 1 **Replies:** 0 **URL:** https://discourse.openehr.org/t/archetype-based-query/12027 --- ## Post #1 by @Sam Dear Tom and Andrew It is clear that we need a standard notation for expressing queries into the openEHR space\. I am sure you have this underway but the statements must address queries into both levels of the model \- the reference model and the archetype stamps in the reference model\. 1\. The statements that relate to the Reference Model include:   \- Time \(Composition time, Observation\.History\.Event\.time\) \- \- Return type Folder/Composition/Section/Entry/\{data|protocol|state\}/Cluster/Element/Value   \- Committer, participation 2\. Statements that relate to archetype   \- May have an archetype at any valid level in the reference model \- archetype specifies the rm class in the name   \- Path statement to the level of the return type \- this could determine the return type   \- Where statements or conditions These could probably all be expressed in XQuery \- which is \(I think\) what we should be concentrating on to get the data out\. We need to formulate this as soon as possible\. I wonder if there are many people out there who have begun to working with XQuery? Cheers, Sam --- **Canonical:** https://discourse.openehr.org/t/archetype-based-query/12027 **Original content:** https://discourse.openehr.org/t/archetype-based-query/12027