-
Notifications
You must be signed in to change notification settings - Fork 750
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
Add time support for Medications #1601
Comments
@julianguyen is there a specific uicomponent in mind for listing out the times of day? dropdown or checkboxes for example |
@anGie44 Yes, good question! You should be able to use the |
Hi @anGie44, I was wondering if you're still working on this issue? It's been a while since I contributed to if-me and I was looking for something to work on. If you'd like help or if you're not working on this issue anymore let me know! |
Hi @julianguyen, It's been a while since I contributed and I was looking for something to do. I reached out to @anGie44 to see if she was still active on this issue, I don't think she is. Should I wait a bit longer or do you think it's safe to take this issue on? |
Go ahead and assign it to yourself @SonuToor. Thanks for reaching out! :D |
Hi @julianguyen , Just have a couple of questions to clarify the nature of the new feature. When a user sets a time, is that time for every single day? Or should a user be able to set a separate time for every single day? |
This is what we want! Good question @SonuToor :) We could add a checkbox for setting the same time daily, but we should give users the ability to fine-tune time for each day. |
@julianguyen so the time input that I am creating is for the reminder to take the medication not the refill reminder correct? So maybe below the checkboxes for the days of the week have a checkbox that is by default checked that sets it to same time daily. Then if the user unchecks this checkbox, we then display each day that is currently checked, with a corresponding component of type time, whereby they can set a separate time for every selected day? |
@SonuToor Correct that it's a reminder for when to take the medication! That sounds like a good experience to me! Thanks! |
Hey @julianguyen, So I played around with the code. I get the checkbox that toggles whether the medication is taken at the same time daily to render. Now unfortunately my skills on the backend (and Ruby) aren't fully there yet to handle the next steps. So I want the checking and unchecking of the checkbox to be stored in postgres and then depending on whether the value is checked (true) or unchecked (false) I want to conditionally render inputs that allow the user to input times for each day they take the medication. Now I'd have no problem creating the inputs in React or adapting existing input components to fit the need, but the back end code to make it happen I need some help on. I am going to start a thread in the #dev channel and ask for some help, but if you have some pointers you could give me it would be super helpful as well. *edit I have a new branch on my fork for this issue the link is: |
Hey @SonuToor! You're correct about storing the checkbox data in Postgres! So you'll want to create a DB migration to add columns to the Medications table. You should the The table you'll want to modify is Medication. Currently, we use the Possible Solutions(1) Keep
|
Thanks for such a detailed response @julianguyen ! As I mentioned in the slack chat I agree with your solution, it is pragmatic, a bit more work is required but worth it imo. So, I think it would be best to tackle it in order. So implement solution 1, then implement solution 2. As far as I can tell in either path we would have the checkbox that sets the time uniformly for each day? That would also be stored in the Medications table? Then after that go to add the columns for monday_time, tuesday_time etc. After that I could go on to add the UI components that allow the user to input medication times? I'm going to read the link you provided about db migrations, as it's something I've not done before. I'll need some guidance on modifying the table as well, would that be found under ruby docs? Let me know what you think about my plan and of course any guidance or tips would be appreciated! |
@julianguyen i want to join slack channel , i have also mailed you, want to talk with you please contact me |
Hi @SonuToor I was wondering if you are still working on this issue. |
@rutger-t I've been quite busy, so you can take it up! The conversation between me and Julia above will be quite helpful! |
Hi! @julianguyen I was looking at this issue and I would like to know if there is someone working on this? I would like to give it a try :) |
Hi Marthaerm, I got a bit busy so please go ahead and take it Good luck! |
Description
Currently, users can specify the days they want to be notified of Medication reminders. This notification is sent at 12:00 am, at the beginning of each day. We want to add ability to specify the time for each day of the week.
Screenshots
Currently:
Please assign yourself (via the Assignees dropdown), if you do want to work on this issue. Can't find yourself? You need to join our organization.
Check out our Picking Up Issues guide if you haven't already!
The text was updated successfully, but these errors were encountered: