This is good work on a great concept!
I have a question related to how you will deal with multiple EVENT on an OBSERVATION.
I am working on ETL for openEHR data. To extract i.e. Body Temperature I use the following AQL. The example illustrates how I query for only POINT_EVENT and also support for multiple versions of the archetype.
The latter, versions of archetype, could be done safer to only allow specific versions. Currently there are v1 and v2 published over the years.
select
pe/time/value as 'time',
pe/data[at0001]/items[at0004]/value/magnitude as 'value',
pe/data[at0001]/items[at0004]/value/units as 'unit',
temp/data[at0002]/origin/value as 'origin',
temp/protocol[at0020]/items[at0021]/value/value AS 'location_of_measurement',
temp/data[at0002]/events[at0003]/state[at0029]/items[at0030]/value/value AS 'body_exposure',
c/name/value as 'composition_name',
c/context/start_time/value as 'start_time',
c/context/end_time/value as 'end_time',
temp/archetype_details/archetype_id/value as 'archetype_id'
from
composition c
contains observation temp[openEHR-EHR-OBSERVATION.body_temperature.v*]
contains POINT_EVENT pe
order by
temp/data[at0002]/origin/value desc,
pe/time/value desc
This is good work on a great concept!
I have a question related to how you will deal with multiple EVENT on an OBSERVATION.
I am working on ETL for openEHR data. To extract i.e. Body Temperature I use the following AQL. The example illustrates how I query for only
POINT_EVENTand also support for multiple versions of the archetype.The latter, versions of archetype, could be done safer to only allow specific versions. Currently there are v1 and v2 published over the years.