Friday, October 31, 2008

The Windows App.



So, I have been working on a windows applicaiton (program) to calculate the GI of a meal and attempt to graph the relationship between the breakdown of carbs and the effects of insulin. I have been working to get the correct 'shape' of each curve and need to continue to tweak the length and/or height of the curve to get a more realistic breakdown. The GI will obviously affect the graph of the carbs. Eventually, I would like to be able to have various factors affect the insuling curve, such as physical or mental activity, health, amount of sun, etc along with shot location... Oh, the yellow line you can barely see is the Lantus or long term insulin, which is a seperate factor in the mix.


The program will allow you to build the meal and input activities and other information, then it will calculate the shot she needs and graph the information. The user would then see the graph and would be able adjust the curve, by adding some high or low GI food to 'fix' it. We have been using this for Ryann, giving her a couple of life-savors for quick sugar and then adding those carbs to the dinner shot, preventing the low at 9 or 10 pm, which we treat, causing the high in the morning... You can see the main screen somewhere on this post...
I'm just staring this program and will be updating the status of the project... I have been working with my daughter at controlling her diabetes for a little over a year and have lots to learn. Please feel free to post comment or suggesting to me...


Graphs

Low GI Graph, causing the BSL to dip before ending at 150.

Good GI food causing a nice gradual decline to 150..


My Project Theory

My daughter was diagnoses with Type 1 diabetes in Oct of 2007, at the time I was in Federal Law Enforcement in the Philadelphia area. Earlier in the year, my wife and I had decided to leave law enforcement and return home to the west coast to be closer to family and friends. We packed up our five kids in the spring of 2007 and moved them back, I stayed on the east coast looking for jobs back home. I found a good job in September of 2007 and was at my going away party at a restaurant when my wife called with the diagnosis. She had taken her to the doctor thinking she had a bladder infection, only to find out it was Type 1 Diabetes. Ryann and my wife then spent the next few days in the hospital getting help and support for Ryann.

Now, one year later, I understand diabetes, food, carbohydrates and the human body more then ever before. I spend hours running and thinking about how to make it easier to track and monitor Ryann’s blood sugar level or BSL. However, we still struggles to understand the reasons Ryann would have high BSL in the morning or at varios times during the day. We worked with doctors who suggested her Lantus dosage was to high or low or the amount of Novolog was to high. These suggestions never made sense to me, but I was not a doctor, and I was new at this.

Having a degree in Computer Science and over-whelming desire to solve problems, I began to look into the diabetes more and more. I began reading books and looking into the effect of insulin and other factors as they relate the Ryann’ BSL. What I found was something called the Glycemic Index or GI, this describes the breakdown rate of carbs in the body. What I think I have figure out is why Ryann would go low at 10 pm and then wake-up at 350 or so in the morning. It was not a factor of the insulin dosage but the rate of breakdown of carbs and the rate the insulin works. If those two are out of sync, in relation to the current BSL, it would appear she was headed low, but in fact she wasn’t. You can look at the two graphs below, the first one is what I would call “good’ or that we have selected the right foods so her carbs breakdown at a rate even with the insulin. The second graph is ‘bad’ because the carbs breakdown at a slower rate then the insulin which causes a ‘temporary low’ which would be recovered from later. The green lines are the insulin, the red line the BSL and the black is the carbs…




So by controlling the GI of the meal, we can control the BSL and understand better what is happening with Ryann.