fix(food-queue): resolve camp map patient count mismatch
title: "fix(backend): correct food queue patient count in camp map"
🐛 Bug Report
Describe the bug
Food Queue patient count displayed in the Camp Map was inconsistent with the actual Food Queue patient listing. Patients visible in the Food Queue page were not reflected in the Camp Map population count (P value), causing incorrect queue statistics.
To Reproduce
- Register patients and move them to the Food Queue.
- Open the Food Queue page and verify patients are present.
- Navigate to Camp Map as Volunteer/Admin.
- Compare Food Queue patient listing with Camp Map Food Queue
Pcount. - Observe that the Food Queue tile shows
P0or incorrect values despite patients existing in the queue.
Expected behavior
The Food Queue patient count in Camp Map should match the actual number of patients returned in the Food Queue listing and remain consistent across Volunteer and Admin views.
Screenshots
Refer to attached screenshots showing:
- Food Queue page displaying patients.
- Camp Map showing mismatched Food Queue
Pcount. - Network response mismatch in
population-countsAPI.
Environment
- OS: Linux (Ubuntu)
- Browser: Chrome / Firefox
- Frontend: Vite React
- Backend: FastAPI
Additional context
The issue was caused by backend Food Queue population count logic not using the same filtering/query conditions as the Food Queue patient listing endpoint, resulting in count inconsistencies.