fix: eForm Print now always saves to the eChart#2489
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideSimplifies eForm printing logic so that printing always triggers a save to the eChart, fixing cases where mouse-only interactions failed to persist the form. Flow diagram for updated remotePrint save behaviorflowchart TD
A[remotePrint] --> B{parent.opener exists}
B -->|yes| C[hailMary]
B -->|no| D[skip hailMary]
C --> E[remoteSave]
D --> E[remoteSave]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe remotePrint() function in eform_floating_toolbar.js was changed to always invoke remoteSave() after the print action, removing the previous conditional logic that only saved based on the needToConfirm flag. ChangesRemote Print Save Behavior
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new
remoteSave()call inremotePrint()is indented with spaces while the surrounding code uses tabs; align the indentation style with the rest of the file for consistency.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `remoteSave()` call in `remotePrint()` is indented with spaces while the surrounding code uses tabs; align the indentation style with the rest of the file for consistency.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
PR Summary by QodoFix: Always save eForm to eChart when printing from floating toolbar
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
There was a problem hiding this comment.
Code Review
This pull request simplifies the remotePrint function in eform_floating_toolbar.js by removing conditional checks on needToConfirm and always calling remoteSave() when an eForm is printed. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Code Review by Qodo
1. Admin print save error
|
Issue
The floating eForm toolbar's Print button prints but does not always save to the eChart. When a form is filled using the mouse only (e.g. clicking checkboxes on the HPV Test requisition), Print produces the printout but the eForm is missing from the patient's eForms list. Typing a single character before printing makes it save.
Cause
remotePrint()ineform_floating_toolbar.jsguarded its save behindneedToConfirm. Each eForm setsneedToConfirmtotrueonly on a keyboardkeyupevent, so mouse-only input left itfalse- and with the flag defined but false, neither save branch ran.From

eform_floating_toolbar.js:From

HPV Testeform:Fix
Have
remotePrint()callremoteSave()unconditionally. No change detection is needed because the eForm is already marked as dirty by the auto-populated fields, such as the patient name and provider name.Summary by Sourcery
Bug Fixes:
Summary by cubic
Printing an eForm now always saves it to the patient’s eChart, fixing cases where mouse-only input didn’t persist. Printed forms will consistently appear in the patient’s eForms list.
remotePrint()now always callsremoteSave(); removed theneedToConfirmcheck.Written for commit eeeeaa6. Summary will update on new commits.
Summary by CodeRabbit