Why the DIY part of OpenAPS is important

I had the chance to talk about DIYPS and OpenAPS during a demo session in DC last week. (Thank you to Gary from Quantified Self and Marty from the National Academy of Sciences for making this possible!)

I walked away with several insights:

  1. Many people don’t know about diabetes; fewer have a realization of current diabetes tech. In several cases as I was describing the closed loop artificial pancreas, people stopped me and were wowed – but not by the closed loop. They were impressed by the CGM.
  2. Others think that this type of technology is already out on the market.

So, I believe we have a long way to go in communicating and advocating for this type of technology. We know it’s behind where it should be – and we want it to catch up. That’s a big part of the OpenAPS goals to help the FDA, device companies, and everyone involved move a little faster than they might otherwise, because #WeAreNotWaiting.

But here’s the other question I was often asked: “How many people have you given this to?”

I frequently embarked on an explanation of how we can’t “give” away #DIYPS or the OpenAPS implementation – in fact, we can’t and won’t give away the code, either. Some of that is because the FDA says no – and some of it is common sense and principles that both Scott and I hold.

Here’s why I think it is so important to keep the DIY in DIYPS and each OpenAPS implementation that is in progress:

  • You need to have a deep understanding of the system before even considering using it on yourself. You need to know what it’s trying to do in all situations, including the fringe cases (the “this is unlikely to happen but if it does…”), so that you know when it’s working – and when it’s not – whether it’s 3pm in the afternoon at work, or 3am and you wake up and find something is not right and the system is not working.
  • You need to go step by step and test and ensure at each stage that it is working as expected – both in a “this is what it should be doing” and “it is giving out the correct amount of insulin”. Remember, insulin is a lethal drug. It’s also a lifesaving drug. It’s important to remember both of these things and balance the risks accordingly.

From the conversations I’ve had with people interested in learning more or getting a DIYPS-type system for themselves, they fall into two categories:

  1. “How can I buy it from you?”
  2. “What do I need to do to make one?”

Given my above reasoning, the second question is my favorite. The first one scares me, if someone does not then switch to the #2 question. Many people do go from #1 to #2, which is great.

DIYPS, for me, and OpenAPS implementations, for others, are works in progress. They’re not perfect. They’re better than what’s out there (like sleeping through alarms when you’re low at night), but they also have big risks. And it’s important to know, and respect these risks, and understand the limitations of the system, before being able to take advantage of this type of system – and to build the system with appropriate safeguards. (This is one of the reason we have OpenAPS, for example, designed to accept multiple failure points – like walking out of range, loss of connectivity, etc.)

The ability to buy a “black box” type system where you don’t know exactly how it works, but you trust that it works? That will be coming from the major device manufacturers in several years – hopefully sooner rather than later, and that’s something that OpenAPS will hopefully help make happen more quickly.

So to answer the #2 question, what do you need to make a DIYPS or OpenAPS of your own?

I’ll answer the technical aspects of this question in another post, but the first thing I always say is: “The willingness to build and test and test and test some more before ever considering using it on yourself.”

How to do “eating soon” mode – #DIYPS lessons learned

“Do you prebolus for meals with #DIYPS?”

The answer to this question is complicated for me. I don’t “prebolus” like most people do (meaning “take some or all of your meal insulin about 15 minutes before you eat”).

I do take insulin before a meal. In fact, I do it up to an hour before the meal starts, by setting my correction target BG from it’s usual range (usually 100-120) to 80. This usually means I’m usually doing anywhere from .5-1u or more of insulin prior to a meal. But the amount of insulin has no direct relationship with the total amount of carbs I’ll end up eating during the meal.

Does it work? Yes. Do I go low? No, because it is unlikely that I would get anywhere near 80 by the time my carbs kick in for a meal (15 minutes after I eat), and therefore the initial carbs are handled by that initial amount of insulin from the eating soon-bolus. (Last year, I wrote a post about “eating soon mode” under the guise of lessons learned about meal time with #DIYPS – if you want to read the reason behind WHY eating soon mode is key in more detail, you can definitely read the longer version of the post. It also links another key concept I’ve learned about called carbohydrate absorption rate.)

So, how can you manually do “eating soon” mode?

1. If you know you’re going to eat anywhere in the next hour, manually calculate a correction bolus with a target BG of 80. (Example – if your correction ratio is 1:40, and you are currently 120, that means you would give yourself 1u of insulin.) An hour, 45 minutes, 30 minutes – whatever you make work is better than not doing it!

2. Eat your meal and bolus normally, but use your IOB as part of your meal calculation so you don’t forget about that insulin you already have going. (Helpful if your pump tracks IOB and you use a bolus calculator feature, but if you take injections, keep in mind about the insulin you’ve already given for the meal – just subtract that amount (1u in above example) from what you’d otherwise inject for the meal.

Note: if you use eating soon mode, you might want to delay the last unit or two of your meal insulin until after you see BGs rise, since sometimes you need less total insulin for the meal if you get insulin active early. (Often, we PWDs may overcompensate with more insulin than we need because it’s not timed correctly compared to the carb absorption rate.)

Example:

  • 5pm – You’re planning to eat around 5:30 or 6pm. Your BG is 120 and your correction ratio is 1:40. Setting your correction target to 80, that means you take 1u of insulin.
  • 6pm – You sit down to eat. Looking at your meal, you see 45 carbs and decide, with a carb ratio of 1:10, that you would take 4.5 units for the meal. Keeping in mind your earlier bolus of 1u, you end up taking 3.5 units for the meal. (4.5 total – 1u prebolus = 3.5 more units needed to cover the meal, see above note about considering delaying a unit or two of that bolus until you see your BGs impacted by carbs).

Result? You should have less of a spike from your carbs kicking in 15 minutes after you eat. It won’t always completely eliminate a spike, but it will provide a flattening effect. This is part of how I’m able to eat large (like 120g of gluten free pizza) meals and have flat or mostly flat BGs, and this is also one of the reasons I think using #DIYPS has dramatically improved my eAG and a1cs.

(See another post, with illustrations, about doing eating soon mode here.)

#DIYPS & #OpenAPS

Since I‘ve been using #DIYPS for over a year and also had the closed loop version running for more than two months with excellent results, I get several questions every week about how/when we’re going to make it available to other people. #DIYPS is an individual implementation that we built, and because of FDA regulations it’s not something we can give to another person to use. (Not to mention it’s not been tested for more than n=1, etc.) But, both Scott and I are passionate about moving diabetes technology forward for all, and so this week we kicked off the OpenAPS project.

#OpenAPS is our initiative to build on the #DIYPS closed loop work and eventually make this type of technology available (and faster than the market and traditional research is otherwise moving) for more people with diabetes. We aim to encourage other independent researchers to build their own closed loop implementations based on the OpenAPS reference design, and share their results and help us improve the design further. We are also working toward clinical trials that will enable more people to test and use the system during the research phase, but without having to code and build their own implementation of a closed loop artificial pancreas system. And all of this will be done in an open, transparent way so people can ask questions, monitor progress, and get involved at various stages.

The Open Artificial Pancreas System (#OpenAPS) is an open and transparent effort to make safe and effective basic Artificial Pancreas System (APS) technology widely available to more quickly improve and save as many lives as possible and reduce the burden of Type 1 diabetes.

We believe that we can make safe and effective APS technology available more quickly, to more people, rather than just waiting for current APS efforts to complete clinical trials and be FDA-approved and commercialized through traditional processes. And in the process, we believe we can engage the untapped potential of dozens or possibly hundreds of patient innovators and independent researchers and also make APS technology available to hundreds or thousands of people willing to participate as subjects in clinical trials.

At the end of the process, we hope to have produced an FDA-approved #OpenAPS reference design and reference implementation that can be used by any medical device manufacturer with minimal regulatory burden. We believe this will in turn allow manufacturers (and the academic research teams they work with) to turn more of their attention to designing and testing more advanced APS systems, and thereby accelerate the pace of innovation toward new and improved Type 1 diabetes treatments, and eventually a cure.

In the mean time, it will make basic overnight closed loop APS technology widely available to anyone with compatible medical devices, thereby reducing the burden of Type 1 diabetes on everyone who lives with the disease.

I’ll continue to post here often with data and updates from my experience & work with #DIYPS, which I’m continuing to use. But I also encourage you to bookmark OpenAPS.org if you’re interested in watching that work move forward, too – and as always, we’ll be on Twitter with #DIYPS and #OpenAPS as @DanaMLewis and @ScottLeibrand (and you can email us for #DIYPS or #OpenAPS info at Dana@OpenAPS.org and Scott@OpenAPS.org).

#DIYPS Closed Loop – One month of data & it still works great

My name is Dana Lewis and I have a closed loop artificial pancreas (that I built) that I use every night. Also see: woot!

Tweet that says "I love you #DIYPS closed loop"

We closed the loop in December (click here for more details about the first week of data & basics on how the closed loop works; or here to learn more about the basic non-closed loop #DIYPS and how far we’ve come in a single year), and I’ve been using it almost nonstop since.

When to loop – or not

I’ve only been limited in using the closed loop for overnight when I inadvertently fried the SD card in the Raspberry Pi (a known issue that’s related to the number of times you plug/unplug it from power source). We promptly ordered a second Pi as a backup, and by the time it arrived, Scott managed to revive the first one, so I now have two ready to run at any time. (Because of course you need emergency backups of your essential organs!)

When I first started looping in December, I originally intended to only use it at night, but it was hard to not loop during the day, too. The idea that I could sit at my desk and work for 3-4 hours straight, and not worry about my BGs, is so appealing!

However, it’s not really practical for me to want to use 24/7 every day…yet. This is where the versions of APS that will come to market in 3+ years will be great, because it will be all-in-one (or at least limited in excess pieces you have to carry). To wear it 24/7, I have to have enough batteries to power the raspberry pi and keep it in range, which means constantly picking it up and moving it around, carrying it in my bag from meeting to meeting, etc. I’ve decided it’s not worth it for every day, but it is awesome to have the choice when sitting through an important interview to have it running and have more security and peace of mind.

Back to using the closed loop for overnights

When we first showed our closed loop efforts off, we had about a week’s worth of data that already showed improved overnight blood glucose (eAG) and time in range, plus reduced number of #DIYPS alarms.

After a month, the results of using a DIY closed loop artificial pancreas system overnight continue to look promising:


We also recently added another screen to #DIYPS so I could access and review “what happened last night”, or what was the output of the closed loop. I usually look at the net impact per hour (how much above or below my normal basal rates I ended up getting), but also at the individual numbers of how much above and how much below I ended up getting every hour. Here’s a visualization:

Tweet illustrating how DIYPS closed loop works overnight with micro corrections to keep blood glucose in range

Using closed loop activity to spot trends and change basal rates

We also built a 7 day and 30 day view of this closed loop activity history so I can look at trends by hour overnight (versus manually compiling and visualizing them, like I did in our first closed loop data post here).

When we first looked at the data for overnight closed loop net insulin activity, I could spot a trend easily – the loop temped low from midnight to 2am, leveled out, then increased with higher temps after 5am. I can easily see why it often ends up temping low after I go to sleep, because I often do a half unit or so if I’m riding “high” (130 – ha!), and feel safe doing so with the loop to catch any more drop than I desire. (This pattern was consistent at 7, 14, and 30 days, although the average net insulin amount varied slightly.)

However, when I first started looping overnight in December, I had rises around 2am that the loop had to handle by providing higher temporary basal rates than my scheduled basals. I upped my midnight basal rate as a result, but it looks like I upped it too far since the closed loop often temps low now during that time frame. My next step is to probably change my midnight basal to be lower by 0.1u, and see if that reduces the amount of low temps needed from 12-2am, without causing spikes. My theory is that this alone may also reduce the number of higher temps from 2-4am, because those may be a result of the lower temps earlier on. Thus, I am starting overnight basal tweaking with this one change and seeing how much of a ripple effect it has for the rest of the night as well.

In pursuit of…what? Or: what are we optimizing for?

My BG averages overnight (and during the day) are excellent (well within the “normal” range <120) and time in range is continuing to grow (85% & counting) with using the closed loop #DIYPS. So, beyond minute basal tweaking, what’s next?

At this point, I think the next goal is encouraging other independent researchers to get up and running on their own closed loop overnight APS.  Do we really need to wait another 3+ years for APS technology to come to market?  What exactly would #WeAreNotWaiting look like if we applied it to closed loop Artificial Pancreas technology research? What do you think?

How does a closed loop artificial pancreas work when you DIY? Or: #DIYPS closed loop is working!

We closed the loop with #DIYPS and now have a DIY closed loop artificial pancreas running right now (for me, aka n=1.)

Here’s what a closed loop #DIYPS artificial pancreas looks like:


(A raspberry pi powered with a battery (shown) or via an outlet; a Carelink USB plugged into the Pi and in close proximity to the pump; a Medtronic insulin pump (an older version, thanks to a family from CGM in the Cloud for sharing it!); and of course my CGM and Android uploader phone that’s sending my data into the cloud/#DIYPS)

Here’s how a closed loop artificial pancreas or “#DIYPS closed loop” works:

Over the past year, we’ve been using #DIYPS to process BG, insulin on board and carbohydrate decay in real time. This yields real-time predictive alerts of three kinds: more insulin needed (X.X units of bolus insulin); less insulin needed (temp basal to zero insulin for X minutes); or carbs needed. Using this algorithm and my data entered (insulin taken or reduced; carbs ingested); we’ve seen significant results not only for the first 100 days, but also sustained over an entire year for improved average glucose, improved a1c, and improved time in range.

Closing the loop with #DIYPS

Three weeks ago, we mentioned at D-Data Exchange 2014 that we were planning to close the loop with #DIYPS…by August 1 (our wedding date :)).

The FDA was even in the room.

Two weeks later…we closed the loop.

It was this simple:

  • Thanks to Ben West’s awesome work, we plugged the Carelink USB into the Raspberry Pi. Thanks to a generous family from the CGM in the Cloud Facebook group, we acquired an old 522 insulin pump that could talk to the Carelink USB. (My current pump is too modern to work with this setup.)
  • Once we established that the Pi/USB setup could read from the pump, we started connecting #DIYPS to the system to close the loop.
  • Normally, #DIYPS provides 3 types of recommendations (see above). We reconfigured it so that while “looping”, it only enables the pump to do temporary basal rates instead of boluses. If #DIYPS says I need more insulin, it tells the pump to begin a temporary basal rate for 30 minutes above my normal basal rate. If #DIYPS says I need less insulin, it tells the pump to begin a temporary basal rate lower than my normal basal rate for 30 minutes, effectively reducing my net insulin.
  • When something changes and I need to do more or less insulin, #DIYPS tells the pump to increase or decrease the temporary basal rate, or resume my normal basal rate.
  • Note: there is a maximum basal rate that the pump can provide. This is a safety check so that #DIYPS cannot recommend a seriously dangerous basal rate. In fact, if I need more insulin than #DIYPS closed loop can safely provide using a 30 minute temp basal, the system will alarm and alert me to that state (although I usually already know about it). Same for if I was dropping fast and needed carbs in addition to reducing insulin; it would alarm and recommend carbs above and beyond reducing insulin.

I’ve been ‘looping’ (using #DIYPS closed loop) for a little over a week. Here are some of my overnight results:

As you can see, the outcomes are awesome. In fact, they are better than I expected!

#DIYPS closed loop results are significant

Here’s a break down that shows on an example night (Sunday night, 12/14 through Monday morning, 12/15) of how #DIYPS performed:

You can see that around 10:30 (not pictured, but in the graph), I was running low and needed some temp basals to zero, then later some higher temp basals to accommodate the resulting rise in BG. Later, my normal basal rates sufficed until another point overnight when I needed less insulin to prevent a low.

While this is 1/9 or so example nights, this is pretty much how it works every night. BGs drift up? Temp basal higher (usually 1.6 or 1.8, which is <=.5u above my normal). BGs drifting low? Temp basal lower or in extreme cases to zero to prevent a low.

What happens if the closed loop artificial pancreas fails/stops working?

If the loop stops working*, #DIYPS continues to work normally (processing all data and pushing recommendations), and my pump goes back to my normal basal profiles after any existing temp basal rates expire (which would be a max of 30 minutes). No big deal and no more dangerous than I would be walking around with my pump acting normally.

*I’ve found numerous ways to make the system stop working: no battery power; being too far away from the USB stick so the pump can’t communicate; no cell signal to provide wifi as a hotspot to the Raspberry Pi; if the pump battery goes low, RF gets turned off and the USB can’t talk to the pump; if there’s no cell signal or wifi at all, I can’t upload CGM data to #DIYPS anyway; if the SD card gets corrupted inside the Raspberry Pi; etc.

So, there’s many points of failure. But it doesn’t matter. #DIYPS closed loop is safer for me (disclaimer: just me! I’m the only one doing this as a personal experiment to my own body) than if I just had a pump and a CGM, because it can reduce insulin and prevent lows. And it can increase insulin slightly and prevent rebounds.

After about a week’s worth of data, here’s the results of #DIYPS (what I’ve been using for the past year) versus the week of closed loop #DIYPS:


The target BG is especially awesome, because we have the closed loop targeting a BG of 115!

It’s also worth noting the reduction in alarms. Remember, I sleep through CGM alarms, so we built #DIYPS. #DIYPS makes a lot of alarms – sometimes upwards of 40 a night (those are really bad nights!). With the closed loop nights, there are very few alarms..and they’re usually alerts about things #DIYPS closed loop is taking care of on it’s own (see all of those no-hitters above!).


What’s next with #DIYPS closed loop

We’re going to continue and iterate on the closed loop and keep making it better. I’m definitely going to keep using it overnight – it’s like having a working pancreas, the kind where you can go to sleep without fear.

We’re also adding this to the ‘things we’ve learned while working on #DIYPS’ list:

  • Calculating the carbohydrate absorption rate for an individual – how many carbohydrates your body absorbs in an hour
  • Tracking “carbs on board” or “carb decay” – how many carbohydrates are still being digested in your body and impact BG levels
  • “Net” IOB – tracking net IOB by incorporating “negative” boluses from temporary basal rates to zero
  • Preventing post-meal BG spikes/drops with early meal boluses and better understanding of insulin activity
  • and you can control overnight BGs solely using simple adjustments of insulin rates.

Thanks to everyone who made it through a really long post, and for the MANY people who have contributed in various ways to helping us close the loop with #DIYPS! Also, let us know what questions come to mind that we haven’t managed to answer above about how the system works, results, etc.

Why #DIYPS N=1 data is significant (and #DIYPS is a year old!)

As I’ve said many times, last year we set out to create a louder CGM alarm system. By adding “snoozes” so I didn’t drive my co-investigator crazy, we realized I might as well enter what I was doing, and be precise about it (aided by some quick bolus and quick carb buttons that made data-entry not the chore that it sounds). Thus, we had the data and the brains to realize that this made for some great predictions; much better than what you usually see in diabetes tools because they rely only on your insulin sensitivity factor (ISF) and correction rate, but don’t take into account carbs on board and their impact over time, etc.

(If you’re new to #DIYPS, read about the beginnings of it here. For more on this idea of carbs on board and the carbohydrate absorption rate and how significant it is for people with diabetes, read about that here.)

After I had spent 100 days using #DIYPS, Scott and I stopped to look and see what the impact was. For the long version, read this post about the results and the direct comparison to the bionic pancreas trial data that was available then. The short version: #DIYPS reduced my eAG and a1c significantly, reduced lows, reduced highs – aka my time in range was improved from 50% to regularly 80+%.

I have asked myself (and others have asked), are these results sustainable? Are these improved outcomes truly because of #DIYPS? It’s definitely worth noting I never changed what or how I ate. (I ate 120 grams of pizza (for science! ;)) several times to test the system, but I didn’t eat less or any healthier or otherwise change my diet.)
I can’t attribute these outcomes directly to #DIYPS alone, but I do believe they’re highly correlated. It’s hard to separate other contributing factors like the fact that I have more boluses per day using #DIYPS (which other studies have shown decreases a1c); or the fact that I spend less time high/low because with #DIYPS I actually can wake up at night and take action before I’m high or low.
So, it’d be hard to study specific factors and say “it’s all #DIYPS”. But, I’m pretty sure it’s mostly #DIYPS. Regardless, here’s the updated data about the sustainability of the results I’ve seen with #DIYPS over the past year:
Why this is significant
#DIYPS is currently n=1 (meaning one person is the study’s subject). But what is significant is that I have year’s worth of data and actual lab-tested a1cs that shows the outcome of this type of artificial pancreas work. And it (to date, but coming soon  / OMG this week!) hasn’t even been closed loop – I’m still the “human in the loop” making decisions and pushing buttons on my pump.Compared to the bionic pancreas and other artificial pancreas study trials where they have a few days and a few more (usually n=20 or so) subjects; they can look at the decrease in lows and highs and improved eAG…but they can only project what the a1c improvement is going to be.We’ve shown the improvements in lab-tested a1cs – see my graph above?

It all adds up
Scott and I are not the only ones working on a closed loop. The community of developers connected to the Nightscout community has nearly two hands full of people who are working independently on device interoperability to close the loop by freeing our data from devices and enabling us to work with our own algorithms regardless of which hardware device we use to support our diabetes management.When all of these n=1 studies add up, it matters. At some point in the near future, after we’ve closed the loop with #DIYPS (ah! this week! :)) and others have as well, we may have more n=1 hours on closed loop artificial pancreas systems than the (traditional) “researchers”. Scott and I are hoping that we can not only show the world how open source innovation and new regulatory paradigms can deliver safe and effective results for people living with T1D faster than traditional medical device development and traditional regulation; but that we can also change how all successful medical device companies approach interoperability, and how traditional medical researchers do research – possibly in partnership with patient researchers like us.

What we’ve been up to lately – closing the loop with #DIYPS and open process work

We’ve been quiet on the blogging front (yes, I admit, I blogged!) because we’ve been busy closing the loop. (We’re always active on Twitter, though – make sure you watch #DIYPS on Twitter for more real-time updates in between blog posts, and you can follow @ScottLeibrand and @DanaMLewis.)

That’s right.

Closing the loop.

It feels good to say that :).

We’re submitting a research proposal to Medtronic to get access to their research device that will enable us to send commands to my insulin pump. These commands will be generated from #DIYPS. Because that would remove the “human in the loop” component that’s a current part of #DIYPS (i.e.  me pushing the pump buttons), that would move #DIYPS from being not an artificial pancreas to a closed loop artificial pancreas system.

This is not what we imagined we would do when we set off nearly a year ago to do this work (make a louder CGM alarm system, enable remote monitoring, etc.), but this is awesome!

And, in the true #wearenotwaiting spirit, we’re not waiting for the research device to start this phase of our work. We got started with this phase of our research by getting a Raspberry Pi and hooking it up to the Carelink USB and sending commands to a test Medtronic pump.

(Note: this pump is not hooked up to my body! There is no insulin in it! We’re just testing to see how data can be read off the pump & fed into #DIYPS. There will be many tests with a pump not connected to my body and many safety checks and stages before we would get anywhere near to allowing this to run under waking, close observation let alone under observed sleeping conditions. Stay tuned for more on this later.)

Where we are with #DIYPS and Nightscout

We’ve been having many discussions with the other developers of Nightscout, and end users in the CGM in the Cloud Facebook group around this topic. Scott and I are both passionate about the open source part of our project and being open and transparent every step of the way. We’ve been learning a lot from #DIYPS and have some key features that we’re putting back into the overall Nightscout platform as a result. We’re calling this “#DIYPS-Lite”, or the “wip/iob-cob” branch of Nightscout. (This is not what the main community is using, it’s still an advanced test branch, but enables more advanced users to implement and take advantage of some of these features, like net IOB and COB.) We’ve also been contributing to the roadmap of Nightscout; as of this past weekend, we helped map out the priority list to show what are priorities of some of the core developers (including Scott and I); what’s currently being worked on; and what’s on the ‘backlog’ as a project we’re all interested in and is important to the community, but no one’s had a chance to jump in and start it yet.

Back to the closed loop update

We won’t be releasing any closed-loop systems to the public any time soon, because that would mean distributing an untested medical device system that controls administration of a potentially lethal drug (insulin), which the FDA (and anyone in their right mind) would (rightly) frown on.

Instead, we want to open up our process of developing such systems, so that other researchers (including independent ones like us, and those inside traditional research labs and companies) have a roadmap to follow for how to safely put together and test an open-source artificial pancreas system.  The more people and companies we have developing such systems, sharing their results, and learning from each other’s work, the closer we’ll be to having a system that could indeed be proven safe and effective to the FDA’s satisfaction, and eventually released to the public.  In the end, we suspect the companies and research labs developing APS systems will be the ones to commercialize them, but we are confident that our efforts will accelerate those timelines and result in a more dynamic, innovative T1D medical device ecosystem that will provide a bridge to a true cure.

We are hoping that we can show the world how open source innovation and new regulatory paradigms can deliver safe and effective results for people living with T1D faster than traditional medical device development and traditional regulation.  By doing so, we can change how all successful medical device companies approach interoperability, and get to a world where the latest ideas, algorithms, and software can be made available to everyone with T1D, regardless of what hardware they’re using.


(More to come next week as we mark 1 full year of #DIYPS in action (!) and we have some new data to share!)

12 years & counting – are we there yet?

Today marks 12 years of living with diabetes. (Like everyone else, I wonder what to do on yet another diabetes anniversary – celebrate? Cry? Eat gluten-free cupcakes? All three things?) And interestingly, I’m almost at the one year mark of living with diabetes powered by #DIYPS.

When I was diagnosed, my blood glucose meter was bigger in all dimensions than the iPhone 6+.  Luckily, that’s changed, and my meter is now about the size of my Pebble smart watch – and that watch actually shows my my blood glucose readings from my CGM every 5 minutes.

Even better, in the last year, we’ve built a system that will not only give me a number, but help me track changes and push alerts so I can pay attention when needed…but otherwise live my life and not let diabetes get in the way of the things I actually want to be doing (running marathons, reading marathons, saving the world, etc.).

What hasn’t changed, though? My insulin pump. I’m pretty sure it’s a slightly different purple color than it was 11 or so years ago, but not much else has changed. For 11+ years I’ve been wanting:

  • To be able to see (on the pump) a HISTORY of any temporary basal rates
  • To be able to have “days of the week” programmable basal rates. (As you can imagine, my Tuesdays and Saturdays look a little different!)
  • To be able to have “net IOB” calculated and displayed to reflect the true amount of insulin in my body

For 11 years, I didn’t question the lack of progress, much, though. That’s just the way it was. I imagined it would probably be this way until we got a cure for diabetes in (5 or insert your magical number here) years.

I’m glad this is no longer the way it is and that I have tools like #DIYPS. But I hope that medical device companies will get out of their rut and the way they’ve been doing innovation and business for eons and do better. Because what they’re doing right now is not good enough. And #wearenotwaiting.

How and why we are working with the FDA: background and a brief summary of the recent meeting with the FDA about the Nightscout project

On Wednesday, October 8, 2014, I accompanied several other individuals active within the CGM in the Cloud community (John Costik, Ben West, Bennet Dunlap, and Ping Fang), and an invited guest observer (Mark O’Donnell from Medtronic) to meet with the US Food and Drug Administration (FDA) to discuss the Nightscout project. Our goal was to begin a dialog with the FDA, in which we hope to educate the FDA on the Nightscout system and the open source development methodology behind it, to learn what concerns the FDA might have about the project, and to determine which efforts need to be prioritized to address those concerns and ensure the safety of everyone using the Nightscout system.

As most of you are aware (and as outlined so well in the recent front-page WSJ article), the Nightscout project started with John Costik’s early efforts to improve safety for his son going to kindergarten, by using the USB interface of his Dexcom G4 Continuous Glucose Monitor (CGM) to obtain up-to-date glucose readings, and make that data available remotely. After John and a few others released their code, many other interested developers began improving and extending it using an open-source development model.

Since that time, the CGM in the Cloud Facebook group has grown to over 7,000 members, and the open-source Nightscout project has been developed into the system used regularly by most of the over 1,100 individuals who have made their own copies (forks) of the source code on GitHub. Recognizing that this rapid growth indicated something so important to so many people living with diabetes, the FDA has reached out over the last several months to a number of us at events like the D-Mine D-Data Exchange.

We all recognize that this kind of open-source patient-driven project has the potential to greatly improve patient safety, quality of life, and quality of treatment. Furthermore, this bottom-up innovation also represents a new way of developing potentially life-saving mHealth systems: it falls somewhat outside the way medical devices have traditionally been developed and regulated, both in the open-source nature of the project and the #WeAreNotWaiting-inspired speed of software development, testing, and release.

In light of all this, the FDA encouraged those of us working on Nightscout to begin working with the FDA through their pre-submission process, so they can better understand what we are doing, and so they can work with us to make sure that we are doing everything possible to accomplish the shared goal of maximizing patient safety. We also saw it as an opportunity to work with the FDA to help them develop a model for regulating patient-driven open source mHealth software, which ensures the aforementioned focus on safety without unnecessarily slowing things down. So Ben West did exactly what the FDA suggested, documenting a number of details about how the Nightscout software and project currently work, and formally submitted them to the FDA along with a request for Wednesday’s meeting.

This meeting represented an excellent start on the dialog required to reach those goals. The FDA asked a number of questions about how Nightscout’s open-source development model works. From our perspective, they seemed particularly interested in learning about the (currently largely informal, yet effective) processes we have in place for ensuring that new features and code are well reviewed and tested before being made available to the general public, and for making sure that any reported issues that might represent a safety issue can be appropriately triaged, prioritized, fixed, and the fix distributed back to the people using the software. They also expressed an interest in making sure that there is a core person, group, or entity that is responsible for making sure nothing falls through the cracks and that any modifications or new features are well-tested and work as designed, and who will take responsibility and take appropriate action if something goes wrong.

Prior to Wednesday’s meeting, some people had expressed concern whether formally engaging with the FDA would put the Nightscout project at risk, and possibly even result in the FDA “shutting it down” and taking away a tool that many people find invaluable in helping ensure the safety of themselves or their loved ones. Given the FDA’s desire to work with us, we did not think that would be a significant risk. In fact, we felt that failing to engage the FDA would be irresponsible, because it would not only put the project at risk, but it would mean that we were not doing everything we could to ensure safety.

Now that we have actually had our first meeting with the FDA and heard what their major concerns are, I am even more confident that we are on the right track. The FDA’s initial questions were mostly focused on making sure that we have good processes, procedures, and systems in place to make sure Nightscout is safe as it can be, even in rare and challenging circumstances. We share their focus on safety, and while we have already put in place systems to address most of the things they are concerned about, we are also committed to working with them to identify and close any gaps. The FDA has not yet indicated to us that they have any problems with what Nightscout is currently doing, but rather indicated they want to learn more, discuss internally, and keep communications open.

We are currently in the process of writing up formal minutes based on the notes I took at the meeting and getting those over to FDA so they can review them for accuracy. Once they approve the minutes, we plan to post them, along with the raw notes, for everyone to review.

Over the next few weeks and months, we will be undertaking an effort to document (and in some cases improve) our processes and systems. That is partly so the FDA knows we’re doing the right thing, but it’s even more importantly so that all of you, the CGM in the Cloud community, can be confident that we’re all doing everything we can to keep our loved ones safe. That is the primary goal that we all share, and #WeAreNotWaiting to make it happen.

An artificial pancreas may not be good enough – #DIYPS perspective

I didn’t expect to end up with #DIYPS when Scott and I first started building a system that would make louder CGM alarms. (If you are new to #DIYPS, read this post to learn more about it!)

But, as we added ‘snooze’ features for the loud alarms; the ability to input carbohydrates and insulin into the system; figured out that knowing your carbohydrate absorption rate is critical for managing diabetes as is the timing of the insulin activity in your body during mealtimes; and realizing that net IOB (factoring in temporary basal rates) matters…we ended up with today’s version of #DIYPS.

After the first 100 days, we knew #DIYPS was as good as the bionic pancreas was performing in clinical trials. And after several more months, I’ve had sustained results that show the value and impact of this type of system.

But, as more news and attention lately is focused on the “bionic pancreas” and APS (artificial pancreas systems), I have started to wonder… will those be good enough (for me)?

APS/bionic pancreas will not be a cure – it will not take away diabetes. It will make managing diabetes easier for many people.

But since I have #DIYPS, those systems may not be good enough (initially, for me).

The big difference between #DIYPS and APS is automation. With #DIYPS, I make all decisions and push all buttons to add or reduce insulin. There is still a “human in the loop”.

My hope would be able to add the ability for DIYPS to automatically set basal rates to zero temporarily overnight in advance of predicted low BG, to help prevent lows without having to wake up from a deep sleep and take that action myself. (And as Medtronic’s Low Glucose Suspend (LGS) technology has shown to the world and FDA, the risk of stopping insulin delivery for up to two hours while someone is sleeping is lower than it would be to continue providing insulin to them if they are not waking up and are low.)

If we’re able to make that happen with #DIYPS, I may be one of those people who doesn’t want to jump on board for day 1 of the first market available artificial pancreas system or bionic pancreas. (Although I reserve the right to change my mind :D). After all, at this point it would be a battle of the algorithms to see what system might work best for the most people. (And since I have my own algorithms that Scott and I developed, they might be better than the alternative for me.)

I also can imagine that there will be many people who won’t implicitly trust the/a system to make decisions for them all the time. They’ll still want a “human in the loop”.

#DIYPS-type systems that are “decision assist systems” may play an important role as a stepping stone platform for people to get comfortable with this new generation of technology that can predict lows and highs and make recommendations for them to take action.

Eventually, maybe everyone will be on an APS or bionic pancreas. Even setting aside the difficult questions of cost, availability, and insurance coverage, I know that one technology will not fit every person with diabetes (like how CGM in the Cloud is not for everyone); one system will not meet the needs of everyone; and none of us will be ultimately satisfied until we’ve prevented and cured all types of diabetes and eradicated the impact of any complications from diabetes.

But until we get there, #wearenotwaiting.