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

Ending data-shaming: diabetes data should provide perspective, not judgment, on diabetes

Let’s end data-shaming. A1c is not only number that matters for ppl w/T1 diabetes. #DIYPS http://bit.ly/1n86Z3A @danamlewis @scottleibrand
My last A1c dropped significantly. Some of these results can be attributed to changes I’ve made with #DIYPS, like predictive alerts, alarms that actually wake me up at night, etc. (If you are new to #DIYPS, click here to read a post explaining what the system is.)

Right now, #DIYPS is still n=1 (me), so until we can have more people using the system and verifying the algorithms (click here to learn more about carbohydrate decay rates and how you can test this yourself) and showing the applicability for a wider group of people, we’ll have to wait and see how these results translate to other people. With this in mind (and with the thought that it’s frustrating that A1c is the ‘holy grail’ of diabetes), I wanted to start looking at additional ways to utilize #DIYPS data, so I had some relevant data between the CGM data and the A1c.

We added a number of additional “stats” to my #DIYPS dashboard:  I started looking at my eAG (estimated average glucose) for a single day, a week, and 30 days. We also added a % ‘time in range’ (between 70 and 150) for the same time periods.

Having this data at my fingertips thanks to #DIYPS provides a great balance between the flood of data I get every day (288 individual data points per CGM) and the three month “benchmark” of A1c.

Why these stats are helpful:

  • I can track overall average (eAG) over time, without having to wait 3 months for the next A1c value.
  • I don’t have to guess where I’m at or go borrow a Windows computer to look at my CGM data.
  • I’m not chasing a lower A1c/eAG at the expense of all else (i.e. having lots of lows). A <120 average for a week is good; but if my time in range is <80%, that’s not ideal. Finding a balance between time in range (95%+ is great, 90%+ is good, 80%+ is target) and a good eAG (<120 or <125) is the ultimate goal.
  • If I have a day with higher than usual BGs (usually resulting in a high 24 hour average and low % time in range), I can see the impact it has on a week and the month.

I am happily sharing my “time in range” and eAG numbers, because I am happy with them, and I’m able to show “what is working”. But I have often hesitated to share my A1c data publicly.

Here’s why:

I’ve observed judgments, negative comments, and changed behaviors based on people’s perceptions of what is a “good A1c” and whether someone is “in control” or not of diabetes, based on this SINGLE average of a value that can be off by as much as 0.5% depending on the lab. This comes back to what Scott and I talked about regarding carbohydrate consumption and judging what people eat.

Why do we do we allow any shaming – regarding food or based on snapshots of data – in our communities? Sometimes there is a conversation about the shaming that happens regarding food choices, but I don’t think we apply the same conversation to data-shaming. My hope is that one day, everyone feels safe sharing their A1c, or pictures of their CGM graphs, at any time – even if it’s not the outcome they were hoping for in that moment.

Diabetes is a constant learning process with constant decision-making. Why don’t we frame sharing data and perspectives like this:

  • Here’s what didn’t work today: (Image of a CGM roller coaster)”
  • “Wow, this (pre-bolusing and then xyz) worked! (Image of someone’s ideal CGM graph)”
  • “Hmm, I tried xyz, but didn’t quite work, I’m going to try xyz+1 next time (image of a spike on a CGM graph)”
  • “Just got my A1c back: X%. Helps me see that small changes are making a difference in the long run.”
  • “Just got my A1c back: X%. Brainstorming ideas with family/care team about what I can do differently.”

Will you join me in pledging to end data-shaming for PWDs (people with diabetes)?

  1. I pledge to stop making snap-judgments about other people’s diabetes data.One data point (A1c or a single BG reading) or a snapshot (3 hour or 24 hour CGM graph) does not tell the story of someone’s decision making and choices. It tells the outcomes of hundreds of decisions that we don’t know about, and hundreds of variables that someone doesn’t have control over. As it’s not our data and not our lives, we have no business making judgments regarding it.
  2. I pledge to start a conversation about data-shaming and bring awareness to this problem when I see it happening.
Please comment below if so, and share your thoughts on what else could be added to the pledge.