Skip to content

fix : disease registry has issues#313

Merged
yingbull merged 5 commits intodevelop/coyotefrom
255-disease-registry-issues
Jun 20, 2025
Merged

fix : disease registry has issues#313
yingbull merged 5 commits intodevelop/coyotefrom
255-disease-registry-issues

Conversation

@LiamStanziani
Copy link
Copy Markdown
Collaborator

@LiamStanziani LiamStanziani commented Jun 18, 2025

Fixed issues in patient echart disease registry:

  • Not being able to input any disease registry codes as the input fields were disabled by default
  • 500 error on submission of page
  • 404 errors when submitting page, or using the options on an already existing registered disease

Fixed issues in administration disease registry:

  • broken form and button options that had broken styling and deprecated struts 1 nested tags
  • 404 errors on buttons when submitting forms
  • Replacing character set of html to UTF-8
  • Setting different values and id's for radio buttons that caused radio buttons to be deselected

Summary by Sourcery

Fix patient and administration disease registry pages by re-enabling input fields, correcting form actions and redirects, replacing deprecated tags, and standardising encoding and radio button behavior.

Bug Fixes:

  • Enable disease registry input fields by setting disabled attribute based on user permissions
  • Resolve 500 and 404 errors by updating form action URLs and response redirects to include the correct context path
  • Replace deprecated Struts nested tags with standard HTML inputs to restore button functionality
  • Correct radio button values and IDs to prevent deselection issues

Enhancements:

  • Set HTML character encoding to UTF-8 in JSPs
  • Introduce a JSP string variable for the disabled attribute to simplify form field handling
  • Consolidate context path usage across form submissions and redirects for consistency

…lve", "Delete", and"Update". Fixed styling issues on administration disease registry in relation to main, fixed broken button and search due to a depricated nested:form and submit tags
…efault, and fixed an issue where the radio button being not selected to any value might cause searches to fail
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Jun 18, 2025

Reviewer's Guide

This PR refactors the disease registry interfaces to enable UTF-8 encoding, replace deprecated Struts nested tags with standard HTML forms, correct all form and redirect URLs to use the context path and .do endpoints, update radio button values and IDs for proper selection, and introduce dynamic disabling of input fields based on user permissions.

Class diagram for dynamic input disabling in dxResearch.jsp

classDiagram
    class SecurityManager {
      +hasWriteAccess(String, String) : boolean
    }
    class dxResearch.jsp {
      -boolean disable
      -String disabled
      +setAttribute("disable", disable)
      +setAttribute("disabled", disabled)
    }
    SecurityManager <.. dxResearch.jsp : uses
Loading

Class diagram for updated dxResearch2Action and dxResearchUpdate2Action URL handling

classDiagram
    class dxResearch2Action {
      +execute() : String
      -request : HttpServletRequest
      -response : HttpServletResponse
    }
    class dxResearchUpdate2Action {
      +execute() : String
      -request : HttpServletRequest
    }
    dxResearch2Action : +execute() uses request.getContextPath() for redirects
    dxResearchUpdate2Action : +execute() uses request.getContextPath() for redirects
Loading

File-Level Changes

Change Details Files
Enable UTF-8 encoding for pages and forms
  • Added <%@ page contentType and pageEncoding directives for UTF-8
  • Inserted header
  • Set accept-charset="UTF-8" on form elements
src/main/webapp/oscarReport/oscarReportDxReg.jsp
Replace Struts nested tags with standard HTML controls
  • Swapped nested:form for with method and class attributes
  • Replaced nested:submit elements with
  • Updated submit and clear buttons to standard HTML inputs
src/main/webapp/oscarReport/oscarReportDxReg.jsp
Correct form action URLs and backend forwards/redirects
  • Prefixed form actions and redirects with request.getContextPath()
  • Appended .do extension to all action URLs
  • Replaced hard-coded paths in Java actions with dynamic context-path concatenation
src/main/webapp/oscarReport/oscarReportDxReg.jsp
src/main/java/oscar/oscarResearch/oscarDxResearch/pageUtil/dxResearch2Action.java
src/main/java/oscar/oscarResearch/oscarDxResearch/pageUtil/dxResearchUpdate2Action.java
Update radio button values and IDs for correct selection
  • Changed generic radio values to descriptive method names
  • Assigned unique IDs per radio button
  • Bound onClick actions to corresponding .do endpoints
src/main/webapp/oscarReport/oscarReportDxReg.jsp
Add dynamic disabling of input fields based on permissions
  • Checked write access via SecurityManager and set a disable flag
  • Computed a disabled string and exposed it as a page attribute
  • Applied the dynamic disabled attribute to all relevant form controls
src/main/webapp/oscarResearch/oscarDxResearch/dxResearch.jsp

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @LiamStanziani - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@LiamStanziani LiamStanziani requested a review from yingbull June 18, 2025 21:16
@LiamStanziani LiamStanziani self-assigned this Jun 19, 2025
@yingbull yingbull merged commit f18de7f into develop/coyote Jun 20, 2025
9 of 11 checks passed
@yingbull yingbull deleted the 255-disease-registry-issues branch January 8, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disease registry has issues within its code search, addition, and UI components on develop/coyote

2 participants