PHPackages                             netbrothers-gmbh/kostentraegerdatei-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. netbrothers-gmbh/kostentraegerdatei-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

netbrothers-gmbh/kostentraegerdatei-parser
==========================================

Parser for GKV Kostenträgerdateien

v1.0.0(6mo ago)20LGPL-3.0-or-laterPHPPHP ^8.3CI passing

Since Oct 24Pushed 6mo agoCompare

[ Source](https://github.com/netbrothers-gmbh/kostentraegerdatei-parser)[ Packagist](https://packagist.org/packages/netbrothers-gmbh/kostentraegerdatei-parser)[ RSS](/packages/netbrothers-gmbh-kostentraegerdatei-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (2)Used By (0)

[![CI Status](https://github.com/netbrothers-gmbh/kostentraegerdatei-parser/actions/workflows/ci.yml/badge.svg)](https://github.com/netbrothers-gmbh/kostentraegerdatei-parser/actions/workflows/ci.yml/badge.svg)

NetBrothers Kostenträgerdatei Parser
====================================

[](#netbrothers-kostenträgerdatei-parser)

A small PHP library and CLI for parsing GKV "Kostenträgerdateien", files describing cost bearer responsibilities and capabilities within the German statutory health insurance environment.

The project provides parsers for two variants:

- Pflege Leistungserbringer (SGB XI) — parsed by the `PflegeParser` and exposed via the `netbrothers:kostentraeger-pflege` command.
- Sonstige Leistungserbringer (SGB V) — parsed by the `SonstigeParser` and exposed via the `netbrothers:kostentraeger-sonstige` command.

These commands are available as executable scripts in the `bin/` directory and as `vendor/bin/` commands when the project is installed via Composer.

Requirements
------------

[](#requirements)

- PHP 8.3 or later

Development dependencies include PHPUnit, PHPStan and PHP CS Fixer.

Installation
------------

[](#installation)

1. Clone the repository:

```
git clone https://github.com/netbrothers-gmbh/kostentraegerdatei-parser.git
cd kostentraegerdatei-parser
```

2. Install dependencies:

```
composer install
```

After installing, the CLI wrapper scripts in `bin/` should be executable and ready to use on Unix-like systems.

Usage
-----

[](#usage)

There are two entry points (see `bin/`):

- `bin/kostentraeger-pflege` — runs the SGB XI parser
- `bin/kostentraeger-sonstige` — runs the SGB V parser

These scripts will be exposed as follows, when installed as a dependency in your own project.

- `vendor/bin/kostentraeger-pflege`
- `vendor/bin/kostentraeger-sonstige`

Both scripts accept the same arguments and option.

### Arguments

[](#arguments)

- `filePath` (required) — Path to a Kostenträgerdatei file (examples: `AO05Q425.ke0`, `AO06Q425.ke0`).
- `ikNumber` (required) — The IK (Institutskennzeichen) to print. Use `"all"` instead to print the parsed contents of the whole file.

### Options

[](#options)

- `--cost-bearer`, `-c` — If specified and the IK exists, the command prints only the cost bearers (Kostenträger) of the given entity (if available).

### Examples

[](#examples)

Print a single institution by IK using the SGB XI parser (via the bin wrapper):

```
php bin/kostentraeger-pflege path/to/AO06Q425.ke0 123456789
```

Print all institutions contained in a file:

```
php bin/kostentraeger-pflege path/to/AO06Q425.ke0 all
```

Print only the cost-bearer (Kostenträger) of a given IK:

```
php bin/kostentraeger-pflege path/to/AO06Q425.ke0 123456789 --cost-bearer
```

The same usage applies for the SGB V parser using `bin/kostentraeger-sonstige`.

### Output

[](#output)

The commands print a textual representation of the parsed `Institution`.

[![Screenshot of the Kostenträgerdatei Parser's Output](docs/assets/output.png)](docs/assets/output.png)

Kostenträger File Format
------------------------

[](#kostenträger-file-format)

The parser expects standard GKV Kostenträgerdateien (files typically named like `AO05Q425.ke0`, `AO06Q425.ke0`, etc.).

Development
-----------

[](#development)

### Run tests with PHPUnit

[](#run-tests-with-phpunit)

```
vendor/bin/phpunit
```

### Run static analysis with PHPStan

[](#run-static-analysis-with-phpstan)

This command will perform a static analysis of the project according to the configuration in `phpstan.dist.neon`.

```
vendor/bin/phpstan analyse
```

### Fix coding style with PHP CS Fixer

[](#fix-coding-style-with-php-cs-fixer)

```
vendor/bin/php-cs-fixer fix
```

License
-------

[](#license)

This project is licensed under the [LGPL-3.0-or-later](https://spdx.org/licenses/LGPL-3.0-or-later.html) license.

Support / Feature Requests
--------------------------

[](#support--feature-requests)

If you need help integrating the parser, want additional output formats (e.g. JSON), or want the parsers exposed as a library API, feel free to contact us, open an issue or submit a PR.

Author
------

[](#author)

[Thilo Ratnaweera, NetBrothers GmbH](https://netbrothers.de)

[![nb.logo](https://camo.githubusercontent.com/15f2d95c9afe46f4bf078f912ae2241f4e18e060a94ebb3fbc8aed45d9f12b09/68747470733a2f2f6e657462726f74686572732e64652f77702d636f6e74656e742f75706c6f6164732f323032302f31322f6e657462726f74686572735f6c6f676f2e706e67)](https://netbrothers.de)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance67

Regular maintenance activity

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

200d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b978ff9166a8511f29c075766eb124d3b47b6963efbc0babd811104b4eda0c8?d=identicon)[netbrothers](/maintainers/netbrothers)

---

Top Contributors

[![netbrothers-tr](https://avatars.githubusercontent.com/u/15143604?v=4)](https://github.com/netbrothers-tr "netbrothers-tr (6 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/netbrothers-gmbh-kostentraegerdatei-parser/health.svg)

```
[![Health](https://phpackages.com/badges/netbrothers-gmbh-kostentraegerdatei-parser/health.svg)](https://phpackages.com/packages/netbrothers-gmbh-kostentraegerdatei-parser)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[presta/sitemap-bundle

A Symfony bundle that provides tools to build your application sitemap.

3929.4M28](/packages/presta-sitemap-bundle)[daux/daux.io

Documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly

825191.0k1](/packages/daux-dauxio)[wikimedia/parsoid

Parsoid, a bidirectional parser between wikitext and HTML5

171524.3k1](/packages/wikimedia-parsoid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
