You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Model Documentation

The WhereClauseCondition class is used to define simple selection criteria conditions in the condition attribute of the WhereClause class (or any of its specializations).

ER Diagram: WhereClauseCondition

In each instance of the WhereClauseCondition class:

  • The dataset attribute contains the name of the dataset in which the condition is being applied.
  • The variable attribute contains the name of the variable (within the specified dataset) to which the condition applies.
  • The comparator attribute contains a value from the ConditionComparatorEnum enumeration ("EQ" for "equal to", "LT" for less than, etc.) to indicate how values of the specified dataset variable are compared with the specified selection value(s).
  • The value attribute specifies the selection value, or values, for comparison with values in the specified dataset variable. If the value of the comparator attribute is:
    • "IN" or "NOTIN", there should be at least 2 values specified in the value attribute; otherwise there should be no more than 1 value specified in the value attribute.
    • "EQ" or "NE", the value attribute may contain no value to indicate a condition based on a missing value (i.e., "is missing" or "is not missing" respectively). 

Example

This example shows an instance of the WhereClause class (or one of its specializations) that defines a simple condition based on a single specified selection value. The example shown specifies that the value of the SAFFL variable in the ADSL dataset is equal to "Y", which could be expressed as:
  • ADSL.SAFFL EQ 'Y'

Note that some attributes (such as the expected level and order attributes) have been excluded from this example. 

YAML Example
...
condition:
  dataset: ADSL
  variable: SAFFL
  comparator: EQ
  value:
  - Y

This condition could be represented in tabular form as:

$titleHtml
datasetvariablecomparatorvalue
ADSLSAFFLEQY
$warningHtml
Other conditions based on a single value (i.e., with a comparator value of "EQ", "NE", "LT", "LE", "GT", or "GE") would be represented in a similar way.

Example

This example shows an instance of the WhereClause class (or one of its specializations) that defines a simple condition based on multiple specified selection values. The example shown specifies that the value of the AEREL variable in the ADAE dataset matches 1 of the listed values ("POSSIBLE" or "PROBABLE"), which could be expressed as:
  • ADAE.AEREL IN ('POSSIBLE','PROBABLE')

Note that some attributes (such as the expected level and order attributes) have been excluded from this example. 

YAML Example
...
condition:
  dataset: ADAE
  variable: AEREL
  comparator: IN
  value:
  - POSSIBLE
  - PROBABLE

This condition could be represented in tabular form as shown in the following table where the multiple selection values are represented as a pipe (|)-delimited list:

$titleHtml
datasetvariablecomparatorvalue
ADAEAERELINPOSSIBLE|PROBABLE
$warningHtml
Other conditions based on multiple selection values (i.e., with a comparator value of "IN" or "NOTIN") would be represented similarly.

Example

This example shows an instance of the WhereClause class (or one of its specializations) that defines a simple condition based on a missing value. The example shown specifies that the value of the BASE variable in the ADVS dataset is not missing, which could be expressed as any of the following:
  • ADVS.BASE NE ''
  • ADVS.BASE IS NOT MISSING
  • ADVS.BASE IS NOT NULL

Note that some attributes (such as the expected level and order attributes) have been excluded from this example. 

YAML Example
...
condition:
  dataset: ADVS
  variable: BASE
  comparator: NE
  value:

This condition could be represented in tabular form as:

$titleHtml
datasetvariablecomparatorvalue
ADVSBASENE
$warningHtml
Other conditions based on a missing value (i.e., with a comparator value of "EQ" or "NE") would be represented similarly.

  • No labels