ccharz / medtronic-php-parser
A PHP Medtronic Carelink Data Parser
v0.0.4
2025-01-25 10:06 UTC
Requires
- php: ^8.3
- smalot/pdfparser: ^2.8
Requires (Dev)
- laravel/pint: ^1.14
- phpunit/phpunit: ^11.0
- spatie/phpunit-snapshot-assertions: ^5.1
README
With this library you can parse data from export files available in the medtronic carelink center
Requirements
Installation
Use Composer to install this library into your project:
composer require "ccharz/medtronic-php-parser"
Basal Rates, Carb Ratio factors, Target Blood Sugar and Correction Factors
Important: Currently only exports in german with units in mg/dl are supported
Usage
use Ccharz\MedtronicParser\ProfileParser; $filepath = 'path/to/your/medtronic-profile.pdf'; $result = (new ProfileParser($filepath, 'de', 'Europe/Vienna'))->parse(); var_dump($result);
CSV Data
Usage
To get all data from the csv use the following code
use Ccharz\MedtronicParser\ProfileParser; $filepath = 'path/to/your/medtronic-export.csv'; $importer = new CsvParser($filepath, 'Europe/Vienna'); $lines = []; $importer->parse(function ( string $type, array $values ) use (&$lines) { $lines[$type][] = $values; }); var_dump($lines);
Testing
For privacy reasons the test data is not included in the repository
License
This library is an open-sourced software licensed under the MIT license.