Skip to content

Refactor: Centralize oscarRx JavaScript utilities into shared asset #1865

@coderabbitai

Description

@coderabbitai

Description

The toggleSection() and useFav2() functions are currently defined inline in individual JSP files, leading to code duplication and inconsistent behavior across pages.

Current Locations

  • toggleSection(): src/main/webapp/oscarRx/ShowAllergies2.jsp:107-119
  • useFav2(): src/main/webapp/oscarRx/SideLinksEditFavorites2.jsp:158-160

Recommendation

Move these utilities to a centralized JavaScript file such as:

  • /share/javascript/Oscar.js, or
  • A new /oscarRx/rx-common.js

Benefits

  • Easier to maintain and test
  • Consistent behavior across all pages
  • Reduces code duplication
  • Single source of truth for shared functionality

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions