Draft: Feat/patient status

This MR introduces the Patient Login functionality and implements a dynamic, stage-based queue system in the Patient Dashboard.

🔐 Patient Login

Implemented patient login using:

Book Number

Password

On successful authentication:

Patient is redirected to the Patient Dashboard

Token-based authentication is used for secure API communication

Book number is displayed in the dashboard header

📊 Patient Dashboard – Queue Implementation

Added dynamic queue tracking for:

Vitals Queue

Consultation Queue

Queue display is now calculated based on the patient’s current stage, instead of showing only a static queue number.

🧠 Queue Logic (Stage-Based Calculation)

The number of patients ahead is determined dynamically using backend data:

🔹 Vitals Stage

If the patient is in Vitals stage, only patients with status "vitals" ahead of them are counted.

🔹 Consultation Stage

If the patient is in Consultation stage, only patients in:

"waiting"

"in_consultation"

ahead of them are counted.

This ensures the queue reflects the actual stage-specific waiting list.

💬 UI Behavior

The dashboard now displays:

“There are X patients ahead of you”

“You are next” when patientsAhead = 0

Proper status indicator (Waiting / In Consultation / Completed)

Queue updates dynamically based on backend API response.

🚀 Impact

This enhancement improves:

Transparency for patients

Real-time stage awareness

Professional queue management experience

Overall usability of the Patient Dashboard

Edited by Rajuldev Vandana

Merge request reports

Loading