whereClause

The where clause filters the results of a query by a Boolean expression. Only rows where the expression evaluates to true are included.

Examples

Filter by active status

from [Condition] C
  where C.clinicalStatus ~ "Active"

Filter by date range

from [Encounter: "Inpatient Encounter"] E
  where E.period during "Measurement Period"

Compound filter

from [MedicationRequest] M
  where M.status = 'active'
    and M.intent = 'order'
Railroad Diagram
100%
where expression

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

EBNF

whereClause
  : 'where' expression
  ;

Used In