Friday, March 30, 2012

Site Selector

Yesterday evening, Site Selector appeared on the iOS App Store. If you don't already know, it's a graphical log of where you're wearing you insulin pump and CGM. Since they lose effectiveness at different rates, sites can be reused with different frequencies, and their schedules are generally different, it can be difficult to keep on track of proper rotation. I didn't have trouble until getting the Dexcom, but I needed help and doing it on paper just didn't have the right accuracy.

So this is my first app. I've been doing web apps for pushing ten years, but this is my first iOS App. I used Phonegap, which lets you write native applications with HTML & Javascript. Used Sencha Touch 2 for the interface. There are other technical details on the project's Github page. (That's right. The webapp is open source).

Of significant importance with medical apps is your privacy. This log lives entirely on your device. It never touches the Internet. (If Apple decides to start replicating your data across devices, or backups, or..., or..., or...; that's different. I never push your data to the internet. I can't promise that Apple doesn't.) This also has the downside that all your data lives on the device. I hope it's safe. I've taken steps within the app to keep your data safe. But there's always the potential your phone takes a bath and the data disappears. It's possible an upgrade goes badly, and your data disappears. Perhaps a volcano halfway across the world erupts, and your data is swallowed in a river of lava. I don't think so, but the unexpected can happen. So best not to instantly forget where you've placed sites.

In the time this app has been under review by Apple, I've worked on bug fixes, and new features. The interface is a little easier to use. It's faster. Both insertion and removal dates are tracked. Times are now tracked. You can look up to 90 days into the past, to see sites from long, long ago.

One other feature I'm working on, and may be in the next release, or may not, is a CSV export. What that means is the data you enter can be transformed into a spreadsheet. Right now, I'm investigating what's possible, how to make that data available to you (Email? In iTunes? Copy/Paste? Haven't decided yet). I think that will be a useful feature, but want to get it right. And it'll make me feel a whole lot better about your data not living on the cloud: if your phone takes a bath one day, at least you'll have had the opportunity to back it up.

So that's Site Selector: It's available on almost all iOS devices. At least everything that runs iOS 4. Should even be attractive with the newest iPad, as it ships with insanely high resolution images.

Last: This is an opensource webapp based around Sencha Touch. Sencha Touch is supported on iOS, Android, Blackberry, and a couple of others. Phonegap has similar compatibility. I'm not especially interested in building or submitting for these other platforms, but if you are, go for it. Shoot me an email (site selector at alternate interior dot com) so we can coordinate but I'm all for this application being more accessible to people.

Tuesday, March 20, 2012

Public Knowledge

This is my first-ever contribution to the DMSA Blog Carnival.

Does your employer/school/friends know you have diabetes? Why or why not?

Most people I actually know are aware I'm diabetic. Details vary based on closeness, interest, etc, but for the most part, everyone is aware. While I certainly don't introduce myself as "My name's Brian, and I'm diabetic," there are inevitably occasions where my pocket is beeping, or I can't join in lunch, or have to check out of a meeting, or, or, or, and it's easiest to say "Diabetes" than to make up a filmsy excuse.

Even in the earliest days of my diagnosis, I would admit Diabetes. But while I was on shots, I was nervous about doing that in public. Even checking sugar, I would try to do in private. I have no problem using my pump in public, and I'm now comfortable checking sugar in front of others, but I tend to think if I ever had to go back on shots, I'd still be private about that. It's probably because you're more exposed with shots: it may not be clear what you're doing, but it's clear you're doing something serious.

But in just knowing, it's easier to put the knowledge out there. I've been fortunate in not having many run-ins with food police and even then, the convenience of not having to remember who knows what and who can know and that sort of drama far outweighs the annoyance of know-it-alls. There's also the benefit that, should anything ever happen, people would be better equipped to respond, if only to pass additional context on to first-responders.

So I put it out there because I'm lazy and it's self-serving.

Wednesday, March 7, 2012

The one with the swollen arm

Last night, I had a milkshake.

It was on the tail end of an infusion set. Took a truly absurd amount of insulin, ate, and enjoyed. Once I got home, I changed the set. Put the new one in my right arm.

Two hours later, I was at 165. Three hours later, I was at 120. I had owned that milkshake.

But then, suddenly, I got a ↗. Moments later, a ↑. By the time I rage bolused, I was up to 180 something and still raising. The pump wanted me to take about .7U, because I still had some on board. But I know better. So I took 7.0U. Blood sugar continued to rise as it was being absorbed but I topped out around 250. A second smaller bolus followed. Fought for a couple hours and got it down to 170, and went to bed.

Couple hours later, Dexcom buzzed. I was back up to about 230. Took the appropriate amount (not going to rage bolus if I won't stay up to babysit it) and went back to sleep. Looking at the graph, it got down to about 180 and then started right back up. Next time I woke up was closer to 300. Again, a normal correction, and back to sleep.

Tangent: Not sure what the point of trying to sleep with bad sugar is. It's the least restful thing I can imagine. 3 Hours of restful sleep is better than a full night of sleep on the glucocoaster.

When I finally woke up for real, I was around 200. And my arm felt swollen. And I realized, it wasn't the milkshake doing it to me, it was the infusion site. So I replaced it. Of course the old one bled. But the new one didn't stick! Half of it adhered to my belly while the other half flapped in the wind. I pressed and pressed, and there was no taming it. So I took it out. And it bled. Quite a bit.

The third infusion set in 12 hours went in without incident. My sugar is finally nicely and predictably declining. It just took using extra extra supplies that I'm going to need in another couple months. And enough time to convince myself it wasn't at all feasible that the milkshake was responsible for it all.

When I had the Medtronic pump, there was only one type of infusion site. It was 23" long, and I could put it in my belly, butt, back or thigh (and I wasn't brave enough to put it in my thigh). Now with the Ping, I have 46" tubing as well, and I'm using body parts like my arms that I just didn't ever use before. If I were to use the Ping exactly the same as the Medtronic, it'd work just as well. But it allows me to try sites I wouldn't have used before and they're just not at all a sure thing. The occasional failed site on a Saturday afternoon is one thing, but a failed site that costs me a night's sleep and 3 infusion sets is much more frustrating.

Friday, January 27, 2012

Carb Limits

Since being exposed to so many other Diabetics via the #DOC, I've been surprised by how carb-limited many people are.

To begin with, I'm slim and slightly underweight. Could stand to gain 10 or 15 pounds. Gaining 5 takes constant work and the first time I waver it melts away. So I don't need to limit for weight reasons.

I have a self-imposed per-meal limit of 70g of carbs. I'm pretty good at sticking to it. Sometimes I misestimate. Sometimes I intentionally blow past it. But generally, 70 is my limit and 50-60g is common. That makes my per-day carb limit about 210g. In reality, I come in closer to 170g. So that's just north of half the FDA guidelines.

The only reason for that self-imposed limit is how much harder it becomes to manage blood sugar on larger meals. 70 is hard. 90 is... harder.

But when talk turns to food, I notice people limiting themselves to 70g... a day. Less than half of my common day and fully a third of my upper limit. Some people eat 20-30 a meal. And I ask, how? I can eat a huge steak dinner, but without a couple servings with bread, I'm simply not full.

From my understanding, there isn't a maximum safe dose of insulin. So given controlled numbers, there's no downside to taking the insulin to cover the carbs. And if I need that many carbs to satisfy hunger, then I may as well dose for them.

Largely, then, I wonder two and a half things:

  1. Is my understanding about insulin wrong? Do I need to use less? Presently I use about 45U on a good day, up to mid-50s when battling highs.
  2. How do you stay satisfied with so few carbs? Do you adapt? Did you never want them?
  3. And last, how do you deal with lows, especially when so carb-limited? If it takes 20g to produce a rebound, and you only get 30g for a meal, then you're looking at salad. Right?

Generally what I'm doing is working. But seeing so many people, with so similar a regiment, that is so different than mine, leads to second-guessing my plan.

Tuesday, November 15, 2011


When first diagnosed, I was given three hard, numeric references for insulin. Not fluffy relative terms but absolute. rules. I like those. There's no room for interpretation. They just are what they are.

The first was a carb ratio. I would take 1U for every carb exchange. And one carb exchange = 15 carbs. That ratio quickly proved to be a little off, but it was a hard number I could work with.

The second was correcting. I would take 1U for every 50 points above 100 I was. That number, too, was fairly quickly changed in the real world but there it was.

The third I still struggle with. It was an explanation of how long after correcting I should wait to eat. From memory, it was something like:

BGnow Dose Delay
100 0 + Meal Now
120 0 + Meal 5 minutes
150 1 + Meal 10 Minutes
200 2 + Meal 15 Minutes
250 3 + Meal 20 Minutes
And so on

The source of confusion, especially now, is my blood sugar doesn't change that fast. 20 Minutes after correcting with a blood sugar of 250 isn't going to put me anywhere near normal territory!

Logically, I can reckon that:

  1. The extra insulin from the meal will lead to a quicker fall than the correction dose by itself.
  2. A meal with fewer carbs will have less of a rebound than a meal with more, so you may be able to fudge and eat a little sooner that way.
  3. And last, you don't want to be #bgnow 100 with 12U active (and active without lag)

But Novalog, for me, tends to take 15-20 minutes before anything appreciable happens to my blood sugar. And with a hypothetical 250, an hour is unlikely to put me anywhere near 100.

So instead of dealing with a reasonable 10 minute pause, I tend to follow one of three (including lows) algorithms.

For a blood sugar < 140ish

I dose whatever fractional correction the pump spits out at me and eat.

For higher blood sugars

I rage bolus the high, check sugar every 20 minutes or so and once it's fallen by about half eat bolus the difference between active and what I'm meant to take for the food.

And for low blood sugars

I tend to take a 30 or 60 minute square wave depending how complex the carbs are and eat now - because remembering to bolus at some indeterminate point in the future is not one of my strengths.

Over the years, I've been able to adapt the first two rules from the initial diagnosis rather easily but just haven't ever figured out how to incorporate the delays/lags/etc defined in the third into my regiment. I may have a system but it too often leads to a low or high a couple hours in the future. I'd love to one day figure out a math function to give me an optimal time differential for correcting & eating.

Thursday, November 3, 2011

Approaching 24 hours with the Dexcom

The Dexcom was waiting outside the door when I got home last night, a day early. So I opened it up, reviewed the getting start process, plugged the receiver in to charge, and went about dinner and #DSMA. After #DSMA, it was time.

I'd worn a Dexcom for about 10 days a month earlier, in a trial through my CDE. (Note, sometimes I call her an Endo, sometimes a doctor, sometimes CDE. I don't really know. I don't really care. She does everything I need and is generally awesome.) I read the process of sensor insertion about half a dozen times and started. It must have taken 15 or 20 minutes to get it in OK. Getting the needle in went ok. Removing the insertion mechanism took some work. Getting that collar up as high as can be HURT. The entire sensor lifted up towards the middle and there was some blood clearly visible. But I did manage to remove the mechanism, and settle the sensor down closer to my skin. The pain was much more severe than when my doctor did it. I suspect that's just the learning curve, because she also did it much faster than I was able.

It was nearly time for bed once calibration was complete. But around 4AM, my wife woke me up because the Dexcom woke her up. (It had been going off for pushing an hour by then.) It was a 48. Confirmed and it really was low, so grabbed some sugar from the nightstand and went back to sleep. When I woke up for real three hours later, the screen looked like ____/----/`````. It said 140-something, but my meter said 104. But over the course of the morning, I had a stubborn but mild high that just didn't want to go away. In retrospect, I wonder if it really was closer to 140.

And now we're at lunch. I had a slice of pizza and salad. Started a square wave 10 minutes or so before eating, so had a slow descent and was in the high 90s while eating. But an hour later, I was still creaping up, past 150. Small correction and kept climbing. Repeat. Repeat. I managed the arrest it by 175 a half hour agp, so the Dexcom adverted a high. I'm flat or slowly descending at 166.

I can't know how I'll feel in 6 months, but for now, I love seeing this kind of information. Probably check the silly thing every 10 minutes. My immediate goal with the Dexcom is just to tighten the ranges. My A1c is pretty good (Labwork likes to warn me that with an A1c around 5.8, I'm at risk of developing Diabetes: HAH!) but it's only that good because I have far too many lows. If I can go from 60 being an every day occurrence to, say, once a week, and make the corresponding cuts on the high end, I ought to be able to hold an A1c in the high fives or low sixes, but hold that much more safely. It'll be the Dexcom's credit if that happens.

Wednesday, October 26, 2011

DSMA is the Diabetic Online Community at Large

Tonight was #dsma. (It's every Wednesday @ 9PM EST if you're interested.) And so I got to talk with a number of other diabetics who are outside of my normal #doc feed.

While I don't have an exact number, I'd bet I follow fewer than 50 diabetics on Twitter. There are tons more. There are the celebrities of the community like @diabetic_iz_me or @diabetesalic that I don't follow. Absolutely nothing against them, but I use Twitter for bantering with real-life friends, political posturing and technical issues as well. They and many other core group of DOC members are so followed that the number of tweets in the timeline grows exponentially because not only do I see them, I see the bantering between them and everyone else too. It's part of it being a community but given the tools I have, volume-control is the best way to keep Twitter generally useful.

#dsma is a way around that problem. For once a week, I can forsake all matters non-diabetic and see the spectrum of peoples and their thoughts. One hope from this blog is I can follow more in a less instant manner. Still won't see every thought, but it enables seeing more than I would on Twitter alone. And until I can handle the volume on day-to-day Twitter, #dsma is the outlet to the community at large.