Skip to content

Add medication dose reminders - #231

Open
OliviaH05 wants to merge 7 commits into
oss-slu:mainfrom
OliviaH05:feature/issue-171-medication-reminders
Open

OliviaH05 wants to merge 7 commits into
oss-slu:mainfrom
OliviaH05:feature/issue-171-medication-reminders

Conversation

@OliviaH05

@OliviaH05 OliviaH05 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary:
Adds medication dose reminders building on the medication adherence functionality from issue 169. The reminders are in-app only, they do not send background, push, or email notifications.

Changes Made:

  • Add backend endpoints and data model for medication reminders.
  • Allow users to enable, pause, resume, and disable reminders.
  • Add localized reminder controls and status messages in English, Spanish, Hindi, Arabic, and Chinese.
  • Add backend and frontend tests for reminder behavior and validation.

Closes #171

@mudabs mudabs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Olivia, for adding the medication reminder API, controls, localization, and test coverage.

Please address these items before merge:

  • Make the selected reminder time drive the actual due reminder. The current logic only checks prescription.next_dose, ignores reminder_time, and never triggers for prescriptions created without next_dose.
  • Define the reminder schedule and timezone behavior, then add regression tests where reminder_time differs from next_dose and where next_dose is null.
  • Add the missing Arabic translations for reminderEnabled, doseReminderDue, and dismissReminder.
  • Display reminderEnabled when a reminder is active instead of the enableReminder action label.
  • Add frontend coverage for enabled, paused, disabled, empty, and scheduled reminder states.

@mudabs mudabs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Olivia for improving reminder scheduling, localization, and frontend coverage.

Please address these items before approval:

  1. Resolve the SonarCloud quality gate failure. New-code duplication is 4.1%, above the required 3% limit. Refactor the duplicated reminder logic or test setup and confirm SonarCloud passes.

  2. Fix the partial enable failure flow. If createReminder succeeds but updateReminder fails, retain or reload the created reminder so retrying updates it instead of attempting another create and receiving a conflict.

  3. Add a regression test covering create success followed by update failure, then verify that retrying recovers successfully.

All other CI checks pass. Please push the fixes and request another review.

@OliviaH05
OliviaH05 requested a review from mudabs November 4, 2026 00:16

@mudabs mudabs left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Olivia for addressing the reminder scheduling, localization, retry handling, and test coverage feedback.

PR #230 is now merged, but this branch has not been rebased onto the updated main. GitHub reports merge conflicts, and the diff still includes the medication adherence implementation that is already in main.

Please rebase this branch onto current main, resolve the conflicts, remove the duplicate adherence changes, and keep only the reminder functionality and its tests. Then push the updated branch, confirm all workflows pass, and request a fresh review.

@OliviaH05
OliviaH05 force-pushed the feature/issue-171-medication-reminders branch from b96a861 to 662b76a Compare November 5, 2026 23:58
@OliviaH05
OliviaH05 requested a review from mudabs November 6, 2026 00:20

@mudabs mudabs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Olivia, for addressing the earlier scheduling, localization, retry, SonarCloud, and rebasing feedback.

Please address one remaining API validation gap: PATCH /prescriptions/{id}/reminder currently accepts reminder_time: null, which can persist an invalid value and cause response validation errors. Reject explicit null values and add a regression test.

Please also request a fresh review after the fix. The branch is based on current main and all CI checks pass, but the PR remains blocked by the existing changes-requested status. Please confirm in the PR that reminders are currently in-app only and do not send background, push, or email notifications.

@sonarqubecloud

Copy link
Copy Markdown

@OliviaH05
OliviaH05 requested a review from mudabs November 10, 2026 20:35
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

Successfully merging this pull request may close these issues.

[Small Rock] Add medication reminders and notification preferences

2 participants