Building Online Communities: OpenAPS

The Open Artificial Pancreas System, or OpenAPS, is an open source project and global community dedicated to making advanced diabetes management technology available to more people living with the condition. Through a collaborative open source approach, OpenAPS enables individuals to build DIY "artificial pancreas" systems using existing medical devices, open source software, and cloud-based data sharing platforms.

Understanding the Diabetes Challenge

To grasp the significance of OpenAPS, it‘s important to first understand the challenges of living with type 1 diabetes. Type 1 diabetes is an autoimmune disease in which the pancreas stops producing the hormone insulin, which is essential for allowing cells to absorb glucose from the bloodstream for energy.

Individuals with type 1 diabetes must take on the role of their pancreas by regularly monitoring blood glucose levels and administering precise doses of insulin, either through injections or a wearable insulin pump. This is a 24/7 responsibility involving constant vigilance and dozens of dosing decisions every day in response to food intake, physical activity, stress, illness, and other factors. It‘s especially challenging to manage glucose levels overnight while sleeping.

Managing type 1 diabetes places a major cognitive and emotional burden not only on those directly impacted, but their families and loved ones. While diabetes technology has advanced significantly in recent decades, the daily experience for most still involves a lot of manual effort and interruptions.

The Artificial Pancreas Concept

The concept of an artificial pancreas aims to ease the burden of diabetes management by automating insulin delivery in response to real-time glucose data. An artificial pancreas system integrates three main components:

  1. A continuous glucose monitor (CGM) that measures glucose levels in interstitial fluid via a small sensor worn on the body
  2. An insulin pump that delivers insulin subcutaneously through a cannula
  3. An algorithm that analyzes CGM data and instructs the pump to adjust insulin dosing accordingly

In essence, an artificial pancreas closed loop replicates the function of a healthy biological pancreas by modulating insulin delivery in response to the body‘s constantly changing glucose levels and insulin needs. While commercial artificial pancreas systems are still in development and not widely available, the diabetes community has innovated to create open source artificial pancreas solutions using existing devices, a movement known as "We Are Not Waiting".

The Birth of OpenAPS

The origins of OpenAPS trace back to 2013 when Dana Lewis, a type 1 diabetic and tech professional, started experiencing issues with her CGM‘s alarm system failing to wake her up at night when her glucose levels were out of range. Familiar with the Nightscout project, an open source system for remote monitoring of CGM data, Dana forked the code to create a custom iOS app with louder, more persistent alerts.

Building on this initial "DIY" solution, Dana connected with others in the diabetes community exploring homemade closed loop technology, including developer Ben West and Scott Leibrand. In 2015, they decided to release a reference design called OpenAPS to enable anyone with compatible devices to implement a DIY hybrid closed loop.

While OpenAPS does not offer a downloadable turnkey "product" due to regulatory restrictions on distributing medical devices, the community openly shares documentation, code, and support to enable tech-savvy individuals to build and maintain their own systems. The fundamental goal of OpenAPS is to accelerate progress in artificial pancreas technology and make it available to more people with diabetes unwilling to wait for official commercial solutions.

How OpenAPS Works

On a technical level, OpenAPS leverages existing, commercially available insulin pumps and CGMs in conjunction with a microcomputer like a Raspberry Pi and open source software to create a DIY closed loop. Here‘s a step-by-step breakdown:

  1. The individual wears a compatible insulin pump and CGM device that collect data on insulin dosing and glucose levels. Popular choices include older Medtronic pumps and Dexcom CGMs.

  2. OpenAPS code running on a Raspberry Pi retrieves glucose data from the CGM via Bluetooth or a USB radio stick at regular intervals (e.g. every 5 minutes).

  3. The OpenAPS algorithm analyzes the CGM data and calculates recommended insulin dosing adjustments (e.g. temporary basal rates or small boluses) using oref0 (reference design zero).

  4. The recommended dosing commands are transmitted from the Raspberry Pi to the user‘s insulin pump via radio frequency or Bluetooth, depending on the pump model.

  5. The pump receives and implements the commands to adjust insulin delivery, thus completing the closed loop.

  6. The system continues this cycle of glucose monitoring, prediction and adjustment on an ongoing basis, generating copious data that can be logged and visualized for later review.

Key hardware components of an OpenAPS setup typically include:

  • A small portable computer like a Raspberry Pi or Intel Edison
  • A compatible battery-operated insulin pump (e.g. older Medtronic models)
  • A CGM device and transmitter (e.g. Dexcom G4/G5/G6)
  • A radio stick (e.g. CareLink USB stick) or Bluetooth adapter to enable communication between components
  • A custom "RileyLink" device to bridge communication between some pumps and the Pi

On the software side, OpenAPS is powered by a suite of open source tools including:

  • The core openaps toolkit that provides the basic commands and building blocks
  • oref0 (reference design zero), the key set of algorithms for interpreting glucose data and dosing recommendations
  • Nightscout for cloud-based logging and visualization of closed loop data
  • Various tools for device communication, interoperability, and remote monitoring

