Skip to main content

The logic for selecting patients into an output is specified in one or more rules containing logic in a specific format which can be consistently interpreted by all GP system suppliers. Non-technical descriptions of rules or data descriptions are provided as supplementary information to assist non-technical readers (for example GP practice staff, ICBs, etc.) to interpret the logic. Any organisations or individuals who are implementing the business rules are expected to implement the logic and or qualifying criteria and should not rely on the textual descriptions which may be over-simplified.

Where there are multiple rules in the logic they are to be processed sequentially. Processing of rules should terminate as soon as a ‘Reject’ or ‘Select’ condition is encountered. A count should be returned for each Select statement. In QOF rulesets reject statements also generate a count.

Rules are expressed as logical statements that evaluate as either ‘true’ or ‘false’. The following operators are required to be supported:

  • > (greater than)            >= (greater than or equal to)   AND 
  • < (less than)                   <= (less than or equal to)         OR 
  • = (equal to)                    ≠ (not equal to)                          NOT

Rules asking for X OR Y should be treated as meaning ‘X and/or Y’, so that either X can be true, Y can be true or both X and Y can be true for that rule (for that section of the rule) to evaluate as true.

If a data item has a NULL value and is used within the rules or qualifying criteria of another data item, then this part of the rule must evaluate as false as values cannot be checked against a NULL value.

For example if a rule in one of the counts is checking that the earliest treatment took place after the earliest assessment and the patient has no assessment date (null), it is not possible to check whether the earliest treatment took place after the earliest assessment. This means the rule would evaluate as false.


Processing rules

The following example shows how patients would be selected or rejected by a series of rules. In this example patients are being selected into or rejected from an indicator. It is assumed that the practice has 7,000 patients and a population (register in this case) called ECZEMA_REG consisting of all patients with a diagnosis of severe eczema has already been identified and contains 100 patients.

Indicator ID Description Applied to population: In Out Start
ECZ001 Patients with severe eczema who were given Treatment X ECZEMA_REG Not applicable Not applicable 100 

At the start of the rules there are 100 patients in the register, but none have been selected into the count yet and none have been rejected out of the count yet.

Denominator

Rule number Rule Action if true Action if false In Out Remaining 
1 If TREATX_DAT >= ECZEMA_DAT Select Next rule 70    -  30 

The first denominator rule takes all patients in the ECZEMA_REG register (n=100 so the START number from the indicator table above) and identifies whether these patients received Treatment X (TREATX_DAT) on or after their diagnosis date (ECZEMA_DAT).

  • if 70 patients had received the treatment on or after their Eczema diagnosis date, then the rule evaluates as true for these patients, and they are selected into the count so 70 are in the count and processing ends for these patients
  • for the remaining 30 patients they did not receive treatment following their diagnosis, so the rule evaluates as false and these patients are passed onto the next rule (30 patients remain for further processing)

Denominator

Rule number Rule Action if true Action if false In Out  Remaining 
2 If ECZEMA_DAT >= (PPED – 1 month) Reject Next rule -  10  20 

Rule 2 takes all patients remaining after Rule 1 (n=30 so the REMAINING number from Rule 1 above) and identifies whether these patients had their Eczema diagnosis within the 1 month period leading up to the payment period end date (the assumption being that these patients may not have had enough time to receive the treatment).

  • if 10 patients had been diagnosed within the last month, then the rule evaluates as true for these patients and they are rejected out of the count so 10 of the patients are now out of the count and processing ends for these patients
  • for the remaining 20 patients they did not receive their diagnosis within the last month, so the rule evaluates as false and these patients are passed onto the next rule (20 patients remain for further processing)
Rule number Rule Action if true Action if false  In Out Remaining 
3 If TREATXCON_DAT ≠ Null Reject Select 15 5 -

Rule 3 takes all patients remaining after Rule 2 (n=20 so the REMAINING number from Rule 2 above) and identifies whether these patients had a code to indicate that they were contraindicated to treatment X and therefore were not applicable to receive it.

  • if 5 patients were contraindicated, then the rule evaluates as true for these patients and they are rejected out of the count so 5 of the leftover patients are now out of the count and processing ends for these patients
  • the remaining 15 patients were not contraindicated to the treatment, so the rule evaluates as false. These patients are selected into the count and processing ends for these patients

There should be no patients remaining once the last rule is evaluated.

End of denominator rules

The final number of patients selected into the denominator is the total number which were selected in each rule.

Out of the total 100 patients in the register

  • 70 + 0 + 15 = 85 selected in
  • 0 + 10 + 5 = 15 rejected out

As the numerator is applied to the patients selected into the denominator, there are 85 patients which the numerator is applied to:

In Out Start 
Not applicable Not applicable 85 

Numerator

Rule number Rule Action if true Action if false In  Out  Remaining 
1 If TREATX_DAT >= ECZEMA_DAT Select Reject 70 15 - 

The first numerator rule takes all patients in denominator (n=85) and identifies whether these patients received Treatment X (TREATX_DAT) on or after their diagnosis date (ECZEMA_DAT). Note: this is the same as rule 1 from the denominator.

  • if 70 patients had received the treatment on or after their Eczema diagnosis date, then the rule evaluates as true for these patients, and they are selected into the count so 70 are in the count and processing ends for these patients
  • the remaining 15 patients did not receive treatment following their diagnosis, so the rule evaluates as false and these patients are now out of the count and processing ends for these patients

As there is only one rule in this numerator there should be no patients leftover at the end of this rule.

End of numerator rules

The final number of patients selected into the numerator is the total number which were selected in each rule. As there is only one rule in this example this is simply the 70 selected in rule 1.

In the example above the denominator count = 85 and the numerator count = 70.


Last edited: 5 November 2026 3:58 pm