Diabetes is a lifelong condition with no cure. It requires constant attention from the patient and his or her environment. Now, artificial pancreas is coming into the everyday-life of diabetes patients to unburden them and enable them to live a normal life. I had a great conversation with the inventor of the DIY pancreas, Dana Lewis to get to know how it feels like to elevate life with diabetes to a whole new level.


Diabetes management faces extraordinary times with sensors and digital contact lenses but that positive future requires innovators like Dana Lewis who uses a DIY pancreas system.

Traditionally, to monitor blood sugar levels successfully, diabetes patients use insulin pumps and monitors, which send alarms if the glucose levels are too low or too high. More often than not, however, these alarms are quite inefficient. For example, they are often unable to wake up diabetes patients during the night to correct their glucose levels, risking death in their sleep.

This is exactly the reason why diabetes patients have been waiting for a long time for the so-called artificial pancreas – a closed-loop system that constantly measures blood glucose levels, that is able to administer insulin and glucagon in the right amount at the right time – so patients with this chronic illness are able to go to sleep without any worries.

There are already great examples how technology enables patients with diabetes to manage their lives easier in a sustainable way. Look at the example of Dana Lewis. She was 14 when she was diagnosed with diabetes. She, as a digital health analyist, together with her husband, Scott Leibrand, a former Twitter engineer and an expert in computer networks, decided to defy existing technology and fate and started hacking together a homemade ‘artificial pancreas’ to help Dana manage her disease.


Bionic pancreas - Dana Lewis


And it worked amazingly well! So they started to contemplate about how they could spread the great experience around. As they realized that the only obstacle in helping others suffering from the same condition is regulation – completing clinical trials, becoming FDA-approved and commercialized through traditional processes takes too much time (so it is not only an urban legend that regulation slows down innovation) – they established an open source community to offer know-how and a helping hand to anyone who is interested in creating the DYI ‘artificial pancreas’. There is also a Twitter-feed documenting the community’s efforts to make the lives of diabetes patients easier.

I got really interested in Dana’s experiences and I reached out to her to discuss how the life of a diabetes patient can change with an artificial pancreas and what challenges they face daily.


Managing diabetes is demanding and complicated. An artificial pancreas system would definitely be welcomed by the diabetes community. Why did you start working on yours? 

Artificial pancreas is one of many names for an artificial pancreas – i.e. a system that can integrate an insulin pump and CGM data and be automated to take action to help better manage changes in blood glucose levels.

I did not originally set out to create one, though – three years ago, I originally wanted to solve the problem of not hearing the alarms on my CGM. I knew that if I could get the data from my CGM in real-time (this was before Dexcom SHARE or MiniMed Connect or even Nightscout existed), I could send data to my phone or computer to make louder alarms than was possible on the existing medical device. Once I did that, I realized I wanted to share my data with others, and added buttons to prevent waking them up unnecessarily if I was taking action (thus only alarming them if I wasn’t waking up to take action).

