Sunday, March 22, 2009

Android Pill Minder--outline of a program I want to write

My mom mentioned to me today that my (gracefully) aging grandparents sometimes have a hard time keeping track of their rather complex perscription cycles: when to take what, with or without food, and how often can be hard to juggle, espcially when the bottles themselves are identical and crawling with tiny text.  

She suggested individually shrink wrapped pills that would blink when you needed to take them--I agree this would work, but I think that I could write a program for an Android device (currently just the G1) to do the same thing more genericly, with today's pill bottles.

Currently, there are no hits for pill, pills, medicine, or perscriptions in Android Marketplace.  I think this needs to change.

The major G-phone API's I'd need to figure out how to access are the barcode scanner, background scheduler, a setup screen, and an alert interface.  Really, there wouldn't need to be any more complex than that.  I'd also say that the barcode scanner is optional (but extremely handy).

Basic functionality would be inputting how often you should (in case of scheduled medicines) or can (in case of 'take no more often than Xhours or Y times per day') take your various medications.  The program would then provide an alert at the appropriate time, telling you when you should (or can) next take said medicine.  That's the barebones version.

Adding one level of complexity, you could 'color' each medicine by adding colored dot stickers to the corresponding bottle.  So rather than an alert saying "Take your hydroxydoxorubicin!" it would be a flashing green screen saying "Take your hydroxydoxorubicin! (GREEN BOTTLE)"

Adding a second level of complexity, there are currently barcodes of some kind on all the perscription bottles I've seen.  When you're setting up your new medicine, you would 'check in' the new bottle's barcode.  It would store this code with the schedule, and when it prompted you to take your medicine, it wouldn't clear the alert until you'd rescanned the correct bottle.  This would prevent you from accidently taking the wrong medication.

A third level of complexity which isn't possible without the involvement of pharmacies would be to add 2-D barcodes to the labels encoded with all of the direction information about your dosage schedule.  2-D barcodes are grid looking structures that look like this:

That particular barcode has "http://eng.wikipedia.org/" encoded into it, so you can see how easily large amounts of information could be compressed into a small symbol on the bottle.  This code, when scanned by the phone, could then add all of the information automaticly.

I think the Android is definitely capable of handling this entire task, it's just a matter of me gaining the knowledge to make it happen.  I've been wanting a legitimate reason to try my hand at writing an Android program, and this seems as legitimate as any, so we'll see!  I just wanted to use this blog entry as a napkin sketch of my ideas, in case I don't have the time to impliment them while they're still fresh in my mind.

No comments: