Skip to content

nethma-dewmini/health-records-app

Repository files navigation

Health Records Management System

A comprehensive health records management system built with Laravel 11, designed to manage patients, doctors, appointments, and prescriptions efficiently. This application provides a clean and intuitive interface for healthcare administration.

πŸ₯ Features

Patient Management

  • Patient Registration: Add new patients with personal details
  • Patient Records: View and manage patient information
  • Patient Search: Easily find patient records
  • Patient Updates: Edit patient information

Doctor Management

  • Doctor Profiles: Manage doctor information and specialties
  • Doctor Directory: Browse available doctors
  • Specialty Tracking: Organize doctors by their medical specialties

Appointment System

  • Schedule Appointments: Book appointments between patients and doctors
  • Appointment Management: View, edit, and cancel appointments
  • Date/Time Tracking: Organized scheduling system

Prescription Management

  • Prescription Records: Track medications prescribed to patients
  • Doctor-Patient Linking: Associate prescriptions with specific doctors and patients
  • Medication Instructions: Store detailed prescription instructions

User Authentication

  • Secure Login: User authentication system with Laravel Breeze
  • User Registration: New user account creation
  • Profile Management: User profile editing and management

πŸ› οΈ Technology Stack

  • Framework: Laravel 11.31
  • PHP Version: 8.2+
  • Frontend: Blade Templates with TailwindCSS
  • Authentication: Laravel Breeze
  • Database: MySQL/SQLite (configurable)
  • Build Tool: Vite
  • Testing: Pest PHP

πŸ“‹ Prerequisites

Before running this application, ensure you have the following installed:

  • PHP 8.2 or higher
  • Composer (PHP dependency manager)
  • Node.js & NPM (for frontend assets)
  • MySQL or SQLite (database)
  • Git (version control)

πŸš€ Installation & Setup

1. Clone the Repository

git clone <repository-url>
cd health-records-app

2. Install PHP Dependencies

composer install

3. Install Node.js Dependencies

npm install

4. Environment Configuration

# Copy the example environment file
cp .env.example .env

# Generate application key
php artisan key:generate

5. Database Setup

Edit the .env file and configure your database connection:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=health_records
DB_USERNAME=your_username
DB_PASSWORD=your_password

For SQLite (simpler setup):

DB_CONNECTION=sqlite
DB_DATABASE=/absolute/path/to/database.sqlite

6. Run Database Migrations

# Create the database tables
php artisan migrate

7. Build Frontend Assets

# For development
npm run dev

# For production
npm run build

8. Start the Development Server

php artisan serve

The application will be available at http://localhost:8000

πŸ“Š Database Schema

Tables

  • users: System users with authentication
  • patients: Patient personal information and medical records
  • doctors: Doctor profiles and specialties
  • appointments: Scheduled appointments between patients and doctors
  • prescriptions: Medication records linked to patients and doctors

Key Relationships

  • Patients can have multiple appointments and prescriptions
  • Doctors can have multiple appointments and prescriptions
  • Each appointment links one patient with one doctor
  • Each prescription is associated with one patient and one doctor

🎯 Usage Guide

Getting Started

  1. Register/Login: Create an account or login to access the system
  2. Dashboard: Navigate through the main dashboard to access different sections

Managing Patients

  1. Go to Patient Section from the dashboard
  2. Click "Add New Patient" to register new patients
  3. Fill in required information: name, email, date of birth, phone
  4. View all patients in the patient list
  5. Edit or delete patient records as needed

Managing Doctors

  1. Access Doctor Section from the dashboard
  2. Add new doctors with their specialties
  3. Update doctor information and specialties
  4. Browse the doctor directory

Scheduling Appointments

  1. Navigate to Appointment Section
  2. Create new appointments by selecting:
    • Patient from the dropdown
    • Doctor from the dropdown
    • Appointment date and time
  3. View upcoming and past appointments
  4. Edit or cancel appointments as needed

Managing Prescriptions

  1. Go to Prescription Section
  2. Create prescriptions by selecting:
    • Patient
    • Prescribing doctor
    • Medication details
    • Instructions for the patient

πŸ”§ Configuration

Environment Variables

Key environment variables in .env:

  • APP_NAME: Application name
  • APP_ENV: Environment (local, production)
  • APP_DEBUG: Debug mode (true for development)
  • DB_*: Database configuration
  • MAIL_*: Email configuration (if needed)

Customization

  • Styling: Modify TailwindCSS classes in Blade templates
  • Functionality: Extend controllers and models as needed
  • Validation: Update form requests for additional validation rules

πŸ§ͺ Testing

Run the test suite:

# Run all tests
php artisan test

# Run specific test types
./vendor/bin/pest --filter=Feature
./vendor/bin/pest --filter=Unit

πŸ“ Project Structure

app/
β”œβ”€β”€ Http/Controllers/          # Application controllers
β”œβ”€β”€ Models/                    # Eloquent models
β”œβ”€β”€ Http/Requests/            # Form request validation
└── Providers/                # Service providers

database/
β”œβ”€β”€ migrations/               # Database migrations
β”œβ”€β”€ seeders/                 # Database seeders
└── factories/               # Model factories

resources/
β”œβ”€β”€ views/                   # Blade templates
β”œβ”€β”€ css/                     # Stylesheets
└── js/                      # JavaScript files

routes/
β”œβ”€β”€ web.php                  # Web routes
└── auth.php                 # Authentication routes

🚨 Troubleshooting

Common Issues

1. Permission Errors

# Fix storage permissions
chmod -R 775 storage
chmod -R 775 bootstrap/cache

2. Missing Application Key

php artisan key:generate

3. Database Connection Issues

  • Verify database credentials in .env
  • Ensure database server is running
  • Check database exists

4. Frontend Assets Not Loading

npm run dev
# or
npm run build

Development Tips

  • Use php artisan tinker for interactive testing
  • Check logs in storage/logs/laravel.log
  • Use php artisan route:list to view all routes
  • Run php artisan migrate:fresh to reset database (⚠️ destroys data)

πŸ“ License

This project is open-sourced software licensed under the MIT license.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Built with ❀️ using Laravel 11 and TailwindCSS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages