AQL queries using links (discussion)

Removed this example from the current AQL specification v1.0.0, because there is no definition around querying using links, and might need some clarifications and more examples to be correctly implemented.

 

This example below means from a particular EHR, retrieving all composition uid values and the contained instruction instances if the instruction instances have links with particular EHR URI value.

 

-------- SELECT c/uid/value, instruction FROM EHR e [ehr_id/value=$ehrid] CONTAINS COMPOSITION c CONTAINS INSTRUCTION instruction[openEHR-EHR-INSTRUCTION.referral.v1] WHERE EXISTS instruction/links[target='ehr://327000002/87284370-2D4B-4e3d-A3F3-F303D2F4F34B@latest_trunk_version'] --------

 

For instance we need to be sure that kind of path predicate is valid.