Technical Notes


Managing multiple logbooks

Diabetes Logbook X keeps all data in the preferences file that is stored in each user's Preferences folder, found with their Library folder.

Provided that each user has a separate account on your Mac, you can manage multiple logbooks, one logbook per account.

Exported data format

The export data file format is a comma delimited text file: the first line always lists the columns. Here is an example (the lines have been split to fit on the page). To support mobile databasing applications on the iPhone and Palm PDAs a modified import data structure is provide, click here for details.

Data column Can a different column name be used? Data content
Flag No This column must be called 'Flag'.
  • Empty = not flagged
  • F = flaged
Date Yes The date format can be day/month/year or month/day/year: this is a selectable option during data export/import.

The supported date formats are:

  • DD/MM/YYYY
  • MM/DD/YYYY
The date's year must be 4 digits long, for example 2007.
Time Yes The supported time formats is HH:MM

The 24hr time range is 00:00 to 23:59.

Period Yes The time periods are recalculated during import. English options are:
  • Before Breakfast
  • After Breakfast
  • Before Lunch
  • After Lunch
  • Before Dinner
  • After Dinner
  • Before Bedtime
  • Night
Glucose Yes Number.

See note 2.

GlucoseUnits Yes Must be either:
  • the text string: mmol/L
  • the text string: mg/dL
InsulinA Yes Number.

See note 2.

InsulinAName Yes List field: no {comma} characters.
Carbs Yes Number.

See note 2.

InsulinB Yes Number.

See note 2.

InsulinBName Yes List field: no {comma} characters.
Medicine Yes Number.

See note 2.

MedicineName Yes List field: no {comma} characters.
KetonesTested Yes Must be either:
  • Empty
  • the text string: -ve
  • the text string: +ve
KetonesValue Yes Number.

See note 2.

Weight No Number.

See note 2.

Height Yes Number.

See note 2.

HbA1c Yes Number.

See note 2.

EventName Yes List field.

The list has the following preset:

  • Clinic
  • Staring item
No {comma} characters.
Notes Yes Text field.

The Notes column uses '{lf}' to signify multiple lines in the notes text.

The Notes field can have {commas} in its text.


Notes:
  1. The header row must be present and as shown below.
  2. All number fields must use a floating point format with a period, ".", as the decimal mark. Examples of permitted values: 12.5 ; 0.5 ; 1.0 .

For version 1.3.0 and later:

First row, with column names:

Flag,Date,Time,Period,Glucose,GlucoseUnits,InsulinA,InsulinAName, Carbohydrates,InsulinB,InsulinBName,Medicine,MedicineName, KetonesTested,KetonesValue,Weight,Height,HbA1c,EventName,Notes

Subsequent event rows, with day/month/year date format:

F,27/07/2006,22:51,Before Bedtime,12.0,mmol/L,12.0,NovoRapid, 12.0,12.0,Levemir,12.0,GlucoGel,+ve,12.0,22.3,119.0,7.0,Clinic,
HbA1c = 7.0%{lf}Weight = 22.3kg{lf}Height = 119cm


For version 1.2.0 and earlier:

First row, with column names:

Flag,Date,Time,Period,Glucose,GlucoseUnits,InsulinA,InsulinAName, Carbohydrates,InsulinB,InsulinBName,Medicine,MedicineName, KetonesTested,KetonesValue,EventName,Notes

Subsequent event rows, with day/month/year date format:

F,27/07/2006,22:51,Before Bedtime,12.0,mmol/L,12.0,NovoRapid, 12.0,12.0,Levemir,12.0,GlucoGel,+ve,12.0,Clinic,
HbA1c = 7.0%{lf}Weight = 22.3kg{lf}Height = 119cm


How the data is stored


Data file and snapshots

The database is saved in the application's preferences file com.Nesfield.DiabetesLogbookX.plist in the user's Preferences folder of their Library .

There is also a folder com.Nesfield.DiabetesLogbookX Saved Prefs, within the Preferences folder, which is used to hold snapshots of the last 5 states of the preferences file. Along with the .plist version of the file there is also a text based .xml version.

Automatic backup

In addition to the snapshots, the application's preferences file com.Nesfield.DiabetesLogbookX.plist will be saved to a backup folder in the home folder's Documents/Diabetes Logbook X/Backup folder. The backup is saved every 24 hours (when the logbook data is being saved after an edit). If a Daily Backup detects that today's backup file is smaller that the previous backup file, the previous backup file is archived in a datestamped folder within the home folder's Documents/Diabetes Logbook X/Backup Archives folder.

The reason for this backup is to have a daily snapshot of the data which is not in the Library folder. You can then manually copy the data file to another hard disk or volume; or you may automate this using a Folder Action.

Regular backing up of either the actual preferences file or the automated backup file is strongly recommended: preferably to a volume that is not the same as the one on which your account data is stored; suitable backup volumes would be iDisk, a networked folder, another computer, or to CD or DVD.


What to do if an error occurs


This section has moved to a new page, Troubleshooting.