Skip to content

Raisulll/EyeCare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

EyeCare - Comprehensive Healthcare Management System

A full-stack healthcare management platform designed to connect patients, doctors, hospitals, pharmacies, and delivery agencies in a seamless ecosystem for eye care services.

Table of Contents

Overview

EyeCare is a comprehensive healthcare management system specifically tailored for eye care services. The platform facilitates interactions between multiple stakeholders in the healthcare ecosystem, providing a unified solution for appointment scheduling, prescription management, medical supplies ordering, and delivery tracking.

Key Stakeholders

  • Patients: Book appointments, view prescriptions, order medical supplies
  • Doctors: Manage appointments, create prescriptions, track earnings
  • Hospitals: Coordinate with doctors and manage appointments
  • Shops/Pharmacies: Manage inventory, fulfill orders, track transactions
  • Delivery Agencies: Handle order deliveries, update delivery status

Features

For Patients

  • Browse and book appointments with eye care specialists
  • View upcoming and past appointments
  • Access and download prescriptions
  • Order medical supplies and eyewear products
  • Shopping cart functionality with order tracking
  • View transaction history
  • Profile management with image upload

For Doctors

  • Dashboard to manage appointments
  • Create and manage prescriptions
  • Track consultation fees and earnings
  • View patient history and appointment details
  • Set availability time slots
  • Profile management with specialization details

For Hospitals

  • Manage affiliated doctors
  • Track appointments and consultations
  • Coordinate between patients and doctors

For Shops/Pharmacies

  • Inventory management system
  • Add and update products with images
  • Order fulfillment and tracking
  • Transaction management
  • View sales analytics

For Delivery Agencies

  • View assigned delivery orders
  • Update delivery status
  • Track delivery charges
  • Profile management

Technology Stack

Frontend

  • Framework: React 18.3.1
  • Routing: React Router DOM v6
  • UI Components:
    • React Bootstrap
    • Bootstrap 5.3.3
    • Bootstrap Icons
    • React Icons
    • FontAwesome Icons
  • State Management: React Hooks (useState, useEffect)
  • Styling: CSS3, Styled Components
  • Notifications: React Toastify
  • Modals: React Modal
  • Image Upload: Cloudinary integration
  • Utilities: UUID, Date handling

Backend

  • Runtime: Node.js with Express.js
  • Database: Oracle Database (OracleDB)
  • Cloud Storage: Supabase, Cloudinary
  • Authentication: Firebase Admin SDK
  • Email Service: Nodemailer
  • File Upload: Multer
  • API: RESTful API architecture
  • Security: CORS enabled, dotenv for environment variables

Development Tools

  • Package Manager: npm
  • Development Server: nodemon
  • Version Control: Git

Project Structure

EyeCare/
├── EyeCare_Client/          # React frontend application
│   ├── public/              # Static assets
│   │   ├── Images/          # Product images
│   │   ├── index.html
│   │   ├── manifest.json
│   │   └── robots.txt
│   ├── src/
│   │   ├── Assets/          # Images and static resources
│   │   ├── Components/      # React components
│   │   │   ├── Delivery Agency/  # Delivery management
│   │   │   ├── Doctor/           # Doctor dashboard & features
│   │   │   ├── Hospital/         # Hospital management
│   │   │   ├── Others/           # Shared components
│   │   │   ├── Patient/          # Patient features
│   │   │   ├── Shop/             # Pharmacy/Shop features
│   │   │   └── Signin-Signup/    # Authentication
│   │   ├── App.js           # Main application component
│   │   ├── firebase.js      # Firebase configuration
│   │   └── index.js         # Application entry point
│   └── package.json
│
└── EyeCare_Server/          # Node.js backend server
    ├── db/                  # Database files
    │   ├── init.sql         # Database schema
    │   ├── trigger.sql      # Database triggers
    │   ├── view.sql         # Database views
    │   ├── Cursor.sql       # Cursor operations
    │   ├── connectiondb.js  # Database connection
    │   └── SupabaseClient.js # Supabase client
    ├── routes/              # API route handlers
    │   ├── auth.js          # Authentication routes
    │   ├── appointment.js   # Appointment management
    │   ├── DoctorAppointment.js
    │   ├── editProfile.js   # Profile updates
    │   ├── FetchInfo.js     # Data retrieval
    │   ├── SetInfo.js       # Data creation
    │   ├── resetPass.js     # Password reset
    │   └── UploadImage.js   # Image uploads
    ├── cloudenary.js        # Cloudinary configuration
    ├── index.js             # Server entry point
    └── package.json

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v14.0.0 or higher)
  • npm (v6.0.0 or higher)
  • Oracle Database (19c or higher)
  • Git

Installation

1. Clone the Repository

git clone https://github.com/Raisulll/EyeCare.git
cd EyeCare

2. Install Client Dependencies

cd EyeCare_Client
npm install

3. Install Server Dependencies

cd ../EyeCare_Server
npm install

Configuration

Client Configuration

  1. Create a .env file in the EyeCare_Client directory:
