How pranav30r/multi-agent-hospital-management-system works
This is a hospital command-center application: staff authenticate, review live operational and clinical information, enter patient intake, and manage emergencies, beds, and approvals. The React dashboard calls a FastAPI backend, which exposes clinical, operational, and AI-assisted workflows backed by SQLAlchemy persistence and Redis/WebSocket event streaming. The README documents broader capabilities—including predictions, resource optimization, and multiple agents—whose detailed implementation was not sampled; those are represented at subsystem level rather than inferred call-by-call.
Main entry points: main.py FastAPI Application · App.jsx Dashboard Application · client.js HTTP API Client · routers Clinical And Patient Routes
Components 19
Command Center UI
- Dashboard Application
frontend/src/App.jsx - Authentication State
frontend/src/context/AuthContext.jsx - Live Event Context
frontend/src/context/EventContext.jsx - Operational Panels
frontend/src/components - HTTP API Client
frontend/src/api/client.js - WebSocket Hook
frontend/src/hooks/useWebSocket.js
Backend API
- FastAPI Application
backend/app/main.py - Staff Authentication
backend/app/routers/auth.py - Clinical And Patient Routes
backend/app/routers - Operations Routes
backend/app/routers
Clinical Workflow
- Clinical Intake
backend/app/services/clinical_intake_service.py
Intelligence And Operations
- Intelligence Execution
backend/app/services/intelligence_engine_service.py - Multi-Agent Orchestrator
backend/app/services/agent_orchestrator.py - Prediction Engine
backend/app/services - Resource And Workflow Services
backend/app/services
Persistence And Events
- SQL Database
backend/app/database.py - Redis Cache And Pub/Sub
backend/app/core/redis.py - WebSocket Event Stream
backend/app/routers/events.py
Other components
- Hospital Staff
Connections 22
- Hospital Staff → Dashboard Application: uses dashboard
frontend/src/App.jsx - Dashboard Application → Authentication State: checks identity
frontend/src/App.jsx - Dashboard Application → Operational Panels: renders panels
frontend/src/App.jsx - Dashboard Application → Live Event Context: provides events
frontend/src/App.jsx - Authentication State → HTTP API Client: stores token
frontend/src/context/AuthContext.jsx - Operational Panels → HTTP API Client: requests data
- Live Event Context → WebSocket Hook: subscribes to
frontend/src/context/EventContext.jsx - WebSocket Hook → HTTP API Client: uses token
frontend/src/hooks/useWebSocket.js - HTTP API Client → FastAPI Application: sends HTTP requests
- FastAPI Application → Staff Authentication: routes requests
backend/app/main.py - FastAPI Application → Clinical And Patient Routes: mounts routers
backend/app/main.py - FastAPI Application → Operations Routes: mounts routers
backend/app/main.py - FastAPI Application → SQL Database: initializes database
backend/app/main.py - FastAPI Application → Redis Cache And Pub/Sub: initializes Redis
backend/app/main.py - FastAPI Application → WebSocket Event Stream: mounts WebSocket
backend/app/main.py - Staff Authentication → SQL Database: queries staff
backend/app/routers/auth.py - Clinical And Patient Routes → Clinical Intake: invokes intake
- Clinical And Patient Routes → Intelligence Execution: invokes intelligence
- Intelligence Execution → Multi-Agent Orchestrator: delegates orchestration
backend/app/services/intelligence_engine_service.py - Intelligence Execution → SQL Database: reads run messages
backend/app/services/intelligence_engine_service.py - WebSocket Event Stream → Redis Cache And Pub/Sub: uses pub-sub
- Operations Routes → Resource And Workflow Services: invokes operations
backend/app/routers/auth.py