// Pseudocode!!!!!
// Input variables from user: tabsPerDose dosePerDay daysTotalPrescribed
//initial calculations double tabsTaken = 0; double tabsTotal = (tabsPerDose * dosePerDay * daysTotalPrescribed); double tabsRemaining = (tabsTotal - tabsTaken) ; double progress = (tabsTaken / tabsTotal) ;
// when compliant button is clicked tabsTaken = (tabsTaken + tabsPerDose) ; tabsRemaining = (tabsTotal - tabsTaken) ; double progress = (tabsTaken / tabsTotal) ; //display congrats, amount/days left, fun fact //also display picture!
//when noncompliant button is clicked tabsTaken = (tabsTaken - tabsPerDose) ; tabsRemaining = (tabsTotal - tabsTaken) ; double progress = (tabsTaken / tabsTotal) ;
// display some sort of message saying what to do (keep taking meds or whatever) // this will be either from the internet or from a pharmacist // if that isn't kosher, this can display the contact info for the pharmacist or // physician so that the patient can ask what they should do now that they missed // a dose //and display picture!
//note that our "compliant button" corresponds to the patient taking the dose (clicking button) AND it occuring at the appropriate time
//expected doses calculated by prescription info //user will set first time and desired dose (can update as appropriate) //Next notification will occur if time is past expected time + some buffer
timeBtwnDoses = (24 / dosePerDay) nextDoseTime = current.time + timeBtwnDoses double bufferTime = 1
//If buttonPressed within plus or minus a buffer (say 1 hour) of expected, either no notification //or a fun fact. If not, then a push reminder.
//load images or whatever and assign variables to them
//load images or whatever and assign variables to them (pandai)
panda0 (image that is all full of buggies) panda1 panda2 panda3 panda4 panda5 panda6 (bug free!!)
// not sure how you're fitting this in but... functionInput (progress): avatar = null (define some variable avatar that is not local in the if/else loop thing) if (progress <= 0.16) { avatar = panda0; //panda is full of germs! } else if (progress > 0.16 && progress <= 0.33) { avatar = panda1; //fewer germs! } else if (progress > 0.33 && progress <= 0.50) { avatar = panda2; } else if (progress > 0.50 && progress <= 0.67) { avatar = panda3; } else if (progress > 0.67 && progress <= 0.83) { avatar = panda4; } else if (progress > 0.83 && progress <= 0.99) { avatar = panda5; } else { avatar = panda6; // panda is germ free! } display avatar

Log in or sign up for Devpost to join the conversation.