A simple hospital appointment manager built with Python and Streamlit. Use this app to register patients and doctors, schedule appointments, view and edit records, and reset the database. A demo data seeder is included to quickly populate the app for testing.
- Add / view / edit / delete patients
- Add / view / edit / delete doctors
- Schedule, view, edit, and cancel appointments
- Simple SQLite database (hospital.db)
- Dashboard with quick stats
- Demo data seeder available from the Dashboard
- Windows, macOS or Linux with Python 3.8+
- Git (optional)
Recommended: create and use a virtual environment for this project.
- Clone the repository (if you haven't already)
git clone https://github.com/hemant0hack/Hospital-Appointment-Manager.git
cd Hospital-Appointment-Manager- Create and activate a virtual environment
python -m venv .venv
.\.venv\Scripts\Activate.ps1- Install dependencies
.venv\Scripts\pip.exe install -r requirements.txtIf you don't have a requirements.txt, at minimum install:
.venv\Scripts\pip.exe install streamlit pandasStart the Streamlit app using the virtual environment's Streamlit executable:
.venv\Scripts\streamlit.exe run "$(Resolve-Path .\app.py)"Open the URL printed by Streamlit (usually http://localhost:8501) in your browser.
To quickly add sample patients, doctors and appointments for testing:
- Open the app and go to the Dashboard.
- Expand the Demo / Test data section.
- Click Seed demo data — the app will insert a few sample patients, doctors and appointments (it will skip any records with existing IDs).
After seeding, use the All Patients, All Doctors and All Appointments views to confirm the data.
- The app uses a local SQLite database file named
hospital.db(created in the project directory by theHospitalDatabaseclass). - If you need to inspect the database manually, you can use tools like
sqlite3, DB Browser for SQLite, or a Python script.
- If success messages don't appear or the UI doesn't update immediately after an action, try switching tabs or refreshing the browser page. The app reads the database on interaction and will show the latest data.
- If Streamlit errors mention missing attributes like
experimental_rerunorrerun, update Streamlit to a modern version or run the app without programmatic reruns (the app is compatible with multiple Streamlit versions).
- Main app:
app.py - Database wrapper:
database.py(uses SQLite)
This project includes a LICENSE file — check it for licensing details.
Feel free to open issues or submit pull requests with improvements or bug fixes.
Made with ❤️ — Hospital Appointment Manager by Hemant Rathore
