Well, the core of OpenAPS runs on a few hundred lines of code.
In other words, the beating heart of an APS, deciding when to add a touch more basal or drop back the insulin flow, weighs in at less than ten printed pages.
Just to be 110% clear, that's a huge achievement - bigger does not mean better when it comes to health code.
Keeping it as simple as it can be, whilst still being effective, can promote safety and reliability and should bring a smile to any Regulator's face (or to any person / parent with T1D doing their own risk assessment!)
Of course, there are other modules supporting this, but that's the hub.
This is mission critical stuff of course: I imagine, like us, on diagnosis, you're told just how dangerous too much insulin can be and how urgently DKA needs action before that too becomes life-threatening. If you're handing over some of the insulin bolusing keys to a machine, a stack of code, you* have to decide if it's safer than your sleep / glucose deprived brain cells. After all, those 270 lines are what we have to "compute" dozen(s) of times at day. Right now, in the small hours of the morning, I'm trying to gently, but swiftly pull Janki down from a relatively high glucose value following some low values earlier. Those "270 lines" are running in my head 24/7.
*in the absence of any APS with FDA or equivalent approval at present, at which point my guess is most people will just trust the "system" that approved it...
270 lines. Just to put that into (some sort of) context:
- If you're reading this on a Smartphone, you'll be sitting on top of more than 10 million lines of code
- It took 145,000 lines of code to safely land Apollo 11 (perhaps one of the first computer programs that put people's lives on the line. 72kB storage to play with by the way...)
- Millions of lines of code, most likely, went into the engine management system of your car and tens of millions of lines of code look after the avionics systems on that Airbus or Boeing you last flew on.
- A pacemaker has around 100,000 lines of code.
- An infusion pump has a similar number of lines of code.
Of course, writing "Hello World" 100 or 100,000 times doesn't make an APS :-)
But OpenAPS has evolved into a system that is currently running successfully, in closed loop mode, for over thirty Type 1 diabetics.
OpenAPS shows that an APS doesn't have to be fiendishly complex to make a positive difference. They have demonstrated what's possible with an additional few thousand lines of code all in (in addition to the commercial insulin pump and CGM routines).
There are still many components, on both the biological and engineering side, where knowledge is incomplete (at least in my little head...). But that doesn't stop a risk assessment and evaluation being taken. We do it all the time in my day job: you (and most importantly the patient) accepts an element of unknown every time treatment is started and sometimes the balance of known risk and benefit and all the unknowns make it a difficult call to make.
Managing Type 1 Diabetes can be exhausting: here's Janki's trace from a couple of days back.
We've had higher-highs and lower-lows this week and school were doing their absolute best with there limited resources and training. On days like this it's exhausting for those looking after her and, most importantly, it screws up her day (and night) too. Anyone would feel rubbish on this glucose roller coaster.
![]() |
Dropping the T1D bar of soap |
It just takes commercial and political will to do it. Now. I don't want to wait any longer.
This post is not meant to encourage adoption of OpenAPS or any similar non-CE marked or non-FDA approved Medical Device.
Thanks to Howard Look at Tidepool for the original Tweet that sparked this brain-dump!
No comments:
Post a Comment