Search by

ccharz / medtronic-php-parser

ccharz

A PHP Medtronic Carelink Data Parser

Package info

github.com/ccharz/medtronic-php-parser

pkg:composer/ccharz/medtronic-php-parser

Statistics

Installs: 71

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.0.5 2026-11-28 19:22 UTC

This package is auto-updated.

Last update: 2026-11-28 19:41:16 UTC


README

Parse CSV data exports and PDF device settings reports from Medtronic CareLink.

Requirements

  • PHP 8.5+

Installation

composer require ccharz/medtronic-php-parser

CSV Data

Reads pump, sensor and auto insulin data from a CareLink CSV export.

use Ccharz\MedtronicParser\CsvParser;

$parser = new CsvParser('path/to/export.csv', 'Europe/Vienna');

$lines = [];

$parser->parse(function (string $type, array $values) use (&$lines): void {
    $lines[$type][] = $values;
});

$type is pump, sensor or auto. Each $values array contains the row's non-empty columns plus a datetime key.

Device Settings (PDF)

Reads basal rates, carb ratios, correction factors, target blood sugar and active insulin time from a CareLink PDF report.

Note: Only German reports with units in mg/dL are supported right now.

use Ccharz\MedtronicParser\ProfileParser;

$profile = (new ProfileParser('path/to/report.pdf', 'de', 'Europe/Vienna'))->parse();

Testing

composer test

The test data isn't included, for privacy reasons. To run the tests, put your own files in tests/samples/exports/ (CSV) and tests/samples/profiles/ (PDF).

License

MIT. See LICENSE.