Translate

Showing posts with label health. Show all posts
Showing posts with label health. Show all posts

Sunday, April 26, 2015

Monitoring health data - populating Food tables

This article continue the discussion about the building of the system to collect my health numbers.

There are already many data stored in LibreOffice Calc tables and other LibreOffice documents.
Because of that when/where possible macro will be used to generate the mySQL commands to populate the tables.

Populate T_FOOD_TYPE

Populating this table it requires more work because it is necessary to find the information about each specific food used. In order to simplify the input mechanism, a new spreadsheet that collect the information to be put in the database, is created.
Unfortunately there is no easy way to populate the spreadsheet, i.e. it must be done manually, copying the data from the existing LibreOffice word documents as described in the Monitoring health data - my way  #2 article.

Let's examine the spreadsheet used to format the insert statement.

The spreadsheet has two tabs:
  • Food type
  • Food
The Food type tab, is structured as the database, raw.
A hash key is prepared as index, using the Food name, the brand and the number of carbs.
This should allow to generate a unique key for the each record.

Here the fields of the tab:

Index (food type) Name 1 Serving Serving unit Serv X cont Carbs Calories Protein Fat Sodium Potassium Brand Notes


The index in the cell A2 use the Hash macro (it is implied the third Party Hash macro is installed):

=TEXTHASH(CONCATENATE(B2,L2,F2),"MD5")

The goal is to have a unique index and to do so the hash is calculated using the name of the food (B2), the value in carbs (F2) and the brand (L2).
The field in the table are mostly following the SQL table structure (see Monitoring health data - an improvement).
For extra info there are these fields:
  • Serv X cont
    Serving per container - the number of serving you can expect from the container or how many servings can be obtained from a recipe
  • Notes
    Just extra notes about the food
After the table, there is the formula for the formatting of the SQL insert statement.
First of all, a cell (O1) contains the starting structure of the statement :

Insert into t_food_type values (

Then below, this formula is applied :
=IF(B2="","",(CONCATENATE($O$1,"""",A2,"""", ",", """", B2, """", ",", C2, ",", """", D2, """", ",", F2, ",", G2, ",", H2, ",", I2, ",", J2, ",", K2, ",",  """", L2, """", ",", """", M2, """", ");")))
The meaning is :
  • if the field "Name" exists (not blank) then 
    • create a string using the field O1, plus the other fields, starting from the field A2 (hash key) and ending with the field M2 (Notes)
  • otherwise create a blank entry
The formula is then copied in all subsequent cells.

Here an example of the insert statement generation starting with the data on the table :

Insert into t_food_type values ("ce7993e549b4d010c825766dfd034a99","Pork Patties",2,"patty",2,270,11,24,500,0,"Jimmy Dean","");
Insert into t_food_type values ("981a21f5a752cad048a834b9fd6cd258","Cooked Ham",4,"slices",1,60,8,2,580,0,"Land O'Frost","");
Insert into t_food_type values ("1a52451ea65def964ddb3c2be50811ce","Big Cup Noodles Homestyle Beef Flavor Ramen Noodle",1,"1/2 container",24,190,3,8,760,0,"Nissin","");
Insert into t_food_type values ("74ccbb6a8f0e507375ca5f727074a4e1","Texas Style Angus Beef Chili with Black Beans Soup",1,"cup",21,210,15,5,790,0,"Campbell","");
Insert into t_food_type values ("76d5f224ea4a78e3d737caa4eba0d1e","iesta Chicken Lime Tortilla Soup with White Meat Chicken",1,"cup",13,110,9,1.5,790,0,"Campbell","");
.............................................................
.............................................................

After the table is manually populated, we end up with a list of insert capable to fill up the T_FOOD_TYPE table.

Populate T_FOOD

The same mechanism used  to populate the T_FOOD_TYPE table, is used to populate the T_FOOD table too.
Like before, a new spreadsheet that collect the information to be put in the database is created (still refer to the Monitoring health data - my way  #2 article)

Let's examine the spreadsheet used to format the insert statement.

The spreadsheet has two tabs:
  • Food type
  • Food
The Food tab, is structured as the database, raw.
Here the table structure:

Index Date Meal Type Meal FoodIndex Food name Servings Calculated carbs Calculated salt

The Calculated carbs and Calculated Salt are populated using data from the previous table.

Calculated carbs is :

=VLOOKUP(D2,'Food type'.$A$2:$M$156, 6, 0)*F2

The meaning is to look in the all previous tab (Food type) of the spreadsheet for the FoodIndex key, retrieve the number of carbs per serving and multiply for the number of serving (field Servings on this tab).

Similarly for the Calculated salt :

=VLOOKUP(D2,'Food type'.$A$2:$M$156, 10, 0)*F2

The meaning is to look in the all previous tab (Food type) of the spreadsheet for the FoodIndex key, retrieve the number of mg of salt per serving and multiply for the number of serving (field Servings on this tab).
Just to have a quick idea about the amount of salt of the selected food.

The Index is an hash key using the Date Meal, the FoodIndex and the Food name fields. 
This should allow to generate a unique key for the each record.
The cell A2 contains this formula :

=TEXTHASH(CONCATENATE(B2,C2,D2,E2),"MD5")

Again the purpose is to obtain a unique key for each entry, to do so it used the date of the meal (B2), the type of the meal (C2, e.g. Breakfast or Lunch or Dinner or Snack), the food index (D2, foreign key) and the food name (E2).
Note that the food name field is populated from the other Calc table (see above).

After the table, there is the formula for the formatting of the SQL insert statement.
First of all, a cell (I1) contains the starting structure of the statement :

Insert into t_food values (

Then below, this formula is applied :

=IF(B2="","",(CONCATENATE($H$1, """", A2, """", ", str_to_date('",(TEXT(B2,"mm/dd/yy")), "', ", """", "%m/%d/%Y", """", "), ",        """",C2,"""",", ","""",D2,"""", ", " ,F2, ");")))


The meaning is :
  • if the field "Date Meal" exists (not blank) then 
    • create a string using the field H1, plus the other fields, starting from the field A2 (hash key) and ending with the field F2 (Servings)
  • otherwise create a blank entry
The formula is then copied in all subsequent cells.

Here an example of the insert statement generation starting with the data on the table :

Insert into t_food values (84280b208c8c61a7aab5c4be5fb25385, str_to_date('12/29/14', "%m/%d/%Y"), "Breakfast", "ac118ebecb401ae2e9fe42b8f7b1da8c", 2);
Insert into t_food values (16df74f3237c526a71186884b0cd7aa1, str_to_date('12/29/14', "%m/%d/%Y"), "Breakfast", "254a86d2153bfbc149f51d63c7113952", 1);
Insert into t_food values (532061254f4761e69bcf627c4916f3c2, str_to_date('12/29/14', "%m/%d/%Y"), "Lunch", "1b4f22d0d92b9185406cf6d815fd2c4c", 1);
Insert into t_food values (34c6041c3126488e599aa467e8a0d4de, str_to_date('12/29/14', "%m/%d/%Y"), "Lunch", "af3a803a27460603422bf47322ba6d4", 2);
Insert into t_food values (532061254f4761e69bcf627c4916f3c2, str_to_date('12/29/14', "%m/%d/%Y"), "Dinner", "1b4f22d0d92b9185406cf6d815fd2c4c", 2);
....................................................................
....................................................................


Basically after the table is manually populated, we end up with a list of insert capable to fill up the T_FOOD table.


Saturday, April 25, 2015

Monitoring health data - populating measurement tables

This article continue the discussion about the building of the system to collect my health numbers.

There are already many data stored in LibreOffice Calc tables and other LibreOffice documents.
Because of that when/where possible macro will be used to generate the mySQL commands to populate the tables.
The T_MES_TYPE table will be populated manually, but T_MES, T_FOOD_TYPE and T_FOOD can use some kind of automation mechanism to do so.

Populate T_MES_TYPE

Here a list of mySQL commands to populate the T_MES_TYPE table.
It is easy to populate the table, just open a mySQL session in a terminal, connect to the database and then cut & paste the lines below.

connect name_database;
insert into t_mes_type values (1, "Glicemy", "ml/dg");
insert into t_mes_type values (2, "Weight", "lb");
insert into t_mes_type values (3, "Carbs", "count");
insert into t_mes_type values (4, "Blood Systolic", "mmHg");

insert into t_mes_type values (5, "Blood Diastolic", "mmHg"); 
insert into t_mes_type values (6, "Heart beat", "bpm"); 

insert into t_mes_type values (7, "Ketons", "count"); 
insert into t_mes_type values (8, "Exercise elliptical", "min"); 
insert into t_mes_type values (9, "Exercise walking", "miles"); 
insert into t_mes_type values (10, "Exercise hiking", "miles"); 

Populate T_MES table from Spreadsheet

Since already exists many data stored in the LibreOffice spreadsheet, here there is  a procedure to populate the data stored in the tables. 

Populate T_MES - glucose level


  • Open the spreadsheet
  • Create a separate tab and rename it to give a meaning (i.e. Export SQL glucose)
  • In the cell A1 copy this fixed string : Insert into t_mes values ( 
  • In the cell J2 use the Hash macro (it is implied the third Party Hash macro is installed):

    =TEXTHASH(CONCATENATE('All times'.A2,'All times'.F2,'All times'.G2),"MD5")
  • Copy in the other Jx fields the formula above
  • In the cell A2 copy this formula :

    =IF (OR('All times'.G2 = 0, 'All times'.G2 = ""), "",(CONCATENATE($A$1, """", J2,"""", ", str_to_date('", (TEXT('All times'.A2,"mm/dd/yy")), "',", """", "%m/%d/%Y", """", ")", ", str_to_date('", (TEXT('All times'.F2,"hh:mm:ss")), "',", """", "%H:%i:%s", """", ")", ", 1, ", 'All times'.G2, ");")))
  • Copy all the result strings  in the mysql
Here an example of a correct entry generated :

Insert into t_mes values ("31ba5af2e19e9c8e9bc35bbd1f588fb1", str_to_date('10/28/14',"%m/%d/%Y"), str_to_date('19:45:00',"%H:%i:%s"), 1, 150);

Invalid entries will be blanket

Populate T_MES - weight


  • Open the spreadsheet
  • Create a separate tab and rename it to give a meaning (i.e. Export SQL weight)
  • In the cell A1 copy this fixed string : Insert into t_mes values ( 
  • In the cell J2 use the Hash macro (it is implied the third Party Hash macro is installed):

    =TEXTHASH(CONCATENATE('All times'.A2,'All times'.F2,'All times'.H2),"MD5")
  • Copy in the other Jx fields the formula above
  • In the cell A2 copy this formula :

    =IF ( OR ('All times'.H2 = 0, 'All times'.H2 = ""), "", (CONCATENATE($A$1, ,"""",J2,"""", ", str_to_date('", (TEXT('All times'.A2,"mm/dd/yy")), "',", """", "%m/%d/%Y", """", ")", ", str_to_date('", (TEXT("08:00:00","hh:mm:ss")), "',", """", "%H:%i:%s", """", ")", ", 2, ", 'All times'.H2, ");")))
  • Copy the content of the cell A2 for the remains rows up tp the number of rows present in the tab All times (see the limit in the tab All times)
  • Copy all the result strings  in the mysql
Here an example of  a correct entry generated :

Insert into t_mes values ("4af7c8660faee64b3e126c3c1717b510", str_to_date('10/28/14',"%m/%d/%Y"), str_to_date('08:00:00',"%H:%i:%s"), 2, 177.6);


Invalid entries will be blanketed

Populate T_MES - Ketons


  • Open the spreadsheet
  • Go in the tab of the month (to be repeated for each month)
  • In the cell U1 copy this fixed string : Insert into t_mes values ( 
  • In the cell T2 column create the index using the hash formula:

    =TEXTHASH(CONCATENATE(A2,F2,K2),"MD5")
  • Copy in the other Tx fields the formula above
  • In the cell U2 copy this formula :

    =IF (   K2 = "",    "",       (CONCATENATE($U$1,                 """",T2,"""",         ", str_to_date('", (TEXT(A2,"mm/dd/yy")), "',", """", "%m/%d/%Y", """", ")",         ", str_to_date('", (TEXT("09:00:00","hh:mm:ss")), "',", """", "%H:%i:%s", """", ")",         ", 7, ", K2, ");")))
  • Copy the content of the cell U2 for the remains rows up tp the number of rows present in the monthly tab 
  • Copy all the result strings  in the mysql
Here an example of a generated entry (invalid entries are blanketed).

Insert into t_mes values ("fe8565c8659775e73957e9c0485101f4", str_to_date('03/01/15',"%m/%d/%Y"), str_to_date('09:00:00',"%H:%i:%s"), 7, 0);

Alternatively (I prefer this way) is possible to prepare ASCII files with the generated commands and feed mySQL with these files.
In this way, the files allows to recreate the database from the scratch if necessary, a form of backup, and also is easy to duplicate the database on different machines.
The files can be edited to add comments and explain the purpose of specific commands/fields.

Sunday, April 5, 2015

Monitoring health data - an improvement

The purpose of the article is to start a discussion  about a "system" capable to store and retrieve/analyze health data.
More articles will follow on specific issues.  This article is the continuation of the previous articles "Monitoring health data - my way #1 and #2".

The use of the spreadsheet as main tool to collect data for now is preserved, because it is  easy to store the information in that way, but retrieve them in a meaningful way can become tricky.
This why I started to think a better way to do this "daily chore", in a way that will easily allow me to create better reports and analyze the data more deeply, creating also reports "on the fly".

The system


The system is based on a database that collect all the information and a set of macro/applications/programs to facilitate the data entry and the retrieval.
The database is based on mySQL.
Macro in the spreadhseet (Libreoffice Calc) allows to export the data stored in the SQL tables.

The database


The database is based on some tables that collects the measurements and other related values.
At the moment I created 4 tables:

  • Measurement table
  • Measurement type table
  • Food table
  • Food type table

Measurement tables

T_MES


These are the main tables used to store the health measurements.
The main table (T_MES) contains the actual readings, and the T_MES_TYPE contains specific information about the type of measurement.
Each measure is stamped with date and time, however some measurements will have a fake time.
For example the weight. Usually there is an entry per day, so the time is forced at 8:00 am regardless when actually was taken, because not always I can measure at the same time.

Let see in details the fields of T_MES:

  • mesIndex
    Unique ID for the record, it is a MD5 Hash of the date, time and value measured
  • dateMeasure
    It is the date of the measurement
  • timeMeasure
    It is the time of the measurement. Weight and Ketons have a fake time entry. 8:00 am for Weight, 9:00 am for Ketons
  • typeMeasure
    Foreign key for the table T_MES_TYPE
  • noteMeasure
    Contains specific measurement note. The nature of the note depends about the measurement.
  • valueMeasure
    Value of the measurement
The T_MES_TYPE table contains information about the measure.
  • typeMeasure
    Unique ID for the record. Incremental number
  • description
    A brief description of the measurement. Explains what is measured
  • units
    Measurement unit of the measurement

Here the data to load in the T_MES_TYPE table :

typeMeasure code unitsdescription 
1ml/dg Glycemy
2lb  Weight 
countCarbs 
4mmHgBlood pressure systolic 
mmHg Blood pressure diastolic
bpmHeart beat (beat per minute)
 7count
Ketons 
 8minutes
Exercise elliptical 
 9miles 
Exercise walking
 10miles 
Exercise hiking

Here the mySQL commands to create the two tables :

create table if not exists t_mes (mesIndex varchar(40) not null primary key, dateMeasure date, timeMeasure time, typeMeasure numeric, valueMeasure numeric);

create table if not exists t_mes_type (typeMeasure numeric not null primary key, description varchar(20), unit varchar(10));

T_FOOD


The T_FOOD tables (T_FOOD and T_FOOD_TYPE) stores information about the food eaten.

Let see in details the fields of T_FOOD:

  • foodIndex
    Unique ID for the record, it is a MD5 Hash of the date, time and value measured
  • dateMeal
    It is the date of the meal
  • typeMeal
    It is the time of the meal according to a fixed schedule.
    It is a fixed value like this :
    • Breakfast
    • Lunch
    • Dinner
    • Snack
  • foodType
    Foreign key for the table T_FOOD_TYPE
  • serving
    Number of serving consumed
The T_FOOD_TYPE table contains information about the food.
  • foodType
    Unique ID for the record. Hash of the food name, brand and carbs
  • name
    Name of the food
  • servings
    Number of servings in a product (if applicable)
  • servingUnits
    Measurement unit used for the servings
  • carbs 
    Net Carbs in grams contained in 1 serving
  • calories
    Calories contained in 1 serving
  • protein
    Proteins in grams contained in 1 serving
  • totalFat
    Total fat in grams contained in 1 serving
  • sodium
    Salt in milligrams contained in 1 serving
  • potassium
    Potassium in milligrams contained in 1 serving
  • brand
    Name/description brand of the food. For vegetables/fruit use the word "raw".
  • notes
    Notes about the food
Here the mySQL commands to create the two tables :

create table if not exists t_food (foodIndex varchar(40) not null primary key, dateMeal Date, typeMeal varchar(30), foodType varchar(40), serving Numeric);


create table if not exists t_food_type( foodType varchar(40) primary key not null, name varchar(40), servings Float, servingUnits varchar(15), carbs Float, calories Float, protein Float, totalFat Float, sodium Float, potassium Float, brand varchar(40), notes varchar(40));

Sunday, March 29, 2015

Monitoring health data - my way - #2

On this article I'll discuss how I track data related to the food.
A very important thing to do if you are dieting or keeping track of your health numbers, is to monitor the carbs and other nutrient intake, i.e. how many carbs you are eating.
In order to do so, it is important to know exactly what and when you are eating.

It seems easy but is not.
Why is not easy ? Well, let see some reasons (just a few) :
  • not all the food you are eating is labeled
  • the food is not  "homogeneous", the same food can be present in different forms
  • often a processed food have different characteristics  than a less processed food
  • often are indicated base chemical compost rather than more "human" description
  • different companies label the food in different way
  • all the companies who sell food, always try to hide or manipulate information in order to make more palatable the food they sell. The rule seems to be, if you can't be vague, obscure with chemistry and strange words
  • hidden basic ingredients in processed food (like salt or sugar) often requires to "split" a food in it's basic elements
  • etc.
So monitoring what you want to eat is not an easy business, it takes time and organization.
Here  is "my way". Repeating myself, this is how  I do that, I'm not stating it is the right way to do it.
It is good for me.

I maintain basically 3 documents :
  1. a "food information" document (word processor)
  2. a "food journal" document (word processor)
  3. the spreadsheet where I track also the sugar level and other measurements (spreadsheet)

Food information


The food information document contains information about the food I eat.
Usually I save a picture of the food or box, for an easy visual reference, and then some nutrient information.
Plus I add some notes to clarify how many carbs are actually present, just to simplify when I have to figure out quickly how much carbs I'm having.

The main problem is due by the fact that manufacturers give the information often in a very complicated way.
For example, many "soups" containers  contains 2 servings, but often the nutrient information are for about 1 serving.
Often you find 2.5 servings per container, other times 1 ... doesn't exists a standard.
Some manufactures express the "serving" in grams, other in oz, other per cup, other per bowl other as a generic "serving", or specific food description.
So in order to figure out what you are eating, to calculate carbs and other measurement, you need to spend time researching information.

Thus I decided to "save" these researches, the results, in a document.
Each entry has a picture of the product, a copy of the nutrition chart, a thumb up or down to indicate that tastes good, and eventually some notes.

Here an example of entry:








Again, the main purpose of this document is to have a quick recap of the food I usually ate, in order to avoid to do the same research over and over.

On this document are also documented some "home made recipes", in order to calculate the nutrition info for that.
What I usually do, is to put down the basic nutrients of each component of the recipe, then calculate the total amount of carbs (and other nutrients) and then divide in cups or bowls.

Food journal


Once you figure out how many carbs (and other nutrients) are in the food, the second step is to write down somewhere what you ate on a specific day.
This is the Food Journal document.
For each day there are 4 entries :
  • Breakfast
  • Lunch
  • Dinner
  • Snacks
Each entry will collect information about what I'm eating. Quantity, food, estimated carbs, often divided by food.
With these info I can sum up the number of carbs for each "period" and transpose that value in the spreadsheet.

Here an example of entry :


February 26, 2015
  • Breakfast
    1 low carb tortilla (3g) with cheese, 4 slices capocollo (0g), eggs beater
    Coffee
  • Lunch
    1 serving Chicken Enchilada bake (15g)
    Pringles chip onion sour – single serve (10g)
    Cornetti single serving (3 g)
  • Dinner
    Panera Bread – Chicken Kale and sweet potato soup – 1 cup (9g)
    1 Morey's grilled salmon (1g) with zucchini (5g)
  • Snacks
    10 am – 1 pouch Skinny zero popcorn (5g)
    3 pm - Chiquita – Bites juicy red apple (6g) with string cheese
    9 pm – low carb cake (4 g)
More details are put in this document, more is easy to calculate the carbs but there is always a trade between efficiency and time spent doing that.
Being too precise requires a lot of time, so know what to write as amount of information is something that is coming with the experience of doing that daily.

Note that the food journal reports mainly the carbs intake and not all the others nutrient,
This because the carbs intake is the main key in my case, however, other articles will explain how to use the nutrient information and create a daily journal.

Spreadsheet


In the end the goal is to come up with some carbs number to put in the spreadsheet I described in the previous article (Monitoring health data - my way #1).
The day is divided in 6 time areas :
  • breakfast
  • morning snack
  • lunch
  • afternoon snack
  • dinner
  • night snack
For each area the goal is to assign a value (if any).
See the previous document for details.

Wednesday, March 25, 2015

Monitoring health data - my way - #1

Everybody should be aware about his/her health, using real time data, but of course only when an illness is developed we really starts to pay attention to that.

I started to measure the sugar level in the blood regularly and  record these data on a spreadsheet.
It is relatively convenient to keep track on these data in this way, but it has many limits, especially when I started to collect other data as well, like the weight, my daily intake of carbohydrates, how much exercise I do, what medications I'm taking and when, and so on.

This article describes the way I started to collect/store/retrieve information using LibreOffice Calc.
I'm sure exists many other better ways to do so, but this is my way.

Software

The main tool used to store the data is LibreOffice Calc.
I'm using it in two flavors :

  • LibreOffice Calc 4.3.1.2 for Windows
  • LibreOffice Calc 4.2.7.2 for Linux
The spreadsheet is divided in different tabs.
A tab for each month, a tab to recollect all the data, a tab to recollect only the fasting measurements and other tabs for the conversion (will be discussed in other articles).
Let see more in details the main tabs.

Monthly tab


Each month of collected data has a tab, named with Month and Year, like "January 2015".
The data collected in the tabs are the carbs intake, the glucose reading, what medications are taken, the weight, the ketons and some notes.
Additionally in the notes field is reported what kind of exercise is done and other remarks.

Here the columns on this tab :

Date Meal Carbs Daily carbs Glucose reading Time ml/dg Medications Weight (lb) Notes Ketons

  • Date
    The date of the measurement.
    Since the tab contains different data, there are at least 6 entries for each date, i.e. every day there are 6 entries (rows) with the same date.
  • Meal
    Indicates a specific period of the day. It is used  to record the intake of carbs in gram.
    The values of this column are :
    • Breakfast
    • Snack (morning)
    • Lunch
    • Snack (afternoon)
    • Dinner
    • Snack (night)
  • Carbs
    A value in grams of the net carbs for each specific period (see previous column)
  • Daily Carbs
    A sum of the 6 previous field (see Carbs)
  • Glucose reading
    A description associated to the glucose reading.
    The three major measurements of glucose are done before breakfast, before lunch and before dinner.
    There are three "fixed" descriptions, plus a random description (up to three) :
    • Before breakfast
    • Before lunch
    • Before dinner
    • Random
  • Time
    Time of the glucose reading
  • ml/dg
    Value of the glucose reading
  • Medications
    List of the medication taken in the day
  • Weight (lb)
    Weight measured. Usually once a day. not in a specific time.
  • Notes
    Generic notes. Usually I put in here what exercise I do and how long or other notes, maybe associated to other fields
  • Ketons
    Value of the ketons. I'm trying to mimic the colors used by the strips and putting an estimate value in one of the cell.
  • bpm (after March)
  • Systolic
  • Dyastolic

Here an example of a monthly tab, how is look (is a demo page, the values are fake):

















After March, three extra columns will be added, to save the blood pressure and the heart beat.

Chart

In the end of the table, a chart is present to show the main collected data.
The chart is a linear one and shows the weigh, the glucose level, the daily carb intake and the carb intake.
The colors used and the scale are kept for all the monthly tabs in order to facilitate to compare them.

Here an example of the monthly chart (it's a demo - fake values):






There are two different scales on the Y axes.
On the left from o to 200 for the weight and ml/dg.
On the right from 0 to 400 for the carbs intake.

The reason was to leave more space between the carbs and the other two lines.
Using the same scale, sometime the lower part of the glucose line and the upper part of the daily carb intake, were mixing. The chart is important to show quickly the patterns, not reading specific values, so the two scales are just OK.

All times tab

This tab recollect all the data present in the monthly tabs.
Originally the data were simply copied in this tab, since January 2015 some operations are automated, so that the update happens when the monthly tab is updated.
The reason to have an extra tab to recollect all the data previously collected, is to easily generate a chart.

Date Meal Carbs Daily carbs Glucose reading Time ml/dg Weight (lb)

  • Date
    The date of the measurement.
    Since the tab contains different data, there are at least 6 entries for each date, i.e. every day there are 6 entries with the same date.
  • Meal
    Indicates a specific period of the day. It is used to record the intake of carbs in gram.
    The values of this column are :
    • Breakfast
    • Snack
    • Lunch
    • Snack
    • Dinner
    • Snack
  • Carbs
    A value in grams of the net carbs for each specific period (see previous column)
    Since January the value of this cell is copied automatically from the specific monthly tab.
    Example : =IF(('January 2015'.C2 = 0),"",'January 2015'.C2)
  • Daily Carbs
    A sum of the 6 previous field (see Carbs)
  • Glucose reading
    A description associated to the glucose reading.
    It is used to divide the day. The three major measurements of glucose are done before breakfast, before lunch and before dinner.
    There are three "fixed" descriptions, plus a random description :
    • Before breakfast
    • Before lunch
    • Before dinner
    • Random
  • Time
    Time of the glucose reading
    Since January the value of this cell is copied automatically from the specific monthly tab.
    Example : =IF(('January 2015'.F2 = 0),"",'January 2015'.F2)
  • ml/dg
    Value of the glucose reading
    Since January the value of this cell is copied automatically from the specific monthly tab.
    Example : =IF(('January 2015'.G2 = 0),"",'January 2015'.G2)
  • Weight (lb)Weight measured. Usually once a day. not in a specific time.
    Since January the value of this cell is copied automatically from the specific monthly tab.
    Example : =IF(('January 2015'.I2 = 0),"",'January 2015'.I2)

Chart

In the end of the table, a chart is present to show the collected data.
The chart is a linear one and shows the weigh, the glucose level and the daily carb intake like the monthly one, but it will include more months.

All time only fast tab

This tab recollect all the data present in the monthly tabs but only for the "Before breakfast" glucose levels.
Originally the data were simply copied in this tab, since January 2015 some operations are automated, so that the update happens when the monthly tab is updated.
The reason to have an extra tab to recollect all the data previously collected, is to easily generate a chart.
Basically this tab is identical to the previous one (All times tab) but the glucose values copied are only the ones before breakfast.

Date Meal Carbs Daily carbs Glucose reading Time ml/dg Weight (lb)
  • Date
    The date of the measurement.
    Since the tabspreadsheet contains different data, there are at least 6 entries for each date, i.e. every day there are 6 entries with the same date.
  • Meal
    Indicates a specific period of the day,  used to record the intake of carbs in gram.
    The values of this column are :
    • Breakfast
    • Snack
    • Lunch
    • Snack
    • Dinner
    • Snack
  • Carbs
    A value in grams of the net carbs for each specific period (see previous column)
    Since January the value of this cell is copied automatically from the specific monthly tab.
    Example : =IF(('January 2015'.C2 = 0),"",'January 2015'.C2)
  • Daily Carbs
    A sum of the 6 previous field (see Carbs)
  • Glucose reading
    A description associated to the glucose reading.
    The three major measurements of glucose are done before breakfast, before lunch and before dinner.
    There are three "fixed" descriptions, plus a random description :
    • Before breakfast
    • Before lunch
    • Before dinner
    • Random
  • Time
    Time of the glucose reading
    Since January the value of this cell is copied automatically from the specific monthly tab.
    Example : =IF(('January 2015'.F2 = 0),"",'January 2015'.F2)
  • ml/dg
    Value of the glucose reading
    Since January the value of this cell is copied automatically from the specific monthly tab.
    Example : =IF(('January 2015'.G2 = 0),"",'January 2015'.G2)
  • Weight (lb)Weight measured. Usually once a day. not in a specific time.
    Since January the value of this cell is copied automatically from the specific monthly tab.
    Example : =IF(('January 2015'.I2 = 0),"",'January 2015'.I2)

Chart

In the end of the table, a chart is present to show the collected data.
The chart is a linear one and shows the weigh, the glucose level and the daily carb intake like the monthly one, but it will include more months.

More articles will follow in order to describe the system I'm setting up to deal with all these data.