Fix: Proper Saving and Refresh of All CPP Modules in Encounter Window#372
Merged
yingbull merged 2 commits intodevelop/coyotefrom Jul 16, 2025
Merged
Conversation
…gfix] - Fixed saving issue for Social History (all CPP) notes - Restored missing code required for correct session storage - Passed data properly to backend and stored it correctly in session - Ensured the note container div refreshes correctly after saving - Refactored necessary logic to align with Struts 2 conventions
Reviewer's GuideThis PR restores missing data handling, refactors JSP views to use JSTL/Struts2 conventions, enhances session management in action classes (implementing SessionAware with form state restoration and reloadUrl support), and updates Struts redirects to ensure Social History CPP notes persist correctly and the UI refreshes appropriately after save. Sequence diagram for saving a Social History (CPP) note and UI refreshsequenceDiagram
actor User
participant EncounterWindow as Encounter Window (JSP/UI)
participant EntryAction as CaseManagementEntry2Action
participant Struts as Struts2 Framework
participant Session as Session
participant ViewAction as CaseManagementView2Action
participant DB as Database
User->>EncounterWindow: Add/Edit Social History note
EncounterWindow->>EntryAction: Submit form (save note)
EntryAction->>Session: Restore form state from session
EntryAction->>DB: Save note data
EntryAction->>Session: Update session with new state
EntryAction->>Struts: Return "listCPPNotes" result with reloadUrl
Struts->>EncounterWindow: Redirect to reloadUrl (CaseManagementView)
EncounterWindow->>ViewAction: Load updated notes
ViewAction->>DB: Fetch updated notes
ViewAction->>EncounterWindow: Render refreshed notes UI
EncounterWindow->>User: Display updated notes
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issues with CPP module note saving and UI refresh in the Encounter Window by implementing proper session management, converting JSP code to use JSTL conventions, and ensuring reliable parameter handling.
- Implements SessionAware interface for proper form state persistence across actions
- Converts JSP templates from mixed scriptlet/JSTL code to standardized JSTL approach with proper i18n support
- Adds dynamic redirect URL configuration for post-save UI refresh
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| viewNotes.jsp | Major refactor from JSTL/EL to scriptlet approach for note display logic |
| noteIssueList.jsp | Fixes property access path for issue usage check |
| forward.jsp | Adds providerNo parameter to redirect URL |
| ChartNotes.jsp | Moves form declaration and adds proper form naming |
| struts.xml | Changes listCPPNotes result to dynamic redirect with reloadUrl parameter |
| CaseManagementView2Action.java | Adds fallback method parameter retrieval from request attributes |
| CaseManagementEntry2Action.java | Implements SessionAware interface and adds session-based form state management |
yingbull
approved these changes
Jul 16, 2025
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.
This PR addresses issues with the Social History (all CPP) notes not saving correctly within the Encounter Window. Specifically:
Notes were not being saved properly due to incorrect or missing data handling.
After saving a note, the corresponding div container in the UI was not refreshing as expected.
Fixes and Improvements:
Restored some critical code that was inadvertently removed in previous updates.
Ensured all relevant data is correctly passed and stored in the session.
Converted related code blocks to follow Struts 2 conventions properly.
Verified the UI refreshes correctly after note submission, reflecting the updated content.
Summary by Sourcery
Fix saving and UI refresh of all CPP modules in the Encounter Window by restoring missing logic, implementing session persistence, and converting to proper Struts 2 and JSTL conventions.
Bug Fixes:
Enhancements: