Creating Rules
Creating Rules enables you to use logic in your Pathway.
Adding Rule Lines to a Rule Node
To apply Rules to a Rule Node:
- Select the Rule Node.
The Ruleset displays in the lower section of the view. - Update the Ruleset as required:
- Update the Description, this displays on the Node
- Node Reference - this is for support purposes and should not be changed
- Select the Countries the Ruleset applies to
- Optionally, change the Group Type to Register for Reporting purposes
- Optionally, update the Sex and/or Age filters
- A blank Rule Line displays below the Ruleset.
- Select the Parameter type:
- Latest - Searches for the latest occurrence of a Codeset
- Earliest - Searches for the earliest occurrence of a Codeset
- Any - Searches for any occurrences of a specified Codeset
- Reg. - Returns the date of registration for a patient
- DOB - Returns the date of birth of a patient
- [Latest]/[Earliest]/[First]/[Last] - These are variables that are used to store dates from one Rule Line and then used later on in another Rule Line in the Rule Node, or even in another Rule Node
- End date - Returns the end date
- Review - Returns the review date
- Select the appropriate Codeset from the drop-down, for example, Asthma Management.
- Optionally, select the Date Parameter:
- On - a specific date, for example, 1st January 2022
- After - after a specific date, for example, after 31st December 2022
- On or After - from a specific date, including that date. for example, from 1st January inclusive
- Before - prior to a specific date, for example, before 1st January 2022
- On or Before - earlier than a specific date, including that date. for example, before 31st December inclusive
- Not on - all events apart from a specific date
- Between - between a range of dates
- Select More for additional Rule Parameters.
- Use the parameters and operators explained below to build up the Rules for the select Rule Node.Note - A Rule List can range from one rule to multiple however there must be at least one Select and one Reject outcome in the The True and False actions control the outcomes of the Rule Line. A Rule Node must finish with a Select or Reject statement, either in the True or False position..
- Once the Rule Node has Rules you can test the Pathway, see Test Rule Nodes.
Rule Parameters and Operators
The Rules are built up from a set of Parameters and Operators:
The Parameters drop-down is the starting point of the Rule Line:
- Latest - Searches for the latest occurrence of a Codeset.
- Earliest - Searches for the earliest occurrence of a Codeset.
- Any - Searches for any occurrences of a specified Codeset.
- Reg. - Returns the date of registration for a patient.
- DOB - Returns the date of birth for a patient.
- [Latest]/[Earliest]/[First]/[Last] - These are variables that are used to store dates from one Rule Line then used later on in another Rule Line in the Rule Node, or even in another Rule Node.
- End date - Returns the end date.
- Review - Returns the review date.
- [Latest info]/[Earliest info] - These are variables that are used to store information from one Rule Line then used later on in another Rule Line in the Rule Node, or even in another Rule Node.
The Codeset drop-down displays all the Codesets that are available within the applied Codeset File(s).
The Operators drop-down displays all the available Operators that can be applied with the Rule Line.
- = - Equal to
- > - Greater than or after a date
- >= - Greater than or equal to
- < - Less than or before a date
- <= - Less than or equal to
- <> - Not equal to
- >< - Between
On selection additional options display, select the relevant Parameters from each drop-down.Optionally, select Properties from the toolbar to further refine the Between settings:
- > x < - Between but not equal to both numbers
- > x <= - Between and equal to the larger number
- >= x < - Between and equal to the smaller number
- >= x <= - Between or equal to both numbers
The 2nd Parameter drop-down contains the same criteria as in the 1st Parameter, along with the following:
- Date - Activates a calendar in the following Codeset drop-down to specify a fixed date.
- Today - Applies the current date each time the rule is evaluated.
- April - Applies the QOF/QAIF April 1st date to the rule.
The Codeset drop-down displays all the Codesets that are available within the applied Codeset File(s).
The Period Units apply a time period against the 1st Parameter, the units can be varied and the period of time can be in the future (+) or in the past (-).
Use the Arrows to increase/decrease the Units.
The default setting is zero months, to change the Period Units for the Rule Line select Properties from the toolbar, and select Years, Months, Weeks or Days:
The True and False actions control the outcomes of the Rule Line.
A Rule Node must finish with a Select or Reject statement, either in the True or False position.
A True or False result can have the following outcomes below:
- Select - Takes the result of the Rule Line down the Select route (Green route to the right of the node).Note - You can use multiple Select outcomes in the same rule.
- Reject - Takes the result of the Rule Line down the Reject route (Red route to the left of the node).
- Next - Moves the result of the Rule Line down the next Rule Line to evaluate.
- Skip - Takes the result of the Rule Line and skips the number of Rule Line(s) as specified in the control:
To test the Skip function select the Blue arrow and the Rule Line it proceeds to displays.