
New partnership changes everything for the DIY diabetes community - GordonS
https://www.hanselman.com/blog/ThisChangesEverythingForTheDIYDiabetesCommunityTidePoolPartnersWithMedtronicAndDexcom.aspx
======
dflock
Does anyone know if it's possible to get the FDA to certify a snapshot of
source code, along with a complete test suite - instead of an executable
binary - for use in medical devices?

From my limited experience with this, it seems that all existing medical
device software is closed source and are certified as executables - but I'm
not sure if this is a limitation of the FDA processes, or the fact that
they're intended to be closed source?

~~~
oliwarner
Just to extend off the other replies, the license might also be a factor.
GPLv3 has an anti-TiVo, "you must let your users apply their changes to
hardware" clause. FDA might consider that too risky.

~~~
belorn
The anti-TiVo clause has some major exception since it is designed to address
a very specific scenario; One where the the owner can update the device but
only through the approval of the device manufacturer through signed updates.

That create two cases where GPL have no issue with DRM. The first case is when
no one can update the device because there is no update mechanism.

The second case is when there is DRM, and the device can be updated, and the
manufacturer give the owner the power to inject their own keys. Again this is
allowed.

FDA should have no issue with the first case. It may have a issue with the
second case if the update allows for changes which impact the medical safety
of the device (but not technological security, as there is an exception for
that by the fda).

------
PascLeRasc
I've been really wanting to learn more about the DIY diabetes community, does
anyone know where to start?

~~~
rullgrus
I learnt a little a few years ago while setting up monitoring and building a
"Parakeet" [0] for a relative. I think the Nightscout foundation [1][2] should
be a good start. I believe they are very active in their Facebook group.

