#DIYPS and the wedding

“Diabetes wasn’t in the picture during the wedding, and that was exactly how it should be.”

Dana Lewis and Scott Leibrand said "I do!"

 

If you’re not familiar with Scott & me (Dana), and how we ended up building #DIYPS and later #OpenAPS, you might be interested to read this great article in Business Insider. (And I’ve been told it’s guaranteed to make you go “awww” even if you already sort-of know us!)

I love that it also highlights how #DIYPS played into our wedding, which was exactly how I wanted it: I hardly thought about diabetes at all. I didn’t have to cut into the lining of my wedding dress to carry d-supplies. In fact, up until the last minute, I wasn’t sure if I was going to carry the closed loop during the wedding itself, because I had decided not to put pockets in my dress and I wasn’t sure Scott’s suit had big enough pockets to hold everything.

But just like all things in this #DIYPS and #OpenAPS journey, a couple of serendipitous events gave us our solution.

First, we were in Alabama for the week before the wedding, and I was working a few days remotely there. But I like to move while I work, and so I’d move around the house (and go outside) with my laptop while I was on calls. This led to Scott getting no data alerts and no-loop-running alerts, and randomly chasing me down to re-plunk the loop down into range. Finally, he asked if I would consider a fanny pack. I laughed, and told him no way, and that HE should wear a fanny pack. Then I remembered hearing about flip belts and thinking about getting one at one point to try for running. So, we made a quick Amazon purchase (where all great artificial pancreas parts come from ;)).

Scott probably thought he’d get me to wear the flip belt around the house (it is purple, after all), and maybe at the wedding, but when it arrived two days before the wedding and I was busy working, he actually put it on, placed all the loop parts inside, and then decided to try putting his tux coat on over it.

It didn’t show.

And this is how *Scott* ended up wearing the belt and the AP parts during the wedding (he’s wearing it above and you can’t see it!). I obviously was stilling wearing my pump and my CGM sensor under my dress where it wasn’t showing. We also gave my second CGM receiver to Tim ( Scott’s brother and best-man-extraordinaire), who also wore Scott’s watch for much of the day and helped give me updates on my BGs when Scott & the loop were out of range prior to our “first look”.

As a result of having #DIYPS/#OpenAPS, my BGs had been picture perfect the night before the wedding, and were within range all afternoon leading up to the wedding. (They were fine during and after the wedding, too, so much so that it never occurred to me to take more pictures of my graph, which shows how perfect it was to have diabetes not on my mind!)

This may have been (one of) the first wedding(s) with an artificial pancreas in it, but we bet it won’t be the last – one of our friends in the Seattle area who is now up and running on #OpenAPS is also getting married next month, and he may wear his loop during his wedding, too!

We like this trend.

What we’ve been up to – mostly offline #OpenAPS

It’s probably time for an update around here – especially since we’re nearing the “deadline” we set for closing the loop – August 1, 2015!

August 1 is our wedding date, which is part of the reason it’s been quiet around here as we are off busy preparing for that.

