This is a working draft of using some ADL (Archetype Definition Language) operators in AQL WHERE clause in order to improve AQL flexibility. This proposal is still under review, any comments are welcome.
Clinical Scenario 1 |
Blood glucose > 11 mmol/L or blood glucose >= 200 mg/dL |
EHR path |
o/data[at0001]/events[at0002 and name/value='Any event']/data[at0003]/items[at0013.1] |
AQL Expression Fragment |
|
|
|
|
|
Clinical Scenario 2 |
Blood glucose level is between 5-6 mmol/L or between 90-110 mg/dL |
|
EHR path |
o/data[at0001]/events[at0002 and name/value='Any event']/data[at0003]/items[at0013.1] |
AQL Fragment |
|
|||
|
|
|||
Clinical Scenario 3 |
HbA1c > 7.0% |
|||
EHR path |
o/data[at0001]/events[at0002 and name/value='Any event']/data[at0003]/items[at0013.1] |
|||
AQL Fragment |
|
|||
|
|
|||
Clinical Scenario 4 |
Total cholesterol >= 5.0 mmol/L or LDL-C >= 3.0 mmol/L |
|||
Total cholesterol EHR path |
o/data[at0001]/events[at0002 and name/value='Any event']/data[at0003]/items[at0013.1] |
|||
LDL-C EHR path |
o/data[at0001]/events[at0002 and name/value='Any event']/data[at0003]/items[at0011.1 and name/value='Fractions']/items[at0013.4 and name/value='LDL-Cholesterol'] |
|||
AQL Fragment |
|
|||
|
|
|||
Clinical Scenario 5 |
Require all HbA1c values done in 1999 |
|||
EHR path |
o/data/origin |
|||
AQL Fragment |
|
|||
|
|
|||
Clinical Scenario 6 |
Require all blood glucose values done in the morning of 1st December, 1999 |
|||
EHR path |
o/data/origin |
|||
AQL Fragment |
|
|||
|
|
|||
Clinical Scenario 7 |
Require all blood glucose values done in the morning of December, 1999 |
|||
EHR path |
o/data/origin |
|||
AQL Fragment |
|
|||
|
|
|||
Clinical Scenario 8 |
Require all HbA1c values done after 1999 |
|||
EHR path |
o/data/origin |
|||
AQL Fragment |
|
|||
|
|
|||
Clinical Scenario 9 |
Require all HbA1c values done before 1999 |
|||
EHR path |
o/data/origin |
|||
AQL Fragment |
|
|||
|
|
|||
Clinical Scenario 10 |
Requires all reports composed by patient self |
|||
AQL Expression |
|
|||
|
|
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 |
|
|
|
|
|
Clinical Scenario 1 |
all patients who have not been discharged |
||
AQL Statement |
|
||
|
|
"EXISTS" operator has been supported in the latest AQL BNF grammar. The path followed by exists does not have brackets around. The section below can be ignored. It will be removed later.
Clinical Scenario 1 |
requires all blood pressure values with position recorded |
||
AQL Expression |
|
|