...
Archetype predicate is a shortcut of standard predicate, i.e. the predicate does not have left operand and operator. It only has an archetype id, e.g. [openEHR-EHR-COMPOSITION.encounter.v1]. Archetype predicate is a specific type of query criteria indicating what archetype instances are relevant to this query. It is used to scope the the data source from which the query expected data is to be retrieved. Therefore, an archetype predicate is only used within an AQL FROM clause, for example,
FROM EHR [ehr_id/value='1234'] CONTAINS COMPOSITION c [openEHR-EHR-COMPOSITION.encounter.v1] CONTAINS |
Node predicate
Node predicate is also a shortcut of standard predicate. It has the following forms:
- containing an archetype node id (known as atcode) only, e.g.
No Format [at0002]
- containing an archetype node id and a name value criteria, e.g.
No Format [at0002 and name/value=$nameValue
] [at0002 and name/value='real name value']
- containing an archetype node id and a shortcut of name value criteria, e.g.
No Format [at0002, $nameValue
] [at0002, 'real name value']
- The above three forms are the most common node predicates. A more advanced form is to include a general criteria instead of the name/value criteria within the predicate. The general criteria consists of left operand, operator, and right operand, e.g.
at0002 and value/defining_code/terminology_id/value=$terminologyId
...
Operator | Meaning | Example | ||
---|---|---|---|---|
= | Equal |
| ||
> | Greater than |
| ||
>= | Greater than or equal to |
| ||
< | Smaller than |
| ||
<= | Smaller than or equal to |
| ||
!= | not equals to |
| ||
|
|
|
Advanced AQL operators
...