Rx Bugfixes 20260428#219
Closed
lacarmen wants to merge 48 commits into
Closed
Conversation
77e0a03 to
35e7752
Compare
… instead of a reference
…echanism that was only used to archive re-staged medications after re-editing
…th CSRF and POST fetch, update JSDoc to align with uncheckReRxForExistingPrescribedDrug parameters
…o searchDrug3.jsp, updated javadoc in delete action, added drugList null or empty check
Unchecking a ReRx checkbox after staging failed to remove the UI card because removeDrugFromReRxList looked up the card by prescription ID (set_<prescriptIdInt>) but the card uses a randomId (set_<randomId>). Added data-drug-ref-id attribute to staged card fieldsets and updated the lookup to use querySelector with that attribute.
…ference for window to be used when hiding modalBox
… DataTables upgrade
…ering - Fetch all drugs once on load (show=all) instead of a separate server request per legend button click - Cache all <tr> rows via DataTables fnGetNodes() after each load so pagination does not silently truncate the row set - Filter the cached rows in JS on every legend click — no AJAX round-trips - Track activeViewMode / activeSectionDefs so non-legend refreshes (changeLt, re-rx) re-apply the correct view automatically after recaching - Extract showLongTermAcuteView() and showFullProfileView() named functions to replace unreadable inline showSections blobs in onclick attributes - Add row predicate helpers (rowIsArchived, rowIsLongTerm, rowIsCurrent, rowIsExternal) to eliminate repeated data-* string comparisons - Move ListDrugs.jsp legend styles to SearchDrug3.jsp <head> so they survive the rebuildDrugProfile() container wipe on every legend switch - Fix legend selected-state highlight: clear link-default-selected class from Current button when another legend item is activated
…missing csrfguard
Moved reprint visibility from Prototype $('reprint').toggle() with a CSS display:none rule to vanilla JS toggleAttribute('hidden'). Prototype's show() clears inline styles but cannot override CSS rules, so the reprint section was invisible even after toggling, changed in de82590. Also restored the csrfguard script include removed in f5eb92f
…csrfguard near global.js script to match the ctx variable usage
…each medication, and underlines on specifically singular medication reprints
…anged to be in ascending order instead of previous descending order)
…ate to match original behaviour instead of enetered date
… Date is unknown, to match the previous server side sorting behaviour
…age data changing the default sort order, since changes have not been added to prod, so this issue doesn't currently cause issues
…eeded for fixes to this issue when reproducing the workflow
…ate as needed for fixes to this issue when reproducing the workflow" This reverts commit 8d3b9b7.
…providers, will need to update to iron out bugs and less memory usage
…ng the demographicNo
…working fully, but works for most actions inside of the Medications module
… account for the changes
…icNo and there was no per-patient session bean for the connected demographicNo, meaning a bean was never created in the first place
- Move RxSessionFilter after auth filters in web.xml to prevent
unauthenticated session mutation
- Add Patient session attribute swapping to RxSessionFilter, removing
redundant manual lookups in ListDrugs.jsp
- Support both demographicNo and demographic_no params in filter
- Fix fetch interceptor to preserve Request object properties
- Revert generatePreviewPDF.jsp bean read to use filter-swapped legacy key
- Remove deferred stash clearing fix (resetStashAndClose) from
ViewScript.jsp and ViewScript2.jsp
- Revert RxSessionFilter mappings to before Struts2 in web.xml.
Struts2 short-circuits chain.doFilter() for .do action URLs,
so placing the filter after Struts2 prevented bean swapping
for actions like RxWriteScript2Action. Auth for .do URLs is
handled by SecurityInfoManager inside actions, not LoginFilter.
- Simplify CaseManagementView2Action and RxChoosePatient2Action
bean setup — remove redundant getFromSession lookups since
the filter handles per-request swapping.
- Restore RxShowAllergy2Action's original provider/demographic
match check to preserve existing bean state (stash, view).
- All three actions now use saveToSession instead of setAttribute
for per-patient key storage.
…pt to new save to session method usual setup
…mes for the same patient
WIP session isolation commits reintroduced the deleted updateDeleteOnCloseRxBox function and left popForm2 truncated (missing pharmacy URL logic, myLightWindow call, and the title bar update). Removed the stale function and restored the complete popForm2 body to match the correct reference state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35e7752 to
fb4f1e9
Compare
Merged
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.
Summary
This package contains a collection of bug fixes and regression repairs for the Rx module. Some issues were long-standing bugs, some were regressions introduced to the
mainbranch when updating the Rx Module.Individual PRs
1. PR #2343 - Fix: medication X button passes wrong ID and removed flawed archival mechanism (4 commits)
Related Issues: https://github.com/openo-beta/Open-O/issues/2339, https://github.com/openo-beta/Open-O/issues/2341
2. PR #2344 - Fix: string object comparison, forward-iteration deletion, missing GCN_SEQNO, and drug name encoding (5 commits)
==instead of.equals()) in the medication stash caused lookup failuresGCN_SEQNOfield in the drug search flow and fixed drug name encoding on inputRelated Issues: https://github.com/openo-beta/Open-O/issues/2340, https://github.com/openo-beta/Open-O/issues/1879
3. PR #2345 - Fix: ghost card appears when unchecking ReRx checkbox after staging (3 commits)
Related Issue: https://github.com/openo-beta/Open-O/issues/2342
4. PR #2414 - Fix: Instructions Field Reference popup in the Rx module cannot be closed (1 commit)
Related Issue: https://github.com/openo-beta/Open-O/issues/2391
5. PR #2404 - Fix: restore drug profile legend and filter tab functionality broken by DataTables upgrade (6 commits)
Related Issue: https://github.com/openo-beta/Open-O/issues/2387
6. PR #2413 - Fix: "Reprint" button in Rx module no longer works (4 commits)
Related Issue: https://github.com/openo-beta/Open-O/issues/2397
7. PR #2415 - Fix: medication list in Rx module sorted in wrong order (4 commits)
Related Issue: https://github.com/openo-beta/Open-O/issues/2390
8. PR #2417 - Fix: restore line break rendering and fix missing labels in Rx Preview (2 commits)
Related Issue: https://github.com/openo-beta/Open-O/issues/2388
9. PR #2261 - Fix: missing staged medications when saving with multiple Rx-related pages open - LEGACY BUG (18 commits)
Related Issue: https://github.com/openo-beta/Open-O/issues/2237