#### Search

Go to start of banner

# Compound Expression Constraints

Expression constraints can be built up from smaller parts using conjunction (i.e. AND) and disjunction (i.e. OR). The simplest example of this is where the conjunction or disjunction is used between two simple expressions. For example, the following expression constraint is satisfied only by clinical findings which are both a disorder of the lung and an edema of the trunk. This gives the same result as a mathematical intersection between the set of 19829001 | Disorder of lung|  descendants and the set of 301867009 | Edema of trunk|  descendants.

Please note that all keywords are case insensitive, so the following two expression constraints are equivalent to the above:

The next expression constraint is satisfied only by clinical findings which are either a disorder of the lung or an edema of the trunk. This gives the same result as a mathematical union of the set of 19829001 | Disorder of lung|  descendants and the set of 301867009 | Edema of trunk|  descendants. For this reason, an OR operator will usually allow more valid clinical meanings than an AND operator.

Conjunction and disjunction operators may also be combined with the use of the 'member of' function, as shown below:

This expression constraint is satisfied only by concepts that belong to the 19829001 | Disorder of lung|  hierarchy and are also members of the 700043003 | Example problem list concepts reference set| .

When more than one conjunction or more than one disjunction is used, round brackets can be optionally applied. For example, the following expression constraints are all valid and equivalent to each other:

However, where a conjunction and disjunction are both used together, it is mandatory to use round brackets to disambiguate the meaning of the expression constraint. For example, the following expression constraint is not valid:

And must be expressed (depending on the intended meaning) as either:

Or as:

# Attribute Conjunction and Disjunction

Conjunction and disjunction may be used within refinements in a variety of ways. The most common way of using these operators in a refinement is to define the conjunction or disjunction of individual attributes.

For example, the expression constraint below, in which the comma between the two attributes represents conjunction, is satisfied only by clinical findings which have both a finding site of pulmonary valve structure (or subtype) and an associated morphology of stenosis (or subtype).

This expression constraint can equivalently be expressed as:

The following example uses the disjunction operator (OR) to represent the disjunction of two attributes. This constraint is satisfied only by clinical findings which have either an associated morphology of 'infarct' (or subtype) or are due to a myocardial infarction (or subtype).

When more than one conjunction or more than one disjunction is used in a refinement, round brackets can be optionally applied. For example, the following expression constraints are all valid and equivalent to each other:

However, where a conjunction and disjunction are both used together in a refinement, it is mandatory to use brackets to disambiguate the meaning of the expression constraint.

For example, the following expression constraint is not valid:

And must be expressed (depending on the intended meaning) as either:

Or as:

# Attribute Group Conjunction and Disjunction

Similarly, conjunction and disjunction may be defined between attribute groups. The following expression constraint is satisfied only by clinical findings which either have a finding site of pulmonary valve structure (or subtype) and an associated morphology of stenosis (or subtype), OR have a finding site of right ventricular structure (or subtype) and an associated morphology of hypertrophy (or subtype).

# Attribute Value Conjunction and Disjunction

Conjunction and disjunction can also be applied to attribute values. The example below is satisfied only by members of the adverse drug reactions reference set for GP/FP health issue, which have a causative agent that is either a subtype of pharmaceutical / biologic product or a subtype of substance.

Similarly, attribute values can also use conjunction. The following expression constraint is satisfied only by clinical findings with an associated morphology whose value is both a subtype (or self) of ulcer and a subtype (or self) of hemorrhage.