How 1-satyam/nearest_hospital_recommender works
ArogyaSetu is a Bhubaneswar hospital-discovery and bed-request demonstration. Users explore and compare ranked hospitals, inspect reported vacancy and routes, then sign in and follow a demo hold through its lifecycle; the hospital desk supports scoped staff access. Backend stages cover inventory loading, discovery/forecast/routing, authentication, and request lifecycle persistence. The README documents additional UI capabilities, but most frontend and API implementation details were not sampled, so those connections are shown only as unverified where necessary.
Main entry points: App.jsx Application shell · main.py FastAPI application · hospitals.py Hospital discovery API · requests.py Request lifecycle API
Components 25
Discovery interface
- Application shell
frontend/src/App.jsx - Hospital views
frontend/src/components/HospitalCard.jsx - Map and routes
frontend/src/components/MapComponent.jsx - Comparison matrix
frontend/src/components/ComparisonTable.jsx - Top N sorting
frontend/src/utils/hospitalSorting.js - Vacancy metrics
frontend/src/utils/hospitalMetrics.js - Account and profile
frontend/src/components/AuthModal.jsx - Bed request flows
frontend/src/components/GeneralAdmissionFlow.jsx - Hold and history
frontend/src/components/HoldPassView.jsx - Hospital desk portal
frontend/src/components/DeskPortalModal.jsx - Chat assistant
frontend/src/components/ChatbotDrawer.jsx
API workflows
- FastAPI application
backend/main.py - Hospital discovery API
backend/api/hospitals.py - Authentication API
backend/api/auth.py - Request lifecycle API
backend/api/requests.py - Chat API
backend/api/chatbot.py
Discovery services
- Hospital ranking
backend/core/ranking.py - Demo forecast
backend/core/forecasting.py - Route estimation
backend/core/routing.py - Spatial calculations
backend/core/spatial.py
Data and persistence
- Hospital inventory loader
backend/data_engine/loader.py - SQLite records
backend/db/database.py - CSV datasets
Other components
- Hospital seeker
- OSRM routing service
Connections 28
- Hospital seeker → Application shell: uses
README.md - Application shell → Hospital views: presents
- Application shell → Map and routes: presents
- Application shell → Comparison matrix: presents
- Application shell → Top N sorting: sorts hospitals
- Top N sorting → Vacancy metrics: reads vacancy
frontend/src/utils/hospitalSorting.js - Application shell → Account and profile: presents
- Application shell → Bed request flows: presents
- Application shell → Hold and history: presents
- Application shell → Hospital desk portal: presents
- Application shell → Chat assistant: presents
- Application shell → FastAPI application: calls API
- FastAPI application → Hospital discovery API: registers routes
backend/main.py - FastAPI application → Request lifecycle API: registers routes
backend/main.py - FastAPI application → Authentication API: registers routes
backend/main.py - FastAPI application → Chat API: registers routes
backend/main.py - Hospital discovery API → Hospital inventory loader: loads records
backend/api/hospitals.py - Hospital discovery API → Route estimation: estimates routes
backend/api/hospitals.py - Hospital discovery API → Demo forecast: requests forecast
backend/api/hospitals.py - Demo forecast → Hospital inventory loader: loads training data
backend/core/forecasting.py - Route estimation → Spatial calculations: calculates distance
backend/core/routing.py - Route estimation → OSRM routing service: queries optionally
backend/core/routing.py - Hospital inventory loader → CSV datasets: reads datasets
README.md - Authentication API → SQLite records: reads and writes
backend/api/auth.py - Request lifecycle API → SQLite records: records lifecycle
backend/api/requests.py - Request lifecycle API → Authentication API: requires user
backend/api/requests.py - Request lifecycle API → Hospital inventory loader: looks up hospitals
backend/api/requests.py - Hospital discovery API → Hospital ranking: ranks results