Hi Greg, Thank you for raising your issue.
Sorry that I don't really understand what you want to do? Do you want a path for an archetype node or do you want to use AQL to retrieve EHR data? The AQL where clause stated in your previous email is not quite correct. It should always starts with a variable which is defined in the AQL from clause, such as: Select bp >From EHR e CONTAINS Composition anyComposition CONTAINS Observation bp[openEHR-EHR-OBSERVATION.blood_pressure.v1] Where bp/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude>=1 40 In this query, anyComposition and bp are variables. This path "/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value" points to the systolic element.value - DV_QUANTITY This path "/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude" points to the systolic element value magnitude - double. In future, we do need AQL validations, I agree. Ocean Template Designer has AQL builder prototype. However, it is only a prototype, only about three weeks work. However, it can be used to create simple AQL queries. We are in the process of building a new AQL builder. AQL specifications is on openEHR wiki. Any comments or criticisms are welcome. Cheers, Chunlan > -----Original Message----- > From: openehr-technical-bounces at openehr.org [mailto:openehr-technical- > bounces at openehr.org] On Behalf Of Greg Caulton > Sent: Wednesday, October 01, 2008 10:01 PM > To: openehr-technical at openehr.org > Subject: AQL queries > > I still think it is unfortunate that none of the existing tools nor > the web based CKM show the appropriate AQL path for each data element. > > It is near impossible to manually build > > ... > WHERE openEHR-EHR- > OBSERVATION.blood_pressure.v1/data[at0001]/events[at0006]/data[at0003]/ > items[at0004]/value/value > >= 140 > > the only way I can do it is to write code to parse the ADL and build > the path but I have nothing to validate that my implementation was > correct > > it would be nice to have a set of illustrative AQL queries that one > could validate against. > _______________________________________________ > openEHR-technical mailing list > openEHR-technical at openehr.org > http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical

