Comparison Rules (V2)
25R1 & Later
Vault EDC’s Comparison Rules feature enables study designers to easily create system-managed query rules that compare dates and datetimes without using the Rule Editor. Comparison Rules greatly reduce study build times by allowing users to simply select their desired Identifiers and Operator without having to write expressions, validate, and troubleshoot User Defined Rules.
All Comparison Rules use the Query action. By default, the system constructs a standard query message based on the identifiers and operator used in the Comparison Rule, or you can provide a custom query message. See the Available Operators table for details.
Prerequisites
The Comparison Rule Configurator V2 is automatically available for Studies created after the 25R1 (April 2025) release. This feature can be enabled for existing studies that do not use Comparison Rules V1. Contact your Veeva Services representative for details.
Users with the CDMS Study Designer standard role can perform the actions described below. If your organization uses custom Study Roles, your role must grant the following permissions:
Type | Permission Label | Controls |
---|---|---|
Standard Tab | Studio Tab | Ability to access the Studio tab |
Functional Permission | Design Study | Ability to create study design definitions and a study schedule from Studio |
If your Study contains restricted data, you must have the Restricted Data Access permission to view it.
Learn more about Study Roles.
Creating a Comparison Rule
To create a comparison rule:
-
Click + New Comparison Rule to open the New Comparison Rule page.
- Select Identifier 1 and Identifier 2.
- Select the Type of the identifier. You can select Item, Event Date, or Casebook Variable.
- Select the components of the identifier. For each Type, required fields are highlighted in yellow.
- Optional: for an Item-type Identifier, you can leave the Event and Event Group blank to evaluate the rule reciprocally against the selected Form or across the whole schedule. This functions similarly to the @Form floating identifier in User Defined Rules.
-
For Repeating Forms: if the Form you selected is a repeating Form, for Repeating Form Instances select Current Instance, All Instances, or select Specific Instance and enter the sequence number you want the rule to evaluate against.
- For Identifier Items that allow unknowns: For Unknown Handling select whether to replace the unknown parts of a date or datetime with the minimum or maximum value.
-
Select an Operator from the dropdown menu. Operators in Comparison Rules V2 function differently than in Comparison Rules V1. Learn more about available operators(#available-operators).
- Optional: For Rule Scope, select the Within Current Event Group checkbox. For inputs that are collected multiple times, this setting prompts Vault to only add the Event or Form within the current Event Group that the rule is evaluated in, instead of across the whole study.
- Optional: For Rule Execution, select the Post-save Rule checkbox to delay execution of the rule until after the user submits the Form. You may wish to do this for rules that have a lot of permutations to avoid prolonged Form submission.
-
In the Action section, choose which Identifier to Open Query On.
- Optional: To use your own text for the query message, enter a Query Message Override. Otherwise, leave this blank to use the Default Query Message.
- When you are finished creating your rule, click Save and Close.
Copying Comparison Rules
Vault allows you to copy Comparison Rules from both the current Study and from another Study that you have access to. Comparison Rules can only be copied from other Studies that use Comparison Rules V2.
From the Current Study
You may wish to duplicate a Comparison Rule in your study to quickly create a rule that is similar to another rule in your study. To duplicate a Comparison Rule within the current study:
- Navigate to Studio > Comparison Rules.
- Hover over the Comparison Rule to show the Actions menu.
-
Click Duplicate. The New Comparison Rule page opens with the same selections as the Comparison Rule being copied.
- Make your desired changes, then click Save and Close.
From Another Study
You can also copy Comparison Rules from another Study. Note that if matching identifiers don’t exist in the target Study, Vault copies the rules as “invalid”, and you’ll need to update the identifiers and reactivate the rules before they are available for use. To copy a Comparison Rule from another Study:
- Navigate to Studio > Comparison Rules.
- Click Copy from Study.
- Select Create a copy or Use existing to handle duplicates.
- Select a Vault.
- Choose where you want to copy from (From Study or From Library.)
- Select a Study to copy from.
- Select the Environment to copy from.
- Select the Comparison Rule you want to copy.
- Optional: Select the Select all checkbox to select all Comparison Rules for copying.
- Click Copy # Comparison Rule(s). Vault begins a job to copy the Comparison Rules into your Study. When finished, Vault will send you an email notification with a link to download the log file.
- Click Close.
Comparison Rule Actions
You can perform the following actions from the Comparison Rule Actions menu:
- Rename
- Duplicate
- Inactivate / Activate
- Archive
- View Rule Bindings
Archiving (Deleting) Comparison Rules
Archived Comparison Rules are functionally deleted. They do not appear in the list of Comparison Rules at Studio > Comparison Rules, and cannot be retrieved.
To archive a Comparison Rule:
- Navigate to Studio > Comparison Rules.
- Click Archive. The Comparison Rule is archived (deleted) and cannot be retrieved.
Available Operators
The table below lists the operators available for use. Each operator has a standard query message.
Comparison Rules V2 Operators Changes: The rule logic and operator labels in Comparison Rules V2 are different from those in Comparison Rules V1. Similar to User Defined Rules, the expression in the V2 Comparison Rule is evaluated as either true or false. When the expression evaluates to true, the rule action is executed and the query message is added.
Operator | Query Message |
---|---|
is after (>) | Identifier 1 cannot be after Identifier 2 . |
is after or equal to (≥) | Identifier 1 cannot be after or equal to Identifier 2 . |
is before (<) | Identifier 1 cannot be before Identifier 2 . |
is before or equal to (≤) | Identifier 1 cannot be before or equal to Identifier 2 . |
is equal to (=) | Identifier 1 cannot be equal to Identifier 2 . |
is not equal to (≠) | Identifier 1 must be equal to Identifier 2 . |