Supplement Grouping

Since verison 1.1.0, the SwissDRG Java Grouper is able to calculate applicable supplements for patient cases. For the batchgrouper, full supplement grouping is only available with the ‘batch_2017’ and ‘bfs’ input formats, since these are the only formats which provide medication information.

Loading a supplement grouper

The IGrouperReader interface was extended and now provides the loadSupplementGrouper(String) method, which returns an instance of ISupplementGrouper:

IGrouperReader reader = new SpecificationReader();
IGrouperKernel drgGrouper = reader.loadGrouper("path/to/spec/with/supplements", IGrouperKernel.Tariff.SWISSDRG);
ISupplementGrouper supplementGrouper = reader.loadSupplementGrouper("path/to/spec/with/supplements");

This will load and ISupplementGrouper instance if the passed specification has defined rules to compute supplements. If no such rules have been defined in the specification, this loadSupplementGrouper will throw an exception.

Medication Information for Patient cases

Supplements are triggered by certain CHOP codes or ATC codes in the case of medications. In previous versions of the grouper software, it was not possible to annotate the patient case with medication information. Since version 1.1.0 (and onwards), the PatientCase type was extended with methods to specify medications:

patient.addMedication("L01XC06::IV:600:mg");
// Or
patient.addMedication("L01XC06", null, MedicationRoute.IV, 600.0f, "mg");

This code snipped (both methods) registers 600 milligrams of a medication with ATC code “L01XC06” for an intravenous route of administration. Refer to the Javadoc for further information on the parameters.

Calculating supplements

In order to calculate supplements of a PatientCase, you first have to decorate it by creating an instance of SupplementPatientCase. You can then pass this instance to the ISupplementGrouper#group method, which returns an ISupplementGroupResult. This result holds all calculated supplements, along with additional information:

// Group into DRG
drgGrouper.groupByReference(pc);

// Calculate Supplements
SupplementPatientCase sPc = new SupplementPatientCase(pc);

ISupplementGroupResult result = supplementGrouper.group(sPc);

See the code below for a full example:

Example

import java.io.IOException;
import org.swissdrg.grouper.*;
import org.swissdrg.zegrouper.api.*;

class SupplementExample {
    public static void main(String[] args) throws Exception, IOException {
        // Setup patient case
        PatientCase pc = new PatientCase();
        pc.setId("test");
        pc.setAgeYears(30);
        pc.setPdx(new MainDiagnosis("B26.9"));
        pc.addProcedure("39.95.21");
        pc.addMedication("L01XC06::IV:600:mg");

        // Load Groupers
        IGrouperReader reader = new SpecificationReader();

        IGrouperKernel drgGrouper = reader.loadGrouper("path/to/spec/with/supplements", IGrouperKernel.Tariff.SWISSDRG);
        ISupplementGrouper supplementGrouper = reader.loadSupplementGrouper("path/to/spec/with/supplements");

        // Group into DRG
        drgGrouper.groupByReference(pc);

        // Calculate Supplements
        SupplementPatientCase sPc = new SupplementPatientCase(pc);

        ISupplementGroupResult result = supplementGrouper.group(sPc);

        // Access calculated supplements
        System.out.println(result);
    }
}

Medication Consolidation

As specified in Technisches Begleitblatt – Erfassung hochteurer Medikamente in der Medizinischen Statistik:

Gemäss Kodierhandbuch sind die Dosen pro Fall bei gleichem ATC-Code, gleicher Zusatzangabe sowie gleicher Verabreichungsart zu kumulieren.

you should always consolidate medications with the same ATC code, same medication route (Verabreichungsart) and medication annex (Zusatzangabe), i.e. the individual dosages should be summed up. The supplement grouper will further consolidate medications according to the rules in the loaded specification.