Nightscout

The Nightscout logo and motto/ hashtag.

Today’s weblog post focuses on Nightscout, a social movement for Type 1 diabetics, and their parents, that enables them to access and work with continuous glucose monitor (CGM) data and open-source tools, so they are better able to manage their condition. They describe themselves as CGM in the Clouds,

In healthy people the pancreas regulates blood sugar. It works continuously without intervention. Diabetics have to take control, and inject insulin using syringes, although in recent years it has become more common to use an insulin pump connected to the body and providing an even base dose. It is difficult for people to adjust insulin levels which have to continuously monitored and adjusted for the rest of the patient’s life.

There are three main types of diabetes mellitus (DM): 1) Type 1 results from the pancreas’s failure to produce enough insulin due to a loss of beta cells; 2) Type 2 begins with insulin resistance, a condition in which cells fail to respond to insulin properly, but may result in a lack of insulin, as the disease progresses; 3) Gestational diabetes occurs when pregnant women, without a previous history of diabetes, develop high blood sugar levels.

According to the IDF Diabetes Atlas, 9th edition, an estimated 463 million people had DM worldwide (8.8% of the adult population), in 2019, with type 2 making up about 90% of the cases.

Legacy medical equipment companies, much like legacy automotive companies, perpetuate their market share by making it intolerably expensive for new companies to become established. In the automotive world, this is in part because of the extreme cost of setting up manufacturing facilities. With medical equipment, it is the cost of gaining approval in assorted jurisdictions. In the USA, for example, the Food and Drug Administration (FDA) regulates the sale of medical device products. Manufacturers (or their sales agents) must present evidence that the device is reasonably safe and effective for a particular use.

The high cost of market participation, means that legacy manufacturers can avoid/ discourage innovation, which helps improve profit margins, but denies patients access to improved technology. This is what nerds, patients and relatives have now managed to solve with Nightscout, for diabetics. It is a do-it-yourself DM tech community. It first developed data-sharing tools. More recently, an open-source closed loop artificial pancreas system has been developed.

Wikipedia says that Nightscout began in 2013-02 , when the parents of a 4-year-old boy newly diagnosed with type 1 diabetes began using a CGM system. When the child was at school there was way to access this data in real time. The boy’s father, John Costik, a software engineer, developed software to access and transfer CGM data to cloud computing infrastructure. Lane Desborough and Ross Naylor added a blood glucose chart display. A community of developers emerged to make the software generally accessible. Because this software amounted to an unlicensed medical device, it was not released immediately as open source code to address legal concerns. After this was done, the combined code was released in 2014 as the Nightscout Project.

In another part of cyberspace, Loop started off as an Apple-only framework and algorithm that runs on an iPhone, worked with older Medtronic insulin pumps and requires a small box, the RileyLink, to communicate between the pump and smartphone. It was created in large part by Pete Schwamb. An unknown number of people use this technology.

OpenAPS

The Open Artificial Pancreas System project (OpenAPS) is an open and transparent effort to make safe and effective basic artificial pancreas system technology widely available. It began in 2013, when Dana M. Lewis and Scott Leibrand became aware of the software created by John Costik. The OpenAPS software can run on a single-board computer, such as a Raspberry Pi.

Lewis, who has a DM Type 1 condition, was dissatisfied with her commercial device, because its hypoglycemic status alarm was too quiet to wake her. To address this, Lewis and Leibrand extended the CGM-in-the-cloud software to create a custom high volume alarm. They then used the same CGM-in-the-cloud software to create Do-It-Yourself Pancreas System (DIYPS) software, which provided a decision assist system for insulin delivery. This become a closed loop system using open-source decoding-carelink software created by Ben West to communicate with Medtronic insulin pumps, enabling data retrieval and issuance of insulin-dosing commands to pumps that support it. With this update, the DIYPS system became OpenAPS.