Once I was entering data about actions I was taking, the next obvious step was building a prediction algorithm to make the alarms smarter. This enabled the system (which we called #DIYPS) to only alarm if I needed to take additional action, rather than being purely reactive and alarming without the context of other data, which is still currently the standard of diabetes care today. And a year later, we realized that combining our algorithm with other open source code to communicate and send commands directly to the pump would enable us to “close the loop”. That’s how I went from building a system to better wake me up at night to building an artificial pancreas system that allows me to sleep without having to wake up and take action for diabetes.

I knew I did not want to be the only one who has this kind of device while we are waiting for these kinds of systems to reach the commercial market in 2017-2018 and beyond. That’s why, with the partnership of the open source diabetes community who helped us get to the point of building this system, we decided to find a way to make it open source. That’s how OpenAPS, which is how we refer to the open source artificial pancreas system, was created. This enables anyone with the compatible diabetes devices and motivation to build their own system to be able to learn how to build such a system for themselves.


Hacked Raspberry Pi turned into artificial pancreas

Can you please describe your device and how it works? Also, how does it get incorporated into your everyday life?

A DIY artificial pancreas is not a medical device in and of itself. It is a system that takes your existing diabetes devices (insulin pump and CGM) and a small smart computer (Raspberry Pi, Intel Edison, or the like) and a radio stick to allow you to read data, run it through an algorithm, and send commands automatically back to the pump to adjust basal insulin rates.

You can read the reference design online and see how the OpenAPS algorithm reacts if a BG level is rising or dropping, if BG data is missing or “jumpy”, and what happens if you go out of range of the system. Because this is a DIY effort and not integrated into all-in-one device, there are many ways where you might lose communication. As a result, we specifically designed the system with all of this in mind, and only issue temporary basal rate commands to make micro-adjustments to baseline insulin levels. We never issue a “bolus” (burst of insulin at one time) through the automated system, and we calculate conservatively so that every adjustment the system makes is the safest possible thing that can be done at the time, even if that ends up being the last command it is able to send.

And if any of those issues happen and the system is powered down or you go out of range, the system reverts back to the pre-programmed basal rates. By reverting back to the “standard of care” therapy in the case of failure, you are not adding any additional risk to the equation that is life with diabetes, and you are minimizing risk when the system is operating.

An OpenAPS-based system is what is considered to be a “hybrid closed loop”. This means that users still perform meal boluses manually, to better match the timing of insulin (which often peaks around 60-90 minutes) with the timing of food (which hits the blood stream after 15 minutes). Some users choose not to perform meal boluses and allow the loop to “catch up”, but those of us seeking to eliminate meal spikes will still choose to do a meal bolus.

While I continue to issue meal boluses, OpenAPS mostly eliminates the need to do manual “correction” boluses of additional insulin, and greatly reduces the number of times I need to eat extra sugar to correct a low blood sugar level. If I keep a loop “rig” (the small computer, battery, and radio stick) in range of my pump throughout the day, or at the bedside at night, it reacts to any fluctuations by making those small adjustments, much like a normal pancreas does. This enables my BG to stay in range as much as 90-100% of the time, which is a big improvement from what I was able to achieve before I had this technology – and with a lot less effort.


I have several “rigs” – one that lives by my desk at work, one by the bedside at home, and one that I clip to my jeans whenever I am out and about; together, these enable me to be “looping” most of the time. This allows me to spend significantly less time checking my BGs and avoid making hundreds of small manual corrections or behaviour changes a day in order to help keep my BGs in my preferred target range.


Bionic Pancreas - Design


How did it improve your diabetes management and how can you measure the outcomes?

My diabetes management was significantly improved with my smart alarm system (#DIYPS), but having a closed loop system took it to the next level and significantly reduced the amount of effort required to achieve those outcomes. There are two obvious clinical outcomes: reduced average glucose level (or A1c) and increased amount of time in target range. But another important set of outcomes, by which we should be measuring medical technology are quality of life metrics like reduced time spent dealing with diabetes on the go, improved sleep, reduced stress levels, and improvement in overall quality of life.


Bionic Pancreas - Dana Lewis


These outcomes are not unique to me, though. OpenAPS is now (as of end of July, 2016) (n=1)*103+ people around the world using these types of DIY closed loop systems. We recently presented a self-reported study with outcomes from 18 of the first adopters of this type of system, and the outcomes (reported here, and as recently cited in a recent comment in Nature, and in this Letter to the Editor in the Journal of Diabetes Science and Technology) aligned with my personal experiences of A1c reduction, time in range increases, and quality of life improvements for the whole family .


In your post, you mention that you cannot distribute your device to others due to the lack of FDA regulations. What could be the solution for it?

The FDA regulates commercially-distributed medical devices, and I have not been interested in creating a company and distributing a “product”. There have been others who have done so – both Bigfoot Biomedical and Beta Bionics are two newcomer companies that have stemmed from parents in the diabetes community who were determined to bring an artificial pancreas solution to the market to help people with diabetes – and there are traditional companies that also have artificial pancreas systems in clinical trials. However, when I started this work three years ago, these systems were far off from being in the hands of people with diabetes. (In fact, they’re still not here yet – the earliest will reach the market in mid-2017, and multiple options will be 2018 and beyond.)

Our goal with OpenAPS was instead to help make safe and effective artificial pancreas technology more widely available and more quickly. We decided we will best achieve this by supporting the community through an open source approach, but not by distributing a medical device. To us, this seems to be making a bigger difference to the community than if we had launched yet another commercial APS effort, even though we are not an FDA-approved solution and are not able to “distribute” something. We have learned a lot from the community’s work: collectively we all have 240,000+ hours of closed loop experience, and individually I have personally been using a closed loop for more than 600 days. We have been sharing what we’ve learned with every commercial vendor who is interested in improving the artificial pancreas technology they are creating or helping shape the user experience and “onboarding” process to help future users of a commercial product switch from the current standard of care to a closed loop system. And in the meantime, the hundreds of users who have built their own closed loop artificial pancreas systems will continue to educate their healthcare providers and other patients on what they can expect when similar commercial systems are finally approved.

Bionic Pancreas - Quote

Dana’s example is one of the best precedents of how medical professionals could learn from their patients and also supports the statement I made previously with the help of Kubrick. Namely, physicians, care delivery experts and regulators all believe they know what’s best for patients, and almost everything, from hospital processes to new healthcare technologies is designed based on input solely from people inside the healthcare industry. However, truly visionary solutions can only be designed by the right mix of industry insiders and outside experts. Technology is already changing how we manage diseases and health – just look at the exponentially increasing number of health trackers and sensors! -, thus it is high time to learn how to get the most out of it.

The other great take-away for medical professionals should be the fact that innovation outpaces regulatory agencies and they must step their game up – otherwise such solutions as the existence of open source communities will take their place.

[The Medical Futurist]