Skip to content

Search Input State Not Reset and feature single doctor

srilatha bandari requested to merge feat-single-doctor into develop

What does this MR do and why?

This MR addresses two workflow issues identified during the medical camp usage of the eHRS system:

  1. Multiple Doctor Assignment Issue Previously, a patient could be assigned to multiple doctors simultaneously. This caused:

    • The same patient appearing in multiple doctor queues
    • Confusion among volunteers about consultation ownership
    • Inconsistent patient tracking

    This MR ensures that a patient can have only one active doctor assignment at a time. If reassigned, the previous assignment is replaced or marked inactive.

  2. Search Input State Not Reset After prescription submission, the Book Number search input field was not clearing automatically. This required manual deletion before entering the next patient’s Book Number, slowing down workflow and increasing the risk of entry errors.

    This MR resets the search input state after successful submission to improve efficiency during high patient volume.


References

  • Issue: Multiple Doctor Assignment Bug
  • Issue: Search Input State Not Reset
  • Branch: feat-single-doctor
  • Observed during Medical Camp (2026-03-01)

Screenshots or screen recordings

Before After
Patient appears in multiple doctor queues Patient restricted to one active doctor queue
Book Number remains in search field after submission Search input auto-clears after submission

How to set up and validate locally

  1. Checkout the branch:

    git checkout feat-single-doctor
  2. Start the backend server:

    uvicorn main:app --reload
  3. Start the frontend application.

  4. Validate doctor assignment:

    • Assign a doctor to a patient.
    • Try assigning another doctor to the same patient.
    • Confirm only one active assignment exists.
  5. Validate search input reset:

    • Search using a Book Number.
    • Enter prescription and submit.
    • Confirm the search input clears automatically.
    • Ensure focus is ready for the next entry.

MR acceptance checklist

  • Ensures only one active doctor per patient
  • Prevents duplicate doctor assignments
  • Resets search input state after submission
  • Improves workflow efficiency
  • No impact on unrelated modules
  • Tested locally under multiple scenarios

#60 (closed)

Merge request reports

Loading