Skip to content

feat : added the search option in the medicine list page

Closes #210 (closed)

Fuzzy Search Implementation – Volunteer Medicine List

Description

Implemented a fuzzy search bar in the Volunteer Medicine List page to improve medicine accessibility and filtering.


Key Changes

🔎 Shared Search Utility

  • Extracted the fuzzy search and scoring logic into a new shared utility: src/utils/searchUtils.ts

  • Enables consistent searching across the application.

  • Simplifies maintenance and reduces duplication.

Medicine List Filtering

  • Added a real-time search bar to the Medicine List page.
  • Volunteers can now filter medicines by:
  • Medicine ID
  • Formulation
  • Type

Dynamic PDF Generation

  • Updated the PDF download feature.
  • Ensures that only the currently filtered results are exported.

Code Refactoring

  • Refactored UpdatePrescriptionPage.tsx.
  • Replaced local search logic with the new shared search utility.
  • Reduced code duplication and improved maintainability.

Verification

  • Verified that the search bar correctly filters the medicine table.
  • Confirmed that the "Download PDF" button honors active filters.
  • Ensured that the medicine autocomplete in the Update Prescription flow remains fully functional after refactoring.

image

Edited by Bikkumalla Sai Krishna

Merge request reports

Loading