With the fundamental hardware working I have moved on to improving some of the software. The lowest hanging fruit in this case was the scheduling system. You may have noticed in my earlier demo that I have a dummy schedule and the scheduling page has some GUI display problems. Over the weekend I have added a scheduling and log table to the database. A schedule can be created using the form shown below:
Every time a medicine is dispensed it is logged with the time, medicine, and user. The scheduling system checks every minute for schedules that may need to be taken. For example if the schedules needs to be taken once per day at 1PM the log table is checked to see if the medicine has been logged as taken from 1PM today and after. If there is no matching log a message is displayed automatically to the user and the machine plays a sound and spoken message:
Users are given the option to Vend, Snooze, or Cancel. Snoozing will ask again in 5 minutes. Vending will dispense a pill for the user and log it. Canceling will not vent the pill and log the pill as not taken. There may be cases where the user will have not choice to cancel depending on the prescription. This has not been implemented yet. I am, however interested in the big data aspects of this type of log. This data could give us information about what methods are more likely to get a user to take a pill, or which/when medicines are more likely to be ignored.The new schedule view screen pools the schedules database and get a list of all schedules. It then takes the list and extrapolates the next 10 dates for each med which is displayed on the machine:
All of the complexity is done on the server side (web server in the machine vs. web browser on the machine). This allows for a smart-phone app (in development) to access this data via an easy HTTP-GET / JSON interface. I have finally added a GIT repo for all the code in this project.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.