Its stated aim of OpenAPS is “to more quickly improve and save as many lives as possible and reduce the burden of Type 1 diabetes.” Their website states that “community efforts will be open source and free for use for other people, open source projects, researchers, and non-profits to use, and available on an open and non-discriminatory basis for all commercial manufacturers to use in proprietary products if desired.”

OpenAPS differs from other APS currently in clinical trials in two significant ways: 1, it is designed to use existing approved medical devices, commodity hardware, and open source software, and 2. it is designed primarily for safety, understandability, and interoperability with existing treatment approaches and existing devices. Those concerned about safety issues are encouraged to read this statement of principles.

An aside: In researching this post, one article in particular highlighted the need for professionalism in the production of code. In this case, the anonymous coder was unable to understand contextual issues. Obviously, many of the projects mentioned here have been professionally run. However, it is very common to encounter code written by amateurs, that is unsuitable for real-world use. The advantage of using people with a medical condition is that they have internalized much of the contextual information needed to produce appropriate code, even if they are amateurs.

Closed loop artificial pancreas systems integrate a glucose monitor with an insulin pump, using connecting controller software (such as assorted varieties of Loop). The system’s purpose is to keep blood glucose levels within a specified desired range for as long as possible. This can reduce damage to kidneys, retinas and nerves.

Since Nightscout is Do-It-Yourself (DIY), the onus is on the user to provide and deploy any and all resources needed, such as the MongoDB database, a web host and other software. This can result in many barriers, that prevent potential users from enjoying Nightscout’s benefits.

Recently, on 2020-11-20, Medical Data Systems LLC met with and formally petitioned the FDA for clearance of the service product “T1Pal.com.” T1Pal.com is a hosted Nightscout platform that runs copies of the latest Nightscout software on its servers for the benefit of individual subscribers.T1Pal is a hosted Nightscout platform running the latest version of Nightscout on its servers. It provides subscribers with Nightscout as a Service. This means that Medical Data Systems LLC takes responsibility for maintaining and updating the site. T1Pal was designed by Ben West, a member of the original CGM in the Cloud team and lead core developer for the Nightscout Project. A subscription costs US$ 12/ month and upwards, depending on the services provided.

Tidepool

Originally, this post had intended to focus on Tidepool, a Palo Alto, California based nonprofit company founded by Howard Look in 2013. The company works with medical equipment manufacturers, such as Dexcom and Medtronic, to create interoperable automated insulin pump systems, communicating with iPhone and Android apps.

Tidepool wanted to build a database where people with insulin-dependent diabetes could store and analyse data about their condition. Its iOS and Android apps and web system, allow users to add and view CGM related data to gain better insights into their condition. This data can be shared with health personell.

As stated in the previous weblog post on telemedicine, some equipment and software providers assume they own patient data. These companies have very disturbing privacy policies. Tidepool encouraged equipment manufacturers to develop systems that would work with Tidepool software. They elminated some of the friction, by setting up a (not-for-profit) foundation to administrate collected data.

Tidepool Loop will be its next big step, What I have been unable to discover is wny users would prefer yet another open-source closed loop artificial pancrease system, where the openAPS already seems to feature one, not to mention the RileyLook.

Developing open-source software can be messy. Sometimes, work is duplicated, and at other times, nobody is doing the work at all. The people who have a vested interest in mitigating a health condition, or in the case of Type 1 diabetes, their parents, will develop breakthrough improvements that manufacturers seldom prioritize. Software is cheap to produce, especially if development time is freely given. My expectation is that additional improvements in hardware will also come in the future, as open-hardware, as increasing numbers of people invest in CNC hardware, that can build precise equipment inexpensively.

Some sources:

Off topic: Wyze Watch

This blogger has pre-ordered two Wyze smart watches using a facilitator in the United States, for delivery in 2020-03. This pre-order opportunity is restricted to addresses in USA, and is ending a week after the planned publication of this weblog post, on 2020-12-22. The unit price is about US$ 20, excluding taxes, shipping, non-black watch strap and who knows what else. These two watches will be used initially for experimental purposes.