Diabetes Forums » Living with Diabetes » Diabetes » algorithms to analyze BG, carbohydrates, insulin


Welcome to Diabetes Forums!

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.


Reply
algorithms to analyze BG, carbohydrates, insulin LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-04-2008, 08:28 AM
Senior Member
 
Join Date: Jan 2008
Posts: 1,242
algorithms to analyze BG, carbohydrates, insulin

I've seen a few questions lately about testing, basal rates, insulin ratios, et cetera. I don't know what software is "out there", and it would be forever and a day before I could get around to writing anything[1], but I probably could document algorithms and ideas that I use. e.g., Starting to inject insulin before meals and I have questions

Anyone interested? If so, I'll try to dust off my LaTeX skills (realistically speaking: around September) and write up some stuff.

However, if good books or tools already exist, I don't want to duplicate prior efforts. Yes, I'm a renegade diabetic (diabetic renegade?) who prefers researching literature and taking a self-managed approach; I consequently am totally naive what resources exist, because I've never had the urge to find out. I guess I could examine oft-cited books, but I've heard that they sometimes resort to "consult an endocrinologist".

[1] Right now, for-fun and free stuff have to take a back seat. (And, seeing all the challenges people have, I'd feel much better if any such software were free.) Although perhaps if I cut back time spent on DF...
Reply With Quote
  #2 (permalink)  
Old 07-04-2008, 11:18 AM
xMenace's Avatar
Senior Member
I am a: Type 1
 
Join Date: Jun 2006
Location: New Brunswick Canada, eh
Posts: 8,948
I actually tried calculating my basal adjustment needs in Excel. It's been awhile, and I wasn't exactly successful. I was close though. Maybe a revisit would be worthwhile.

The biggest issue is that sensitivity has to be estimated. If you knew your sensitivity, you wouldn't need to basal test or go through trial and error.
__________________
I eat an anti-oxidation diet!

Minimed 722 Pump, Novarapid, Ramipril A1C 5.9% Diagnosed Oct 19th, 1975.

Michael Pollan on CBC
Gary Taubes on ABC
Reply With Quote
  #3 (permalink)  
Old 07-04-2008, 11:51 AM
Senior Member
 
Join Date: Jan 2008
Posts: 1,242
That's the reason for the curve-fitting. Sensitivity and basal error are the variables.

Of course, you're one of those wacky-basal folks... which makes things more interesting...
Reply With Quote
  #4 (permalink)  
Old 07-04-2008, 12:11 PM
xMenace's Avatar
Senior Member
I am a: Type 1
 
Join Date: Jun 2006
Location: New Brunswick Canada, eh
Posts: 8,948
Quote:
Originally Posted by Eddy View Post
Of course, you're one of those wacky-basal folks... which makes things more interesting...
Very.

I kind of compare it to surfing, riding waves. Sometimes you fall off.
__________________
I eat an anti-oxidation diet!

Minimed 722 Pump, Novarapid, Ramipril A1C 5.9% Diagnosed Oct 19th, 1975.

Michael Pollan on CBC
Gary Taubes on ABC
Reply With Quote
  #5 (permalink)  
Old 07-04-2008, 12:54 PM
shiftzor's Avatar
Senior Member
I am a: Type 1
 
Join Date: Aug 2007
Location: UK
Posts: 952
Eddy I am currently writing a carb counting application, basically the idea is to organise recipes with carb quantities and make bolusing easy. Meal times can then be quickly created from ingredients or recipes, storing insulin records and bg after is only a step away. I am also storing things like changes to insulin and allowing you to use different I:C at any time of the day. It’s an ambitious plan but i will get there in the end. The software I currently use is winglucofacts pro which gives me hints on insulin doses and bg patterns with graphs. I would love to combine the two piece of software together however I don't have enough time to do it all. Only downside here is that I am writing it all in C#.NET not LaTeX, I am happy to work with others if they want to add bits and pieces to it, and then release this software to other diabetics under an open source license or something. Turning it into a web application is definitely another possibility. PM if you have any ideas or want to offer some assistance.
__________________

Pumping 20/05/2009 Animas 2020

Standard Deviation (Target below 2.1mmol/L | 38mg/dL)
02.01.10-01.02.10: 2.2mmol/L | 40mg/dL
02.12.09-01.01.10: 2.6mmol/L | 47mg/dL

HbA1c
30.12.09: 6.2 (7.9mmol/L | 143mg/dL)
28.01.09: 6.1 (7.7mmol/L | 140mg/dL)
21.05.08: 6.2 (7.9mmol/L | 143mg/dL)
29.11.07: 6.1 (7.7mmol/L | 140mg/dL)
23.05.07: 8.1 (11.6mmol/L | 211mg/dL)
Diagnosed 27.08.06: 14.8 (24.7mmol/L or 450mg/dL)
Reply With Quote
  #6 (permalink)  
Old 07-04-2008, 12:54 PM
Senior Member
 
Join Date: Jan 2008
Posts: 1,242
Quote:
Originally Posted by xMenace View Post
Very.

I kind of compare it to surfing, riding waves. Sometimes you fall off.
In fact... if you have -- or anyone else has -- basal logs that you'd not mind sharing, I'm curious to try looking for mathematical patterns in actual wacky basals. (I'm pretty much a flat-liner, although my regimen currently is getting a bit more odd.)

I don't know how many independent variables I'd use initially, so I'm unsure how much data to use. I've worked with overnight-only when someone was testing and correcting frequently... but a week's worth would be handy.

*shrug*

It just seems that there's enough hair-tearing and teeth-gnashing that someone should try codifying this a bit more formally. And, if it fails... that's also valuable information.
Reply With Quote
  #7 (permalink)  
Old 07-04-2008, 01:11 PM
shiftzor's Avatar
Senior Member
I am a: Type 1
 
Join Date: Aug 2007
Location: UK
Posts: 952
Quote:
Originally Posted by Eddy View Post
In fact... if you have -- or anyone else has -- basal logs that you'd not mind sharing, I'm curious to try looking for mathematical patterns in actual wacky basals. (I'm pretty much a flat-liner, although my regimen currently is getting a bit more odd.)

I don't know how many independent variables I'd use initially, so I'm unsure how much data to use. I've worked with overnight-only when someone was testing and correcting frequently... but a week's worth would be handy.

*shrug*

It just seems that there's enough hair-tearing and teeth-gnashing that someone should try codifying this a bit more formally. And, if it fails... that's also valuable information.
Yes, it does sound like a problem worth solving, creating a useful tool is not always easy though. The winglucofacts pro as I said in my other post uses standard deviation and "periods" through a day to watch for changes in bg patterns. Might be worth checking out, I could provide you with a sample of my results however they are locked into the proprietary winglucofacts format. I am sure with some effort I could “free” them obviously contacting Assencia and asking for permission first. Nothing illegal here sir.
__________________

Pumping 20/05/2009 Animas 2020

Standard Deviation (Target below 2.1mmol/L | 38mg/dL)
02.01.10-01.02.10: 2.2mmol/L | 40mg/dL
02.12.09-01.01.10: 2.6mmol/L | 47mg/dL

HbA1c
30.12.09: 6.2 (7.9mmol/L | 143mg/dL)
28.01.09: 6.1 (7.7mmol/L | 140mg/dL)
21.05.08: 6.2 (7.9mmol/L | 143mg/dL)
29.11.07: 6.1 (7.7mmol/L | 140mg/dL)
23.05.07: 8.1 (11.6mmol/L | 211mg/dL)
Diagnosed 27.08.06: 14.8 (24.7mmol/L or 450mg/dL)
Reply With Quote
  #8 (permalink)  
Old 07-04-2008, 06:26 PM
Senior Member
 
Join Date: Jan 2008
Posts: 1,242
Quote:
Originally Posted by shiftzor View Post
creating a useful tool is not always easy though.
No kidding.

Quote:
Originally Posted by shiftzor View Post
The winglucofacts pro as I said in my other post uses standard deviation
I've noticed that. I'm not terribly keen on the stddev calculation, as it's highly dependent on testing pattern. It's easily calculated, though, so minimal development effort made for something that might look impressive at first blush.

Quote:
Originally Posted by shiftzor View Post
and "periods" through a day to watch for changes in bg patterns. Might be worth checking out, I could provide you with a sample of my results however they are locked into the proprietary winglucofacts format.
Interesting. Even screen shots would be cool.

Quote:
Originally Posted by shiftzor View Post
I am sure with some effort I could “free” them obviously contacting Assencia and asking for permission first. Nothing illegal here sir.
Yes, by all means: If anyone has any restrictions, keep everything above-board.
Reply With Quote
  #9 (permalink)  
Old 07-04-2008, 06:37 PM
Senior Member
 
Join Date: Jan 2008
Posts: 1,242
I overlooked one of your posts. D'oh!

Quote:
Originally Posted by shiftzor View Post
Eddy I am currently writing a carb counting application, basically the idea is to organise recipes with carb quantities and make bolusing easy.
Cool.

Quote:
Originally Posted by shiftzor View Post
Meal times can then be quickly created from ingredients or recipes, storing insulin records and bg after is only a step away. I am also storing things like changes to insulin and allowing you to use different I:C at any time of the day.
Also cool. If you haven't already, you might look into

SQLite Home Page

for data storage.

Quote:
Originally Posted by shiftzor View Post
It’s an ambitious plan but i will get there in the end. The software I currently use is winglucofacts pro which gives me hints on insulin doses and bg patterns with graphs. I would love to combine the two piece of software together however I don't have enough time to do it all. Only downside here is that I am writing it all in C#.NET not LaTeX,
LaTeX is a text layout language. I was referring to documenting my madness, even before bothering whipping up source code.

For development, I'm most at home using C/C++ on POSIX-ish systems. That said, I've also written stuff for Windows -- once upon a time in the days of Win32S (anyone else remember that?) -- and could brush up.

Quote:
Originally Posted by shiftzor View Post
I am happy to work with others if they want to add bits and pieces to it, and then release this software to other diabetics under an open source license or something.
Yes. My personal bias is toward BSD license, including restrictive advertising clause. (If someone else wants to take the work, expand on it, and sell it... fine, as long as people know there's a free alternative.)

Quote:
Originally Posted by shiftzor View Post
Turning it into a web application is definitely another possibility.
*nod*

I thought of that. And, with plenty of bandwidth and equipment available, I'm more than willing to host it. However, I also think it would be nice to give people untethered, totally-trustable, standalone software, for those who would rather not deal with a third party.

Quote:
Originally Posted by shiftzor View Post
PM if you have any ideas or want to offer some assistance.
I'll PM you with email address.
Reply With Quote
  #10 (permalink)  
Old 07-05-2008, 11:20 AM
Senior Member
 
Join Date: Jan 2008
Posts: 1,242
A little cross-pollination is in order:

Is there software that does all of this...
Reply With Quote
  #11 (permalink)  
Old 07-20-2008, 11:35 AM
Junior Member
 
Join Date: May 2008
Posts: 48
where did you guys get up to? This is sooo needed.
Reply With Quote
  #12 (permalink)  
Old 07-20-2008, 12:12 PM
shiftzor's Avatar
Senior Member
I am a: Type 1
 
Join Date: Aug 2007
Location: UK
Posts: 952
We are still talking about it, although I think eddy has run away hope he is oki. Things have been busy lately I will have to put fingers to keyboard. If there is keen interest in something like this I am willing to invest time in it. Time to get the ball rolling.

Hopefully we can have some prototypes up and running with some community input would be good to test it and make sure it is useful. Any additional help is appreciated as there are many components to this plan from reading meter data to design of user interfaces.
__________________

Pumping 20/05/2009 Animas 2020

Standard Deviation (Target below 2.1mmol/L | 38mg/dL)
02.01.10-01.02.10: 2.2mmol/L | 40mg/dL
02.12.09-01.01.10: 2.6mmol/L | 47mg/dL

HbA1c
30.12.09: 6.2 (7.9mmol/L | 143mg/dL)
28.01.09: 6.1 (7.7mmol/L | 140mg/dL)
21.05.08: 6.2 (7.9mmol/L | 143mg/dL)
29.11.07: 6.1 (7.7mmol/L | 140mg/dL)
23.05.07: 8.1 (11.6mmol/L | 211mg/dL)
Diagnosed 27.08.06: 14.8 (24.7mmol/L or 450mg/dL)
Reply With Quote
  #13 (permalink)  
Old 07-21-2008, 12:03 AM
Junior Member
 
Join Date: May 2008
Posts: 48
I have been looking for something like this and don't understand why it hasn't already been done. I am not a software person but go for it. Anything that helps has to be better than what the current position is. Any help I can give I will.

Milly's Dad
Reply With Quote
  #14 (permalink)  
Old 07-22-2008, 07:23 PM
Senior Member
 
Join Date: Jan 2008
Posts: 1,242
Quote:
Originally Posted by shiftzor View Post
We are still talking about it, although I think eddy has run away hope he is oki. Things have been busy lately I will have to put fingers to keyboard. If there is keen interest in something like this I am willing to invest time in it. Time to get the ball rolling.
Yeah, I ran off for a bit. Work has been crazy busy... and I became nocturnal, then had a tough time shaking the habit. I think I'm at least getting back to sane-person hours.

(The good part: Crazy sleep hours made it easier to basal test!)

Quote:
Originally Posted by shiftzor View Post
Hopefully we can have some prototypes up and running with some community input would be good to test it and make sure it is useful. Any additional help is appreciated as there are many components to this plan from reading meter data to design of user interfaces.
What would people place as the highest priorities?
Reply With Quote
  #15 (permalink)  
Old 08-25-2008, 05:31 PM
Junior Member
 
Join Date: May 2008
Posts: 48
My suggestion would be to have a computer program that for pump or mdi you could put in carbs eaten, phyisical demensions, insulin regime , blood glucose levels and any other attributes considered appropriate and the computer program would calculate basal and bolus profiles. It would learn from current data. So if your profiles changed season to season etc you simple put in or download current data and updated profiles would be produced. I know this may sound like pie in the sky but currently there are so many people out there with little guidance or making no changes at all. I know the outcomes would not be perfect but it would have to be better than the current guess and miss situation. Chat rooms are full of people searching for basal profiles and doctors just don't have the time. You can't tell me that with the right computer programmer, mathematician, web designer that a user friendly "educational" tool could not be developed. The goal would be a computer program that showed based on previous results what basal rates and bolus rates could give a mathematical best fit and show this graphically.


From a priority point of view I think to start on basal rates is a good place. I have done a lot of research on what is available and what has been done inthe past.
Reply With Quote

Reply


Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.diabetesforums.com/forum/diabetes/29876-algorithms-analyze-bg-carbohydrates.html
Posted By For Type Date
Basal Testing for MDI - Page 2 - Diabetes Daily Forum This thread Refback 09-25-2008 07:12 AM

» Log in
User Name:

Password:

Not a member yet?
Register Now!

All times are GMT -7. The time now is 07:15 AM.

For Advertising:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33