Re: AQL query for blood pressure from the AQL documentation

2019-05-02 Thread Thomas Beale
Georg, can you please raise a PR for this problem on the Jira PR tracker ? thanks On 29/04/2019 22:49, Georg Fette wrote: Hello, I have a problem with the interpretation of an AQL query from the AQL documentation. In section 6.3 the

Re: AQL query for blood pressure from the AQL documentation

2019-05-02 Thread Seref Arikan
Hi Tom, See comments inline please. On Thu, May 2, 2019 at 12:52 PM Thomas Beale wrote: > Ian, > > If you were referring to the discussion about paths and data types, i.e. > how do you know if you can refer to some path inside a DvQuantity if the > archetype only knows about DataValue and LOINC

Re: AQL query for blood pressure from the AQL documentation

2019-05-02 Thread Ian McNicoll
The replies that seref and I gave address the issue. The vast majority of lab imports will use the generic analyte cluster. On Thu, 2 May 2019, 12:01 Ian McNicoll, wrote: > Thomas this is not a problem. The aql works as designed > > On Thu, 2 May 2019, 11:06 Thomas Beale, wrote: > >> Georg, >>

Re: automatic demotion of lists in AQL ?

2019-05-02 Thread Ian McNicoll
Yes that at codes are always effectively namespaced by their parent archetype. Ian ___ openEHR-technical mailing list openEHR-technical@lists.openehr.org http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

Re: AQL query for blood pressure from the AQL documentation

2019-05-02 Thread Ian McNicoll
Ah sorry. Yes that is incorrect. On Thu, 2 May 2019, 12:13 Thomas Beale, wrote: > I'm confused... are you saying the value/value path is not a typo in the > spec? > On 02/05/2019 12:01, Ian McNicoll wrote: > > Thomas this is not a problem. The aql works as designed > > On Thu, 2 May 2019, 11:06

Re: AQL query for blood pressure from the AQL documentation

2019-05-02 Thread Thomas Beale
I'm confused... are you saying the value/value path is not a typo in the spec? On 02/05/2019 12:01, Ian McNicoll wrote: Thomas this is not a problem. The aql works as designed On Thu, 2 May 2019, 11:06 Thomas Beale, > wrote: Georg, can you please

Re: automatic demotion of lists in AQL ?

2019-05-02 Thread Thomas Beale
Unless I am missing something, the fragment items[at0001] cannot appear more than once /relative to any given archetype/. Here, it is relative to 'a', i.e. openEHR-EHR-CLUSTER.laboratory_test_analyte.v1. Within the same archetype, you cannot have other items[xxx] such that the xxx are not

RE: AQL query for blood pressure from the AQL documentation

2019-05-02 Thread Bjørn Næss
I am not sure where this fits in, anyway. Given an AQL for the latest systolic like this: select o/data[at0001]/events[at0006]/data[at0003]/items[at0004] from composition c contains OBSERVATION o[openEHR-EHR-OBSERVATION.blood_pressure.v1] order by o/data[at0001]/origin desc limit 1 I

Re: AQL query for blood pressure from the AQL documentation

2019-05-02 Thread Thomas Beale
Ian, If you were referring to the discussion about paths and data types, i.e. how do you know if you can refer to some path inside a DvQuantity if the archetype only knows about DataValue and LOINC codes, it's true that you can use such a path, if the real data (Element.value) happen to be a

Re: constraining of laboratory_test_analyte Analyte result

2019-05-02 Thread Thomas Beale
Well, at the risk of stepping on Ian's toes (he has spent a lot more time on these particular archetypes and also AQL in general than me), I would say that what we need to do is to create a data-type specific version of this archetype for each DATA_VALUE descendant, e.g.

Re: AQL query for blood pressure from the AQL documentation

2019-05-02 Thread Ian McNicoll
Thomas this is not a problem. The aql works as designed On Thu, 2 May 2019, 11:06 Thomas Beale, wrote: > Georg, > > can you please raise a PR for this problem on the Jira PR tracker > ? > > thanks > On 29/04/2019 22:49, Georg Fette wrote: >

Re: automatic demotion of lists in AQL ?

2019-05-02 Thread Georg Fette
Hi Thomas, I do not want to use the path element "items[at0001]" multiple times. What I mean is that in the query SELECT a/items[at0001]/value FROM EHR e CONTAINS CLUSTER a[openEHR-EHR-CLUSTER.laboratory_test_analyte.v1] the path "a/items[at0001]" denotes a list of ELEMENT (min: 0, max: *).

Re: constraining of laboratory_test_analyte Analyte result

2019-05-02 Thread Georg Fette
Hi Thomas, It depends on what you mean with "specialise". I do not wish to create a new archetype but I rather would like to query existing instances of the openEHR-EHR-CLUSTER.laboratory_test_analyte.v1 archetype. From those instances I would like to query only this with specific attributes.