Labour camp operations — blocks, rooms, occupancy, visitor management, meal planning, medical, transport, hygiene, and fire safety.
Camp Management handles worker accommodation facilities at remote construction sites. Camps are organized into blocks and rooms with capacity tracking. Occupancy management assigns workers to rooms with check-in/check-out. Visitor logs track non-resident access. Meal plans manage catering with headcount forecasting. Medical, hygiene, fire safety, maintenance, transport, and utility modules ensure camp compliance with labour regulations.
| Status | Description | Allowed Actions | Next States |
|---|---|---|---|
| Occupied | Room assigned to worker(s) | Transfer, Vacate | Vacant |
| Vacant | Room available for assignment | Assign Worker | Occupied |
| Maintenance | Room under repair/cleaning | Complete, Return to Pool | Vacant |
| Condemned | Room unfit for habitation | — | — |
camp_id — PKproject_id — FK → project.projectcamp_name, location — Camp identificationtotal_capacity, current_occupancy — Capacity trackingfacilities_json — Amenities liststatus — Active / Under Construction / Closedroom_id — PKblock_id — FK → camp.camp_blockroom_number, room_type — single | double | dormitorycapacity, current_count — Occupancy limitsstatus — Vacant / Occupied / Maintenanceoccupancy_id — PKroom_id — FK → camp.camp_roomworker_id — FK → labour.workercheck_in_date, check_out_date — Stay periodstatus — Active / Checked Outmeal_id — PKcamp_id — FK → camp.camp_mastermeal_date, meal_type — breakfast | lunch | dinnerplanned_count, actual_count — Headcount trackingmenu_items, cost_per_head — Menu and costingCreate camp with blocks, rooms, and capacity. Configure facilities, meal vendor, medical clinic hours, and transport schedule.
Assign workers to rooms based on crew/trade grouping. System prevents over-capacity assignment. Transfer workers between rooms as needed.
Daily occupancy register with headcount. Check-in/check-out logged. Visitor passes issued with entry/exit times.
Daily meal plan with menu and expected headcount. Actual served count recorded. Cost per head tracked. Special dietary requirements noted.
Daily hygiene inspections, monthly fire drills, medical clinic utilization, and utility consumption monitored. Reports generated for labour inspector compliance.
SELECT cm.camp_name, cb.block_name, COUNT(cr.room_id) AS total_rooms, SUM(cr.capacity) AS total_capacity, SUM(cr.current_count) AS current_occupancy, ROUND(SUM(cr.current_count)::numeric / NULLIF(SUM(cr.capacity), 0) * 100, 1) AS occupancy_pct FROM camp.camp_master cm JOIN camp.camp_block cb ON cb.camp_id = cm.camp_id JOIN camp.camp_room cr ON cr.block_id = cb.block_id GROUP BY cm.camp_id, cb.block_id;