Model Documentation
Class: WhereClause
The WhereClause class is used to define data selection criteria that are used for the selection and grouping of data for analysis.
There are 3 specializations of the WhereClause class that allow an identifier value and label to be assigned for the defined selection criterion:
- The AnalysisSet class is used to define subject populations (i.e., criteria for the selection of subjects for inclusion in an analysis), as described in the AnalysisSet section.
- The DataSubset class is used to define criteria for the selection of data records for inclusion in an analysis, as described in the DataSubset section.
- The Group class, through use of its two specializations, AnalysisGroup and DataGroup, is used to define the criteria for grouping subjects and data records (respectively) for analysis, as described in the GroupingFactor section.
Each instance of the WhereClause class (or any of its specializations) defines either:
- A simple condition based on the value or values for single dataset variable or
- A compound expression that either:
- combines selection criteria, which are defined in other instances of the WhereClause class (or 1 or its specializations) that represent simple conditions or other compound expressions, or
- negates the selection criteria defined in another single instance of the WhereClause class (or 1 of its specializations) that represents a compound expression. Note that a compound expression should generally not be created to negate a single simple condition; another simple condition using the inverse comparator should be created instead (i.e., using "NE" vs. "EQ", "LT" vs. "GE", "GT" vs. "LE", or "NOTIN" vs. "IN").
In each instance of the WhereClause class,
- The level attribute contains an integer that indicates the level at which the specified condition is being applied, with a value of "1" indicating the "top" level. The level attribute:
- Has a value of "1" in any instance of a specialization of the WhereClause class where an identifier value is assigned.
- Contains a value greater than 1 only in instances of the WhereClause class that are used to define sub-conditions within a compound expression.
- The order attribute contains an integer to order this instance of the WhereClause class with respect to other other instance of the WhereClause at the same level.
- When the value of the level attribute is greater than 1 (i.e., this instance of the WhereClause class defines one of the selection criteria being combined in a compound expression), the order attribute defines the order of this instance of the WhereClause class with respect to the other selection criteria with which it is being combined.
- When the value of the level attribute is "1":
- In instances of either of the specializations of the Group class, the order attribute is used to define the order of the group with respect to other groups in the grouping factor.
- In all other situations, the order attribute should have a value of "1".
- Either:
- The condition attribute contains the specification of a simple condition represented as an instance of the WhereClauseCondition class, as described in the WhereClauseCondition section.
Or
- The compoundExpression attribute contains the specification of a compound expression represented as an instance of the WhereClauseCompoundExpression class (or 1 of its specializations), as described in the WhereClauseCompoundExpression section.