How sunkara-saivardhan/hospital-patient-management-system works
The system lets hospital staff manage patients, doctors, and appointments through a Streamlit dashboard backed by a FastAPI CRUD API and PostgreSQL. The dashboard also summarizes record totals and today’s appointments. Appointment creation checks patient and doctor records, past dates, and doctor time-slot conflicts before saving. The map reflects the supplied README and sampled source; API route groups share one implementation file, and no unsampled modules are inferred.
Main entry points: main.py Patient API · database.py Database sessions · app.py Dashboard · models.py ORM models
Components 11
Streamlit frontend
- Management UI
frontend/app.py - Dashboard
frontend/app.py - CRUD interface
frontend/app.py
API and domain
- Patient API
backend/main.py - Doctor API
backend/main.py - Appointment API
backend/main.py - Request and response schemas
backend/schemas.py
Persistence
- ORM models
backend/models.py - Database sessions
backend/database.py - PostgreSQL
Other components
- Hospital staff
Connections 20
- Hospital staff → Management UI: uses
- Management UI → Dashboard: selects
- Management UI → CRUD interface: selects
- Dashboard → Patient API: fetches totals
- Dashboard → Doctor API: fetches totals
- Dashboard → Appointment API: fetches records
- CRUD interface → Patient API: manages records
- CRUD interface → Doctor API: manages records
- CRUD interface → Appointment API: manages records
- Patient API → Request and response schemas: validates and shapes
- Doctor API → Request and response schemas: validates and shapes
- Appointment API → Request and response schemas: validates and shapes
- Patient API → ORM models: queries and writes
- Doctor API → ORM models: queries and writes
- Appointment API → ORM models: checks and writes
- Patient API → Database sessions: uses session
- Doctor API → Database sessions: uses session
- Appointment API → Database sessions: uses session
- ORM models → Database sessions: uses Base
- Database sessions → PostgreSQL: connects