Tuesday, December 16, 2014

Borrowed Time

“Wait, what are you talking about, we decided!?
My best interest?! How can you know what's my best interest is?
How can you say what my best interest is? What are you trying to say, I'm crazy?” - Mike Muir

A scant hundred years ago, my beloved baby girl would be dead. From this point forward, she is living on borrowed time. She was diagnosed with Type 1 Diabetes at the tender age of five and a half years old. Prior to the advent of Insulin Therapy, the average life expectancy was 1.4 years after a diagnosis was made. The little girl who was full of life and curiosity and who continually insisted she was never tired, would have grown more and more lethargic until the glucose she could not process internally ate away at her organs and ultimately took her life.

Words cannot express the gratitude that I have to the Dr. Frederick Banting (http://www.diabetes.co.uk/insulin/history-of-insulin.html) and the early pioneers of this life giving treatment. However, even after insulin therapy was introduced, the life expectancy of a diabetic was found to be less than the general population’s by over twenty years (http://www.diabetes.co.uk/diabetes-life-expectancy.html). Years of higher levels of glucose, hypoglycemic incidents, and the ups and downs of injected hormones take their toll.

In a span of less than a hundred years, the life expectancy went from 1.4 years from diagnosis to twenty years below average. The good news is that the gap in life expectancy is continually shrinking. Advances in monitoring and using insulin are helping to dramatically increase the life expectancy and quality of life of those affected.

A few months after Zoe’s diagnosis, I stumbled across this article about Bret Michaels’ (front man for the glam rock band Poison):

I was shocked to know that as a young child, Bret received a single shot of insulin. There was no mention of using a glucometer or adjusting the dosage based on carbohydrate intake. Even at one year into it, we have adjusted my daughter’s course of treatment several times, continually check her glucose, and get quarterly A1C’s to ensure that she is as close to her target as possible. With the improvement in insulin and monitoring, it’s no wonder that diabetics are not just living longer, but can control the disorder and lead normal lives.

As diligent as we have been as her primary caretakers and her de facto pancreas, her mother and I have not been great about logging the multiple checks on the glucometer. I would dare to say that no one really is. Even if we were to log every finger prick, we would have a series of data points spread out over several hours that tell a very incomplete story.

The incompleteness of the data has changed recently as my daughter received a Dexcom Continuous Glucose Monitor. Just having the monitor was a big improvement. There was an incident where she had a low on the bus and the monitor sounded the alarm as she was starting to feel dizzy. The nurse was able to get some glucose in her as soon she got to school and she went about her day.

Even better than a single device worn on the hip of a six year old was the concept of taking the data, in all of its completeness and glory, and allowing her various caregivers to see the total story of her glucose and trends throughout the day. A friend tipped us off to the Nightscout project (http://www.nightscout.info/) and I was off and running. Now, my daughter has placed her Dexcom monitor coupled to a dedicated Android phone in a newly acquired and suitably fashionable purse and we can see her current reading and her trends wherever we happen to be. Often times, I sit at work and point a browser to the website that I had cloned and watch her glucose move up and down. More than once, I spotted a hypo coming on and was able to call the school and make sure it was treated before it became serious. Yet this behavior was actually berated by the CEO of the very company that makes the monitor.

https://www.youtube.com/watch?v=WUT5QszkNXM&app=desktop

The insulin that prolongs my daughter’s life has the potential to put her into a coma. This is literally life or death here and a six year old does not have the capability to handle this on her own regardless of her high intelligence and responsibility - the fact remains that she is six.

Further, access to the data helped me to treat our girl. I started taking “pre-bolusing” more seriously, making sure that she stayed in a lower range, and seeing a dramatic improvement in her levels at night secure in the knowledge that if she drifted anywhere near a dangerous level I could intervene (and we have). At her last appointment with the endocrinologist, Zoe’s A1C (a measure of her three month average glucose level) was at its best in the year and change since diagnosis. None of this would have been possible without the CGM nor the freely available software that I cloned and grown reliant on.

Even though the software from the Nightscout project is freely available, my wife and I wound up buying the Dexcom SHARE product. The thought was we could use it at night while the Dexcom monitor charged and it would be useful in providing push alerts to our iPhones (we are unapologetically an iPhone family). We were hopeful that since the SHARE product was created by the Dexcom manufacturer that it would be a little bit more polished and useful than the free stuff provided by the Nightscout folks. We were sorely disappointed.

For starters, the cradle that the monitor must be placed in is huge and requires a constant source of A/C power making it impossible for our daughter to use it at school or playing in the neighborhood. The only use for it was when we were in our own home where we could monitor her fairly easily even without the SHARE. Then there was the issue of notifications… The only way to get an alert would be to download the Dexcom “Follower” application, which is only available on iOS products, requires configuration, and conflicts with Apple’s do not disturb settings. There was something about the way that notifications were handled that truly bothered me, so I thought I could do better.

The folks at Nightscout built in a ReST API for the uploader that I figured I could take advantage of. To the non-techies, ReST is quickly becoming a standard way to share information between different devices and systems by placing information into an agreed upon format and sending it over http(s). I created a dummy listener service and placed it on AWS and pointed the Android phone to my new server. After a minute or so, I had captured the payload in the ReST call and quickly identified the information I was after. Every five minutes, my server was getting information that had my daughter’s current glucose and the direction that she was trending.

On Saturday, I decided I was going to do something with all of this and quickly built an application that took a look at the current reading and direction and then sent a text message if she was below 80, on a dreaded “double down” (glucose dropping very quickly), or if she was over 300. I probably spent about forty-five minutes writing, testing, and then deploying the application. Later, I completely forgot about it and we decided to take the kids to see the Austin Trail of Lights.

There was a mix up with the parking situation and we wound up walking quite a bit more than I had anticipated. As we got somewhat near the car to go home, both my wife and I received text messages saying that Zoe was on a double down. My little messaging service and Zoe’s glucometer knew she was rapidly dropping even before she did! Instead of our little girl getting lethargic and feeling horrible, I found a place for my wife to watch the kids, gave Zoe a glucose tablet, and I went to get the car and pick them all up.

That night, after the kids went to bed, I added some functionality so that the service would actually call my phone between 10PM and 7AM, that way I could continue to use Apple’s do not disturb functionality, but with my service as a favorite - the call would go through and wake me up if Zoe needed attention. A few days later, Zoe dropped into the 70s at 5AM on a school day. My phone woke me from a slumber playing Journey’s “Urgent” (my custom ringtone for that number) and I helped a groggy little girl eat some glucose tablets, get to a decent level, and make it to school without missing much of a beat.

For the first time in my life, rather than try and come up with a way to make a quick buck, I decided I was going to give this away just like the Nightscout folks and give back to the community of hard working parents like us. So, I got up in the morning and tried moving my messaging server from the host it was residing on which had a cost of $35/ month to a different hoster that cost $5/ month. This process took me hours, it was orders of magnitude harder than writing the application in the first place, and I am doubtful that I could write down the steps to get it to deploy. I am a fair to midland developer, but I hate doing system administration. I couldn’t imagine handing a non-professional my code, tell them to modify these places in my files, and then faithfully follow a twenty page deployment guide. I felt the community would be better served if I created a centralized application that could read the Dexcom’s serial number, send alerts based on custom rules, and handling all the administration and IT.

I posted about it and heard several parents say it sounded cool and they wanted in. The developers who created Nightscout then cautioned me about HIPAA and the FDA. So here’s the deal with the well intentioned HIPAA, it sounds good on paper - hey who doesn’t want privacy, but it is causing unintentioned consequences. The data captured on the Dexcom device belongs to my daughter. Seeing that she is a minor, as her guardians, my wife and I have legal decision making power concerning that data. I have spent a considerable amount of time questioning how this data could possibly be used for some nefarious purpose and have come to the conclusion that it cannot be. I would gladly donate this data to anyone who wanted to use it for any purpose. If others were willing to do the same, it is possible that the data could be aggregated and trends could be spotted which could lead to improvements in insulin therapy. We could learn more about the effects of puberty and insulin resistance, when hypos are most likely to occur, and a million other answers that cannot be provided without large volumes of data. There is no risk here.

Recently, my wife saw our daughter heading into dangerous territory and called the school nurse. The nurse said that Zoe was sitting in her office and she had seen the same trend since she had our Nightscout service running on her computer. I did not find a school nurse, charged with the task of administering insulin and monitoring our daughter during school hours, looking at my beloved’s numbers a violation of privacy. I found this to be an example of someone doing their job to the best of their ability and utilizing all tools at their disposal. I am downright thankful that the nurse was looking at this data.

Every time we have used the Dexcom device combined with the Nightscout software, we are helping our daughter manage the highs and lows of her disorder. Every hypo caught early is shrinking the gap in life expectancy. Although she is too young to appreciate this, the Dexcom plus Nightscout is helping to give her a better life. I no longer have the need to interrupt her during play and demand that I prick her finger just so I know what her glucose number is. I no longer have anxiety that my six year old wants to ride her scooter with friends in the cul-da-sac. This is a win for everyone.

Yet, the CEO of Dexcom had the audacity to criticize the work that makes such an improvement in our lives, the well being of our child, and is helping to shrink the life expectancy gap. He referred to us as “rogue cowboys”. Here’s the deal, Mr. CEO, your SHARE product flat out sucks. Here are a couple of things you can do in the short to medium term to make up for this.

Short term:
  • Apologize for these comments - they disgust me
  • Port the uploader application to Android immediately
    • For a lot of folks the cost of having a dedicated phone is prohibitive
    • Android has plenty of less expensive options and there is no reason to force people who want to use this service into the iOS ecosystem which is only 13% of the mobile market in the first place
  • Scrap the FOLLOW app
    • The data is coming into your servers, monitor the data and pick a provider capable of making text messages and/or phone calls
    • This mechanism for providing alerts is platform agnostic, quick, and easy
    • I managed to do this for myself in well under an hour
    • A team of dedicated professionals should be able to roll this out in weeks
    • It is unrealistic to expect every caregiver of a child to have an iPhone, to have the app, and to have it configured
  • Build a portal
    • Allow people to see the real time data through any device
    • If you do not know how to do it, go to Nightscout’s github repo - this part is already done for you and it works amazingly well

Medium Term
  • Embed Bluetooth into the device and abandon the monitor altogether
  • Build an app for both Android AND iOS that is capable of getting the reading and posting the data as appropriate
  • Support a configurable ReST API to allow the community to innovate and come up with additional services
  • This is our data and our lives, respect that

I understand that the FDA and HIPAA are supposed to serve the public. I understand that things that are new seem scary. However, for every missed alert, for every unnecessary hypo, every chance to catch runaway glucose is taking precious minutes from my loved one. Please do your best to fast track things that make sense. My daughter is living on borrowed time.