Back to ER Diagram
Camp Management

Camp Management Logic

Labour camp operations — blocks, rooms, occupancy, visitor management, meal planning, medical, transport, hygiene, and fire safety.

PostgreSQL
14 Tables
Schema: camp
Occupancy Tracking

Overview

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.


Setup Camp

Assign Rooms

Track Occupancy

Manage Services

Report/Comply
14
Camp Tables
Real-time
Occupancy
Per-head
Meal Plan
Daily
Hygiene Check

Status States

StatusDescriptionAllowed ActionsNext States
OccupiedRoom assigned to worker(s)Transfer, VacateVacant
VacantRoom available for assignmentAssign WorkerOccupied
MaintenanceRoom under repair/cleaningComplete, Return to PoolVacant
CondemnedRoom unfit for habitation

Database Schema

camp.camp_master

  • camp_id — PK
  • project_id — FK → project.project
  • camp_name, location — Camp identification
  • total_capacity, current_occupancy — Capacity tracking
  • facilities_json — Amenities list
  • status — Active / Under Construction / Closed

camp.camp_room

  • room_id — PK
  • block_id — FK → camp.camp_block
  • room_number, room_type — single | double | dormitory
  • capacity, current_count — Occupancy limits
  • status — Vacant / Occupied / Maintenance

camp.camp_occupancy

  • occupancy_id — PK
  • room_id — FK → camp.camp_room
  • worker_id — FK → labour.worker
  • check_in_date, check_out_date — Stay period
  • status — Active / Checked Out

camp.meal_plan

  • meal_id — PK
  • camp_id — FK → camp.camp_master
  • meal_date, meal_type — breakfast | lunch | dinner
  • planned_count, actual_count — Headcount tracking
  • menu_items, cost_per_head — Menu and costing

Camp Operations

1

Camp Setup

Create camp with blocks, rooms, and capacity. Configure facilities, meal vendor, medical clinic hours, and transport schedule.

2

Room Assignment

Assign workers to rooms based on crew/trade grouping. System prevents over-capacity assignment. Transfer workers between rooms as needed.

3

Occupancy Tracking

Daily occupancy register with headcount. Check-in/check-out logged. Visitor passes issued with entry/exit times.

4

Meal Management

Daily meal plan with menu and expected headcount. Actual served count recorded. Cost per head tracked. Special dietary requirements noted.

5

Compliance Monitoring

Daily hygiene inspections, monthly fire drills, medical clinic utilization, and utility consumption monitored. Reports generated for labour inspector compliance.

Camp Queries

Camp Occupancy Summary

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;

Validation Rules

Business Rules

  • Room Capacity: Assignment blocked if room at max capacity
  • Visitor Time Limit: Visitors must check out within 12 hours
  • Meal Count: Actual meal count cannot exceed camp current occupancy × 1.1
  • Fire Drill: Monthly fire drill mandatory — system alerts if overdue

Integration Points

Connected Modules

  • Labour: Worker records linked for room assignment
  • HSE: Camp safety incidents reported through HSE module
  • Finance: Camp operating costs allocated to project overhead
  • Procurement: Camp supplies (food, cleaning) via procurement module

Best Practices

Recommended

  • Maintain minimum 10% room buffer for new arrivals
  • Conduct weekly hygiene audits with photo evidence
  • Track per-capita camp cost for benchmarking across projects
  • Ensure camp complies with Building & Other Construction Workers Act