Proposed AQL changes
This page outlines the changes to AQL being explored by Ocean Informatics. In general the changes presented here intend to generalise and extend the capability of AQL.
Identifed paths
Do not break the path down into its path parts
This will simplify the grammar and improve parser performance. The is currently no identifed need to have the path broken down into the path parts except to validate the path syntax. This can be achieved using a terminal definition rather than a rule.
BNF Changes
- Add an IdentifiedPath terminal
- remove <IdentifiedPath>, <Predicate>, <NodePredicate>, <NodePredicateOr>, <NodePredicateAnd>, <NodePredicateComparable>, <PredicateOperand>, <ObjectPath>, <PathPart> rules
FROM Clause
Remove specific class names in FROM class definitions such as VERSIONED_OBJECT, VERSION and EHR
This generalises the utility of the language to other reference models including demographics
BNF Changes
- Remove <FromEHR> from <From>
- Remove <FromEHR> rule
- Replace <SimpleClassExpr> with <ArchetypedClassExpr> in <ClassExpr> rule
- Remove <SimpleClassExpr>, <VersionedClassExpr> and <VersionClassExpr> rules
- Remove <StandardPredicate>, <PredicateExpr>, <PredicateOr>, <PredicateAnd>, <PredicateEquality>
Remove general attribute predicates in Class Expressions
This ensure that only archetype ID predicate expressions can be specified on classes in the FROM clause. All other RM attribute constrains must be expressed as WHERE criteria. This change is intended to make the rules about what attributes can be used in the FROM CLASS expressions interoperable. It also provides a better correlation to a relational model query where an archetyped class can be thought of as a relational table.
BNF Changes
- The BNF changes specified above achieves this change.
Add NOT operator
Allow a NOT CONTAINS statement to be made
WHERE Clause
Add matches operator
Allow ADL like expressions to provide value set, value range and regular expression criteria. For example:
items[...]/value/defining_code/code_string MATCHES { '13452.2', '14062.3' }
Also allow TYPE based criteria. For example:
items[..]/value MATCHES { DV_TEXT }
BNF Changes
- include a <MatchesExpression> that supports a subset of cADL including C_COMPLEX_OBJECT and C_PRIMITIVE_OBJECT
Add NOT operator
Allow a NOT MATCHES statement and other bollean and comparable expressions