fix: restore server-side drug filtering and heading display broken by…#115
Open
D3V41 wants to merge 1 commit intoMagentaHealth:release/2026-03-17from
Conversation
… DataTables upgrade
Reviewer's GuideRestores the Rx drug profile legend UI and re-enables the corresponding server-side filtering logic for drug lists, so profile view tabs once again send filter parameters and ListDrugs.jsp honors them. Sequence diagram for restored drug profile filter interactionssequenceDiagram
actor User
participant Browser
participant SearchDrug3_jsp as SearchDrug3_jsp
participant ListDrugs_jsp as ListDrugs_jsp
User->>Browser: Click filter tab in legend
Browser->>SearchDrug3_jsp: onclick handler for selected tab
activate SearchDrug3_jsp
SearchDrug3_jsp->>Browser: callReplacementWebService(ListDrugs_jsp_url, drugProfile)
deactivate SearchDrug3_jsp
Browser->>ListDrugs_jsp: HTTP GET ListDrugs.jsp with filter parameters
activate ListDrugs_jsp
ListDrugs_jsp->>ListDrugs_jsp: Apply status, longTermOnly, drugLocation filters
ListDrugs_jsp-->>Browser: Filtered drug list HTML
deactivate ListDrugs_jsp
Browser->>Browser: Replace drugProfile inner HTML
Browser-->>User: Updated filtered drug profile view
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In ListDrugs.jsp you repeatedly call
request.getParameter("longTermOnly")and compare to two different values; consider reading it into a local variable once and using a clearer conditional structure to avoid duplication and make the filtering logic easier to follow. - The long
onclickattribute values in the legend links on SearchDrug3.jsp are hard to read and maintain; consider extracting them into named JavaScript functions or helpers instead of composing multi-call strings inline. - The repeated
<fmt:setBundle basename="oscarResources"/>calls inside each legend link in SearchDrug3.jsp could be reduced by setting the bundle once at a higher scope and then only using<fmt:message>to simplify the JSP markup.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In ListDrugs.jsp you repeatedly call `request.getParameter("longTermOnly")` and compare to two different values; consider reading it into a local variable once and using a clearer conditional structure to avoid duplication and make the filtering logic easier to follow.
- The long `onclick` attribute values in the legend links on SearchDrug3.jsp are hard to read and maintain; consider extracting them into named JavaScript functions or helpers instead of composing multi-call strings inline.
- The repeated `<fmt:setBundle basename="oscarResources"/>` calls inside each legend link in SearchDrug3.jsp could be reduced by setting the bundle once at a higher scope and then only using `<fmt:message>` to simplify the JSP markup.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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
SearchDrug3.jspthat was removed in edac1715d550de8062d066badc82eab62d833908ListDrugs.jspthat was commented out in the same commit, causing the Active, Inactive, Long Term/Acute, and External filter tabs to return unfiltered results regardless of which tab was clickedSummary by Sourcery
Restore the drug profile view controls and re-enable server-side drug list filtering in the prescription module.
Bug Fixes: