Supporting Informative comments within AQL predicates - using a pair of "|" characters.

Description

Similar to IHTSDO pipe syntax used for term description, it would be convenient to support arbitrary comments inside AQL predicates.
Content enclosed by a pair of "|" characters is completely ignored by EHRSrv.

Example;

SELECT bp
FROM EHR e
CONTAINS OBSERVATION bp[openEHR-EHR-OBSERVATION.blood_pressure.v1]
WHERE bp/data[at0001]/events[at0006]/data[at0003]/items[at0004|Systolic|]/value/magnitude>110

Environment

None

Activity

Show:
Sebastian Iancu
September 26, 2019, 10:14 PM
Edited

If we going to support this inside AQL than we actually need to support it first on the level of archetype path syntax: https://specifications.openehr.org/releases/BASE/latest/architecture_overview.html#_predicate_expressions.
The impact would be higher than only changing AQL.

Is this still needed?

Diego Bosca
September 26, 2019, 11:00 PM

agree, could be useful, but maybe is overlapping with simplified json paths?

Ian McNicoll
September 27, 2019, 2:53 PM

We already do support this kind of syntax e.g local::at0004::systolic in some tools e.f for setting default values, so it is not a completely novel idea.

I think it would be helpful to add it to the formal syntax. There is some cross-over in purpose with the simplified json paths but they are slightly different in purpose and need ot tech support. This variant is just for human-readability and basically the parser can ignore anything between ||. With the flat Json paths, (which might be nice to have in AQL) there is a dependency on resolving the actual path by interrogating the source template, and applying the correct mapping plus the constraint would actually be enforced to something like [at0004,'Sys. Reading'] .

Value in both IMO

Reporter

Borut Fabjan

Labels

None

Priority

Minor
Configure