The Twitter data your company isn’t using…yet
August 27, 2018
HumanCapitalWorks Signs Agreement with Garmin
October 11, 2018

Using Alexa as a Personal Diabetes Assistant

How we can use technology to ease the burden of diabetes management in our daily lives.

 

June 2018

The clanging of instruments in the ER jarred me from my haze. My mind was now constantly playing back the events of the previous twelve hours trying to understand it all. How did we get here and why didn’t I do something sooner? As the emergency room doctor guided the drill into my son’s leg bone to give him the urgently needed fluids — the whole experience became all too real.

This was the scene nearly three years ago as we joined a club in which we never wanted membership. At eleven months of age our son, Emmett, was diagnosed with Type 1 Diabetes. The sad truth of this club is an estimated 30.3 million Americans — or 9.4% of the population are living with Diabetes.

While today’s insulin formulations save lives, it’s difficult to achieve the tight control over blood glucose that occurs naturally in people without diabetes without knowledge of nutrition and your overall health. This lack of understanding puts individuals with T1D at risk for dangerous hypoglycemic and hyperglycemic episodes. While technological advances have helped in managing day to day Diabetes — the unfortunate reality is that the education and understanding of the disease remains very poor.

Over the years, we have assembled a collection of rules and guidelines to help us manage Emmett’s care. While we often found these guidelines successful, it became increasingly difficult to remember them, especially when you factor in all the variables included in our calculations. For example, in the all to frequent occurrence of Emmett taking down several Dunkin Donuts Munchkins (it happens, he’s a kid), I found myself not being able to recall the formula, not to mention the parameters we used in the past to prevent a Blood Glucose spike. We would try to calculate and remember a formula parameterized by many variables including: 1) nutritional elements (Sugar, Protein, Carbs, Fat), 2) time of day, 3) insulin/carb ratios, 4) insulin in his body, 5) sleep and 6) activity. In addition, the outputs of the formulas wouldn’t just be an insulin amount but also how much should be given at the current moment versus spread out over the following couple of hours.

Born out of frustration, I built an Alexa skill to relieve some of the burden. After creating an AmazonWebServices environment with the necessary infrastructure, writing scripts, loading in data and connecting to the necessary APIs, I was able to achieve the desired functionality. Now, we can now go to Dunkin Donuts and use my phone to engage Alexa with statements like “I am going to eat a large chocolate donut from Dunkin Donuts” or “I am going to eat 30g of a chocolate donut” or some derivative of this statement even without a size/quantity modifier. Alexa will then use the parameters to dynamically create formulas that will generate a treatment plan for the donut and subsequently send the plan to us in a text message. All information and communication with Alexa is then logged for further analysis.

Example of text message containing calculated insulin treatment

Unfortunately, Diabetes care and management isn’t so simple as to come down to a few formulas. As we are starting to gather more information about Emmett, his habits, the foods he eats and how his body tends to react to foods we can start to modify our algorithms. The real power of our solution and where we are spending our time researching is using statistical analysis to continuously improve Alexa’s output. In actuality, we are building the logic into functions Alexa interacts with to learn how to provide better treatment for Emmett from the collected data. While this type of analysis would be an interesting application of AI and the powers of Deep Learning, the reality is we don’t have the data to make use of such techniques. However, we have had promise in the area of statistical learning to further understand and improve his day-to-day care. While we are still in the early stages of the dynamic formula generation, our efforts look promising.

Using Emmett for treatment plan and history

 

Treatment Analysis

Another tool or “intent,” in Amazon Alexa parlance, we frequently use is analysis of our algorithm’s recommended treatments. By engaging with Alexa with the keyword “History” and supplying her with the food of interest, a function will run calculations on observations associated with this food. With this functionality, we observe the change in Emmett’s blood glucose (bg) level from a food at time (t) to discrete time windows at t+ 1hour, t+ 2hours, t+3hours. At these time windows we get reports of indicators like range, volatility and beta of his bg versus time. We have parameters that allow for classification of the observed statistical output into categories of Poor, Fair and Good representing the effectiveness of our recommended treatment when he eats certain foods

This intent allows us to have an expectation as to how effective the treatment will be before administering the recommended dosage of insulin. In addition, the classification also highlights areas of research and events that should have a larger weight in our statistical analysis.

Day-to-Day Support, Help, and FAQs

Finally, we loaded best practices for events and scenarios that might occur in day to day Diabetes management. The best practices, stored in our AWS environment are queried by Alexa after being engaged by the user through the keyword, “Support”. Our library will allow for a simple question to be spoken to Alexa to allow for querying and retrieval of information matching the phrase of interest. For example, “Dexcom Continuous Glucose Monitor isn’t working” and Alexa will respond with tips for fixing the issue. For more day-to-day issues, Alexa refreshes our memories on things that have worked in the past. Some of these things might seem simple, but in the middle of the night, when you aren’t necessarily fully alert, these tips can be a big help.

The Future

My wife and I, and for that matter my entire family, are actively involved in organizations that are doing amazing research in diabetes. These organizations are essentially working towards a cure of this disease. Our Emmett Alexa skill is in no way a cure-all. To us, it is about doing everything we can towards making our son’s life a little easier until the day comes when there is a cure. Until that day, we focus on making small, positive changes thru projects like this. As parents of a diabetic, we celebrate the small victories like shaving a tenth of a point off his A1C. Like millions and millions of people out there that suffer from chronic illnesses, even as technology gets better helping our day to day care, it is always important to celebrate those small victories.

Get involved

My day job is leading the development of AI enabled applications. My day, afternoon, and night jobs are being a father of a child battling type 1 Diabetes. Medical doctors are given little exposure to the complexities of diabetes management and how to improve patient outcomes. While working on an Alexa Performance Management skill for my company, HumanCapitalWorks, I wondered if I could do something for my son and all the other people struggling with diabetes. After talking it over with the executive team, they encouraged me to take time and see what I could do. “Emmett” is the result. It’s already helping my family and we are going to continue working so it can help yours too.

Call to action

We have added functionality to our skill allowing for on-boarding of additional users. After enabling our Emmett Skill, Alexa will prompt the user with questions that will customize their experience. We have begun beta testing with a few users and are looking for feedback on the skill. If you are interested in participating in beta testing contact us at dkorelitz@humancapitalworks.com.