Automatically add queries
Table of Contents
This is a guide that helps with creating an automation (provided you have enabled Automations in the Study Settings) with the "Add Query" action. Please note that all of the below examples use the example forms Castor can provide you for a newly created study.
If you need to add multiple queries to the same field, it can be done manually, please visit the page Monitoring queries for more information.
Parameters
Event: Field Value Updated.
Action: Add Open Query to "weight" asking "Are you sure?"
Example Condition: Study Field Value "weight" is greater than 120 kg.
Creation forms
- Turn Monitoring on within your Study under Study Settings (if this is not down, you will get a warning later on in the Automation Engine).
- Go to the Automation Engine
- Name your Automation (for example: Add query when patient weight is greater than 120 kg)
- Select Event: Field Value Updated
- Select Condition
- Condition Type: Study Field Value
- Condition Field: Weight
- Condition Field Requirement: Greater than 120 kg
- Select Action
- Action Type: Add Query
- Action Field: Weight
- Status of Query: Open
- Comment of Query: Are you sure?
- Save your Automation
- Test your Automation
- Navigate to the Participants tab.
- Either create a new test participant via the "Create a new participant" button or access a test participant.
- In data-entry, find the field "weight". Specify the answer to be greater than 120 kg (eg. 130 kg).
- Now, either wait a few seconds, or refresh the form containing the target field by navigating away from it, then returning
- An open query appears on the "Weight" field. Clicking on it, you can see the message "Are you sure?" appearing. This can also be viewed in the Monitoring tab.
Note: All the conditions specified in the automation need to be true for the automation to trigger. Therefore, automations with multiple conditions will only work if they refer to different fields. For example:
- Condition 1
- Condition Type: Study Field Value
- Condition Field: Weight
- Condition Field Requirement: Greater than 120 kg
- Condition 2
- Condition Type: Study Field Value
- Condition Field: Gender
- Condition Field Requirement: Female
Note: A query will only be created once when the automation is triggered and it is not possible for the same query to be created again within the same field of a specific participant ID. For example, if a query is triggered for a participant with ID 100001 for a field 'Date', if a participant is deleted (e.g. during testing visit) and re-created again, a query will not be triggered for the 'Date' field for the newly created participant ID 100001.