# openEHR Querying specifications

**URL:** <https://discourse.openehr.org/t/openehr-querying-specifications/14765>\
**Category:** Technical (archive)\
**Created:** [3 June 2008 15:39 UTC](https://discourse.openehr.org/t/openehr-querying-specifications/14765 "2008-06-03T15:39:37Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![Tim\_Cook2](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/t/57b2e6/32.png) [@Tim\_Cook2](https://discourse.openehr.org/u/Tim_Cook2)\
**Post date:** [4 June 2008 21:13 UTC](https://discourse.openehr.org/t/openehr-querying-specifications/14765/21 "2008-06-04T21:13:55Z")

</div>

Hmmm, seems to me that you are introducing a new term AND omitting a  
term that is in use. While not clarifying the previous terms which Tom  
did quite well.

I believe that Tom very well defined a version change as a change that  
substantially modified a previous version in such a manner as to render  
it incompatible with previous versions.

A Revision (which you omitted) is a change that may further constrain or  
otherwise modify an archetype but does not render the expressed  
information unusable.

This is also the same information that can be found in the relevant  
documents. But I see no reference to 'Package' as far as archetypes are  
concerned.

Package implies a grouping of some type. An archetype is (AFAIK)  
considered to be the expression of a single clinical concept.

Regards,  
Tim

---

<div class="post-metadata">

**Author:** ![ian.mcnicoll](https://discourse.openehr.org/user_avatar/discourse.openehr.org/ian.mcnicoll/32/4430_2.png) [@ian.mcnicoll](https://discourse.openehr.org/u/ian.mcnicoll)\
**Post date:** [4 June 2008 22:36 UTC](https://discourse.openehr.org/t/openehr-querying-specifications/14765/22 "2008-06-04T22:36:14Z")

</div>

Hi Gerard,

I 'm afraid I agree with Tim on this one. The difference between  
'breaking' Version changes and non-breaking Revisions is clearly  
documented in the specification. The reason for confusion and non-use  
within the NHS is simply that the current tools do not support  
Revisions. Now that the Template Model has been produced, I would hope  
that we can properly support Revisions in both Archetype Editor and  
Template Designer.

I appreciate that at first, Version / Revision is confusing because of  
the similarity in English, but I think it is too late now to change  
these terms, which at least have clear technical definitions. I was  
interested to see Thomas's comment that a future version of the parser  
will offer guidance on whether an altered archetype needs to be  
re-versioned.

BTW What would be the equivalents in Dutch for Revision and Version?

Ian

---

<div class="post-metadata">

**Author:** ![Peter\_Gummer1](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/p/258eb7/32.png) [@Peter\_Gummer1](https://discourse.openehr.org/u/Peter_Gummer1)\
**Post date:** [5 June 2008 01:44 UTC](https://discourse.openehr.org/t/openehr-querying-specifications/14765/23 "2008-06-05T01:44:29Z")

</div>

Heath Frankel wrote:

> [openEHR-EHR-COMPOSITION.encounter.v1\*] (or perhaps more correctly  
> [openEHR-EHR-COMPOSITION.encounter.v1.\*], where the dot means any  
> character  
> not the version delimiter) and [openEHR-EHR-COMPOSITION.encounter.v\d+]  
> are  
> different. The first allows all revisions of .v1 (e.g. v1.1, v1.2, ..)

Close, but not quite!

[openEHR-EHR-COMPOSITION.encounter.v1.\*] allows all revisions of .v1, .v10,  
.v11, ... .v100, .v101, etc.

To allow all revisions of .v1, we would need this:

[openEHR-EHR-COMPOSITION.encounter.v1\..\*]

But what about .v1draft? This regex wouldn't catch it. Does this matter? Or  
is that old "draft" convention going to be phased out?

- Peter

---

<div class="post-metadata">

**Author:** ![Heath\_Frankel3](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@Heath\_Frankel3](https://discourse.openehr.org/u/Heath_Frankel3)\
**Post date:** [5 June 2008 02:06 UTC](https://discourse.openehr.org/t/openehr-querying-specifications/14765/24 "2008-06-05T02:06:23Z")

</div>

The v1draft convention is already deprecated. The BNF for AQL doesn't  
support it deliberately, to ensure only non-draft archetypes are used when  
committing/retrieving data.

Heath

> From: openehr-technical-bounces@openehr.org [mailto:openehr-technical-  
> bounces@openehr.org] On Behalf Of Peter Gummer  
> Sent: Thursday, 5 June 2008 11:14 AM  
> To: For openEHR technical discussions  
> Subject: Re: openEHR Querying specifications
> 
> Heath Frankel wrote:  
> \> [openEHR-EHR-COMPOSITION.encounter.v1\*] (or perhaps more correctly  
> \> [openEHR-EHR-COMPOSITION.encounter.v1.\*], where the dot means any  
> \> character  
> \> not the version delimiter) and [openEHR-EHR-COMPOSITION.encounter.v\d+]  
> \> are  
> \> different. The first allows all revisions of .v1 (e.g. v1.1, v1.2, ..)
> 
> Close, but not quite!
> 
> [openEHR-EHR-COMPOSITION.encounter.v1.\*] allows all revisions of .v1,

.v10,

> .v11, ... .v100, .v101, etc.
> 
> To allow all revisions of .v1, we would need this:
> 
> [openEHR-EHR-COMPOSITION.encounter.v1\..\*]
> 
> But what about .v1draft? This regex wouldn't catch it. Does this matter?

Or

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [5 June 2008 06:28 UTC](https://discourse.openehr.org/t/openehr-querying-specifications/14765/25 "2008-06-05T06:28:43Z")

</div>

I must disappoint you:

Dutch: Revisie, versie.

Gerard

> BTW What would be the equivalents in Dutch for Revision and Version?

– –  
Gerard Freriks, MD  
Huigsloterdijk 378  
2158 LR Buitenkaag  
The Netherlands

T: +31 252544896  
M: +31 620347088  
E: [gfrer@luna.nl](mailto:gfrer@luna.nl)

Those who would give up essential Liberty, to purchase a little temporary  
Safety, deserve neither Liberty nor Safety. Benjamin Franklin 11 Nov 1755

---

<div class="post-metadata">

**Author:** ![mikael](https://discourse.openehr.org/user_avatar/discourse.openehr.org/mikael/32/881_2.png) [@mikael](https://discourse.openehr.org/u/mikael)\
**Post date:** [5 June 2008 11:57 UTC](https://discourse.openehr.org/t/openehr-querying-specifications/14765/26 "2008-06-05T11:57:29Z")

</div>

> Mikael Nyström wrote:
> 
> > If for example the change between the first and second version is a change  
> > in a position value set from “sitting”, “standing” and “other” to “sitting”,  
> > “standing”, “lying” and “other”. If then a query is written for the first  
> > version of the archetype searching for all cases where the position is “not  
> > sitting” and “not standing” the query will search for the position “other”  
> > and return a correct answer.
> > 
> > If we implement Rong’s suggestion the query will work also with the second  
> > version of the archetype, but it will return another answer than the  
> > intended, namely the cases where the position is “not sitting” and “not  
> > standing” and “not lying” instead of the intended “not sitting” and “not  
> > standing”.
> 
> Micke, what if you keep the original search criteria “not sitting” and “not  
> standing” instead of searching “others”, will you get expected result with  
> both versions?

Yes, that works, and that is the proper way to do it. My example was an example of how people quite often do without realizing the consequences. They think that if something works in a specific version it will work in the subsequent versions. I think I have seen these kinds of problems too often in other areas in medical informatics (like the not elsewhere classified-problem in ICD) and I therefore think that people will do things without realizing the consequences also when they query archetypes.

Greetings,  
Mikael

---

<div class="post-metadata">

**Author:** ![Tim\_Cook2](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/t/57b2e6/32.png) [@Tim\_Cook2](https://discourse.openehr.org/u/Tim_Cook2)\
**Post date:** [10 June 2008 11:27 UTC](https://discourse.openehr.org/t/openehr-querying-specifications/14765/27 "2008-06-10T11:27:58Z")

</div>

The previously referred to AQL BNF carries this header:

"Name" = 'EhrBank Query Lanaguage (EQL) - {Equal}'  
"Version" = '0.4'  
"Date" = '14 September 2006'  
"Author" = 'Chunlan Ma & Heath Frankel'

We know it has been renamed from EQL to AQL but I am wondering if there  
is a newer version available anywhere?

Thanks,  
Tim

[Previous page](https://discourse.openehr.org/t/openehr-querying-specifications/14765.md?page=1)
