
Hacked Raspberry Pi turned into artificial pancreas - dreadnought23
http://www.businessinsider.com/hacked-raspberry-pi-artificial-pancreas-2015-8
======
barely_stubbell
This article leaves us hanging; the initial motivator for developing the
system is to prevent instances of overnight hypoglycemia - but we reach a
conclusion talking about how it can autonomously deliver insulin to correct
for hyperglycemic events. Were they ever able to make the algorithm robust
enough to predict low blood sugars in the future and "shut off" or reduce
delivery of basal insulin to mitigate these events?

New pumps by Medtronic are equipped with an auto-off feature that suspends
insulin delivery if the user's blood sugar is below a certain threshold [1],
however this is a rear-facing indicator and the patient will still experience
a hypoglycemic event.

I assume the next logical steps towards making these systems fully autonomous
is to remove the idealogical separation of basal and bolus insulin; instead,
the system would register increases and decreases of blood sugar and take
systematic steps towards bringing them back into a healthy range - much like a
healthy pancreas does, either by increasing or decreasing the amount of
insulin being delivered at a given time. That way a patient can eat, exercise,
and live a "normal" lifestyle while the pump takes care of delivering the
correct amount of insulin.

[1]
[http://www.medtronicdiabetes.com/products/minimed-530g-diabe...](http://www.medtronicdiabetes.com/products/minimed-530g-diabetes-
system-with-enlite)

~~~
mkesper
Are there systems feeding sugar in such an event? That would be the only thing
really preventing a - possibly lethal - hypoglemic event, no?

~~~
barely_stubbell
Preventing these situations entirely by predicting these events and reducing
the administered basal insulin would be ideal, but humans don't exist in a
vacuum. I don't think a system autonomously feeding sugar would be the optimal
solution however; patients who utilize CGM's today are still instructed to
monitor blood glucose through traditional means for calibration and confidence
in system accuracy, so I don't think it would be an additional burden for them
to continue to carry a source of sugar for emergency hypoglycemic events. I
think predicting and preventing lows through lowered basal rates, in
combination with on hand sources of glucose for emergency situations, would be
best.

Even a reduction in the amount of hypo- (and, hyper-) glycemic events would be
a big win for patients and educators. I think the quality of care would vastly
increase with such systems in place.

Additionally - the human body has systems in place to bring blood sugars back
into a safe range when it feels it is in an emergency situation. I do not
claim to be an expert on this matter, but it is my understanding that the
liver is able to release glycogen into the system to spike blood glucose
levels back up if they have fallen low [1]. This is why some diabetic patients
may experience high blood sugars in the mornings if they have experienced a
hypoglycemic event overnight and slept through it. I don't believe this would
be a good solution to depend on, however.

[1][http://www.diabetes.co.uk/body/liver-and-blood-glucose-
level...](http://www.diabetes.co.uk/body/liver-and-blood-glucose-levels.html)

~~~
terminalcommand
I've had type 1 diabetes for 9 years. In the first 3-4 years my liver
continued to produce glucagon. I experienced highs resulting from the down
syndrome over night. But after that it just stopped. Now I automatically wake
up if my blood sugar is below a certain threshold. It's a survival instinct.
Sometimes though it gets very scary. I can't scream, know that I need to get
up and eat something, but I just can't. The downside is that I am very
paranoid. I wake up at least once a week at night (around 3 am) and check my
blood sugar levels. Even though they are usually in the expected range, I
still get that feeling of 'being low'. If I don't act on it, I might die.

------
dekhn
While I am a big fan of DIY bio, my experience with Raspberry Pis is that they
are highly prone to failure. Becoming dependent on a device- that is,
expecting it to work with close to 100% reliability- and then using a device
that is easy to disable and prone to failure (I run a fleet of Pis and they
mangle their SD cards a lot)- seems like wishful thinking.

It may work 95% of the time, but that's not good enough. There's a reason
really good medical devices are based on simpler platforms that are more
robust.

~~~
afarrell
At the same time, this is a really cool hobby project that someone interested
in a future developing medical devices could try to replicate as they are
learning.

~~~
OopsCriticality
I sure hope not.

This is an interesting personal project, but it is far from how medical
devices should be (and are) developed. Where is the risk analysis, for
example? Or the FMEA? Was the software developed under ISO 62304? Etc.

There's a lot of activity that happens in a regulated industry that is
completely missing here, which is why I see this as a poor example.

------
StavrosK
How much liability does a company open itself up to if they make their medical
devices hackable? It's a travesty that these people had to rely on an
unpatched vulnerability to make a device that would save people's lives.

------
gedsic
Calling a glucose monitoring system with an insulin pump an artificial
pancreas is a bit misleading, considering all the other functions the pancreas
has.

~~~
mrfusion
What are the other functions?

~~~
odabaxok
[https://en.wikipedia.org/wiki/Pancreas#Function](https://en.wikipedia.org/wiki/Pancreas#Function)

"It is possible for one to live without a pancreas, provided that the person
takes insulin for proper regulation of blood glucose concentration and
_pancreatic enzyme supplements to aid digestion._ "

~~~
mrfusion
Interesting. I've always wondered why we don't simply remove the entire
pancreas for cases of pancreatic cancer?

~~~
OopsCriticality
Because there is no clinical evidence for the survival benefit of total
pancreatectomy over a Whipple.

There's absolutely nothing simple about surgery when the pancreas is involved.

~~~
mrfusion
Do you have a citation for that? I'd be curious to read more.

Intiutively it sounds wrong since I'd image any cancer that comes back after
the whipple is coming from left over cancer cells in the pancreas, no?

------
terminalcommand
I've had type 1 diabetes since I was 10. With even a semi-automated solution
we would greatly prevent the short and long term complications. The biggest
issue is that brain runs on glucose. When we can't manage our levels, the
brain shuts down. In order to prevent this we grow up paranoid, watching for
every sign. Stress, faulty needles etc. all effect us. Knowing that we can
theoretically prevent nerve damage (almost every person with 10+ years
diabetes gets it) and other serious conditions (kidney failure, blindness) and
practically not being able to do anything is very depressing.

------
gambiting
What makes it a "hacked" Raspberry Pi? Or is everything with a few cables
soldered to it "hacked"?

~~~
forgottenpass
Hacking as a term doesn't mean much anymore beyond a weak social identifier.
The startup scene calls marketing "growth hacking" these days ffs.

------
johngalt
I got a glimpse into this when I talked to someone who was following the
nightscout program for their child.

[http://www.nightscout.info/](http://www.nightscout.info/)

They were non-technical people. Yet they had an android phone connected to a
medical device using a 3d printed bracket and short usb cable. The android
phone was reporting to a windows azure instance. Pebble watch polling the
azure instance for updated levels.

The sysadmin in me recoiled at the myriad operational deficiencies and
potential failure modes. Yet they don't have a better option. I get that the
FDA has standards it has to apply, but I imagine that many things they would
reject would still be vastly better than this. Is there a term for 'the risks
people will take anyway rather than wait for something perfectly safe'. Like
if you make wait times at crosswalks too long will more people get killed
crossing the street?

------
mike-cardwell
It amazes me that technology to do this isn't already mainstream and
ubiquitous.

~~~
noir_lord
It doesn't amaze me, the FDA and organisations like it are brilliant (without
them the world would be a worse place) but they do put a retard on a lot of
the cool stuff by demanding exhaustive testing (which in fairness I can't
disagree with, medical stuff isn't a website where you can just patch it later
- people will die).

It's not a perfect system though as substandard stuff does get through and the
barriers to effective entry are so high that only the big well funded
companies can afford access - not really sure what you can do about that.

~~~
to3m
I think you're supposed to call them mentally handicapped.

~~~
to3m
I must be unaware of the other meaning of the noun "retard".

As an alternative in this case, I might suggest, "brake".

~~~
noir_lord
Not really, it was the correct word appropriately used.

> Retard - delay or hold back in terms of progress or development.

~~~
to3m
Yes, and that's "retard", the verb. A totally different word! (Maybe it
depends on dialect, but as I've always heard it spoken, it doesn't even sound
the same.)

"They do put a retard" \- here, the word "retard" is used in a noun position.
Therefore, it is a noun. Therefore, it must refer (and with an implication of
cruel disaparagement) to somebody who is mentally handicapped.

I wonder if they use the same person each time?

------
trekky1700
I've thought of this but am too worried a floating point number error or a
problem with division could cause an automated fatal dose of insulin to
actually do it.

~~~
WCityMike
Thus the comment in the article about a programmed maximum.

------
listic
I wonder why the medical industry doesn't do this, combining an insulin pump
and a constant glucose monitor into a single system?

~~~
tonylemesmer
Liability. Clinical decisions are made by humans.

Sad thing is, although the software controlling this would undoubtedly have
lots of flaws and cause suffering and death, not implementing something also
allows people to suffer and die.

~~~
andrelaszlo
I'm sure this bias has a name? The idea that changing the outcomes for the
better is actually worse because different people are affected. Or maybe
because in one we are dying of a disease, and in the other one by software
errors. Software errors should be avoidable, so they feel worse than disease
somehow.

~~~
gambiting
Think about it this way. Imagine there's a hypothetical medical device X. It
has been calculated, that due to operator errors, this machine on average
kills 1/1000 patients. Operators are given more training,but the average does
not change.

Now. Another company makes an automated machine, which kills 1/10000 patients
on average, because of software errors. Do you think anyone would ever allow
the second machine to be sold, even though it would save 9 persons compared to
the manually operated machine? Of course not. If it ever came to light that it
killed anyone due to a software error, it would be gone faster from the market
than you can spell "liability". Does not matter that in fact it's killing less
people on average than any other type of machine - it's just that in our minds
software bugs are avoidable so therefore they are not acceptable at all.

------
jdkeller
This is why I come here.

------
wsloth514
... all I have to say is... I LOVE SCIENCE!

