keyword

The complete set of CQL keywords — every word that has syntactic meaning in the language. This is the union of reserved words and keyword identifiers. Keywords appear as terminal tokens throughout the grammar.

Examples

Keywords used as operators

not exists [Condition: "Diabetes Mellitus"]

Keywords as structural tokens

define "Has Diabetes":
  exists [Condition: "Diabetes Mellitus"]

Keywords as modifiers

define fluent function "ToInterval"(p FHIR.Period) returns Interval<DateTime>:
  Interval[p."start".value, p."end".value]
Railroad Diagram
100%
see grammar for complete list

scroll to zoom · drag to pan · click green rules or blue tokens to navigate

EBNF

keyword
  : 'after' | 'aggregate' | 'all' | 'and' | 'as' | 'asc' | 'ascending'
  | 'before' | 'between' | 'by' | 'called' | 'case' | 'cast' | 'code'
  | 'Code' | 'codesystem' | 'codesystems' | 'collapse' | 'concept'
  | 'Concept' | 'contains' | 'context' | 'convert' | 'date' | 'day'
  | 'days' | 'default' | 'define' | 'desc' | 'descending' | 'difference'
  | 'display' | 'distinct' | 'div' | 'duration' | 'during' | 'else'
  | 'end' | 'ends' | 'except' | 'exists' | 'expand' | 'false' | 'flatten'
  | 'fluent' | 'from' | 'function' | 'hour' | 'hours' | 'if' | 'implies'
  | 'in' | 'include' | 'includes' | 'included in' | 'intersect' | 'Interval'
  | 'is' | 'let' | 'library' | 'List' | 'maximum' | 'meets' | 'millisecond'
  | 'milliseconds' | 'minimum' | 'minute' | 'minutes' | 'mod' | 'month'
  | 'months' | 'not' | 'null' | 'occurs' | 'of' | 'on or' | 'or'
  | 'or after' | 'or before' | 'or less' | 'or more' | 'or on' | 'overlaps'
  | 'parameter' | 'per' | 'point' | 'predecessor' | 'private' | 'properly'
  | 'public' | 'return' | 'same' | 'second' | 'seconds' | 'singleton'
  | 'start' | 'starting' | 'starts' | 'sort' | 'successor' | 'such that'
  | 'then' | 'time' | 'timezone' | 'timezoneoffset' | 'to' | 'true'
  | 'Tuple' | 'union' | 'using' | 'valueset' | 'version' | 'week' | 'weeks'
  | 'where' | 'when' | 'width' | 'with' | 'within' | 'without' | 'xor'
  | 'year' | 'years'
  ;