Predefined rules versus custom rules
Study designers typically add predefined rules in form design to validate an answer or to trigger a specific action, such as to display a dynamic element. Rule designers can create custom JavaScript rules to address more complex scenarios.
Predefined rules (Designer)
- Action rules are a set of predefined rules that result in specific actions, which can include: sending notifications, locking a question automatically, creating form associations, and dynamically displaying a question, form, form section, or visit. For more information see Action rules.
- Validation rules allow you to set specific criteria that must be met for a given question. Study designers apply these rules to a specific question on a specific form to ensure appropriate data entry in a study. This is done by generating validation errors, raising queries on invalid answers, or both, depending on the configuration. This configuration also dictates whether the user is allowed to proceed with certain RTSM actions or not (randomization, dispensation, or screening). For more information, see About validation rules.
The main advantage of using predefined rules is that they are built-in and require minimal configuration. However, these rules do not support cross-question, cross-form or cross-visit logic and are only available for a limited number of options that cover the most commonly encountered conditions.
Custom rules
Custom rules are more advanced rules, typically created and tested by a rule designer. These are less limited and support complex logic, including, multi-question, multi-form and multi-visit logic. Similar to predefined rules, custom rules allow you to send notifications or raise queries, but they also let you calculate read-only values from existing data.
These rules are added in testing mode and are defined with JavaScript expressions, which require some knowledge of basic coding principles. Hence, custom rules carry potential risks of programming errors and they require more time to be tested and applied. Oracle Clinical One Platform provides an efficient interface where you can create, debug, validate, and publish rules using JavaScript. But in order for a rule to become active in production mode, it must go through a testing and approval cycle. For more information see Rule statuses and lifecycle.
Note:
You must always validate your custom rules in Testing mode to ensure you are getting the expected results before approving the rule for use in a Production study.Browse other topics in this guide to get more information about custom rules and how to work with them.