So with the hardware design slowly...... taking shape its time to give a little thought to the software pieces.
Essentially we are going to need a number of pieces of software:
- Medcheck dispenser's firmware
- Phone App(s)
- Patient/Carer website
- Practitioners website
- Management website
- Brochure ware
So lets have a poke at each of these and think about what they might look like.
Firmware
At this point we are considering the Banana PI as it supports most of the hardware interfaces that we need. As such we can probably drop one of the cut down linux OS on the PI and use Java to develop the firmware (yes I'm a java developer. I can do C/C++ but it's not necessary and it's not worth the additional pain).
So what does the firmware need to do.
Firstly operate the basic hardware on the device which includes:
- dispense pills when dispense button pushed
- operate buzzer/flasher for dispense button
- lock/unlock dump draw
- lock/unlock dispenser lid
- operate dump bridge
- rotate cartridge
- rotate cartridge into insert/remove position
- connect to LAN via ethernet or WIFI
- download dispensing timetables
- send error/warning alerts
- flash 'touch me' light when error/warning occurs
- transmit warning/error messages to phone when phone touches dispenser
- interact with phone to obtain WIFI connection details
- update carer website when pills dispensed
Phone App
The Phone App is intended to provides some basic management functions and manage any direct interactions with the device.
The trick here is to provide just enough functionality from the phone to make the experience feel fantastic without getting carried away trying to implement functions which are better off done via the Carer website.
So the key Phone App functions will be:
- configure WIFI for dispense
- unlock dispenser
- lock dispenser
- receive warning/error messages from the dispenser (via NFC or WIFI or bluetooth)
- check the status of the dispenser (what exactly this means I'm not certain).
- * probably needs to be able to do this locally (touch the machine) and remotely
- receive notifications of late dispense actions (although this may be better done via SMS)
- receive reminders that a cartridge is due to be changed
- check the status of the cartridge and the next fill date
- pause the dispenser - no further dispensing actions until unpaused.
- mark a specific slot to be dumped (I'm thinking of a remote change of mediation that may need to be done in a hurry).
Carer/Patient Website
The Carer website is where the majority of the dispenser management will occur.
- configure medication schedule
- print cartridge fill guide for specific date range
- authorise third party to manage medication schedule
- view errors/alerts from dispenser
- unlock dispenser
- lock dispenser
- check status of dispenser
- view log of dispense actions
- view date of next cartridge change
- set alert thresholds for notification on late dispenses
- login/logout
- view session history
- log cartridge change (needs to be linked to the fill guide)
- safely modify medication schedule part way through cartridge rotation (still requires cartridge change out).
- assistance to empty/sort tables from dump draw (pictures of different tablets might be useful to aid in identification). This one makes me nervous as what happens if a pill is mis-identified?
- Enter key data about patient including photo for clear identification by Practitioners. At a minimum: Name, Address, DOB, Insurer, Patient identification no.
- View billing history
- Make payment for access to medcheck website.
A wild thought just popped into my mind.
What if we have a household with multiple Medcheck dispensers? This sounds great except that we then have the added problem of ensuring that the correct patient is using the correct dispenser.
So how do we deal with this?
- Finger print scanner
- Facial recognition
- Tattoo
- RFID bracelet
Yes Tattoo was intended as a joke, but no wait...
RFID bracelet seems the most practical and reliable, particularly given that many patients wear medical bracelets anyway. We could configure the dispenser to only dispense when the dispense button is pushed and the RFID bracelet is near. (So what exactly is the range of an RFID?)
Practitioner Website
We probably won't build the practitioner website the first go around. The idea is to allow a practitioner to managed multiple Patients medication schedule
Major concern is that a Practitioner may end up managing multiple medcheck patients and there is therefore a risk that they may mis-identify the patient's medication schedule that they are working on. The intent is to display a photo of the patient in the top right hand corner of the site at all times. This should provide a strong confirmation to the practitioner that they are managing the correct Patient's schedule.
The practiitioners Website should allow the Practitioner to:
- configure medication schedule
- print cartridge fill guide for specific date range
- authorise third party to manage medication schedule (what are the legal issues around this?)
- view errors/alerts from dispenser
- unlock dispenser
- lock dispenser
- check status of dispenser
- view log of dispense actions
- view date of next cartridge change
- set alert thresholds for notification on late dispenses
- login/logout
- view session history
- log cartridge change (needs to be linked to the fill guide)
- safely modify medication schedule part way through cartridge rotation (still requires cartridge change out).
- assistance to empty/sort tables from dump draw (pictures of different tablets might be useful to aid in identification). This one makes me nervous as what happens if a pill is mis-identified?
- Enter key data about patient including photo. At a minimum: Name, Address, DOB, Insurer, Patient identification no.
Management Site
This one is for us to manage users.
- add/Delete/Disable/Enable/Edit user details
- bill users
- report on user activity
- refund payments
- credit account balance
- debit account balance
- check patient device status
- upgrade device firmware
There is a big issue about what access we should have to patient data. The more data we have access to the greater our risk of staff or hackers misappropriating data.
We do need detailed access to the device status and probably its logs in order to diagnose problems.
This opens the whole question of device management, release cycles etc. Given we are using linux on the device we can use apt-get and a repository to push out firmware updates. Do we need something more sophisticated to device management? We will be able to access the device via ssh so on device management should be easy provided its connected to the inet. What can we do if the device won't connect to the inet. The most common problem we can expect to see if people not been able to connect the device to WIFI or inet.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.