How arshh06/vitavia works
VITAVIA is an ambulance emergency-response platform: simulated patient telemetry enters a backend, which assesses urgency, checks hospital resources, compares traffic-aware routes, selects a suitable destination, and tracks the journey. The repository contains both the README-described backend and a more extensive hospital/ application with triage, journey, API, dashboard, and audit-history modules. The graph preserves both implementations. Some links—especially across HTTP and unsampled route handlers—are supported only by the README or source-index references; those limits are reflected in the evidence.
Main entry points: routes.py Emergency API · dashboard.py Operations dashboard · main.py Legacy API · selection_service.py Hospital selection
Components 33
Ambulance simulation
- Telemetry simulator
ambulance/simulator.py
Core response backend
- Legacy API
backend/main.py - Legacy schemas
backend/models.py - Legacy clinical analysis
backend/gemini_service.py - Legacy hospital registry
backend/hospitals.py - Eligibility and selection
backend/decision.py - Legacy routing engine
backend/routing.py
Hospital backend
- Emergency API
hospital/backend/app/api/routes.py - Emergency schemas
hospital/backend/app/models/schemas.py - Vitals simulation
hospital/backend/app/services/simulation_service.py - Assisted triage
hospital/backend/app/services/triage_service.py - Gemini decision support
hospital/backend/app/services/gemini_service.py - Hospital selection
hospital/backend/app/services/selection_service.py - Hospital registry
hospital/backend/app/data/hospitals.py - Resource verification
hospital/backend/app/services/hospital_service.py - Traffic-aware routing
hospital/backend/app/services/routing_service.py - Journey and acknowledgment
hospital/backend/app/services/journey_service.py - Emergency intake
hospital/backend/app/services/incoming_emergency_service.py
Audit history
- History persistence
hospital/backend/app/services/persistence_service.py - SQLite audit store
hospital/backend/app/db/database.py - History records
hospital/backend/app/db/models.py
Operations dashboards
- Legacy command dashboard
frontend/app.py - Operations dashboard
hospital/frontend/dashboard.py - Dashboard API client
hospital/frontend/api_client.py - Route and acknowledgment view
hospital/frontend/components/route_panel.py - Display terminology
hospital/frontend/components/presentation.py - Hospital comparison cards
hospital/frontend/components/hospital_cards.py - Vitals monitor
hospital/frontend/components/vitals_panel.py - History viewer
hospital/frontend/components/history_panel.py - Journey view
hospital/frontend/components/journey_panel.py
Other components
- Patient / request
- Google Routes API
- Gemini service
Connections 33
- Patient / request → Telemetry simulator: starts scenario
README.md - Telemetry simulator → Legacy API: posts telemetry
ambulance/simulator.py - Legacy API → Legacy clinical analysis: requests analysis
backend/main.py - Legacy API → Eligibility and selection: requests decision
backend/main.py - Legacy API → Legacy hospital registry: uses registry
backend/main.py - Eligibility and selection → Legacy clinical analysis: uses assessment
backend/decision.py - Eligibility and selection → Legacy hospital registry: checks capacity
backend/decision.py - Eligibility and selection → Legacy routing engine: evaluates routes
backend/decision.py - Legacy API → Legacy command dashboard: serves workflow
README.md - Emergency API → Vitals simulation: reads and sets vitals
hospital/backend/app/api/routes.py - Emergency API → Assisted triage: requests triage
hospital/backend/app/api/routes.py - Assisted triage → Gemini decision support: requests analysis
hospital/backend/app/services/triage_service.py - Emergency API → Hospital selection: requests selection
hospital/backend/app/api/routes.py - Hospital selection → Resource verification: checks resources
hospital/backend/app/services/selection_service.py - Hospital selection → Traffic-aware routing: calculates routes
hospital/backend/app/services/selection_service.py - Hospital selection → Assisted triage: uses requirements
hospital/backend/app/services/selection_service.py - Hospital selection → Hospital registry: reads candidates
hospital/backend/app/services/selection_service.py - Traffic-aware routing → Google Routes API: requests traffic routes
hospital/backend/app/services/routing_service.py - Emergency API → Journey and acknowledgment: starts journey
hospital/backend/app/api/routes.py - Emergency API → Emergency intake: orchestrates intake
hospital/backend/app/api/routes.py - Emergency API → History persistence: saves operation results
hospital/backend/app/api/routes.py - History persistence → SQLite audit store: opens transactions
hospital/backend/app/services/persistence_service.py - SQLite audit store → History records: creates tables
hospital/backend/app/db/database.py - Operations dashboard → Dashboard API client: requests backend data
hospital/frontend/dashboard.py - Operations dashboard → Route and acknowledgment view: renders route view
hospital/frontend/dashboard.py - Operations dashboard → Display terminology: uses display helpers
hospital/frontend/dashboard.py - Operations dashboard → Vitals monitor: renders vitals
hospital/frontend/dashboard.py - Operations dashboard → History viewer: renders history
hospital/frontend/dashboard.py - Route and acknowledgment view → Display terminology: formats resources
hospital/frontend/components/route_panel.py - Hospital comparison cards → Route and acknowledgment view: uses route context
hospital/frontend/components/hospital_cards.py - History viewer → Route and acknowledgment view: renders route details
hospital/frontend/components/history_panel.py - History viewer → Display terminology: formats history
hospital/frontend/components/history_panel.py - Journey view → Route and acknowledgment view: uses route display
hospital/frontend/components/journey_panel.py