REACT_APP_API_URL=http://localhost:5000
REACT_APP_FIREBASE_API_KEY=your_firebase_api_key
REACT_APP_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
REACT_APP_FIREBASE_PROJECT_ID=your_firebase_project_id
REACT_APP_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id
REACT_APP_FIREBASE_APP_ID=your_firebase_app_id

Server Configuration

  1. Create a .env file in the EyeCare_Server directory:
PORT=5000

# Oracle Database Configuration
DB_USER=your_oracle_username
DB_PASSWORD=your_oracle_password
DB_CONNECTION_STRING=your_oracle_connection_string

# Supabase Configuration
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key

# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret

# Email Configuration
EMAIL_USER=your_email@gmail.com
EMAIL_PASSWORD=your_email_app_password

# Firebase Admin SDK
FIREBASE_PROJECT_ID=your_firebase_project_id
FIREBASE_CLIENT_EMAIL=your_firebase_client_email
FIREBASE_PRIVATE_KEY=your_firebase_private_key

Database Setup

  1. Navigate to the database directory:
cd EyeCare_Server/db
  1. Execute the SQL scripts in the following order:
# Initialize database schema
sqlplus username/password@connection_string @init.sql

# Create triggers
sqlplus username/password@connection_string @trigger.sql

# Create views
sqlplus username/password@connection_string @view.sql

Usage

Development Mode

Start the Backend Server

cd EyeCare_Server
npm start

The server will run on http://localhost:5000

Start the Frontend Application

cd EyeCare_Client
npm start

The application will open at http://localhost:3000

Production Build

Build the Client

cd EyeCare_Client
npm run build

This creates an optimized production build in the build folder.

Database Schema

Core Tables

Patient

  • Patient information, contact details, address
  • Password authentication
  • Profile image (Cloudinary)
  • Virtual age calculation

Doctor

  • Doctor credentials and specialization
  • License information
  • Time slot availability
  • Contact and address details

Hospital

  • Hospital registration and contact info
  • License verification
  • Location details

Shop

  • Pharmacy/optical shop details
  • License information
  • Inventory management

Delivery Agency

  • Delivery service providers
  • Service area coverage
  • Delivery charges

Transactional Tables

Appointment

  • Patient-doctor appointment scheduling
  • Date, time, and status tracking
  • Foreign keys to Patient and Doctor

Prescription

  • Medical prescriptions linked to appointments
  • Patient issues and treatment details
  • Prescription date tracking

Supply & Inventory

  • Medical products and eyewear catalog
  • Shop-specific inventory with quantities
  • Product pricing and descriptions

Orders & Ordered Products

  • Customer orders with unique IDs (auto-generated)
  • Product-wise order details
  • Delivery agency assignment

Cart

  • Shopping cart for patients
  • Product quantities per shop

Transaction

  • Financial transaction tracking
  • Links to patients, shops, hospitals, and doctors
  • Transaction purpose categorization

Additional Features

  • OTP Table: Email verification system
  • Triggers: Auto-generate order IDs
  • Functions: Age calculation from DOB
  • Constraints: Data validation and referential integrity

API Routes

Authentication (/auth)

  • POST /signup - User registration
  • POST /signin - User login
  • POST /verify-otp - OTP verification
  • POST /resend-otp - Resend OTP

Password Management (/auth)

  • POST /forgot-password - Request password reset
  • POST /reset-password - Reset password with OTP

Profile Management (/edit)

  • PUT /profile - Update user profile
  • PUT /doctor-profile - Update doctor profile
  • PUT /shop-profile - Update shop profile

Appointments (/api)

  • GET /appointments - Get all appointments
  • POST /book-appointment - Book new appointment
  • PUT /appointment-status - Update appointment status
  • GET /doctor-appointments - Get doctor's appointments

Data Retrieval (/gets)

  • GET /doctors - Get all doctors
  • GET /products - Get all products
  • GET /prescriptions - Get prescriptions
  • GET /orders - Get order history
  • GET /transactions - Get transactions

Data Creation (/sets)

  • POST /prescription - Create prescription
  • POST /product - Add product
  • POST /order - Place order
  • POST /cart - Add to cart

Image Upload (/upload)

  • POST /image - Upload images to Cloudinary

Contributing

We welcome contributions to EyeCare! To contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Add comments for complex logic
  • Test your changes thoroughly
  • Update documentation as needed

License

This project is licensed under the ISC License.

Authors

Acknowledgments

  • React team for the amazing framework
  • Oracle Database for robust data management
  • Firebase for authentication services
  • Cloudinary for image hosting
  • All contributors and supporters

Support

For support, email [support@eyecare.com] or open an issue in the GitHub repository.

Future Enhancements

  • Real-time chat between patients and doctors
  • Video consultation integration
  • Mobile application (React Native)
  • AI-powered symptom checker
  • Insurance integration
  • Multi-language support
  • Advanced analytics dashboard
  • Payment gateway integration
  • Prescription OCR scanning
  • Telemedicine features

Made for better healthcare accessibility

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors