Batchgrouper

Usage

Please make sure you have installed a JRE / JVM with version >= 1.8 on your system and java executables are accessible on your console (JRE / JDK bin folder is in your environment variable Path). Use the standalone JAR-File if you want to execute the batchgrouper as a standalone application.

java -cp OAAT-grouper-0.6.0-BETA-standalone.jar ch.oaat_otma.grouper.batchgrouper.Batchgrouper -cat catalog10.csv -out output_file.csv amb10_pcs.json input_file.csv

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:

You have to specify a classification system file and exactly one input file
usage: Batchgrouper [options] system-json-file input-file
Options:
 -cat,--catalogue <file>     Specify a flat rate catalogue.
 -nr,--noderesults           Generate a file with results by node: patient case IDs by
                             classification system node. (default: false)
 -out,--output-file <file>   Specify an output file. If none is specified results are written to
                             standard output.

Input format

The input file is a CSV with a header describing the variables and a patient case (ambulante Behandlung / traitement ambulatoire) for each line / row. The data can contain different variables, usually depending on the type of classification system that is applied to the data. E.g. a simulation system with data prior to 2026 will contain the variable “tarpos” for tariff positions (TARMED and other tariffs) whereas a reimbursement system (starting with data 2026) will contain a variable for “services” (LKAAT codes). The batchgrouper will issue a warning if a variable is not used in the classification system or if a variable used in the classification system is not present in the input data.

Format:

CSV / Text

Encoding:

UTF-8

Sample file:

https://grouper.oaat-otma.ch/example_input_file_batchgrouper.csv

Structure

CSV input file structure delimiters

Delimiter

Symbol

Description

Semicolon

;

Column / variable delimiter

Pipe

|

List delimiter in list variables

Double points

:

structure delimiter in structured
variables (codes)

The variables

key

patient case number / ID. aliases are ID, id, case_number

age

age in years (1-124). integer. alias: age_years

sex

sex (“M” for male, “W” for female and “U” for unknown)

diagnoses

Diagnosis or list of diagnoses, ICD-10. Points in diagnosis codes can be omitted but do not have to.

services

List of services, LKAAT. Points in service codes can be omitted but do not have to. This variable will only be mandatory for data >= 2026. Services are structured variables with the following subvariables: code, side (‘B’ for both sides, or empty if one side or not applicable.), number and date in the format “YYYYMMDD”. Side and date are optional. E.g: “C02.CP.0100” or “C02.CP.0100:L:1:20260102”. Multiple codes are chained with the list delimiter ‘|’.

tarpos

List of tariff positions, (Tarmed and other outpatient tariffs). Points in tarpo codes can be omitted but do not have to. This variable will only be mandatory for data < 2025. Tarpo codes are structured variables with the following subvariables: code, tariff code, number, reimbursed amount in CHF. e.g: “390015:001:1:58.54”. Multiple codes are chained with the list delimiter ‘|’.

Example file

This is an example file with five patient cases that can be grouped with a simulation system (data prior to 2025).

key;age;sex;diagnoses;tarpos
ID1;44;W;N40;350510:1:001:57.10|393280:1:001:29.34|393800:1:001:10.68
ID2;20;M;G43.9;170010:1:001:33.93|350210:1:001:64.98
ID3;37;W;;330010:1:500:700.31
ID4;49;M;;7680424280276:1:402:12.70
ID6;26;M;N40;3915060005:1:003:704.50

Output format

The output is also a CSV file with semicolons as delimiter with the following variables/columns:

ID/key

key identical to the one provided in the input.

ambP

outpatient flat rate identifier. e.g. “C02.03A”. The variable name can differ from system to system. The group “NO.ambP” identifies patient cases without a trigger position and will hence be reimbursed outside of the scope of outpatient flat rates.

tax_points

Tax points for this case. “NA” if tax points are not defined (e.g. for the “NO.ambP” group.)