Versions should be handled using the regular expression syntax of the archetype ID, as is done in ADL to represent slot constraints and action_arcehtype_id in ACTIVITY.
E.g. [openEHR-EHR-COMPOSITION.encounter.v1*] BTW, using the OR operator you could have had ... CONTAINS COMPOSITION [openEHR-EHR-COMPOSITION.encounter.v1] OR COMPOSITION [openEHR-EHR-COMPOSITION.encounter.v2] ... Heath > -----Original Message----- > From: openehr-technical-bounces at openehr.org [mailto:openehr-technical- > bounces at openehr.org] On Behalf Of Ian McNicoll > Sent: Wednesday, 4 June 2008 6:06 AM > To: For openEHR technical discussions > Subject: Re: openEHR Querying specifications > > Fair point. Perhaps AQL should support ranges of version numbers to > simplify the query as in many cases the query will not be affected by > a structrural change to the archetype > > e.g. > > > FROM EHR [ehr_id/value=$ehrUid] > > CONTAINS COMPOSITION [openEHR-EHR-COMPOSITION.encounter.v[BETWEEN 1.5 AND 2] > > CONTAINS OBSERVATION obs [openEHR-EHR-OBSERVATION.blood_pressure.v[>=1] > > WHERE ( > > obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/value >= > > 140 > > Versions and revisions would need to be handled. > > Ian > > 2008/6/3 Greg Caulton <caultonpos at gmail.com>: > > > > ------------------------------ > > > > Message: 2 > > Date: Tue, 03 Jun 2008 16:39:37 +0100 > > From: Thomas Beale <thomas.beale at oceaninformatics.com> > > Subject: openEHR Querying specifications > > To: Openehr-Technical <openehr-technical at openehr.org> > > Message-ID: <484565B9.6030805 at oceaninformatics.com> > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > > > > The current material is therefore intended as a resource for discussion > > and definition of a query language for openEHR. A team can be defined > > after sufficient time for the community to react to this material and > > determine if it makes sense to use AQL as the basis or to seek other > > solutions or candidates. > > > > - thomas beale > > > > > > > > Perhaps this has been answered but as the archetypes change version is it > > expected that the AQL will need to keep up with that - I assume our historic > > data would be specific to the archetype version - not 'upgraded' ? > > > > i.e. after v1: > > > > FROM EHR [ehr_id/value=$ehrUid] CONTAINS COMPOSITION > > [openEHR-EHR-COMPOSITION.encounter.v1] > > CONTAINS OBSERVATION obs [openEHR-EHR-OBSERVATION.blood_pressure.v1] > > WHERE obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/value > >>= 140 > > > > after v2: > > > > FROM EHR [ehr_id/value=$ehrUid] > > CONTAINS COMPOSITION [openEHR-EHR-COMPOSITION.encounter.v1] > > CONTAINS COMPOSITION [openEHR-EHR-COMPOSITION.encounter.v2] > > CONTAINS OBSERVATION obs [openEHR-EHR-OBSERVATION.blood_pressure.v1] > > CONTAINS OBSERVATION obs2 [openEHR-EHR-OBSERVATION.blood_pressure.v2] > > WHERE ( > > obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/value >= > > 140 OR > > > obs2/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/value > >>= 140 ) > > > > not sure if that is exactly right. > > > > 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 > > > > > > > > -- > Dr Ian McNicoll > office +44(0)141 560 4657 > fax +44(0)141 560 4657 > mobile +44 (0)775 209 7859 > skype ianmcnicoll > > Consultant - Ocean Informatics ian.mcnicoll at oceaninformatics.com > Consultant - IRIS GP Accounts > > Member of BCS Primary Health Care Specialist Group - http://www.phcsg.org > > _______________________________________________ > openEHR-technical mailing list > openEHR-technical at openehr.org > http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical

