Writing BG Management App

andcol

Well-Known Member
Retired Moderator
Messages
3,176
Type of diabetes
I reversed my Type 2
Treatment type
I do not have diabetes
Version 0.5.1 published to the normal Google Drive Location
https://drive.google.com/file/d/0B-z_UPs-Jl8abmNTNDgwZFluOEE/view?usp=sharing

This version updates your database to version 11 please back up your data using the back up function and also back up your BGDB directory in its entirety before running this version for the first time.

This thread will help to understand the background of this functionality

Highlight
The Application now has a new major function to assist Insulin Users. There is a new Insulin Tab to allow Basal and Bolus in take. It allows your to create your Insulin on Board profile and also shows you an estimate on a real time clock of what is remaining.
(Note that the carbs and comment boxes although shown in the table are not yet functional)
upload_2015-9-13_8-25-27.png

The IOB Profile (RHS) can be made as complex as you wish with different curves for different bolus thresholds.
The yellow bar is your real time clock of the estimatad bolus units still remaining active based on your IOB profile and when you took your previous bolus. Note that if you bolus on top of a bolus it will compound the effective bolus on board as can be seen in the first two lines in the table (LHS) in the screen capture above
If you add a bolus line with a zero it will just record the effective bolus at that point in time

You can edit the basal and bolus values displayed in the table directly and deleting the field will delete the value. The bolus field will always be shown with a zero whereas the basal line will be shown as blank. If you delete the basal and bolus field on the same line the row will be deleted from the application. You can also delete the record by right clicking and choosing delete from the pop up menu

Data backup and restore functionality is implemented with a new InsulinSet Tag

I am trying a new field input approach. When you click on the date field it will suggest "now" as the date time in grey Just hit the space bar or type a date as appropriate. The greyed out value is not entered

To ad or delete an IOB profile threshold (note the default zero can not be deleted) just type in a new number or delete delete the displayed number and hit enter. It will provide a copy of the maximum lower threshold profile. Note that in a profile there are two constraints: The first entry must be at 0 minutes. The last entry must have a multiplier of zero.

TO DO
1. Graphing of basal and bolus
2. Implement carb and comment fields
3. Record table widths and restore as per other tables
4.
 

andcol

Well-Known Member
Retired Moderator
Messages
3,176
Type of diabetes
I reversed my Type 2
Treatment type
I do not have diabetes
Thanks and no not a candidate, that was many years ago. Hope you find it useful
 

andcol

Well-Known Member
Retired Moderator
Messages
3,176
Type of diabetes
I reversed my Type 2
Treatment type
I do not have diabetes

Living-by-the-beach

Well-Known Member
Messages
520
Type of diabetes
Type 2
Treatment type
Diet only

Mike d

Expert
Messages
7,997
Type of diabetes
Type 2
Treatment type
Other
Dislikes
idiots who will not learn
He certainly knows his stuff :)
 

andcol

Well-Known Member
Retired Moderator
Messages
3,176
Type of diabetes
I reversed my Type 2
Treatment type
I do not have diabetes
Version 0.5.4. No changes to the database. Available from the standard google drive or directly from here
https://drive.google.com/open?id=0B-z_UPs-Jl8aVUlLb2dHMUtNN1k


Changes
The widths of the columns in the insulin table are saved on exit and restored on restart
The position of the split bar between the insulin table and the IOB Profile is saved on exit and restored on start
The print functionality now prints your insulin table as well as the other tables
 

andcol

Well-Known Member
Retired Moderator
Messages
3,176
Type of diabetes
I reversed my Type 2
Treatment type
I do not have diabetes
Version 0.5.6 uploaded. Obtainable from standard google drive location https://drive.google.com/open?id=0B-z_UPs-Jl8abmNkQkp5QmVfVjg

Changes
Displays Basal on the graph
Tooltip now gives the values for bolus, basal and effective bolus in that order (not included if value does not exist)
All insulin graphs now controlled by one checkbox which is now called insulin

upload_2015-10-2_16-22-28.png
 
Last edited by a moderator:
  • Like
Reactions: geemacwilly

RuthW

Well-Known Member
Messages
1,158
Type of diabetes
Type 1
Treatment type
Pump
I haven't downloaded your app because I only use what you call "crapple". My PC is old and not portable enough for purpose for a Type 1.

But I have been watching the development of your app with interest. And I appreciate very much how responsive you are to feedback.

I have a question about your handling of basal insulin. Does your app allow the entry of a basal insulin profile typical for Type 1 insulin pumpers? That would mean a profile that varies hour by hour, rather than a once daily or twice daily shot. Also pump users also can have several different profiles, for different days, e.g. A weekend profile, or a weekday profile, a training day vs. non-training day profile and so on.

I ask because so far I haven't found any app that provides that facility with the ability to graph basal rate profile and blood sugar results against each other. DiaConnect allows you to graph them separately but the input mechanism is lousy for the basal rate.

For me, this is a great lack because I am Type 1 with a pump and an exercise habit. Exercise involves daily manipulation of both bolus and basal rates. I have no way of tracking this effectively and trying out different patterns aside from old-school pen and paper, which is not as easily manipulable as software - I don't want to write my own graphs! A huge number of Type 1s are sports fiends (they tend to be younger than T2s) and many T2s are too. So the capacity to relate basal and bolus insulin and exercise would be a great tool. (I note, however, that while a lot of T1s are sporty, T1s comprise a small proportion of the population of diabetics as a whole.)


Anyway, after all that, I do think it would be worth your while thinking about putting it up on Google Play or as an iPhone app. If you decide to cater for Type 1s too, then portability is paramount for us really. I'd love to be able to record my results on-the-go since CGMs are so expensive and out of reach for most of us really.
 

andcol

Well-Known Member
Retired Moderator
Messages
3,176
Type of diabetes
I reversed my Type 2
Treatment type
I do not have diabetes
@RuthW
I have developed the basal and IOB profile on some requirements that @Spiker provided. It allows you to enter basal intake each minute if you wish so easily to do per hour and it will diminish the value on board based on your profile with the new going on top of your existing. If you look at the post above with the screen shot you can see this in that the second intake of bolus (5 units) ended up with an effective level of 5.2 as there was 0.2 left based on the IOB profile.

So I think it should do as you wish if I understand correctly. BTW it does work with apple so why not try it out and if you want some changes let me know and I can improve it
 
  • Like
Reactions: 2 people

RuthW

Well-Known Member
Messages
1,158
Type of diabetes
Type 1
Treatment type
Pump
Ok, I'll try to get to grips with it this week. Thanks.
 

SlyFox

Active Member
Messages
37
Type of diabetes
Type 2
Treatment type
Other
Dislikes
Food
Nice one. I have a similar utility written in Excel that tracks Sleep, weight, Food input for carb,fat, protein, sugar , exercise and salt, BG that is able to predict the next HBA1C to about +- 2 and tracks annual GP metrics and rolls that all up into a daily dashboard that says good day bad day to me. It also tracks the proportion of carb/prot/fat in my diet to help me see where I'm going to keep my own targets in sight. Shout if you want some of the calcs. I'm a Type II onff meds and diet and exercise alone. So its not for Type I's.

I expect there are now hundreds of us doing this in one form or another. No reason to stop though, go for it.
 

yolageen

Member
Messages
21

SlyFox

Active Member
Messages
37
Type of diabetes
Type 2
Treatment type
Other
Dislikes
Food
FWIW: On the subject of diabetes apps in general I spotted this project within the NHS that has started up. If you are in the West country you should be illegible to sign up for it in a while.

From what I know its going to be technology (app) led and with devices to track your readings etc and help advise you to manage your condition better.

Promises much but a while yet to see what it's like I think. The significant thing with this one is that GP's will sit up and take notice of the results because the area CCG's are all signed up for it! I have trouble getting my GP to even look at my 'app' data.
 

andcol

Well-Known Member
Retired Moderator
Messages
3,176
Type of diabetes
I reversed my Type 2
Treatment type
I do not have diabetes
Hello Andrew. Have you developed an android version if your app?
No it is on my list of things to look at but moving the UI is significant effort and is getting harder with each new addition I am adding. I have started to look for a more cross platform technology that means I can convert it once.
 

SlyFox

Active Member
Messages
37
Type of diabetes
Type 2
Treatment type
Other
Dislikes
Food
No it is on my list of things to look at but moving the UI is significant effort and is getting harder with each new addition I am adding. I have started to look for a more cross platform technology that means I can convert it once.

If you are looking at cross platform then QT is probably the way to go. Code once deploy to many platforms... Also, think about using SOLID coding practices as using them means the software is modular and changeable by design. BTW: Get harder as you go is n occupational hazard. Its partly why MS have gone toward metro styles of UI. Keeping it simple and stupid makes it faster to develop, and cheaper to bin when its out of date.
 
  • Like
Reactions: 2 people

andcol

Well-Known Member
Retired Moderator
Messages
3,176
Type of diabetes
I reversed my Type 2
Treatment type
I do not have diabetes
QT is fine except the dual license stuff. I am a bit of an open source freak so license should be fine really. Still need a back end application framework and cross compiler unless I write it all in javascript (yuck). My other option is to make it server based with HTML5 but then I would need a server for the people that want to use it and have to worry about data security. The answer is always harder than just the front end.