# Rule dependencies

In addition to the key item, a rule may reference one or more additional items that contain information the rule needs in order to perform its evaluation or calculation. These items—each in its section, form, and visit—are called dependencies. The context item is also a rule dependency; therefore, every rule has at least one dependency representing the context item.

Note: All dependencies associated with a context must have the same scope as the context. For example, if a context is defined as a generic visit context, its dependencies must also be defined with generic visits.

When you associate a rule with the items it runs against, you specify the type of dependency each item represents in its context: applied, dependency, or trigger. Rule processing begins when an item designated as any of these types of dependencies receives an initial entry of data or is updated:

- Applied—The rule script applies the outcome of the rule to the item with the applied dependency.
  - If a form rule fails, the item designated as the applied dependency receives a query.
  - If the rule performs a calculation or assigns a randomization drug kit, the item designated as the applied dependency receives the result of the calculation or randomization. For a form rule to run, this item and all items classified as dependencies must have an entered value; for a calculation rule to run, this item does not need an entered value.
- Dependency—The rule script uses the value entered for this item in performing its calculations or edit checks.

  For the rule to run, this item and any items classified as applied dependencies must have an entered value.

- Trigger—The rule script can use the value entered for this item in performing its calculations or edit checks; however, the rule does not require a value to be in this item in order to run.

Copyright © 2013 Oracle and/or its affiliates. All rights reserved.