Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set user’s most-recently used treatment doses as default when it's "turned-on" #2

Closed
algodave opened this issue Feb 17, 2016 · 19 comments
Assignees
Milestone

Comments

@algodave
Copy link
Contributor

The most recent dose used for a treatment has to be saved for each user, in order to allow him to quickly select it during checkin

@algodave algodave self-assigned this Feb 17, 2016
@lmerriam lmerriam modified the milestone: Launch Feb 24, 2016
@algodave algodave changed the title Save user’s most-recently used treatment doses Set user’s most-recently used treatment doses as default when it's "turned-on" Mar 3, 2016
@algodave
Copy link
Contributor Author

algodave commented Mar 3, 2016

Summary of slack conversation with @lmerriam to clarify reqs

  • as soon as the user "turns on" a treatment, it automatically gets its last dose, if it has one
  • it would look at the last day the user logged prior to the day they are checking in and use that dose
  • this can be done whatever the checkin day is, so no reason to differentiate behavior between today's checkin and past days

@lmerriam
Copy link
Collaborator

lmerriam commented Mar 3, 2016

👍

@lmerriam
Copy link
Collaborator

lmerriam commented Mar 8, 2016

@algodave this isn't quite working for me, I still get "no dose" on all my treatments when I add them

@algodave algodave reopened this Mar 8, 2016
@algodave
Copy link
Contributor Author

algodave commented Mar 8, 2016

@lmerriam can you provide an example treatment you added which was not populated? Consider that currently you have to wait one second before "turning-on" the treatment just added in order to see the auto-set dose (sorry I should have mentioned that)
I'll fix this together with #3 which will provide the app with better awareness on when to trigger checkin save.

@lmerriam
Copy link
Collaborator

lmerriam commented Mar 8, 2016

Prednisone, Stelara, Folic Acid, Methotrexate on my logan@flaredown.com account

Just tried again waiting 10 seconds, I still see the issue unfortunately

@algodave
Copy link
Contributor Author

algodave commented Mar 8, 2016

@lmerriam I should have found what the issue was. I was discarding null doses but not blank ones. Please try again when you have a chance and let me know. Also note: on a new checkin default doses are immediately available; when you add a new treatment instead, you have to wait one second.

@lmerriam
Copy link
Collaborator

lmerriam commented Mar 8, 2016

Looks good now 👍

@lmerriam lmerriam closed this as completed Mar 8, 2016
@lmerriam
Copy link
Collaborator

lmerriam commented Mar 8, 2016

@algodave
Copy link
Contributor Author

algodave commented Mar 8, 2016

@lmerriam just watched the video. The checkin you clicked on already existed before I released the feature, that means the object was initialized without most-recent doses. I realized that because the summary screen opened up rather than the first checkin screen (the "You haven't checked-in yet").
So to recap: the feature works on new checkins you create from now on, and on not-yet initialized past checkins (i.e. the ones for days which you've never clicked on, if any)

@algodave
Copy link
Contributor Author

algodave commented Mar 8, 2016

@lmerriam oh by the way, if you want to test on some past day, I can manually remove your existing checkins; just give me the dates in case you want to do that

@lmerriam
Copy link
Collaborator

lmerriam commented Mar 8, 2016

Gotcha! Makes sense. If you wanna clear the past 5 days of my check-ins that would be awesome

@algodave
Copy link
Contributor Author

algodave commented Mar 8, 2016

@lmerriam Done!

@lmerriam
Copy link
Collaborator

lmerriam commented Mar 8, 2016

@algodave getting the same thing i got before, it seems to be targeting the wrong dose. right now i added a "5mg" dose of prednisone in the days you recently cleared for me, then the next day I turned on prednisone and the auto-dose was "3mg". I have used 3mg before, but not the prior day. Any way I can help diagnose?

@lmerriam
Copy link
Collaborator

lmerriam commented Mar 8, 2016

video, in case I'm doing something weird again: https://www.dropbox.com/s/0wzv58dlcdj0p4c/autoTreatmentDose2.mov?dl=0

@algodave
Copy link
Contributor Author

algodave commented Mar 8, 2016

No, this time you're not doing anything weird :)
Let me better investigate tomorrow, I'm reopening.

@algodave algodave reopened this Mar 8, 2016
@lmerriam
Copy link
Collaborator

lmerriam commented Mar 8, 2016

Random UX thought: if the last dose was "no dose" the auto dose should be "no dose"

@algodave
Copy link
Contributor Author

algodave commented Mar 8, 2016

Oh this is important, thanks for posting! At the moment it's ignoring both null and blank values while retrieving the most recent. I'll change that.

algodave added a commit that referenced this issue Mar 14, 2016
@algodave
Copy link
Contributor Author

@lmerriam You can now test again; let me know which days should I delete checkin for you, if needed.

@lmerriam
Copy link
Collaborator

Works for me! Closing 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants