SwissDRG Batchgrouper¶

If you want to use the Grouper software as an executable and use its batch grouping capabilities, you should use the java-grouper-{VERSION}-all.jar JAR file since it includes all dependencies that are required to run the batchgrouper. The Batchgrouper will process an input file that contains patient cases in a certain format all at once and produce an output file. The format of the output is explained in Output-Formate.

Let’s start with an example. We assume that you have extracted a valid specification to /path/to/spec. Run the batchgrouper by executing the following command:

$java -jar java-grouper-{VERSION}.jar -f batch -cat /path/to/spec/catalogue-acute.csv \ -out ./grouperresults.csv path/to/spec/ path/to/patientinput.csv  where • catalogue-acute.csv – DRG catalogue (“Fallpauschalenkatalog) in CSV format (you find this in the specifications of a given system in the SwissDRG Download portal) • grouperresults.csv – name of the CSV output file generated by the Java-Grouper • path/to/spec/ – path to a SwissDRG specification. You find all SwissDRG specifications in the special specification packet “SwissDRG 1.0 - 6.0 JSON” in the Downloadportal - https://download.swissdrg.org/specs/28 • patientinput.csv – file of patient cases that you want to group, in Batchgrouper format This command will take a while to complete, depending on the size of the input file. After successful completion, you should see the generated output file in the location that was specified in the grouper call. Options¶ When you run the batchgrouper without any arguments, you will be presented with a short help text explaining how you should call the batchgrouper and what options and arguments you have to provide: $ java -jar java-grouper-{VERSION}-all.jar

You have to specify a workspace and exactly one input file
usage: Batchgrouper [options] workspace-directory input-file
Options:
-bh,--birthhouse                                        Use the birth house grouper. (default:
false)
-cat,--drg-catalogue <file>                             Specify a DRG catalogue providing cost
weights. Mandatory.
-f,--input-format <batch_2017|batch(default)|url|bfs>   Input format: One of 'url', 'bfs', 'batch'
(default) or 'batch_2017'
-out,--output-file <file>                               Specify an output file. If none is
specified results are written to standard
output.
(default: number of cores available)


With the -f option, you can specify the input format of your input file. The possible input formats are documented in Input Formats.

TARPSY Batchgrouper¶

If you want to group patient cases according to the TARPSY tariff system, you must use the TARPSY batchgrouper. The TARPSY batchgrouper can be called by running the following command:

$java -cp java-grouper-1.2.0-all.jar org.swissdrg.grouper.tarpsy.batchgrouper.TarpsyBatchgrouper \ -cat path/to/tarpsyspecs/t1.0/catalogue.csv -f bfs -out grouperresults.csv -honos path/to/honos.csv \ path/to/tarpsyspecs/t1.0 path/to/bfs-patientinput.dat  where • catalogue.csv – TARPSY “PCG” catalogue in CSV format (you find this in the specifications of a given TARPSY system in the SwissDRG Downloadportal) • -f bfs – use the BFS format patient case format. Alternatively, you can use the “MB”-Format, see https://docs.swissdrg.org/TARPSY_Vorgaben_Daten_2015_2016_d.pdf • grouperresults.csv – name of the CSV output file generated by the JavaGrouper, contains the grouping results • honos.csv – name of the HoNOS patient file. Format see https://docs.swissdrg.org/TARPSYBatchgrouperDokumentation_d.pdf • tarpsyspecs/t1.0 – specification for Tarpsy 1.0 catalogue version (see Downloadportal) • bfs-patientinput.csv – file of TARPSY patient cases, in BFS format (corresponding to option -f bfs) Note As of data year 2017 (i.e. once CHOP 2017 is applicable), the -honos parameter is obsolete, since HoNOS values will be encoded as CHOP codes. Options¶ As with the SwissDRG batchgrouper, you can call the TARPSY batchgrouper without any arguments to get a list of all supported options and arguments, along with their specific usage. $ java -cp java-grouper-{VERSION}-all.jar org.swissdrg.grouper.tarpsy.batchgrouper.TarpsyBatchgrouper

Parsing of command line options failed.  Reason: Missing required option: cat
usage: Batchgrouper [options] workspace-directory input-file
Options:
-cat,--drg-catalogue <file>                     Specify a DRG catalogue providing cost weights.
Mandatory.
-f,--input-format <mb(default)|batch|url|bfs>   Input format: One of 'mb', url', 'bfs' or 'batch'
(default)
-honos,--honos-file <file>                      Specify a HoNOS file with PH records. FIDs must
correspond to patient cases IDs.
-out,--output-file <file>                       Specify an output file. If none is specified
results are written to standard output.