[0] [https://jamorham.github.io/](https://jamorham.github.io/)

[1]
[http://www.nightscoutfoundation.org/](http://www.nightscoutfoundation.org/)

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

------
chrispeel
I was in an accelerator with Tidepool people, including Howard Look. They were
head-and-shoulders above the rest of the groups. I'm not surprised that they
are succeeding where others have failed to make an artificial pancreas work.

------
pkaye
Do you really need a Raspberry PI to do all this? Wouldn't a low end 32-bit
(even 8-bit) micro-controller be enough?

~~~
hanniabu
The documentation, community support, accessibility, etc all make a difference
in making RPI the go-to

~~~
rullgrus
Exactly. A low end micro-controller would do the trick but a Raspberry Pi is
much more accessible - almost anyone can get one fairly quickly and if they
themselves don't have the knowledge to do the setup they most likely know
someone who can help.

~~~
mrob
ATmega micro-controllers also have great community support and documentation
because of their use in Arduinos. If I was relying on an electronic device to
protect my health I'd trust a simple 8-bit device more than something as
complex as a Raspberry Pi.

~~~
endymi0n
If I was relying on an electronic device to protect my health I‘d trust my
garbage collected code on a 64 bit ARM CPU using real CPU timers way more than
my own ability to not segfault or OOM myself to death (literally) with low-
level embedded C code.

YMMV.

~~~
zaarn
Segfaulting and OOM on MCU's is far more rare than on a device with an entire
operating system on top.

In most cases, MCU IDE's like the classic Arduino one don't even give you an
allocator, all data must be statically allocated beforehand.

IIRC it doesn't use the stack either. The main() and loop() functions
initialize all their variables statically.

When you have 2KB of memory to share between code, data and stack, allocating
and using stack for function calls is luxury that only introduces problems.

Hence, I've never ever ever seen an MCU crash from segfaults or OOMs.

On the plus side they will also use vastly less energy. 10 Milliamps is enough
to drive a ESP8266 or ESP32, in deep sleep you start counting microamps. A
single battery cell can easily last a month.

------
wkdown
Open source medical devices! Is this a first? There is potential for some
genuine health concerns where QA and security are involved.

~~~
AYBABTME
What is intrinsic in closed source products that makes them less concerning?
Could a financially backed open source device have equal quality, safety and
review?

~~~
ska
There is no fundamental reason, the tricky part is (as always) cost and
expertise.

For all the issues in medical device engineering, the bar is higher than most
people (particularly in software industry) have worked in. Obviously there are
other areas too (e.g. aerospace), with similar or higher bars.

Your project will benefit by finding people with experience in hazard analysis
and risk mitigation, testing, SDLC management etc. They either have to be
motivated to do this on their own or payed, or a mix. Hopefully you'll find
people familiar with ISO13489, IEC60601, IEC62304, etc. - not because you'll
want to audit to these standards, but because the people will _also_ be
familiar with what's needed.

Basically, to have the quality where you want it to be, you need to do the
work. The flexibility of such a system is great, but in terms of verification
and validation, the amount of work could become exponential with the
configurabilty - so you are probably going to want to concentrate on some
specific configurations pretty rigorously and encourage them for "real" use.

------
ska
From the point of view of medical device development, one thing that is very
cool about a community like this is the possibility for broad systematic
testing.

Handled smartly with some centralized tools, they could have something really
effective.

------
qwerty456127
BTW. I don't doubt diabetes is a huge problem and there just is a reason I
don't know but I'm actually curious: why not just go keto, what would you need
insulin for if you just stopped eating carbs? Also can't R-lipoic acid do the
job of push glucose into the cells?

~~~
bayesian_horse
For one thing you can (and will) generate blood sugar from protein, even with
no supply of "carbs". I've heard that eventually after a few weeks the brain
can use fat, but I don't know to which degree.

Also the lack of insulin means the glucose isn't going anywhere to be used.

Diabetic ketoacidosis will eventually lead to a Koma.

~~~
qwerty456127
Sounds like you hardly know much more than I do. I wish scientifically-backed
people could tell us exactly how much glucose does the body make out of
proteins once it switches to ketosis and if lipoic acid supplementation can be
enough to force the cells to consume it quickly enough.

~~~
bayesian_horse
Nobody can predict how much glucose you make from protein. Just too damn
complicated.

I've never heard about Type-1 diabetics avoiding insulin through low-carb
diets. From what I know about diabetes management (and I know a lot) that
sounds incredibly dangerous.

Still, keto-genetic diets and even fasting, can be very beneficial, especially
for Type-2, but patients need to keep track of their blood sugar. If you take
insulin, you MUST check your blood sugar level, otherwise you may faint or go
into a life threatening ketoacidosis.

~~~
qwerty456127
Again, we have the same data.

But doesn't lack of data on glucose levels during ketosis with zero-glucose
diets in type-1 diabetics seem weird to you too? As far as I know (obviously I
may be wrong and I'm not an expert, just a curious person) once your body
switches to ketosis it is fueled entirely by ketone bodies (which feels
awesome according to my experience, but I'm not diabetic) and does not use
glucose any more. I also thought it stops producing glucose from proteins too
when in this mode. So this seems an obviously interesting area for research.

~~~
bayesian_horse
As I had Type 2 diabetes for a short time after a flu and because I studied
veterinary medicine, I can assume to have a bit more data than you.

The assumption that there is no glucose used by your body when you are
eliminating it from your diet is flatly wrong.

Firstly eliminating glucose and anything we can make glucose from
(carbohydrates and protein) from a sustainable diet (= not using up your
reserves) is next to impossible.

Secondly even when there is no protein and no carbohydrates in the diet, your
body will claim the protein from your muscles and turn that into blood sugar.

Thirdly, some tissues in the body, especially the brain, just plainly need
glucose. The body will make glucose, no matter what, even at the expense of
destroying itself.

There is a lot of hype, marketing and simplification around ketogenic diets.
Not all of that translates down to the actual physiology. Ketogenic diets are
beneficial to diabetics, fasting will lower insulin tolerance, whether you are
a diabetic or not. This is well known, and research is going on. There are
even indications that fasting leads to more insulin production in Type-1
diabetic.

~~~
qwerty456127
Can you reference any sources to confirm the body keeps producing glucose from
protein once it has switched to ketososis (which you don't have to eliminate
protein for, the diet just is to be lots of fats and some proteins) the brain
always needs glucose and ketone bodies can't replace it completely? I don't
mean you are wrong, you just are the first person I've met who tells there is
glucose in ketosis (don't confuse it with diabetic ketoacidosis) and I'm
curious to know for sure.

~~~
bayesian_horse
You need to start with the basics:
[https://en.wikipedia.org/wiki/Hypoglycemia](https://en.wikipedia.org/wiki/Hypoglycemia)
and
[https://en.wikipedia.org/wiki/List_of_causes_of_hypoglycemia](https://en.wikipedia.org/wiki/List_of_causes_of_hypoglycemia)

Note how both articles don't talk about fasting or ketogenic diets. Basic
idea: even a low blood sugar level (let alone 0) is very very bad news. The
metabolism will do its utmost to make glucose, even from amino acids. That's
why even people who eat nothing don't have hypoglycemia all the time...

