Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Left operand is an identified path and right operand is a real criteria value - primitive type:
    No Format
    o/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/value >= 140
    c/archetype_details/template_id/value='health_encounter'
    
  • Left operand is an identified path and right operand is a parameter:
    No Format
    c/archetype_details/template_id/value=$templateParameter
    
  • Both left operand and right operand are an identified path (this is an advanced feature):
    No Format
    o/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/value >
    o1/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/value
    

...

SELECT

SELECT clause specifies what data is to be retrieved by the AQL query. The data can be any types from openEHR RM and any primitive data types. In addition, SELECT clause uses TOP to indicate the number of result setS that should be returned and name alias to rename the retrieved data.

...

Example 1: retrieve all compositions' name value, context start time and composer name from a specific EHR.

No Format

SELECT c/name/value AS Name, c/context/start_time AS date_time, c/composer/name AS Composer

...


 FROM EHR e[ehr_id/value=$ehrUid] CONTAINS COMPOSITION c

Example 2: Retrieve all composition objects of a specific EHR.

...