AQL Operator Syntax Examples
The following sub-sections illustrate various AQL operators with examples.
ADL matches operator
The following examples show how the ADL matches operator may be used within AQL statements.
the ADL expressions on the right-hand side of the matches operator are in ADL 1.4 format.
|
| Clinical Scenario 1 | Blood glucose > 11 mmol/L or blood glucose >= 200 mg/dL |
|---|---|
EHR path |
|
AQL Fragment |
|
| Clinical Scenario 2 | Blood glucose level is between 5-6 mmol/L or between 90-110 mg/dL |
|---|---|
EHR path |
|
AQL Fragment |
|
| Clinical Scenario 3 | HbA1c > 7.0% |
|---|---|
EHR path |
|
AQL Fragment |
|
| Clinical Scenario 4 | Total cholesterol >= 5.0 mmol/L or LDL-C >= 3.0 mmol/L |
|---|---|
Total cholesterol EHR path |
|
LDL-C EHR path |
|
AQL Fragment |
|
Arithmetic operators
The following example shows how arithmetic operators may be used within AQL statements.
| Clinical Scenario 1 | For each recorded administration of ampicillin check for problem diagnosis of skin rash that is within 2 days of the administration date |
|---|---|
AQL Fragment |
|
Nest Query and 'Not in'
The following example shows the use of a nested query and the not-in operator.
| Clinical Scenario 1 | All patients who have not been discharged |
|---|---|
AQL Fragment |
|