Skip to content

About

Btech second year DBMS project

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

Clinic Appointment Scheduling & Billing System

Full-stack Flask application for managing patient registrations, appointment scheduling, consultations, lab tests, billing, and payments in a clinic setting.

Features

  • Patient registration with demographic details stored in MySQL.
  • Doctor directory with specialization and fees.
  • Appointment booking that links patients and doctors.
  • Consultation records with diagnoses and prescriptions.
  • Lab tests and lab reports tied to consultations.
  • Automated bill generation including doctor fees and lab costs.
  • Payment tracking with mode, status, and date.
  • Patient-centric reports covering appointments, lab results, and payments.

Project Structure

clinic_app/
├── app.py
├── templates/
│   ├── base.html
│   ├── index.html
│   ├── register.html
│   ├── appointment.html
│   ├── consultation.html
│   ├── lab_test.html
│   ├── bill.html
│   ├── payment.html
│   └── report.html
├── static/
│   └── css/
│       └── styles.css
└── database/
    ├── db_connection.py
    └── schema.sql
env.example
requirements.txt

Prerequisites

  • Python 3.10+
  • MySQL 8+

Setup Instructions

  1. Create environment file

    copy env.example .env

    Edit .env to include your MySQL credentials and target database name (clinic_db).

  2. Create and activate a Python virtual environment (recommended)

    python -m venv .venv
    .venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Create the database schema and sample data

    mysql -u <user> -p < schema_sql_path

    Replace <user> with your MySQL username and schema_sql_path with clinic_app\database\schema.sql. You will be prompted for the password specified in your .env file.

  5. Run the Flask application

    python clinic_app\app.py

    The default development server runs at http://127.0.0.1:5000/.

Usage Notes

  • Navigation links at the top of the UI cover every core module.
  • Flash messages confirm database actions or highlight validation issues.
  • Bills are calculated as doctor fees + sum(lab test costs) per consultation.
  • Reports can be filtered per patient to review their full history.

Environment Variables

clinic_app/database/db_connection.py reads the following variables (set in .env):

  • MYSQL_HOST
  • MYSQL_PORT
  • MYSQL_USER
  • MYSQL_PASSWORD
  • MYSQL_DATABASE
  • FLASK_SECRET_KEY (optional; defaults to change-this-secret)

Next Steps

  • Adjust Bootstrap styling or add JavaScript interactions as needed.
  • Add authentication/authorization for staff roles if required.
  • Replace sample data with production entries or seed scripts.

About

Btech second year DBMS project

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages