This section explains the correct order of operation for unary operators, binary operators, filters and supplements.
Unary operators (e.g. descendantOf, descendantOrSelfOf, ancestorOf, ancestorOrSelfOf, memberOf) are applied from inside to out (i.e. from right to left). For example, when the following expression constraint is processed, the memberOf operator is applied first to the Example problem list concepts reference set, and then the descendants of the referenced components are determined.
Whenever potential ambiguity in binary operator precedence may occur, round brackets must be used to clearly disambiguate the order in which these operators are applied. For example, the following expression constraint is not valid:
Filter constraints (e.g. concept, description, or member filters) apply only to the sub-expression constraint part that is directly to the left of the filter.
For example, the following expression constraint will apply the term filter to only the descendants or self of 415582006 | Stenosis| . This expression constraint will match descendants of 404684003 | Clinical finding| with a finding site that is a descendant or self of 39057004 | Pulmonary valve structure| , and an associated morphology that is any descendant or self of 415582006 | Stenosis| which has a description matching the term "insufficiency". Therefore, the concept 123801008 | Heart valve stenosis and regurgitation (disorder)| will match this expression constraint because it has the associated morphology 708027006 | Valvular stenosis with valvular insufficiency| .
History supplements are applied only to the sub-expression constraint part that is directly to its left, after any filter constraints on this sub-expression constraint part have been applied.
For example, the following expression constraint will match all concepts that are both an active member of the 734139008 | Anatomy structure and part association reference set| and also either an active member of the 734138000 | Anatomy structure and entire association reference set| or an inactive concept associated with an active member of the 734138000 | Anatomy structure and entire association reference set| via the 900000000000527005 | SAME AS association reference set| . Because all active members of the 734139008 | Anatomy structure and part association reference set| are active, there will be no inactive concepts in the result set.