Android APS and extended carbs/bolus

Would anyone mind explaining to me, in really simple terms, how to go about using extended bolus/carbs with Android APS? I’ve tried researching and asking in the Facebook group, but all you ever get there is “READ THE DOCS!!”. Well, the docs aren’t too great at explaining a lot of things, and this is one of them!

For reference, this is the docs page: https://androidaps.readthedocs.io/en/latest/CROWDIN/sv/Usage/Extended-Carbs.html

I understand the concept, and why extended bolus isn’t used like it is with a normal pump, but I don’t fully understand how to go about telling AAPS I’m going to have some slow releasing carbs.

For example…

Pizza, the nemesis of many a diabetic! Let’s say I’m eating a pizza containing 60g of carbs, and I’m on a 1:10 ratio so 6u of insulin. On a non-looped pump I would usually deliver 3u now, and spread the remaining 3u over the next 2-3 hours. But that’s not how it works with AAPS.

With AAPS do I just manually type in I want 3u now, and then tell it I’m going to eat 60g and let it work out the rest itself? Which screens do I do it on? How do I enter it?

I’ve not yet closed the loop, but when I do I’m worried that if I don’t get it right I’ll end up double bolusing or similar, so want to make sure I understand it in really simple terms first.

Thanks! :slight_smile:

1 Like

Hi there,
So, I don’t use Android APS so take what I say with a grain of salt. But in general in Loop, you have log carbs, then log phantom or extra carbs a few hours later, in order to get the sustained high temps you want for an extended basal. But it’s very trial-and-error. So it’s usually not enough for us to, say log 60 grams of carbs upfront for a 3 hour absorption for pizza, we have to do things like log 60 g carbs up front,then 2 or 3 hours later, log an extra 20 or 30 grams of carbs with a 3 or 4 hour absorption.

So it sounds a bit more like MDI in that, with split bolus, but instead you log it as split carbs

Looping works by altering the rate at which insulin is delivered in response to raised or lowered blood glucose. Temp basals and extended boluses both do exactly the same thing; they both simply alter the rate at which insulin is delivered. (The two names are just synonyms, a temp basal does exactly the same thing as an extended bolus, at least with the Omnipod.)

So you can’t both loop and deliver extended boluses; you can have one or the other but not both.

The page your referenced is really about something completely different and it may be appropriate to what you want to do with pizza and, indeed, what I do with nuts. In both cases carbs are released over an extended period of time.

I don’t loop (yet) so I have to find some way of doing precisely what loop would do; I have to deal with the effect the gradual breakdown of protein from the nuts has on my BG. I do that with a guesstimated increase to my basal rate over 8 hours (I use a temp basal, but I could use an extended bolus.) When I start looping I expect the loop algorithm to do this automatically, and do it a lot better than I do.

Pizza is more difficult because the pizza effect is much more rapid than protein metabolism. The more rapid the carb adsorption the more difficult it is for looping to handle it; the insulin increase from the loop algorithm takes 15 minutes to even start showing up.

The limiting case of this is ingesting a high carb meal; subcutaneous insulin injected in response to our raised blood glucose is way too late to prevent our blood sugar going far to high, dangerously high in some cases. That’s because a substantial part of those high carb meals gets adsorbed in 15 minutes.

There are two possible fixes for this bolus problem; either introduce the insulin directly into the blood supply close to the gut as soon as that blood shows a raised blood glucose, or predict exactly how much carbs and protein we will ingest at least 15 minutes in the future and introduce insulin subcutaneously in anticipation of the feast to come.

The first fix is what the non-T1 pancreas does and what an artificial pancreas would have to do. The second is the only choice T1’s have (I’m ignoring Afrezza here); we have to predict what we will eat in advance and arrange for a bolus, also in advance.

That’s a simple bolus. The Pizza Effect complicates this because the carbs don’t get adsorbed at what might be called the “normal” rate. That complicated AndroidAPS page is about a sort-of solution to this; you can say that you are about to eat 40g of carbs in a Pizza, but it won’t be adsorbed significantly for an hour. The result is exactly the same as if you delay the bolus for an hour; that’s something I have done from time to time.

In theory a loop algorithm could respond correctly to carbs that take more than 15 minutes to adsorb just so long as the actual adsorption over 20 minutes is not itself enough to mess up our blood sugar levels. However getting that right depends on the CGM giving accurate readings every 5 minutes. CGMs aren’t that accurate; they produce intermittent bad results, so relying on a single result to alter the insulin delivery rate is, at best, dangerous.

As a result something that takes less than a certain time, I guess at least 2 hours, to introduce significant carbs into the blood stream requires a bolus. A lot of the time I suspect that the loop algorithm will allow an extended bolus of a couple of hours to be replaced by an “instant” bolus; the loop algorithm will see a BG drop early on, correct for that, then counter correct for the BG rise later in the 2 hour period. Of course this will only work when the original extended bolus is no more than a couple of units; i.e. close to the actual basal insulin requirement over the same period.

However I doubt this can handle the Pizza Effect simply because there are so many carbs in Pizza; the bolus requirement makes the basal insignificant.

1 Like

That’s a wonderful, detailed explanation of how looping works, but it isn’t actually answering the question.

I’m more concerned with the actual screens and buttons to press within the Android APS system to try to manage a long lasting carb/high protein/fat meal. Pizza was the example, but the same applies to pasta, rice, curry, or anything else I like to eat.

I’m unfamiliar with how to do this within AAPS and I don’t want to overdose, or double dose, or log the carbs incorrectly resulting in an automatic overdose or double dose.

1 Like

Hi

In the carbs window, you can extend the duration of the carbs.

That works; I’ve now been looping with AAPS for some time and the extended carb option was something I used for a while with AAPS to cover proteins and, to some extent, fats.

These days I just don’t do that; I try to ballpark the carbs I eat (the fast acting carbs, not protein or fat) and AAPS corrects for the errors and omissions. I’m gradually swapping to the newer AAPS algos; it’s a work in progress. Yet ATM I’m pretty damned satisfied with not having to deal with slow carbs/proteins/fats.