Skip to main content

Part of The Casemix Companion

Grouping logic

Groupers

A 'Grouper' is a software application that performs validation checks against data input and uses a complex algorithm to determine Healthcare resource Groups (HRGs) for patient records. Grouper output files contain the original input data plus derived HRGs. The Grouper also outputs quality files that contain details of any errors or conflicts encountered during the grouping process. For more information about using the Grouper application for local grouping, please refer to the Grouper User Manual published with each Grouper release.


Basic grouping logic

The first stage of the grouping process is validation, which ensures that the Grouper input data and record content is appropriate for grouping to HRGs other than the UZ01Z Data Invalid for Grouping HRG.

The single HRG in Subchapter UZ Undefined Groups is generated where a patient record is not valid for grouping to one of the other subchapters.

Further information on the Grouper validation process and the 11 underlying U Error categories is available in the Grouper User Manual, and the Chapter Summaries.

Following validation of the mandated Grouper fields, there are four types of core logic used in Admitted Patient Care grouping that enable certain types of patients to be identified.

Core 4 logic is used to determine whether a patient is a Multiple Trauma patient. Only where a patient has a primary diagnosis of traumatic injury plus a secondary diagnosis of traumatic injury to a different body site will Core 4 logic be triggered. Core 4 logic allows Multiple Trauma patients to be identified prior to subsequent HRG generation via the diagnosis/procedure scoring grid.

Core 7 logic is used to identify patients with second- or third-degree burns. Burns logic is driven by a diagnosis of a second- or third-degree burn in any diagnosis position (not necessarily primary). Note that Core 3 logic is escalation logic specific to these types of burns and is used to escalate the final HRG based on specific patient criteria such as degree of burns, age and CC score.

Core 1 logic is standard grouping logic for all other types of patients, for both procedure-driven and diagnosis-driven activity. Core 1 procedure logic is driven by the dominant procedure in the patient record.

Core 5 global exception logic follows Core 1 procedure logic but precedes Core 1 diagnosis logic within the grouping process. This allows things such as planned procedures not carried out (recorded via ICD-10 diagnosis codes) to take precedence over grouping diagnosis-only activity. Core 1 diagnosis logic is driven by the patient’s primary diagnosis for the episode or by the derived primary diagnosis of the spell.

Core 5 global exception logic allows HRG grouping to override HRG derivation in specific circumstances to allow the generation of HRGs that identify patients who:

  • are admitted or attend solely for radiotherapy treatment and have a length of stay of zero days
  • are admitted or attend solely for chemotherapy treatment and have a length of stay of zero days
  • are admitted or attend solely for nuclear medicine investigations under Treatment Function Code 812 Diagnostic Imaging Service or 371 Nuclear Medicine Service
  • are admitted or attend solely for diagnostic imaging investigations under Treatment Function Code 812 Diagnostic Imaging Service
  • are admitted but a procedure has not been carried out, coded using ICD-10 diagnosis codes in a secondary position, irrespective of whether this is for a patient, clinical or administrative reason, irrespective of the patient’s primary diagnosis or length of stay

Outpatient activity grouping utilises Core 1 and Core 5 logic, as diagnoses are not used for grouping in this care setting. Outpatient activity grouping also employs Core 6 logic, which is used to determine the 'attendance HRG' (for Local Payment Grouper products), in support of the National Reimbursement System, and represents the attendance HRG (WF01A/B or WF02A/B) paid when the core (non WF*) outpatient HRG does not have a tariff price.

Other commissioning data sets, such as those for emergency medicine or critical care, use grouping logic specific to their data set.


The grouping process

For admitted patient care core HRG grouping, the grouping process can be simplified as follows:

Admitted patient care core HRG grouping process

For a given patient record, the design logic trips through various stages to determine the HRG.

The Single Spell Grouper (and Batch process Grouper outputs) will detail which Grouping Method has been employed in the Grouping Method Flag field.

The table below lists the different Grouping Method Flags:

Grouping Method Flag B Burns (2nd or 3rd degree)
Grouping Method Flag D Diagnosis-driven
Grouping Method Flag G Global exception
Grouping Method Flag M Multiple trauma
Grouping Method Flag O Outpatient driven
Grouping Method Flag P Procedure-driven
Grouping Method Flag U Error

Grouping of outpatient activity follows the same process but ignores the elements that require diagnosis coding, as diagnosis is not yet taken into account for outpatient grouping Further information regarding Groupers and respective Grouper outputs can be found in the Grouper User Manual.


Multi-episode spells and interactive complications and comorbidity splits

In a multi-episode spell, all unique diagnoses are evaluated as potential CCs, with the exception of the spell primary diagnosis, determined as either the primary diagnosis of the episode containing the dominant procedure or the primary diagnosis with the first highest diagnosis hierarchy, where no dominant procedure is recorded.

Duplicate diagnoses within a spell and four-digit ICD-10 codes that end in .9 (unspecified) where the same three-digit ICD-10 code has been determined as the primary diagnosis of the spell do not contribute towards CC scoring at either the spell or episode level. For example, ICD-10 code 'A02.9 Salmonella infection, unspecified' cannot be considered a CC for an episode or spell with a primary diagnosis of 'A02.0 Salmonella enteritis', although the converse is not true. Hence 'A02.0 Salmonella enteritis' can rightly be considered a CC for an episode or spell with a primary diagnosis of 'A02.9 Salmonella infection, unspecified' as A02.0 provides greater clinical specificity.

To determine the value of each secondary diagnosis, the Grouper refers to the CC list specific to the relevant subchapter. As per Design Framework requirements, major CCs on a CC list will have a nominal value of 2 and all other CCs on the list will have a nominal value of 1. If a diagnosis is not included in the relevant CC list, it is considered to have a value of 0.

The obstetric delivery HRGs are an exception to this rule, however, as in accordance with national coding standards and unlike all other CC lists, they utilise all diagnoses, including the primary diagnosis, to calculate the CC score.

It is important to note that the spell HRG may be different to any of the FCE HRGs within the spell due to the above processing of spell activity. For example, ALL valid secondary diagnoses of the spell, including primary diagnoses of episodes that are not deemed to be the primary diagnosis of the spell, are 'summed' to generate CC splits. Also, the length of stay for the Spell will be different (longer) than each individual FCE length of stay.

For example:

The following Spell has two Finished Consultant Episodes for a patient aged 25 with an overall spell length of stay of 11 days:

The first FCE, with length of stay 10 days, has a procedure and two diagnosis codes, one indicating congenital heart disease, and groups to HRG EC14C (Intermediate Procedures for Congenital Heart Disease with CC Score 0-3).

However, the second FCE, with length of stay 1 day, has a procedure plus a significant number of ICD-10 codes and groups to HRG FF53A (Minor Therapeutic or Diagnostic, General Abdominal Procedures, 19 years and over).

The Grouper takes into consideration all of the diagnosis codes in the Spell and groups to HRG EC14A (Intermediate Procedures for Congenital Heart Disease with CC Score 9+).

As diagnosis is not yet a mandatory item in the Outpatient Commissioning Data Set, the grouping process does not yet use diagnosis for Non-Admitted Consultation treatments even where present in the outpatient record. CC splits are therefore not currently applicable for outpatient-based care.


Accommodating multiple procedures

In the majority of cases, the dominant procedure (as determined by the procedure hierarchy) is used to derive the HRG. However, certain subchapters contain specific multiple-procedure logic designed to determine the HRG using more than one procedure.

Where there are a relatively small number of procedures that can be performed in combination with one another, grouping logic flags may be used to derive the HRG, dependent on which other procedures are recorded alongside the dominant procedure.

For example:

If P23.2 Anterior colporrhaphy NEC is recorded with no other procedures present and no secondary diagnoses, then HRG MA04D Intermediate Open Lower Genital Tract Procedures with CC Score 0-2 will be generated.

If M53.3 Introduction of tension-free vaginal tape is recorded with no other procedures present and no secondary diagnoses, then HRG LB51B Vaginal Tape Operations for Urinary Incontinence, with CC Score 0-1 will be generated.

