6.7 Rule Expressions

Previously, we gave some basic examples on how RuleExpressions should be written.  This section provides more detailed information and examples on how to design expressions and use rule expression operators with each data type.  All of the information below is based on 3.1.

Below is a list of the operators available for use in Rule Expressions. Parentheses () can be used to designate which parts of the expression should be evaluated first. 1 + 1 * 32 equals 33. Multiplication occurrs before addition.  However, if you add parentheses around the addition you would have (1 + 1) * 32.  In this example, the total is 64.  Parentheses will work the same way with OpenClinica Rule Expressions.

Rule expression operators, in order of precedence:

( )
* /
+ -
gt gte lt lte eq ne ct
and or

At each level of precedence the expression is evaluated from left to right.

In the examples below, we will be building the expressions with the default structure

  • SED_OID = The OID depicting a particular study event definition.  If the rule is referencing more than one event definition, _X, where X is a number, will be appended to the OID
  • CRF_OID = The OID depicting a particular CRF.  This will cover all versions of this CRF.  If the rule is referencing more than one CRF, _X, where X is a number, will be appended to the OID
  • CRF_VERSION_OID = The OID depicting a particular CRF Version.  If the rule is referencing more than one CRF Version, _X, where X is a number, will be appended to the OID
  • GROUP_OID = The OID depicting a particular Group.  If the rule is referencing more than one Group, _X, where X is a number, will be appended to the OID
  • ITEM_OID = The OID depicting a particular Item.  If the rule is referencing more than one Item, _X, where X is a number, will be appended to the OID

Approved for publication by Jessica MacMinn (jmacminn1). Signed on 2014-07-22 4:00PM

Not valid unless obtained from the OpenClinica document management system on the day of use.