Versions Compared

Key

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

...

  • Retrieving candidate compositions with given criteria on EHR identifier and composition meta data, such as composition type (i.e. archetype id), healthcare facility, event start time, composer and so on.
  • Retrieving EHR data from a single EHR for dedicated purposes, such as risk factor calculations 
  • Reporting, in which case AQL is used to retrieve EHR data that are cross multiple EHRs, i.e. population AQL query. 
  • AQL might also be used for other purposes which are out of my knowledge. This list needs to be updated with new usages.to be continued...

The existing AQL grammar and syntax maybe further enhanced in the following areas:

  • Reduce the length of the query statement. The use of archetype path in AQL query makes the query lengthy and hard to read. Local variables with meaningful names that are assigned with path can be used to reduce the length of the query as well as improve readability of the query. One example is shown below:
    Code Block
    
    let $systolic_bp="data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude"
    let $diastolic_bp="data[at0001]/events[at0006]/data[at0003]/items[at0005]/value/magnitude"
    
    
    SELECT obs/$systolic_bp, obs/$diastolic_bp
    FROM EHR [ehr_id/value=$ehrUid] CONTAINS COMPOSITION [openEHR-EHR-COMPOSITION.encounter.v1] 
         CONTAINS OBSERVATION obs [openEHR-EHR-OBSERVATION.blood_pressure.v1]
    WHERE obs/$systolic_bp>= 140 OR obs/$diastolic_bp>=90
    
  • To be continued