News for hackers. Stuff that matters.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by nahsra on Wednesday August 30, 2023 @11:06AM (#37323296)
Insulin lowers blood glucose, which of course is a vital tool. However, there appears to now be shelf-stable glucagon [1], a hormone which can be injected similarly to insulin and raises blood glucose levels.

AFAIK there is only one company, Beta Bionics [2], that is working on commercialization of such technology with dual pumps. In this case, you could be more aggressive in either direction of pushing BG, because you have a safety net.

Because this feels like a holy grail / functional cure, I'm surprised the incredible DIY teams out there haven't trained their guns on doing this. Having both "turn it up" and "turn it down" knobs seems so much more valuable than squeezing the last 5% of efficacy of AID systems. I feel like glucagon is obviously "the answer", but I don't see much talk about it.

Is the problem that there is no hardware for dual hormone pumps? I would have thought by now they'd have hacked 2 patch-pump AIDs to work simultaneously.

[1] https://www.medscape.com/viewarticle/947962 [2] https://www.thejdca.org/article/2023/06/05/fda-approves-beta...

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by awaywethrow on Wednesday August 30, 2023 @11:34AM (#37323743)
My worry with this approach has been that infusion sites (both for insulin and glucagon) can become occluded, pulled out, etc. to suddenly render them completely ineffective, and that automated detection of these scenarios is not great.

You need to move forward, and therefore must occasionally have a foot on the gas (insulin). The gas pedal failing, causing you to stop moving forward, is not urgently dangerous (hyperglycemia). However, if your brakes (glucagon) can sometimes fail completely, that could cause you to die almost immediately if you're moving too fast toward danger (extreme hypoglycemia). Given this situation where brakes are unreliable, do you want your automated control system to rely on them and push you to dangerous speeds?

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by nahsra on Wednesday August 30, 2023 @11:49AM (#37323952)
The detectability of failure is an excellent point. Anybody who uses the hardware can confirm it's not 100%. I think your point helps me re-frame the glucagon as more of an insurance backstop for when we accidentally hit the gas a little hard, rather than a permission slip to constantly be going too fast and constantly be slamming on the brakes.

Even in this framing, it still feels like an extraordinarily valuable addition, and relatively low risk. It's also, of course, more to add to the patient's maintenance, but might help them or their caregivers sleep at night.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by awaywethrow on Wednesday August 30, 2023 @12:04PM (#37324144)
> It's also, of course, more to add to the patient's maintenance

I agree with all that you've said, and this point in particular is extremely important. It's also the reason I moved from a DIY system like the one mentioned here, to a commercial system, once the latter was available. There is simply less hardware and software to juggle with the commercial system. There are fewer knobs, bells, and whistles, meaning I might not be able to tweak things to be in as tight control as might be possible with a DIY system (though with risks!), but overall it's been "good enough" for me, and greatly reduces the cognitive burden of having T1D. My experience clearly doesn't match everyone's, but considering I'm typically someone who loves to tinker, and has plenty of T1D experience (engineer, 34 years with T1D), I'm sure I'm far from the only one that feels this way. My glycemic control isn't significantly better than it was when I did it via constant monitoring and mental math, but the cognitive and emotional burden is much lower.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by jablongo on Wednesday August 30, 2023 @12:11PM (#37324209)
Yea you would need really good failure detection if you were going to "hit the gas" with a bunch of insulin. Part of the solution is going to be controlling risk via the dosing algorithm itself, so you never get in those situations where you are at risk of severe hypo in the event of a (glucagon) site failure.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by haldujai on Wednesday August 30, 2023 @12:55PM (#37325082)
> However, if your brakes (glucagon) can sometimes fail completely, that could cause you to die almost immediately

Failure detection is via alarms to trigger patient action based on the continuous glucose monitor (which has a different set of reliability issues) as well as patient symptoms.

Hypoglycemia becomes symptomatic long before blood sugar is low enough to result in death or serious debilitation and T1D patients know their symptoms well. The risks are not nearly as dramatic as you're suggesting as one isn't/shouldn't be relying on glucagon to prevent severe hypoglycemia, I don't think any system is designed or being conceived to operate in such conditions.

Hypoglycemia isn't really much of a problem anymore with current CGMs and pumps.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by pigeons on Wednesday August 30, 2023 @02:27PM (#37326681)
> Hypoglycemia becomes symptomatic long before blood sugar is low enough to result in death or serious debilitation and T1D patients know their symptoms well.

There is a what seems to be a significant number of people who don't "feel their lows."

> Hypoglycemia isn't really much of a problem anymore with current CGMs and pumps.

Current CGM's can still require hours of "warm up", and many current pumps still must be removed for things like swimming so they don't get penetrated with water.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by haldujai on Wednesday August 30, 2023 @02:51PM (#37327042)
> There is a what seems to be a significant number of people who don't "feel their lows."

Severe hypoglycemia to the point of what was described (death) is not reported in any of the recent device studies.

Level 2 or moderate hypoglycemia, very different from death, is reported at < 0.5% in recent closed loop system studies.

> Current CGM's can still require hours of "warm up", and many current pumps still must be removed for things like swimming so they don't get penetrated with water.

Current CGMs are water resistant but conveniently one is also not administering insulin while swimming either. The bionic pancreas is also dependent on CGMs and has the same limitations.

I'm really not sure what point you're getting at. Hypoglycemia is not what's being improved upon with current advancements, it's time in target.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by awaywethrow on Wednesday August 30, 2023 @03:20PM (#37327529)
> Severe hypoglycemia to the point of what was described (death) is not reported in any of the recent device studies.

Are there large-scale studies that show this for a dual hormone control algorithm (the context of this thread)?

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by haldujai on Wednesday August 30, 2023 @04:13PM (#37328325)
You seem to be misunderstanding how these devices work.

Bihormonal pumps do not mean continuous infusions of both insulin and glucagon. The pumps pulse insulin when you're high and glucagon when you're low. They're not both administered at the same time or continuously infused in a "balanced state".

The context in this thread:

> However, if your brakes (glucagon) can sometimes fail completely

A bihormonal system would not result in more insulin being administered than an insulin-only system for a given blood sugar, if the glucagon pump fails we would have an insulin-only system where we have plenty of safety data. There is no mechanism by which a bihormonal system has higher risk of hypoglycemia than existing closed loop insulin system.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by awaywethrow on Wednesday August 30, 2023 @05:58PM (#37329699)
To clarify, the context of this thread / what I was originally responding to was:

> In this case, you could be more aggressive in either direction of pushing BG, because you have a safety net.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by pigeons on Wednesday August 30, 2023 @03:08PM (#37327343)
OK thanks, I get your points. What I was getting at is a disagreement with "Hypoglycemia isn't really much of a problem anymore with current CGMs and pumps." Because lots of people on current CGMs and pumps still deal with hypoglycemia, despite these pumps and CGMs making the situation so much better than otherwise.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by et2o on Wednesday August 30, 2023 @08:57PM (#37331201)
> Hypoglycemia becomes symptomatic long before blood sugar is low enough to result in death or serious debilitation and T1D patients know their symptoms well.

Often times in an acute setting, yes. However patients who have had diabetes (T1 or T2) for a long time often lose a lot of their hypoglycemia sensitivity and symptoms. It's not nearly that simple.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by Jarmsy on Thursday August 31, 2023 @09:59AM (#37337243)
Hypoglycaemia during sleep is the big one. My hypo sensitivity isn't great, but if I'm awake I'll always notice before it gets really dangerous. Sleeping is a different story though. The days when even a slight low would jolt me wide awake in a sweat are gone though, and now I'm much more reliant on sensor alarms to not just sink silently deeper.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by Projectiboga on Wednesday August 30, 2023 @04:13PM (#37328324)
I'm a type 1 insulin dependent. The three low tech "hacks" I've been happy with are the following. First I take a sublingual Melatonin most nights, Melatonin upregulates the insulin receptors and lowers my insulin requirements about 40% by my guess. The second one is dietary I add olive oil to my lunch and dinner, I feel this provides my body a reserve of non glucose energy. Finally I use a very small dose of cannabis most days, I like to get a puff or two and night, THC protects nerve cells from Hypoxia so I feel this keeps my brain cells going when my blood sugar gets low. I feel these three things, give me a leg up on my long term blood sugar control. I am thankful there are hackers and diy opensource initiatives. The CGM readers here in America Dexcom, and Libre both have crazy bad user interfaces. Libre will only let you pair to a single device, I had their device fail leaving a functional sensor in my arm, a quick idea I searched for opensource libre reader app and found two. One worked and started reading the sensor. Dexcom has the issue of being a 10 day use cycle so you run out on varying days of the week. Both take the FDA mandate to have low blood sugar alarms as a blank check to overide any controls about sound or do not disturb to bother about countdown to a new sensor. I liked that external libre2 reader as it was the only device or official app that can be silenced, but their rigid only pair with one device still angers me, what if my loved one want's to be able to scan my sensor? Low blood sugars are challenging as they affect my brain and I can answer an amazing amount of questions about my blood sugar wrong if I get too low, my brain trying to preserve energy can be dangerous at times. This was an issue more before CGM. Dexcom decides that it is OK to have a completely automatic warning at any hour of the night "your sensor will expire in six hours!!!", that warning has little to do with my care as it is too late to influence refill compliance and seems to have been ordered by the executives to some how improve their pRofItiBiLiTY. I am so much happier on a third party app with the silent reader as an extra. Sorry if this was long winded, being insulin dependent has bee a challenge over 40 years. The first 10 years they hadn't figured out that insulin reactions are much more subtle on human insulin than the older pig and cow derived ones were.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by gustavus on Wednesday August 30, 2023 @11:22AM (#37323578)
So my wife is a type 1er. The way glucagon fits into her life is that we have an emergency glucagon shot that she carries in her purse to use in the case of an emergency. The glucagon is more of an immediate emergency recovery. On the flip side glucagon doesn't lower the blood sugar which is dangerous when she is going high.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by uberduper on Wednesday August 30, 2023 @04:40PM (#37328760)
I may be misunderstanding something here. I'm assuming the emergency you're referring to is low glucose. Why would you use a shot of glucagon rather than a dextrose tablet for that sort of emergency?
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by db3pt0 on Wednesday August 30, 2023 @04:55PM (#37328987)
A glucose tablet and a glucagon shot can both be used in emergencies, but they are best used to treat different levels of emergencies. You can take a glucose tablet if you're coherent and conscious, but when you're incoherent or passed out from a severe hypoglycemia, someone else administering a glucagon shot is a lot easier and safer.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by uberduper on Thursday August 31, 2023 @09:50AM (#37337145)
Okay that makes sense. Thanks.

How quickly does a glucagon shot trigger GNG and how quickly can GNG raise glucose levels?

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by groundcontr01 on Friday September 01, 2023 @04:56PM (#37356099)
In my experience it takes just a minute or two
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by jeroenvlek on Wednesday August 30, 2023 @11:22AM (#37323566)
My wife has diabetes and her endocrinologist told me 5 years ago that the absence of shel-stable glucagon was the reason her insulin pump and glucose sensor weren't connected yet. Now she is actually using AndroidAPS, after I compiled it for her.

Really happy to see that there are people now working on both gradients!

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by iaresee on Wednesday August 30, 2023 @11:47AM (#37323920)
> Is the problem that there is no hardware for dual hormone pumps?

All the well-tested pumps (Tandem, Omnipod, Medtronic) are insulin-delivery only.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by haldujai on Wednesday August 30, 2023 @12:36PM (#37324668)
It's not because of pump issues but more glucagon stability and secondarily whether bihormonal is clinically advantageous.

Tandem is working on a dual chambered pump.

https://diatribe.org/jdrf-and-tandem-diabetes-care-announce-...

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by iaresee on Wednesday August 30, 2023 @06:29PM (#37329999)
Yea, but "working on" is a bit different than "readily available and trusted to function well". Everything is harder with two delivery pumps.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by haldujai on Wednesday August 30, 2023 @07:28PM (#37330467)
The pump isn't the hard part.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by nahsra on Wednesday August 30, 2023 @11:54AM (#37324017)
Yes, but the "patch pumps" like the Omnipod are small enough you think patients might tolerate 2 of them? Maybe they've already asked, and people wouldn't tolerate it.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by iaresee on Wednesday August 30, 2023 @06:39PM (#37330085)
Possibly. But it's more than that. You have site issues, even with one pump, that you need to navigate. There are only so many viable places on a body to attach a cannula for good absorptoin and, while small, these things aren't _tiny_ (especially the Omnipods where the site holds the cannula, pump and reservoir).

It'll be a while before we see highly reliable and well-tested dual-reservoir systems is my bet.

The complexities of balancing insulin and glucagon in a two-pump system are also high. And the feedback loop from sensors that detect BGL aren't super fast. My kid's Dexcom works on a 5 minute sample loop now. So you can't make decisions fast and when you do, you can't course correct a bad decision quickly.

I love that people are working on this stuff. The folks at https://wearenotwaiting.net/ are amazing and we even use NightScout here, but the fragility of the systems are stark and it'll be a ways to go before it's not just the brave pioneers pushing these frontiers for T1Ds.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by jablongo on Wednesday August 30, 2023 @12:03PM (#37324139)
For some background - I'm a T1D working on a search engine and conversational interface for integrating a bunch of new data sources and models into metabolic decision making: https://replica.health. I've also been a user of and worked on various open source artificial pancreas systems through the years, and am currently on Loop.

>I would have thought by now they'd have hacked 2 patch-pump AIDs to work simultaneously.

As you pointed out, the problem is not really hardware. It could technically be done in a straightforward way using two independently controlled insulin pumps, but the complexity and risk of the whole operation goes way up if you are taking way more insulin. Taking a bunch of insulin and glucagon at the same time is not necessarily a great idea either - they don't just annihilate each other without consequence and you could end up with secondary effects like gaining a bunch of weight.

>Because this feels like a holy grail / functional cure

Unfortunately it is not; even dual hormone systems have problems keeping up w/ the kinetics of glucose absorption and to address this there is also research into tri-hormonal systems, w/ amylin as the third hormone. In any case you will still need some a-priori info about meals and planned activities, though less so than with a single hormone system. Integration of exogenous data sources to provide this info to the APS is what we are working on at Replica.

Also, hate to be the bearer of bad news but beta bionics has shelved their dual hormone ambitions for now; their prototype device soon to be released is insulin-only. On the bright side there is a small Dutch company whose tech predates beta-bionics. They sell a dual hormone device and will give it to you for a ton of $ (and probably have you sign a bunch of waivers): https://www.inredadiabetic.nl/en/discover-the-ap/

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by haldujai on Wednesday August 30, 2023 @12:33PM (#37324608)
> In any case you will still need some a-priori info about meals and planned activities

Not necessarily, at least not via patient input. In the albeit small Inreda studies manual announcement of exercise and meals wasn't required (or an option). Medtronic also has a meal prediction algorithm on their newest offering that's a step towards a fully automated process and currently more or less obviates carb counting but isn't at the point where you don't have to announce a meal (yet).

Rather than integrating external data sources the algorithms are predicting based on historical glucose levels and/or insulin administration and it seems to be working.

https://jamanetwork.com/journals/jamasurgery/article-abstrac...

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by jablongo on Wednesday August 30, 2023 @12:54PM (#37325054)
Agree that patient input shouldn't be necessary, but to replace it we will need to include other inputs besides CGM in a systematic way to get the optimal results. My company is working on how to use contextual info automatically collected by your devices to help (detected activity, measured calorie burn, geofencing, data from meal-ordering apis, etc.). This is especially true given that the CGM data themselves are lagged due to averaging and/or kalman filtering going on under the hood. This is a fundamental problem; Inreda uses two identical CGMs for noise reduction purposes just so they can get clean data with less of a lag.

None of the systems claiming you don't have to do anything in terms of meal announcement are _working_ in the sense of achieving euglycemic parity, which should be the goal. I can say with certainty that the cgm logs from people who don't announce meals on the Inreda device do not look like they are from non-diabetics: there are still often large post-prandial spikes. Inreda likely does better than any single hormone system, but the problem is not solved in any sense.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by haldujai on Wednesday August 30, 2023 @01:49PM (#37326031)
> Agree that patient input shouldn't be necessary, but to replace it we will need to include other inputs besides CGM in a systematic way to get the optimal results.

I'm not going as far as to claim Medtronic's approach (I believe the only one commercially available with so-called meal prediction based on historical CGM and offers full correction boluses) is the optimal one, just that it is an approach that is at least very good (~80% time in target) and while it still requires meal announcements it's just the first step of what they're trying to do. Clearly we can expect further iterations of these algorithms as the technology matures.

> Inreda uses two identical CGMs for noise reduction purposes just so they can get clean data with less of a lag.

Just giving an example that this is possible without external input or data, your statement was that you will need a-priori information which is not necessarily the case. Whether such a system is optimal is a different question.

I haven't seen the raw data and highly doubt enough of it even exists for anyone to make a claim whether or not such a system can be optimized to the point necessary.

> None of the systems claiming you don't have to do anything in terms of meal announcement are _working_ in the sense of achieving euglycemic parity, which should be the goal.

For clarity to any less knowledgeable readers while time spent in euglycemia is a very important outcome measure it cannot come at the expense of severe hypoglycemia or severe hyperglycemia/diabetic ketoacidosis (i.e. an algorithm that improves euglycemia to 95% but has a 2% severe hypo time is less acceptable than 80% euglycemia and 0.5% severe hypo.)

To my knowledge no system on the market/generally available right now is claiming to be completely input free. The closest to my knowledge is again the MiniMed 780G discussed in my first point which will assuredly be iterated on.

Also to be clear I'm not being dismissive of what your company is working on, it's a very interesting and novel approach. It may even be necessary to achieve the optimal product. I look forward to reading about your results when you publish them. I'm just presenting alternatives and a brief overview of what other approaches are for HN readers who are likely unfamiliar with the topic being discussed.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by jablongo on Wednesday August 30, 2023 @05:07PM (#37329156)
Really appreciate the pointed commentary on this! Happy to make further prognostications about the success of CGM-input-only APSs via email.

For the record, when I say "Euglycemic Parity" what I really mean is a sort of Turing test (not time in range), where a data-driven Endocrinologist is asked to tell the difference between CGM records from a non-diabetic, and CGM records from a diabetic equipped with some control system. Passing this test should be our long term goal IMO and we will probably have to bring many techniques to bear to eventually achieve it.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by nahsra on Wednesday August 30, 2023 @12:54PM (#37325071)
I think the "no meal announcement" features are really valuable for traditionally underserved demographics who, for whatever reason, can't "get good" at managing their disease.

The difference between how quickly food and insulin hit your bloodstream make it seem like there is no way to "algorithm your way out of" meal announcements. Food hits almost immediately, and with variable strength depending on macronutrients in it, and insulin takes ~15 minutes to start working, and peaks at 1 hour, with no concern about BG levels. Can you square these 2 for me and make it make sense?

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by haldujai on Wednesday August 30, 2023 @02:35PM (#37326779)
I think what you're missing for this to make sense is what is the desired outcome. For type 1 diabetics there are three important ones:

1. Time in severe hypoglycemia - ideally 0%

2. Time in severe hyperglycemia/diabetic ketoacidosis - ideally 0%

3. Time in euglycemia (also called time in target) - clinical target is >70% and for reference the median healthy non-diabetic is in target ~90-95% of the time.

Closed loop systems are very good at #1 and #2 as it takes a while for levels to get to the severe state and insulin can be administered (or withheld) based on CGM.

When we talk about algorithming out of meal announcements it's whether historical patient-specific blood glucose levels and insulin administrations (i.e. a surrogate for what you eat and when) combined with CGM can keep #3 acceptable, not necessarily optimal. Medtronic is using this approach and their newest model more or less eliminates the need for accurate carb-counting but they still require meal announcements. The hope/idea is that this can potentially be eliminated with further iterations.

Another important thing to keep in mind that is sometimes lost in these discussions is that we don't treat numbers we treat patients (i.e. what are the clinical outcomes). Generally speaking, we assume the closer to normal the better but we don't have actual data about how much an extra X% outside of target ranges matters in terms of clinical outcomes and complication rates. We only really started getting this data with CGM and complications in these mild states would require very large cohorts and long (10-20 year) follow-ups to detect differences as they're likely to also be mild.

So while you're absolutely correct regarding the limitations and that an algorithm cannot outperform accurate carb-counting and meal announcements the missing piece is that it may be sufficient. Particularly if said algorithms result in improved time-in-target for patients who aren't good at managing their diabetes and find meal announcements cumbersome.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by nahsra on Friday September 01, 2023 @01:01PM (#37353413)
First of all, clearly you have a ton of knowledge in this space, and I'm feeling very lucky I get to learn from your experience here. I have one more last question/challenge:

I totally get that we "treat the patient" -- that's sort of what I'm hinting at with the demographics. But, in my opinion this thing you said:

> we don't have actual data about how much an extra X% outside of target ranges matters in terms of clinical outcomes and complication rates. We only really started getting this data with CGM and complications in these mild states would require very large cohorts and long (10-20 year) follow-ups to detect differences as they're likely to also be mild.

... is not the same as saying "we know that 70% TIR is safe to live with no complications". I don't think any of the guidelines are that confident, because there's not enough evidence yet. Consider this study (discussed at [1]):

> Overall, increasing time spent with glucose levels in the target range of 70–180 mg/dL (3.9–9.9 mmol/L) was associated with decreasing risk for microvascular complications. For instance, 50.0% of the 10 individuals in the lowest category for TIR (<40%) had at least one microvascular complication, compared with just 27.3% of the 99 people in the highest category for TIR (≥70%).

> Moreover, El Malahi said that the 180 people with microvascular complications had significantly lower average TIR than the 324 individuals without, at 60.4% versus 63.9%.

This suggests to me that a difference of 4% of TIR can seriously affect long-term outcomes. And, by the way, even those with the highest TIR still had microvascular complications higher than the normal population. On top of that, we know that genetic and environmental factors may be at play.

Therefore, my monkey math is that 75%+ as a TIR goal may mean that even if the patient is an order of magnitude more vulnerable to complications, microvascular or otherwise, they have a much better shot.

And, unfortunately, the typical western diet with 3 meals a day and snacks, you have to be "good at managing diabetes" to get to 75%+ TIR. Thanks for reading my ramble.

[1] https://diabetes.medicinematters.com/easd-2020/glycemic-cont...

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by Communitivity on Wednesday August 30, 2023 @12:54PM (#37325070)
So I do not have a medical background. I have however worked a number of Industrial Control Systems (ICS) projects, and what you describe kind of sounds like a PID control loop, which also is not a simple push up/down approach.

From Wikipedia:"A proportional–integral–derivative controller (PID controller or three-term controller) is a control loop mechanism employing feedback that is widely used in industrial control systems and a variety of other applications requiring continuously modulated control. A PID controller continuously calculates an error value e(t) as the difference between a desired setpoint (SP) and a measured process variable (PV) and applies a correction based on proportional, integral, and derivative terms (denoted P, I, and D respectively), hence the name."

Getting PID control loops to work has a lot of research behind it, but it's still hard to get right with new hardware. I would imagine a PID control loop involving organics (wetware) would be much order, and harder still a PID control loop in organics with life-threatening failures possible.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by jablongo on Wednesday August 30, 2023 @01:17PM (#37325461)
At this point all the major solutions are using an algorithm that would probably fall under the umbrella of "Model Predictive Control" rather than a vanilla PID controller. An absurd spate of patent trolling occurred back in the early 2000s related to Controller definitions like these though. Researchers patented the use of a "PID controller in artificial pancreas systems" [1][2] which slowed down the development of APSs by many years.

The way the Supreme Court recently changed patent law [3] for software has definitely had a positive effect for APS development. [1] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2769814/ [2] https://patents.google.com/patent/US20150306314 [3] https://en.wikipedia.org/wiki/Alice_Corp._v._CLS_Bank_Intern...

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by tremon on Wednesday August 30, 2023 @05:58PM (#37329700)
An absurd spate of patent trolling occurred back in the early 2000s related to Controller definitions like these

That's good news, right? That means that everything that people now come up with has well-documented prior art?

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by idiotsecant on Wednesday August 30, 2023 @03:05PM (#37327295)
PID works well for most industrial controls, but it's a blunt instrument. Its mainly valuable because it's simple and doesn't really require much knowledge of the plant to implement. No 'model' is really required, other than the vaguest knowledge of first order dynamics. Instead of model knowledge you just iteratively tune it until it works.

If you need a really optimal control trajectory minimizing or maximizing for some parameter, you are willing to do the system identification necessary for it to work, and you don't much care whether an electrician can understand how it works model-based controls are much better. as /u/Communitivity mentioned so called 'model based control' (which is an umbrella of techniques) is a much more powerful tool.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by nahsra on Wednesday August 30, 2023 @01:01PM (#37325184)
> https://replica.health

Oh my gosh, this is the startup I considered starting last year when this issue became personal to me and I wrapped my brain around the complexity of insulin dosing.

There are a lot of challenges here but we absolutely need an external "brain" to correlate many data points, some trends, and reasonably estimate current insulin sensitivity.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by jablongo on Wednesday August 30, 2023 @01:20PM (#37325521)
I'd love to chat - send me an email at [email protected] . An accurate time-varying insulin sensitivity model is one of our big projects.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by selimthegrim on Wednesday August 30, 2023 @02:26PM (#37326664)
I formerly used to work in the diabetes management space, and I too would be interested in chatting seeing as I have acquired some modeling expertise in the meantime.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by andrewchilds on Wednesday August 30, 2023 @11:20PM (#37332073)
Good luck with Replica! I built something sort of similar for my family (my 8 yo has T1D and a lot of life-threatening food allergies): https://saltie.app. Happy to chat as well, I can create an account for anyone interested, and I can share what I’ve learned in making this.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by gitfan86 on Wednesday August 30, 2023 @04:41PM (#37328773)
This is awesome. The obvious next step here would be integration with the pump to send the correct dose after the user confirms the app is correct in the food they are eating
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by agawish on Wednesday August 30, 2023 @04:53PM (#37328955)
Sorry I know this is off topic, but I'm a recently diagnosed T1D and I would like to get more information about Loop and other loop-like open-source systems.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by wombatpm on Wednesday August 30, 2023 @05:25PM (#37329354)
My son is T1D since age 7. He is now on the OmniPod pump and the Dexcom G6 sensor. It’s been a very effective combination that’s covered by insurance. The challenge with the open source projects is limited equipment that can be hacked.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by jablongo on Wednesday August 30, 2023 @08:58PM (#37331208)
Most people on loop have omnipod and dexcom g6 also so I don’t think it’s that limited. It’s true that it takes a few months for new devices to get integrated but open source APS are the only systems lets you choose what devices you want to use with them.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by Jarmsy on Thursday August 31, 2023 @09:51AM (#37337158)
One thing I wish I'd been told more about when first diagnosed was the possibility of prolonging the honeymoon period. It was decades ago, and back then the advice was to eat a fairly normal diet and just dose as much insulin as needed.

If I was back in that position I'd go low carb high exercise from the start, and do everything I could to reduce my insulin requirements as much as possible. There are cases of new T1s coming of insulin completely, or just a low basal dose for multiple years.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by thecosas on Wednesday August 30, 2023 @07:24PM (#37330439)
Bummer to hear about beta bionics! My understanding was that the hardware they are releasing does have a place for glucagon, just not the software and additional reservoir required. I'm considering a switch to their pump since it seems like they've made it as automated as possible with insulin-only.

Would love to see/hear more about what you're working on!

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by Loic on Thursday August 31, 2023 @02:37AM (#37333295)
My father was an MD (psychiatrist) and had this saying:

    - 1 drug, it works ok, still very patient specific.
    - 2 drugs at the same time, only if you validated correctly at least one alone before.
    - 3 at the same time: clusterfuck/total mess.
Base rule: do everything possible to use only one active ingredient/drug at a time.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by robobro on Thursday August 31, 2023 @09:18AM (#37336715)
Yes, much easier to control a single variable.

I'm a type 1 diabetic on multiple daily injections -- a pump just introduces a lot of inconvenience for me, price aside. You have to track batteries and change tubing and make sure the tubing doesn't snag on things, and unplug the machine before taking a shower or bath, and ... blah blah blah...

All I need for MDI is to carry my syringes and vial around in a cold pack (I live in the tropics, lol) and I don't need to worry about hardware beyond that.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by Jarmsy on Thursday August 31, 2023 @09:34AM (#37336925)
I'm in the same boat re. MDI over pumping. I can still keep very tight control without a bunch of cumbersome attachments (I do wear a flash sensor though). Why vials and syringe rather than a pen though? I usually just carry the pen in my pocket and phone for monitoring. Even in hot weather I've not had problems with insulin losing potency noticeably before finishing a cartridge.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by fyhn on Thursday August 31, 2023 @01:27PM (#37340719)
This is very interesting, and I (T1D) would like to learn more. However, the e-mail signup doesn't work for me. ("Oops! Something went wrong while submitting the form.")
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by haldujai on Wednesday August 30, 2023 @12:07PM (#37324180)
No, there isn't a hardware problem and such systems exist. Several trials[1-3] dating back several years have looked at "bionic pancreas" or a closed loop bihormonal system.

Inreda (a Dutch company) has a CE-marked device[4] that can be clinically used but one limitation has been glucagon stability (has to be replenished daily). Tandem in the US was working on this as well but I haven't heard anything about them in a while, not sure how far along they are.

The Inreda product is still in the early stages of testing but fully functional. Small crossover trials seem promising (defined by more time in euglycemic state).

There is a competing approach with "intelligent insulin" or a self-regulating glucose sensitive insulin formulations that have different bioavailability depending on circulating glucose levels rather than relying on a monitor, this is farther out from clinical use.

One of the reasons bihormonal pumps haven't entered mainstream use yet is that it's more expensive/complicated and the current techniques of algorithmic predictions of hypoglycemic episodes and insulin delivery suspension are already very good that hypo isn't much of a problem with modern devices like Tandem's offering.

Medtronic has added a meal detection algorithm[5] that's really good too (the best on the market I'm told by my endo colleagues) and they say we're getting close to not needing carb counting anymore. This is the first such algorithm so we're not there yet.

The question then becomes how clinically useful more time in euglycemia is as the hypo episode problem is essentially solved, we'll need more data to draw any conclusions and it will take a while for this particular question as many of the outcome measures are long-term.

[1] https://pubmed.ncbi.nlm.nih.gov/28007348/

[2] https://jamanetwork.com/journals/jamasurgery/article-abstrac...

[3] https://pubmed.ncbi.nlm.nih.gov/24931572/

[4] https://www.inredadiabetic.nl/en/discover-the-ap/

[5] https://www.medtronicdiabetes.com/products/minimed-780g-insu...

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by nahsra on Wednesday August 30, 2023 @12:49PM (#37324939)
It's not clear from their site whether the Inreda product also has CGM built into it, or if it must be paired with one?

Glucose-responsive insulin also seems like science fiction as this point, but would be extremely powerful tool.

I'm very familiar with one of the most popular, closed-loop system combinations in the USA and I definitely don't feel the hypoglycemia problem is anywhere near "solved". There is too much volatility dictating a person's insulin sensitivity that even today's smartest systems will regularly give too much insulin, requiring treatment, or too little, resulting in prolonged hyperglycemia.

I agree that time-in-range is incredible today with the technology, comparatively, but there's still lots and lots of room for improvement.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by haldujai on Wednesday August 30, 2023 @01:22PM (#37325563)
Inreda integrates the CGM, [1] has more details on the setup.

> I'm very familiar with one of the most popular, closed-loop system combinations in the USA and I definitely don't feel the hypoglycemia problem is anywhere near "solved".

I should have been clearer, the moderate to severe hypoglycemia (level 2 and 3) problem is essentially solved with the newest generation of closed loop systems. Hypoglycemia in general is trending towards being solved particularly with the newest Medtronic devices, both from studies and what endocrinologists are seeing.

In some of the recent studies (which again are still small as these devices are new) I've come across there are no severe hypo episodes reported and % time in moderate hypoglycemia was (picking one study) ~0.3%[2].

The belief is that further iterations of these algorithms will continue to improve this hence why I said "solved" as in there is no strong need for a large treatment paradigm shift on the basis of moderate-severe hypoglycemia.

> There is too much volatility dictating a person's insulin sensitivity that even today's smartest systems will regularly give too much insulin, requiring treatment, or too little, resulting in prolonged hyperglycemia.

Hyperglycemia is a different discussion altogether that is not addressed by insulin delivery suspension or glucagon. The MiniMed 780G is probably the most advanced system out there with minimal patient input and time in target range is being reported as ~80% which is certainly getting there.

[1] https://diabetesjournals.figshare.com/articles/figure/Fully_...

[2] https://www.nejm.org/doi/10.1056/NEJMoa2004736?url_ver=Z39.8...

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by brudgers on Wednesday August 30, 2023 @12:37PM (#37324701)
[delayed]
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by cperciva on Wednesday August 30, 2023 @03:34PM (#37327720)
Glucagon should probably be a safety net, not something you use regularly. Taking too much insulin and compensating with glucagon leads to long term weight gain among other things.

Dual pumps are being worked on, but it's not yet clear that the improved glucose control justifies potential long term consequences.

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by samstave on Wednesday August 30, 2023 @05:18PM (#37329294)
You know what cyberpunk future I am looking forward to ; Bionic Arms/Limbs whi are chosen to be replaced, but in the place of the bicep is a blood filtering, monitoring mechanism that keeps your blood hyper oxygenated and tracked...

Although, to go along with the cyberpunk theme ; If you want to kill a Cyborg, you just rip off his arm...

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by smoldesu on Wednesday August 30, 2023 @06:03PM (#37329728)
It's fun to imagine a future where we can design human body parts better than our body but can't figure out how to unplug them without a mess. Damn Magsafe patent still holding up in 2077...
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by TaupeRanger on Wednesday August 30, 2023 @05:32PM (#37329414)
The only way to "cure" diabetes is to replace the pancreas or get the cells to go back to behaving the way they were before insulin resistance. The 1st is incredibly risky and wouldn't be pursued for that reason. The 2nd is most likely to lead to a cure, using a morphoceutical approach that reprograms or replaces the misbehaving cells.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by DoreenMichele on Wednesday August 30, 2023 @05:44PM (#37329560)
There's a lot more going on in the body than this. Muscle protein influences insulin resistance. Diabetes is strongly associated with inflammation which may imply that infection or pH balance (or both) plays a role. For functional hypoglycemia, metabolic syndrome and T2D, dietary changes can have substantial positive impact.

I'm thrilled to see this is happening, but the chemical inputs and various metabolic factors are far more complex than "sugar in, one hormone to lower blood glucose levels and another to correctively raise it."

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by jeffybefffy519 on Wednesday August 30, 2023 @07:49PM (#37330655)
The thing is - the ideal solution injects 100% the right amount of insulin and no glucagon because insulin is a growth hormone and too much of it makes you gain weight. Body builders have been known to use insulin to gain muscle.
Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by DavideNL on Thursday August 31, 2023 @01:05AM (#37332680)
> AFAIK there is only one company…

Inreda: “A bi-hormonal fully closed loop system”: https://www.inredadiabetic.nl/en/home-english/

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by markdown on Thursday August 31, 2023 @02:52AM (#37333392)
> Beta Bionics [2], that is working on commercialization of such technology

LOL, so no end then to the American insulin caravans to Canada?

Re:A DIY ‘bionic pancreas’ is changing diabetes care – what'... by conceptme on Thursday August 31, 2023 @11:38AM (#37338896)
There is https://www.inredadiabetic.nl/ontdek-de-AP/ which has both glucacon and insuline maybe there are others still in testing phase though.