Hi Pablo,
I hope I understood correctly:
select
a_a/data[at0002]/events[at0003]/data[at0001]/items[at0004]/value,
a_b/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value
from EHR e
contains COMPOSITION a
contains (
OBSERVATION a_a[openEHR-EHR-OBSERVATION.body_temperature.v1] and
OBSERVATION a_b[openEHR-EHR-OBSERVATION.blood_pressure.v1])
this should be the right way to express the query. I think an account for EHRSCAPE could be of help if you want to dig deeper into AQL.
Cheers,
Birger
Pablo Pazos <[email protected]> hat am 1. Oktober 2017 um 17:52 geschrieben:Hi all, another question about AQL and CONTAINS._______________________________________________Most of the AQL samples use just one branch in the FROM clause, like:EHR CONTAINS COMPOSITION CONTAINS OBSERVATION.I'm wondering what would be the correct FROM notation when more than one ENTRY is needed. Some examples below.
SELECT o1/data[...]/.../value, o2/..., ....
FROM
COMPOSITION c [archid] CONTAINS OBSERVATION o1 [archid2],COMPOSITION c [archid] CONTAINS OBSERVATION o2 [archid3],COMPOSITION c [archid] CONTAINS OBSERVATION o3 [archid4]
WHERE ...SELECT o1/data[...]/.../value, o2/..., ....
FROM
COMPOSITION c [archid]CONTAINS OBSERVATION o1 [archid2] ANDCONTAINS OBSERVATION o2 [archid3] ANDCONTAINS OBSERVATION o3 [archid4]
WHERE ...Thanks!--
Ing. Pablo Pazos Gutiérrez
e: [email protected]
p: +598 99 043 145
skype: cabolabs
http://www.cabolabs.com
https://cloudehrserver.com
Subscribe to our newsletter
openEHR-technical mailing list
[email protected]
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org
_______________________________________________ openEHR-technical mailing list [email protected] http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