However, if these procedures are both performed and recorded, and if either is the dominant procedure, with no secondary diagnoses recorded, then the HRG generated will be MA03D Major Open Lower Genital Tract Procedures with CC Score 0-2.

Both procedures have a flag attached that requires the Grouper to reference a list containing the other procedure. Where both procedures are identified within the record, an HRG is generated that considers both procedures significant in order to appropriately reflect the additional resource use of undertaking both procedures at the same time.

Escalation logic can drive grouping to a higher resource HRG to reflect additional complexity. If a procedure is performed in conjunction with another procedure from a specified list, a higher resource HRG will be derived for the episode than would be derived for an episode in which either procedure were recorded on its own.

For example:

If W47.1 Primary prosthetic replacement of head of femur not using cement is recorded as the dominant procedure, and no other procedure code is present in the patient record, HRG HN12F Very Major Hip Procedures for Non-Trauma with CC Score 0-1 will be assigned. If W47.1 Primary prosthetic replacement of head of femur not using cement is recorded.

However if a procedure from any other very major HN HRG is also recorded, such as W04.2 Triple fusion of joints of hindfoot (which as a dominant procedure would map to HN32C Very Major Foot Procedures for Non-Trauma with CC Score 0-1), the episode will be escalated to the relevant complex HN HRG, in this case HN81E Complex, Hip or Knee Procedures for Non-Trauma, with CC Score 0-1.


Subsidiary procedure-qualified HRGs

Some of the procedure-based HRGs require a subsidiary code qualifier. This means that the OPCS-4 code recorded in the patient record requires an additional OPCS-4 subsidiary code denoting the method of operation. The list of OPCS-4 subsidiary codes are designed to enhance codes from the individual body system chapters in the main OPCS-4 classification and includes (but is not limited to) approach codes, staged and minimal access procedures.

Cases A and B highlight the value of recording a subsidiary procedure code - that is, indicating approach or site (including laterality), where appropriate.

Age Length of stay (days) Primary diagnosis (ICD-10) Dominant procedure (OPCS-4) Secondary procedures (OPCS-4) HRG
A 45 0 H18.6 Keratoconus C46.3 Penetrating graft to cornea Z94.2 Right sided operation BZ61B Complex, Cornea or Sclera Procedures, with CC Score 0-1
B 45 0 H18.6 Keratoconus C46.3 Penetrating graft to cornea Z94.1 Bilateral operation BZ60B very Complex, Cornea or Sclera Procedures, with CC Score 0-1

Diagnosis-qualified HRGs

Some of the procedure-based HRGs have ICD-10 diagnosis qualification logic. This means that the ICD-10 code reported against the record will influence the procedure-based HRG that is derived. This concept ensures that where the patient’s diagnosis is deemed to be clinically important, the procedure-driven HRG captures the additional expected resource associated with that diagnosis. Examples include the obesity check used to derive some bariatric surgery HRGs or a cancer check used to derive specific treatment of malignancy HRGs in gynaecology.

Cases A and B highlight the different HRGs generated for patients with the same dominant procedure but with different primary diagnoses.

Age Length of stay (days) Primary diagnosis (ICD-10) Dominant procedure (OPCS-4) HRG
A 32 15 K59.0 Constipation A48.3 Insertion of neurostimulator adjacent to spinal cord FF47Z Insertion of Neurostimulator for Treatment of Faecal Incontinence
B 45 10 R33X Retention of urine A48.3 Insertion of neurostimulator adjacent to spinal cord LB79Z Insertion of Neurostimulator for Treatment of Urinary Incontinence

Grouping unbundled activity

Unbundling is the first step in the grouping process, following data input. Unbundled procedures are processed separately to derive unbundled HRGs. The Grouper then (usually) ignores these unbundled components when deriving the core HRG for an episode or spell.

When all significant procedures in an admitted patient care record are unbundled, the primary diagnosis is used to derive a core HRG for the episode. For non-admitted care, if all procedures are unbundled, the attendance is allocated one of the default non-admitted care attendance WF* HRGs as a core HRG.


Last edited: 6 December 2023 5:37 pm