Together, these components form a DIY system that closely resembles a biological pancreas for individuals with type 1 diabetes. While not a officially-approved medical product, OpenAPS represents a major community-driven innovation helping hundreds of people better manage their condition.

The OpenAPS Community

Since the release of the first OpenAPS reference design in 2015, the community has grown to encompass hundreds of individuals around the world, including developers, engineers, medical professionals, and individuals with diabetes and their families. As of March 2021, over 1,445 individuals worldwide are known to have built and be using some form of OpenAPS.

The community collaborates and shares knowledge primarily through Gitter chats, GitHub repositories, and in-person events. On Gitter, the "intend-to-bolus" room acts as the central hub for those looking to build an OpenAPS setup, troubleshoot issues, and discuss hardware/software development. The OpenAPS documentation is hosted across several GitHub repositories and constantly evolving as new devices and software features are introduced.

Some key contributors and leaders in the OpenAPS community ecosystem include:

  • Dana Lewis (@danamlewis): Founder of OpenAPS and creator of the original #DIYPS system in 2014
  • Ben West (@bewest): Developed core OpenAPS oref0 algorithms and toolset
  • Scott Leibrand (@scottleibrand): Early OpenAPS developer and Dana‘s husband
  • Pete Schwamb (@ps2): Created open source RileyLink device to bridge older Medtronic pumps and devices
  • Chris Hannemann (@channemann): Developed OpenAPS oref0 and Autotune algorithms

Additionally, the community includes dozens of developers who have contributed to the core code, documentation, and auxiliary tools, along with hundreds of users who actively participate in troubleshooting and supporting each other through the build process and daily use.

Several factors contribute to the sustained growth and success of OpenAPS as an open source community:

  • A clear shared mission to reduce the burden of type 1 diabetes that resonates on a deeply personal level
  • Leveraging existing approved devices and building on prior open source projects like Nightscout
  • A core group of dedicated contributors with deep technical and personal experience in diabetes
  • Comprehensive documentation, guides, and a staged "ramp up" path to help more individuals get started
  • Use of free, public collaboration platforms like GitHub, Gitter, and Facebook to organize and support the community

At the same time, operating in the highly-regulated world of medical technology introduces challenges:

  • Lack of a plug-and-play product due to restrictions on distributing unapproved medical devices
  • A complex initial setup that requires a non-trivial level of technical ability
  • Heavy reliance on a relatively small number of core developers and maintainers
  • Perceived and actual liability concerns for those choosing to use these systems
  • The requirement for each user to build and maintain their own system

As the community grows, these challenges will need to be carefully navigated to bring open source APS technology to the mainstream. Nonetheless, OpenAPS has unquestionably accelerated the development of artificial pancreas systems and demonstrated the immense power of open collaboration in healthcare.

The Future of Open Source Healthcare

The OpenAPS model of patient-driven, open source innovation has major implications for the future of healthcare. As medical technology becomes increasingly software-driven and internet-connected, the ability for patients to access and build on the underlying code introduces new possibilities for customization, experimentation, and rapid improvement.

OpenAPS has already inspired related open source projects to bring APS technology to new platforms and populations, such as AndroidAPS and Loop. The core approach pioneered by OpenAPS of combining off-the-shelf devices, DIY hardware, and open source software to enable a patient-driven closed loop system could be adapted for other chronic conditions such as heart disease or Alzheimer‘s.

At the same time, traditional medical device manufacturers are beginning to embrace interoperability and enabling "open" third-party innovation on top of their hardware and software platforms. In 2020, prominent insulin pump maker Insulet launched its Omnipod 5 platform with the explicit goal of "opening the pathway to APS innovation". Dexcom, Abbott, and Medtronic have also released APIs and SDKs to enable third-party developers to access CGM data.

This convergence between grassroots patient innovation and traditional medical device development hints at a future in which open source projects like OpenAPS work alongside and even collaborate with established companies to bring new solutions to market faster. Open communities like OpenAPS are well-positioned to focus on unmet patient needs, fast iteration and novel use cases, while commercial firms can provide the resources, expertise and infrastructure to support widespread adoption.

Realizing this future will require reforms to regulatory and legal frameworks to support patient-driven innovation, as well as a commitment to user empowerment and open standards across industry. It also demands that open source healthcare communities like OpenAPS prioritize diversity, equity, and inclusion to ensure that the benefits of innovation are accessible to all patients regardless of technical skill or socioeconomic status.

Ultimately, the story of OpenAPS powerfully demonstrates that patients empowered by open source technology can play a leading role in driving medical progress. As healthcare becomes increasingly digitized and democratized, one can imagine a not-too-distant future in which patient-driven communities like OpenAPS work hand-in-hand with researchers, clinicians, and industry to accelerate the development and dissemination of life-changing solutions across a wide range of conditions.

You can learn more about OpenAPS and how to get involved at OpenAPS.org and the OpenAPS GitHub repo. For more background, check out Dana Lewis‘ book "Automated Insulin Delivery: How artificial pancreas "closed loop" systems can aid you in living with diabetes" and the OpenAPS Data Commons showcasing real-world outcomes from the community.

Similar Posts