Skip to content

"Adding Prescriptions & Verify Medicines to Coordinator Dashboard"

Overview

This MR extends the Coordinator Dashboard by adding Prescriptions and Verify Medicines modules while ensuring that existing Queue Management functionality remains completely unchanged.


What does this MR do and why?

The Coordinator Dashboard previously supported only Queue Management.

This MR introduces two new modules:

  • Prescriptions
  • Verify Medicines

These features are added as independent modules to allow coordinators to:

  • Manage prescriptions
  • Verify medicines

The implementation ensures strict separation from Queue functionality to avoid conflicts and maintain clean architecture.


Changes Made

  • Updated Coordinator Dashboard:

    • Added navigation for Prescriptions
    • Added navigation for Verify Medicines
  • Implemented Prescriptions module:

    • Displays patients based on status
    • Supports add, edit, and delete prescription
    • Updates patient status to "PRESCRIPTION_DONE"
  • Implemented Verify Medicines module:

    • Displays patients with completed prescriptions
    • Supports medicine verification
  • Ensured no queue logic is reused in these modules


Technical Details

  • Coordinator Dashboard is implemented as a navigation-only component

  • Queue Management remains untouched and fully functional

  • Prescriptions and Verify Medicines:

    • Do not use queue components, hooks, or state
    • Use patient status-based filtering
  • Prescription updates:

    • Update prescription data independently
    • Update patient status without queue involvement

Type of Change

  • 🐛 Bug fix
  • New feature
  • 💥 Breaking change
  • 📝 Documentation update
  • 🎨 UI/UX improvement
  • ️ Refactor
  • Performance improvement
  • 🧪 Test update
  • 🔧 Configuration change
  • 🚨 Security fix

Related Issues / References

Closes #310 (closed)


Screenshots or Screen Recordings

Before After
Only Queue Management Queue + Prescriptions + Verify Medicines

How to Set Up and Validate Locally

  1. Checkout this branch

  2. Install dependencies:

    bun install
  3. Run development server:

    bun dev
  4. Navigate to Coordinator Dashboard

  5. Validate:

    • Queue Management works unchanged
    • Prescriptions page opens correctly
    • Verify Medicines page opens correctly
    • Prescription add/edit/delete works
    • Medicine verification works

Testing Done

  • Manual testing completed
  • Unit tests added

Test Cases Covered:

Scenario Expected Result Status
Dashboard navigation Pages open correctly
Queue functionality Unaffected
Prescription update Works correctly
Prescription delete Works correctly
Verify medicines Works correctly
Empty state Displays correctly

Code Quality Checklist

Code Standards

  • Code follows project conventions
  • No console.log() left
  • No unused code
  • Proper TypeScript usage
  • ESLint/Prettier passed

React Best Practices

  • Components are properly structured
  • Hooks follow rules
  • State management is appropriate

Component Patterns

  • UI components used consistently
  • Responsive design considered

API & Data Fetching

  • API calls implemented correctly
  • Loading and error states handled

Error Handling

  • Errors handled gracefully
  • User-friendly messages shown

Documentation

  • README.md updated
  • .env.example updated
  • CHANGELOG.md updated

Known Limitations / Technical Debt

  • Unit tests for new modules are pending
  • Additional validation can be improved in forms

Additional Notes

  • Queue functionality is intentionally not modified
  • New modules are fully independent to avoid conflicts
  • Ensures clean separation between workflow (queue) and coordinator actions

Merge request reports

Loading