Hi Greg, The Archetype Query Language (AQL, formerly known as EHR Query language or EQL) was developed by Ocean Informatics and a specification is being prepared to be offered to the openEHR foundation as a candidate openEHR specification. For now the paper referred to by Rong is the main reference but we hope to provide something on the openEHR WIKI soon.
The Ocean Template Designer provides these openEHR (XPath-like) paths as a property of each node but Ocean is also developing an Archetype Query Builder tool that will actually generate the complete query for you. Here is the query generated by the tool as per your use case (it is slightly simpler than the example provided by my colleague Chunlan). SELECT o/data[at0001]/events[at0002]/data[at0003]/items[at0004]/value FROM EHR [uid = $ehrUid] CONTAINS OBSERVATION o [openEHR-EHR-OBSERVATION.respiration.v1] WHERE o/data[at0001]/events[at0002 and name/value='Any event']/data[at0003]/items[at0004]/value/magnitude > $n The units can be included as an additional criteria as indicated by Chunlan but it is unnecessary as the archetype only allows one kind of unit for rate. Let me know if you would like further details regarding the Ocean tools. Regards ? Heath ? Heath Frankel Product Development Manager Ocean Informatics Ground Floor, 64 Hindmarsh Square Adelaide, SA, 5000 Australia ? ph:?+61 (0)8 8223 3075 mb: +61 (0)412 030 741 email:?heath.frankel at oceaninformatics.com > -----Original Message----- > From: openehr-technical-bounces at openehr.org [mailto:openehr-technical- > bounces at openehr.org] On Behalf Of Greg Caulton > Sent: Monday, 5 November 2007 9:30 AM > To: For openEHR technical discussions > Subject: Re: OpenEHR queries > > Thanks Rong, > > Just the thought for someone but it would be handy to have the XPath > (such as o/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/value) > for a data value somewhere accessible in the editor or in the html > generated content such as > http://svn.openehr.org/knowledge/archetypes/dev/html/en/openEHR-EHR- > OBSERVATION.body_weight.v1.html > > Just easier for adhoc testing so not a big deal. > > > On 11/4/07, Rong Chen <rong.acode at gmail.com> wrote: > > Hi Greg, > > > > There was a paper published at Medinfo2007 on this topic. The paper is > > available at: > > > http://www.openehr.org/downloads/publications/archetypes/MedInfo_2007_EQL_MA .p > df > > > > Cheers, > > Rong > > > > > > On 11/4/07, Greg Caulton <caultonpos at gmail.com> wrote: > > > > > > Hi, > > > > > > Somewhere I recall reading that there was an OpenEHR query that > > > theoretically an OpenEHR compliant system could execute a return > > > results for. > > > > > > Is there a spec somewhere, preferably with a simple example. > > > > > > So if someone knew my patient and queried for all instances of > > > Respiratory Rate greater than n? > > > > > > openEHR-EHR-OBSERVATION.respiration.v1.adl > > > > > > Rate at0004 > n > > > Units /min (is that a default or are the units passed in the query) > > > > > > Or is this future functionality? > > > > > > thanks > > > > > > Greg > > > > > > http://www.patientos.org > > > _______________________________________________ > > > openEHR-technical mailing list > > > openEHR-technical at openehr.org > > > > > http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical > > > > > > > > > _______________________________________________ > > openEHR-technical mailing list > > openEHR-technical at openehr.org > > http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical > > > > > _______________________________________________ > openEHR-technical mailing list > openEHR-technical at openehr.org > http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical

