feat: designated area in medical camp
name: Feature Request
about: Suggest a new feature or enhancement for the Corpus Collector Backend.
title: "[Feature]: Implement Designated Area/Workstation Management API"
labels: "feature"
assignees: ''
title: "feat(backend): implement designated area and station tracking API"
🚀 Feature Request
Is your feature request related to a problem? Please describe.
I'm always frustrated when hospital or camp administrators cannot track or officially assign volunteers to specific workstations (e.g. Registration compared to Pharmacy) in the backend. Currently, the system handles all volunteers generically and has no robust capability to map authenticated operational workers to their active designated zones in real-time, making monitoring and load-balancing incredibly inefficient during high volume shifts.
Describe the solution you'd like
I would like a suite of RESTful API routes supported by a new distinct database entity to capture real-time volunteer workstation assignments. Specifically, I'm requesting:
-
New Schema: A table (e.g.,
VolunteerWorkstationAssignment) bridging theuser_idmapped strictly to an activeCampAreaEnum(e.g.registration,vitals,pharmacy). -
Assignment Endpoint: A
POST /api/v1/areas/assignroute so coordinators can formally insert/update a volunteer's deployment zone. -
Analytics Endpoint: A
GET /api/v1/areas/statsendpoint that efficiently aggregates and outputs the deployment distribution (the count of volunteers actively populating each corresponding area/zone).
Describe alternatives you've considered
- We considered appending an
active_areacolumn directly to the baseUsertable model. However, this is heavily coupled, breaks single responsibility, and strips historical metrics (it completely overwrites what previous tasks a volunteer fulfilled during their past shifts). Utilizing an assignment ledger junction design is preferred.
Additional context
This backend feature acts as the mandatory backbone layer. It is highly coupled and prerequisite to enabling the frontend clients' upcoming feature to dynamically route volunteer UI instances to different dashboard views based strictly upon their active assignment.
📌 Follow semantic issue titling convention:<type>(<scope>): <description>(e.g.,feat(records): support video uploadsorfeat(auth): implement password reset).