Patient portal APK + grouped Android dose alarms - #7
Open
yash-learner wants to merge 18 commits into
Open
Conversation
Bring ohcnetwork#16612 (visits, records, prescriptions, diagnostic reports) onto current yash-learner/develop as one commit so Capacitor work can start from fork develop instead of ENG-831. Co-authored-by: yash.topaz <yash.topaz@gmail.com>
|
When window.Capacitor is present, POST /api/care_reminders/sync/ with the OTP Bearer token and pass the calendar to Alarm.sync. Browser sessions are unchanged. No extra patient tab or frontend federation plug. Co-authored-by: Cursor Agent <cursoragent@cursor.com>
yash-learner
marked this pull request as ready for review
August 14, 2026 19:34
POST /sync/ now runs in the browser as well as Capacitor so Home can list the same calendar the phone will ring. Until an APK exists, the card explains that lock-screen alarms need the Android app. Co-authored-by: yash.topaz <yash.topaz@gmail.com>
The APK WebView loads /patient/login. Alarm.sync arms one exact alarm per patient-minute slot so two morning tablets share a lock screen. Take/skip still POST per occurrence. Logout clears the native store. Cloud VM has no Android SDK; sideload from Android Studio in the morning.
cap add and apply-android-alarm.sh are only if android/ is missing.
Gradle loads :capacitor-android from ../node_modules. Opening a copy under StudioProjects makes that path miss even if Maven downloads succeeded.
Windows Studio cannot reliably open Gradle apps under \\wsl$. Clone the whole frontend onto NTFS and npm install there; leave Django in WSL.
care_fe postinstall/Husky are Linux-oriented. Windows only needs @capacitor/android so Gradle can resolve the project; Vite stays in WSL.
The fail-fast message used \\\\wsl$\\\\ inside a GString, which Gradle could not parse. Use a plain concatenated string instead.
The module is generated by cap sync and was gitignored, so a Windows clone without npm/cap sync failed on cordova.variables.gradle.
mergeDebugResources fails when both drawable/splash.png and splash.xml exist. Keep the XML splash; delete the template PNG in the overlay script.
Kotlin 2 refuses to hide the superclass method; the JS Alarm API is unchanged.
Four day-part pickers PATCH /api/care_reminders/clocks/. The response calendar updates Home and Alarm.sync so morning medicines share one ring.
Fix the clocks mutation type. Move day-part times into a Records sheet with turn on, cancel this medicine, and cancel all.
Tap a medicine name for upcoming, taken, skipped, and missed. The Home upcoming-doses card keeps a count on the header when collapsed.
Pixel 6a (targetSdk 35) draws edge-to-edge, so the prescription back control sat under the system bar. Capacitor now insets the WebView on API 35+, and the shell still pads with safe-area env() for iOS.
Day-part clocks stay patient-wide so two 7:00 tablets still share a lock screen. The per-medicine bell made those times look independent and overwrote the other tablet. Header bell, shared pickers, per-medicine switches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Working branch for the CARE patient APK + Android alarms increment (PR #8 merged into this PR).
ENG-831)adjustMarginsForEdgeToEdge: autoso the WebView is not drawn under the status bar (Pixel 6a). Prescription back control stays tappable. Requiresnpx cap sync androidand an APK rebuild — Vite alone does not apply this.android/— WebView starts at/patient/loginAlarm.sync/Alarm.cancel. Same-minute medicines share one lock screen (Take all + per-row take/skip). Logout clears the native store.REACT_PATIENT_APK_URLfor the web install button once you publish an APKEveryday APK steps after a pull:
npm installthennpx cap sync android(seedocs/android.md).cap add/apply-android-alarm.shonly ifandroid/is missing.Windows + WSL: Keep Vite in WSL. Clone full
care_feonto NTFS and copy@capacitor/androidfrom WSL.android/capacitor-cordova-android-plugins/is committed. Delete leftover Capacitorsplash.pngif Gradle reports duplicatedrawable/splash.AlarmPlugin.requestPermissionsoverrides CapacitorPlugin.requestPermissions(Kotlin 2). Ignore the CapacitorflatDirwarning.Requires:
cursor/otp-prescriptions-3720-4f0c0003_opt_in_alarms)Do not merge this to ohcnetwork yet.
Tagging: @ohcnetwork/care-fe-code-reviewers
Merge Checklist