Skip to main content

Rule Studio Overview

Overview of Rule Studio — manage validation rules and business logic for clinical trial studies and CRFs.

Last updated: 04/14/2026

Overview

Rule Studio is the centralized rule management app for defining and enforcing validation logic and business rules across your clinical trial studies. Rules can be scoped to an individual CRF (form-level) or to an entire study (study-level), allowing flexible control over data quality and workflow automation.

Common use cases include:

  • Auto-calculated fields — e.g., compute BMI from height and weight, or age from date of birth
  • Range validations — flag values outside expected clinical ranges
  • Conditional field visibility — show/hide fields based on other answers
  • Default value population — pre-fill fields based on context

Access Rule Studio from: HomeRule Studio (in the top navigation or app launcher).
Or from within a study: HomeStudy NameBuildManage RulesCreate Rule.


Manage Rules

The main page displays a table of all rules across your accessible studies.

Rule List Columns

ColumnDescription
NameThe name of the rule
DescriptionOptional description of the rule's purpose
TypeScope of the rule — CRF (form-level) or Study (study-level)
Applies toThe study or CRF the rule is associated with
Created OnDate and time the rule was created
Created ByUser who created the rule
Last Updated DateDate and time the rule was last modified
EnabledWhether the rule is currently active
Stop Other RulesIf enabled, this rule will halt execution of subsequent rules when triggered
ActionEdit or Delete the rule

Search & Pagination

  • Use the Search bar to filter rules by name.
  • The pagination controls at the bottom show the current range (e.g., Rule 1 – 10 / 10) and allow navigation between pages.
  • The Page Size dropdown controls how many rules are displayed per page.

Creating a Rule

  1. Click Create Rule in the top-right area of the page.
  2. In the dialog, fill in the following fields:
FieldRequiredDescription
ScopeYesSelect Scope for CRF (form-level) or Scope for Study (study-level)
Select CRFYes (if CRF scope)Choose the target CRF form
Select StudyYes (if Study scope)Choose the target study
Rule NameYesA unique name to identify the rule
DescriptionNoOptional explanation of the rule's purpose
  1. Click Submit to create the rule, or Cancel to discard.

After creating the rule, you can configure its conditions and actions by clicking Edit.


Editing a Rule

Click the Edit button on any rule row to navigate to the rule editor at: /apps/rule-studio/edit-rule/[ruleId]

The editor is divided into four main sections: Basic Information, Action, Condition, and an Items reference panel.

Header Bar

The top of the editor shows the rule name and its type (e.g., CRF or Study). Two buttons are available:

  • SAVE — saves all changes to the rule
  • CANCEL — discards changes and returns to the rule list

Reference Panel — Functions, Constants & Operators

A reference panel is always visible, listing all available expressions you can use when building rule logic:

Functions

FunctionDescription
floor(string)Round down to nearest integer
ceil(string)Round up to nearest integer
round(string)Round to nearest integer
toString(string)Convert to string
toInt(string)Convert to integer
toFloat(string)Convert to float
getYear(string)Extract year from a date
getMonth(string)Extract month from a date
getDay(string)Extract day from a date
getHour(string)Extract hour from a datetime
getMinute(string)Extract minute from a datetime
getSecond(string)Extract second from a datetime
toUpperCase(string)Convert string to uppercase
toLowerCase(string)Convert string to lowercase
substring(string, startIndex, endIndex)Extract a portion of a string
getLength(string)Get string length
concat(string1, string2, ...)Concatenate multiple strings
isEmpty(string)Check if a string is empty
list(string)Create a list

Constants

ConstantValue
STRINGString
NUMBERNumber
TRUETrue
FALSEFalse
CURRENT_DATECurrent Date
CURRENT_DATETIMECurrent Date Time
CURRENT_TIMECurrent Time

Operators

OperatorMeaning
+Add
-Subtract
×Multiply
/Divide
%Modulo
=Equal
Not Equal
>Greater than
<Less than
Greater than or equal
Less than or equal

Basic Information

FieldRequiredDescription
Rule NameYesThe name of the rule
DescriptionNoOptional free-text description
Stop other rulesNoWhen checked, this rule halts execution of all subsequent rules if triggered

Action

This is where rules are set to perform specific actions like sending notification emails, automatically creating queries, performing automatic calculations, etc.

You can define one or more actions on a rule. All actions share the same conditions and exceptions. If actions have different conditions, it is recommended to create separate rules.

For each action:

FieldDescription
Action TypeThe type of action to perform (e.g., Set default value to an Item)
Target ItemThe CRF item the action applies to
ExpressionThe value or formula to apply — built using the code editor with access to Functions, Constants, Operators, and CRF Items

Use the Add Action button to add additional actions to the same rule.

Click Submit to confirm an individual action's configuration.


Condition

Conditions control when and whether a rule executes. This section has three parts:

Trigger

Defines the event that causes the rule to fire.

  • Select a Trigger action from the dropdown (e.g., When a form is ready)
  • Click Add Trigger to add multiple triggers

Condition

Specifies additional conditions that must be met for the rule to execute after it is triggered.

  • Click Add Condition to define one or more conditions
  • Conditions are built using CRF items, operators, and values

Exception

Defines cases where the rule should be skipped even if triggered and conditions are met.

  • Click Add Exception to define exceptions

Items Panel

The right-side Items panel lists all available CRF items for the selected form. Each item shows:

  • Item ID (e.g., CDS_ITEM_4)
  • Label (e.g., Number)
  • Data type (e.g., String, Integer, Date, Time, Date time, File)

Use the Search box to filter items by name, and Refresh to reload the item list after form changes.


Deleting a Rule

Click Delete on a rule row to permanently remove the rule. This action cannot be undone.


Rule Types

TypeDescription
CRFThe rule applies to a specific CRF (electronic data capture form). Triggered when data is entered or updated on that form.
StudyThe rule applies at the study level, across subjects and events in the selected study.

Stop Other Rules

Each rule has a Stop Other Rules toggle (checkbox). When enabled, if this rule is triggered, no further rules in the sequence will be evaluated. This is useful for setting up priority-based rule chains.



Expression Reference

Item Reference Syntax

To reference a CRF field in an expression, use the Item[OID] notation where OID is the field's unique identifier:

Item[HEIGHT_CM]
Item[WEIGHT_KG]
Item[DATE_OF_BIRTH]

Full qualified form (when referencing an item in a different event or form):

Event[@oid=EVENT_OID].Crf[@oid=CRF_OID].Item[ITEM_OID]

The short form Item[OID] is sufficient when the item is in the same CRF as the rule.

Real-World Examples

Auto-calculate BMI

Calculates BMI (kg/m²) from height (cm) and weight (kg). Uses multiplication by 10000 to avoid operator precedence issues:

round(10000 * Item[WEIGHT_KG] / Item[HEIGHT_CM] / Item[HEIGHT_CM])
SettingValue
Action TypeSet value to an Item using Calculate Expression
Target ItemBMI
Trigger ActionItem On Change
Trigger ItemsHEIGHT_CM, WEIGHT_KG

Why this formula? The expression engine evaluates left-to-right. 10000 * W / H / H = (10000 × W / H) / H = W × 10000 / H² = BMI. Using parentheses like W / (H/100 * H/100) can produce unexpected results due to parser reordering.

Calculates age in years from the participant's date of birth:

getYear(CURRENT_DATE) - getYear(Item[DATE_OF_BIRTH])
SettingValue
Action TypeSet value to an Item using Calculate Expression
Target ItemAGE_AT_CONSENT
Trigger ActionItem On Change
Trigger ItemsDATE_OF_BIRTH

Trigger Types

Trigger TypeWhen it fires
Item On ChangeImmediately when the field value changes
Item On BlurWhen the user leaves (clicks away from) the field

Adding Trigger Items

  1. Select the Trigger action type (e.g., Item On Change) from the dropdown. A drop zone appears.
  2. In the Items panel on the right, find the item you want to use as a trigger.
  3. Drag the item from the Items panel into the trigger drop zone.
  4. Repeat for each additional trigger item.

  • Configuration — App-level configuration settings for Rule Studio