Conditions/Business Rules Procedure
When you set conditions rules, users will automatically be added and/or removed from cohorts based on your rules.
Prior to version 3.5, the only condition that was available was based on the user's profile. When you defined a user profile condition, users had to meet ALL of the conditions or ANY condition that you set in the cohort. For example, an administrator could set the following rule:
- Example 1: The user must be in the Anaesthetics department OR Cardiology department
- Example 2: The user must be in the Anaesthetics department AND a Nurse
While these rules covered many use cases, an administrator could not set condition sets as per the following
- Example 3: The user must be in the Anaesthetics department OR Cardiology department AND a Nurse
New in 3.5: Condition Sets
Starting in version 3.5, Dual Code added a "Condition Set" option. This option allows an administrator to add condition sets and combine AND/OR business rules within a single cohort as per example #3.
To set or modify the assignment conditions for a cohort:
- Go to Site Administration > Users > Cohorts
- Click on the "Assign Members" or "Assign Administrators" icon next to the cohort in question
- Click on the "Membership rules" tab (or "Administratorship rules" tab if you are assigning administrators)
- In the rules section, click on the "Add condition..." button
- Select one of the options in the modal window:
- User profile: This option allows you to set conditions based on a field define in a user's profile, such as their department or job function, as per examples 1 and 2.
- Condition set: This option allows you to create a "set" of conditions, thereby combining ALL and ANY conditions within one program as per example 3 above.
- Set the condition in question and repeat steps 4-5 until all of your conditions are specified.
- Click on the "Save changes" button at the bottom of the page
Note that it might take a few minutes for the users to be added or removed from the cohort. This is particularly true if you have a large user base that meet the conditions.
Manual Procedure / Override
If you add a user to a cohort manually, then the conditions no longer apply to this user. In other words, even if the user no longer matches the conditions of the cohort, that user will remain a member of the cohort. However, if you manually remove a user from a cohort, he/she will be added back automatically if the user's profile meets the business rules.
To add or remove a user manually to/from a cohort:
- Go to Site Administration > Users > Cohorts
- Click on the "Assign Members" or "Assign Administrators" icon next to the cohort in question
- Add or remove users by selecting them in one of the boxes and clicking on the Add or Remove button
Note that the change is effective immediately and there is no need to click on a save button on this page.
User Upload
You can also manage cohort assignments by uploading CSV files to the system. Please see the "Uploading Users" documentation to learn more. Keep in mind that the cohort conditions override the user upload. So if you plan on using the user upload procedure to add users to a cohort, it is best not to enable the conditions for that specific cohort.