Hi Tim, > -----Original Message----- > From: openehr-technical-bounces at openehr.org [mailto:openehr-technical- > bounces at openehr.org] On Behalf Of Tim Cook > Sent: Wednesday, June 04, 2008 4:49 AM > To: For openEHR technical discussions > Subject: Re: openEHR Querying specifications > > Hi Tom, > > On Tue, 2008-06-03 at 16:39 +0100, Thomas Beale wrote: > > > I have uploaded the Ocean Informatics developed 'Archetype Query > > Language' (AQL) as a candidate solution for querying archetype-based > > data. As explained in the query specification home page, AQL can be > > treated as a starting point for defining a normative openEHR querying > > language, or it may be considered to be one candidate amongst several, > > if there are others available. Ocean Informatics undertakes to > > continue the development of this language in the openEHR space, so > > that if the openEHR community wishes to use AQL, the most recent > > modifications will be available. > > This certainly 'looks' functional. I assume that Ocean Informatics has > done a fair amount of testing it to get to this point. [Chunlan Ma] Yes, Ocean has implemented the parser an query engine to process AQL queries even though some features are not supported yet. It is in our plan. Currently, all Ocean products are using AQL to retrieve data from backend.
> > From my (possibly too brief) read; are there any cases where the FROM > clause wouldn't contain either EHR of DEMOGRAPHICS as its first > parameter? [Chunlan Ma] Certainly, a FROM clause doesn't necessarily include EHR if it is not required. In the From clause, if you specify a particular ehr_id value as the criteria, then you are querying data within a single EHR. Otherwise, you are doing population queries, i.e. querying data across all EHRs. If you want to retrieve EHR associated information, then you need to specify the EHR variable in FROM clause, such as: SELECT e/ehr_id/value FROM EHR e CONTAINS... However, if you are not interested in the EHR associated information, then you can just leave it out. For example, SELECT c/composer/name FROM COMPOSITION c[openEHR-EHR-COMPOSITION.report.v1]... Also, does the FROM clause support wildcard matching such > as: > > FROM EHR e[*] CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.report.v1] > > Oooops! re-reading the very first step I see that the default is ALL > EHRs. But, isn't explicit better than implicit in this case? Otherwise > this query would read: > > FROM CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.report.v1] > > Correct? > [Chunlan Ma] We don't use wildcard in FROM clause because like what you said before, it is the same meaning as FROM EHR e CONTAINS.... If it is required, wildcard can be supported in WHERE clause or SELECT clause for the openEHR path, such as //*[at0002] Cheers, Chunlan > > > > Thanks, > --Tim > > > > > -- > Timothy Cook, MSc > Health Informatics Research & Development Services LinkedIn > Profile:http://www.linkedin.com/in/timothywaynecook > Skype ID == timothy.cook > ************************************************************** > *You may get my Public GPG key from popular keyservers or * > *from this link http://timothywayne.cook.googlepages.com/home* > **************************************************************