The other reason it’s been quiet (unless you follow me on Twitter and see some of the #DIYPS examples there) is because we closed the loop back in December (read more about it here), and we haven’t made any significant updates to the #DIYPS system.

It’s all working well.

Showing a relatively flat CGM graph despite a 75 gram carbohydrate meal, thanks to OpenAPS.

What we’ve been focusing on most of the year is supporting the #OpenAPS community. In particular, we’re trying to help more people learn what they need to understand so that they can build their own loops. There’s a handful who have made or are making excellent progress, and hopefully we’ll have some OpenAPS data to share soon.

Most recently, spotty hotel internet in Portugal helped prompt us to finish the offline version of #OpenAPS, which I’ve been testing. (And will use the honeymoon, wherever that ends up being, as an opportunity for more testing!) #DIYPS has always required internet connectivity to get the recommendations from the cloud (which is where it stores the data I give it about boluses and carbs). The reliance on connectivity is always something to troubleshoot if the system appears to not be working, and also makes it burdensome to carry around all the time and make sure it has connectivity.

Getting offline looping of CGM data to OpenAPS.

Offline OpenAPS will likely solve a big part of the frustrations I experience with daytime use of the system. I already saw a big improvement in being able to use offline OpenAPS in Portugal – both at the conference and in the hotel, as well as walking the streets of London during a layover. It’s nice to drop the system (the same Raspberry Pi, battery, and carelink stick from DIYPS) in my bag and not have to constantly check to make sure the wifi hotspot is connected. The only difference in the setup is that one of my CGMs is plugged directly into the Raspberry Pi.

Showing my OpenAPS rig against the plane window to illustrate offline steam of BGs to OpenAPS is working

We still need to do more testing on our offline implementation of OpenAPS, but it’s going well and I’m excited that what we’ve learned from this progress will help us with better tools to enable the broader OpenAPS community since #WeAreNotWaiting!

“Making” and “DIY”ing – continued

I had a conversation this week with someone in the CGM in the Cloud Facebook group, after they indicated they wouldn’t be (or maybe weren’t interested in) joining the “dev” group for #OpenAPS – and it’s a conversation I find myself having often. Here’s what I usually end up saying, when someone says they’re not a “dev” or “not an engineer” or something similar:

“I’m not a formally trained developer/coder/engineer, either… but I keep telling people, many people in this project aren’t- it’s a passion project where we learn what we need to learn to do the things we want to do. It’s fine if someone chooses not to do something, but I encourage everyone to not let labels or perceptions of traditional roles stop them from jumping in and giving it a try to see what they can learn and thus do! Especially with this awesome supportive community of people willing to help you as you go.”

This also came up when we were discussing what it takes to be a “maker” on TEDMED’s #GreatChallenges live panel today. One of my excellent fellow panelists (Cole) pointed out that pretty much everyone is a maker – whether you tweak a recipe, work with wood, or find any kind of workaround of any sort to make things work. (Which in my mind makes every single person with diabetes a “maker” and probably anyone with any disease or health care condition that they live with.)

I previously wrote about what it takes to DIY from a DIYPS and #OpenAPS perspective (and why that’s important), but I think it holds true across any aspect of diabetes or any other disease state – and definitely beyond healthcare:

Passion, persistence, and willpower needed.

So please, don’t let labels stop you from DOING. You can learn whatever tech skills you set your mind to. You can find numerous ways to solve a problem, whether it’s on your own or by partnering with someone else – and there’s plenty of people with the skills who are willing to help you learn, too.Remember, we started building #DIYPS to make louder CGM alarms. Scott and I have both learned numerous new things and new programming languages and skills along the way as we went from alarms to an alert and recommendation system to a closed loop artificial pancreas (and now people who own 4 Raspberry Pis). We didn’t come to the table with knowledge of everything we needed to know to do what we first wanted to do – and we’re definitely still learning a dozen or more things (programming languages, new software, etc.) along the way as we continue with #OpenAPS. We also didn’t know anything previously about working directly with the FDA – and now we are, on a number of projects, in order to help scale from n=1 of a DIY artificial pancreas to many n=1s around the world.

You can do this. Bring your passion, and go do great things!

#WeAreNotWaiting, are you?

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.”

#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).

What is #DIYPS (Do-It-Yourself Pancreas System)?

#DIYPS (the Do-It-Yourself Pancreas System) was created by Dana Lewis and Scott Leibrand in the fall of 2013.

Curious about building a closed loop for yourself? Head to OpenAPS.org!

#DIYPS was originally developed with the goal of solving a well-known problem with an existing FDA-approved medical device. We originally set out to figure out a way to augment continuous glucose monitor (CGM) alerts, which aren’t loud enough to wake heavy sleepers, and to alert a loved one if the patient is not responding.

We were able to solve those problems and include additional features such as:

  •  Real-time processing of blood glucose (BG), insulin on board, and carbohydrate decay
  •  Customizable alerts based on CGM data and trends
  •  Real-time predictive alerts for future high or low BG states (hours in advance)
  •  Continually updated recommendations for required insulin or carbs
  • ..and as of December 2014, we ‘closed the loop’ and have #DIYPS running as a closed loop artificial pancreas.
  • (And, as of February 2015, we also launched #OpenAPS, an open and transparent effort to make safe and effective basic Artificial Pancreas System (APS) technology widely available. For more details, check out OpenAPS.org)

You can read this post for more details about how the #DIYPS system works.

While #DIYPS was invented for purposes of better using a continuous glucose monitor (CGM) and initially tailored for use with an insulin pump, what we discovered is that the concepts behind #DIYPS can actually be used with many types of diabetes technology. It can be utilized by those with:

  • CGM and insulin pump
  • CGM and multiple daily injections (MDI) of insulin
  • no CGM (fingerstick testing with BG meter) and insulin pump
  • no CGM (fingerstick testing with BG meter) and multiple daily injections (MDI) of insulin

Here are some frequently asked questions about #DIYPS:

  1. Q:I love it. How can I get it?A: #DIYPS is n=1, and because it is making recommendations based on CGM data, we previously have said that we can not publicly post the code to enable someone else to utilize #DIYPS as-is. There’s two things to know. 1) To get some of the same benefits from #DIYPS as an “open loop” system, with alerts and BG visualizations, you can get Nightscout, which includes all of the publicly-available components of #DIYPS, including the ability to upload Dexcom CGM data, view it on any web browser and on a Pebble watch, and get basic alarms for high and low BG – and depending on which features you enable, you can also get predictive alarms. Some of the other core #DIYPS features (“eating-soon mode“, and sensitivity/resistance/activity modes) are now available in Nightscout. 2) If you are interested in your own closed loop system, check out OpenAPS.org and review the available OpenAPS documentation on Github to help you determine if you have the necessary equipment and help you determine whether you want to do the work to build your own implementation.
  2. Q: “Does #DIYPS really work?”A: Yes! For N=1, using the “open loop” style system with predictive alerts and notifications, we’ve seen some great results. Click here to read a post about the results from #DIYPS after the first 100 days – it’s comparable to the bionic pancreas trial results. Or, click here to read our results after using #DIYPS for a full year. We should probably update this to talk about the second year of using #DIYPS, but the results from the first year have been sustained (yay!) and also augmented by the fact that we closed the loop and have the system auto-adjusting basal rates while I sleep.
  3. Q: “Why do you think #DIYPS works?”A: There could be some correlation with increased timed/energy spent thinking about diabetes compared to normal. (We’d love to do some small scale trials comparing people who use CGMs with easy access to time-in-range metrics and/or eAG data, to compare this effect). And, #DIYPS has also taught us some key lessons related to pre-bolusing for meals and the importance of having insulin activity in the body before a meal begins. You should read 1) this post that talks about our lessons learned from #DIYPS; 2) this post that gives a great example of how someone can eat 120 grams of carbohydrates of gluten-free pizza with minimal impact to blood glucose levels with the help of #DIYPS; 3) this post that will enable you to find out your own carbohydrate absorption rate that you can start using to help you decide when and how you bolus/inject insulin to handle large meals or 4) this post talking about how you can manually enact “eating-soon mode”. And of course, the key reason #DIYPS works (in open loop mode) is because it reduces the cognitive load for a person with diabetes by constantly providing push notifications and real time alerts and predictions about what actions a person with diabetes might need to consider taking. (Read more detail from this post about the background of the system.)
  4. Q:Awesome!  What’s next?A: If you haven’t read about #OpenAPS, we encourage you to check it out at OpenAPS.org. This is where we have taken the inspiration and lessons learned from using #DIYPS in manual mode (i.e. before we closed the loop), and from our first version of a closed loop and are paying it forward with a community of collaborators to make it possible for other people to close the loop! Some new features we wanted for #DIYPS that will likely still happen, but integrated with Nightscout and/or #OpenAPS include:
    • calculation of insulin activity and carb absorption curves (and from there, ISF & IC ratios, etc.) from historical data
    • better-calibrated BG predictions using those calculated absorption curves (with appropriate error bars representing predictive uncertainty)
    • recommendations for when to change basal rates, based on observed vs. predicted BG outcomes
    • integration with activity tracking and calendar data
    • closing the loop – done as of December 2014! :) and made possible for more than (n=1) with #OpenAPS as of February 2015

    We also are collaborating with medical technology and device companies, the FDA, and other projects and organizations like Tidepool, to make sure that the ideas, insights, and features inspired by our original work on #DIYPS get integrated as widely as possible. Stay tuned (follow the #DIYPS hashtagDana Lewis & Scott Leibrand on Twitter, and keep an eye on this blog) for more details about what we’re up to.

  5. Q: “I love it. What can I do to help the #DIYPS project? (or #openAPS)”A: #DIYPS is still a Dana-specific thing, but #OpenAPS is open source and a great place to contribute. First and foremost, if you have any ability to code (or a desire to learn), we need contributors to both the Nightscout project as well as #OpenAPS. There are many things to work on, so we need as many volunteers, with as many different types of skills, as we can get.  For those who are less technical, the CGM in the Cloud Facebook group is a great place to start. For those who are technical and/or want to close the loop for themselves, check out OpenAPS.org, join the openaps-dev google group, and hop on the #intend-to-bolus channel on Gitter. If you want to contact us directly, you can reach out to us on Twitter (@DanaMLewis @ScottLeibrand) or email us (dana@openAPS.org and scott@openAPS.org). We’d also love to know if you’re working on a similar project or if you’ve heard of something else that you think we should look into for a potential #OpenAPS feature or collaboration.

Dana Lewis & Scott Leibrand