Solving Life Changing Problems with Simple Solutions

Solving Life Changing Problems with Simple Solutions

Five years ago, my wife was diagnosed with Thyroid Cancer. The surgeon managed to successfully remove the cancer, however he had to take with it the Thyroid and Parathyroid glands.

These glands are responsible for releasing Thyroxine and Parathyroid Hormone, which regulate metabolism and Calcium respectively. A lack of Thyroxine leads to fatigue intolerance of cold temperatures, low heart rate, weight gain, reduced appetite, poor memory, depression, stiffness of the muscles and reduced fertility. Calcium is essential for providing electrical energy to the nervous system, muscular system and is more commonly known for providing strength to the skeleton. The absence of these glands provides a very real problem: the body will eventually fail to function without the support these glands provide.

Thankfully, due to modern pharmaceuticals, these issues are resolvable. My wife is prescribed Calcium and Levothyroxine in order to manage these deficiencies.

Cue “Real Life”

Case closed. Or so you think. If that was everything, this blog post would have been very short indeed. But it’s not… real life happens, and we are all human. Our attention is often diverted to whatever is shouting the loudest at the time, and medication doesn’t have a mouth. A 2-year-old, on the other hand, does… and oh boy does our son have a loud mouth! The challenge of looking after Russell has changed the dynamic of my wife’s life, and as such she regularly tells me that she’s forgotten to take her tablets, usually once Russell is in bed. If she remembers too late in the day, she may be able to take her Calcium, but she will have to give her Levothyroxine a miss, as taking it late at night will keep her awake.

Being a Geek has its Advantages

I’ve worked in Software Development for 10 years now and have been itching to get involved in cloud-based technologies. After having expressed this interest to Hannah, she bought me an AWS IoT button for my birthday last year. I’ve been keen to find a use for this button since the day I got it. I wonder if I could use it to help her redevelop her good medication habits?

I can! And I did. Using AWS (Amazon Web Services), I developed a simple system that would use the button to record medication taken, and in the absence of this button press being recorded, would send a text message to my wife reminding her to take her medication. This check is scheduled for 6pm daily, so it’s not too late as a last reminder to take the medication.

The AWS IoT (Internet of Things) button

The AWS IoT button, when pressed, sends a HTTP request to AWS containing a device ID, keypress type (single/double/long), and remaining battery power as part of the payload. Inside AWS, you can connect this button to your account and configure its actions. It can be used to trigger most AWS services, such as SQS (Simple Queue Service), S3, DynamoDB, Step Functions… the list goes on. This makes it a powerful tool as you can use it to trigger practically anything. Here at AO, our hack days have proved the possibilities for this button are almost endless.

My IoT button connects to the home Wi-Fi and triggers a Lambda, which is essentially just some code. The lambda is programmed to save the date it was triggered into S3 cloud-based file storage. Cloud Watch has a feature, scheduled events, which I’m using to trigger another Lambda to check the date stored in S3. That Lambda is programmed to compare the date and, if the button was last pressed over 14 hours ago, will use SNS (Simple Notification Service) to send a text message.

Like I said before, it’s simple, but it works. Not only does it work, but it works without any servers, which drops the cost of running the system dramatically, as I’m only paying for Lambda compute (which, in the free tier, you get 1 million executes a month, and $0.01 for every 50k executes thereafter) and S3/CloudWatch usage. Had I used traditional methods, I would have had to pay for a server to host it on, which in comparison is significantly more expensive.

Agile Development

Seems a little out of the blue… but did you see it? What I created was an MVP (Minimum Viable Product) to meet the needs of the “customer”. I could have assigned different types of button press to different medications. I could have stored the data into DynamoDB for a historical record. I could analyse this historical data. I could monitor the IoT device battery while saving the meds. I could build a web app that also acts as a trigger in case she needs to take her meds on the go.

I haven’t done any of those things, at least not yet. What I’ve done is delivered something that works, and then my next step is to listen to the customer’s feedback in order to know what the most valuable feature is to implement next. There’s little point in implementing a feature that my “customer” doesn’t want. It’s waste, and if you’re familiar with Lean principles, you can probably guess how I feel about waste.

Impact

I’m pleased to say that since this system has been in place, Hannah has missed her medication far less than before. The quality of life improvement this brings is great, as it provides confidence that her energy levels won’t “randomly” drop and her muscles won’t start to spasm. Ultimately, due to a little bit of code and a nifty little button, my wife can enjoy peace of mind.