Technical Notes
Managing multiple logbooks
Asthma 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:
The date's year must be 4 digits long, for example 2007.
- DD/MM/YYYY
- MM/DD/YYYY
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:
- Morning
- Afternoon
- Evening
- Night
PeakFlow Yes Number. See note 2.
PeakFlowUnits Yes Must be the text string: L/min InhalerA Yes Number. See note 2.
InhalerAName Yes List field: no {comma} characters. InhalerB Yes Number. See note 2.
InhalerBName Yes List field: no {comma} characters. Medicine Yes Number. See note 2.
MedicineName Yes List field: no {comma} characters. Breath No List field: No {comma} characters.
- [0] No Problem
- [1] Slight
- [2] Moderate
- [3] Severe
- [4] Extreme
Health Yes List field: No {comma} characters.
- [0] Well
- [1] Unwell - Slight
- [2] Unwell - Moderate
- [3] Unwell - Severe
- [4] Unwell - Extreme
Weight Yes Number. See note 2.
Height Yes Number. See note 2.
EventName Yes List field. The list has the following preset:
No {comma} characters.
- !! ASTHMA ATTACK !!
- Trigger exposure
- Clinic
- Staring item
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:
- The header row must be present and as shown below.
- 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.1.0 and later:
First row, with column names:Flag,Date,Time,Period,PeakFlow,PeakFlowUnits,InhalerA,
InhalerAName,InhalerB,InhalerBName,Medicine,MedicineName,Breath,
Health,Weight,Height,EventName,Notes
Subsequent event rows, with day/month/year date format:
F,27/07/2006,22:51,Evening,540,L/min,2.0,Symbicort
200/6,1.0,
Ventolin 100,1.0,Telfast 180,[1] Slight,[0]
Well,84.0,170.0,
Clinic,Weight = 22.3kg{lf}Height = 119cm
For version 1.0.0:
First row, with column names:Flag,Date,Time,Period,PeakFlow,PeakFlowUnits,InhalerA,
InhalerAName,InhalerB,InhalerBName,Medicine,MedicineName,Weight,
Height,EventName,Notes
Subsequent event rows, with day/month/year date format:
F,27/07/2006,22:51,Evening,540,L/min,2.0,Symbicort
200/6,1.0,
Ventolin 100,1.0,Telfast 180,84.0,170.0,Clinic,
Weight = 22.3kg{lf}Height = 119cm
How the data is stored
Data file and snapshots
The database is saved in the application's preferences filecom.Nesfield.AsthmaLogbookX.plist in the
user's Preferences folder of their Library .
There is also a folder
com.Nesfield.AsthmaLogbookX 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 filecom.Nesfield.AsthmaLogbookX.plist will be
saved to a backup folder in the home folder's
Documents/Asthma 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/Asthma 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.
What to do if an error occurs
This has not happened but I'm including these instructions in the unlikely event that it does happen.
- Quit the application using this method: control-click
the icon in the Dock and select 'Quit'.
Asthma Logbook X maintains 5 snapshots of the database: a snapshot is taken whenever an event is add, deleted or edited and during import, export and quit actions. Quiting via the Dock icon does not create a snapshot during a quit action, and so prevents potentially bad data from being added to the database, and from losing the oldest snapshot.
- Make a backup copy of
- Preferences file
com.Nesfield.AsthmaLogbookX.plist - Preferences folder
com.Nesfield.AsthmaLogbookX Saved Prefs
- Preferences file
- You can now re-launch Asthma Logbook X and review the
events, if they are all right you can continue using it
without any further action.
- If there is a problem with the data, quit as before
and copy the newest snapshot file
com.Nesfield.AsthmaLogbookX.plist.sav1up into the Preferences folder and rename itcom.Nesfield.AsthmaLogbookX.plist. - Now re-launch the application and review the events. Continue doing this with the snapshots until the event data is restored.
