NAME
Parse::Dexcom::Tab - Parse the Dexcom tab-delimited export file.
VERSION
This dpcument describes version 1.0.
SYNOPSIS
use Parse::Dexcom::Tab;
my $pdt = Parse::Dexcom::Tab->new(
file => '/path/to/data.csv',
);
say $pdt->SerialNumber; # SNRA313JAS (or whatever)
say $pdt->Id; # {some-GUID-here}
for my $sensor ( $pdt->sensor_readings ) {
say $sensor->mgdl, " at ", $sensor->stamp;
}
DESCRIPTION
This package will parse a Tab-delimited export from the Dexcom Studio application and use Diabetes::Glucose to store the glucose readings in a nice, east-to-access format.
Readings from the sensor are placed in the sensor_readings
array refernece.
Readings from a meter, such as entered during the "Enter BG" or calibration are placed in the meter_readings
array reference.
Both of these array references contain Diabetes::Glucose objects. See the documentation there for more information (it's a simple object that stores data and does the mgdl/mmol conversation for you).
Any patient info fields are created accessors by the same name as the field and available for use.
METHODS
- new
-
Constructor, requires a filename in the
file
attribute. This file should be a tab-delimited file exported by the Dexcom Studio, or at the very least, a file in the same format.Alternatively, you may provide a open file handle suitable for reaidng that provides the same data.
All parsing and MOP operations are done at construction. When your program is reading to take the performance hit, create one of these.
- sensor_readings
-
An array ref containing Diabetes::Glucose objects. You might want to sort it by the
stamp
attribute, a DateTime object.These are readings that the sensor provided.
- meter_readings
-
Same as
sensor_readings
, except these readings are provided by the "Enter BG" option on the receiver. - Patient Info Fields
-
All patient info fields have their own accessors created. At the time of this writing, the sample file I pulled from my reciever has te following:
- Id
- SerialNumber
- IsDataBlinded
- IsKeepPrivate
The're not terribly useful. If you wish to avoid the computational time needed to create these attributes, provide
<no_patient_fields =
1>> in the constructor.