Skip to content

DataDarling/ehr-practice-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MedPortal Pro - Electronic Health Records Practice Management System

Next.js TypeScript PostgreSQL Prisma Tailwind CSS

A modern, full-featured Electronic Health Records (EHR) practice management portal built with Next.js 14, demonstrating healthcare data analytics, appointment scheduling, patient management capabilities, and AI Assistant integrations.

🎯 Project Overview

This project showcases a comprehensive healthcare management system with role-based access control, real-time analytics, and modern UI/UX design. Built as a portfolio demonstration of full-stack development and data analytics skills in the healthcare domain.

✨ Features

πŸ” Authentication & Role-Based Access

  • Admin: Full system access including user management
  • Doctor: Patient records, appointments, clinical notes, personal analytics
  • Receptionist: Patient registration, appointment scheduling

πŸ“Š Analytics Dashboard

  • Appointment Trends: 14-day rolling appointment volume visualization
  • No-Show Analytics: Track and analyze patient no-show rates with trend analysis
  • Peak Hours Heatmap: Visual representation of busiest clinic hours
  • Patient Demographics: Age group distribution and gender breakdown charts
  • Doctor Utilization: Workload metrics by physician and specialty
  • Patient Growth: Monthly registration trends

πŸ‘₯ Patient Management

  • Comprehensive patient records with demographics
  • Insurance information tracking
  • Medical history, allergies, and medications
  • Advanced search and filtering

πŸ“… Appointment Scheduling

  • Interactive weekly calendar view
  • Multiple appointment types (Checkup, Follow-up, Consultation, Urgent, New Patient)
  • Status management (Scheduled, Confirmed, Completed, Cancelled, No-Show)
  • Doctor and patient assignment

πŸ“ Clinical Notes

  • SOAP note format (Subjective, Objective, Assessment, Plan)
  • Linked to appointments and patients
  • Expandable card interface

πŸ‘€ User Management (Admin)

  • Create and manage staff accounts
  • Role assignment
  • Account status control

πŸ› οΈ Tech Stack

  • Frontend: Next.js 14 (App Router), React 18, TypeScript
  • Styling: Tailwind CSS, Radix UI Components
  • Charts: Recharts
  • Database: PostgreSQL with Prisma ORM
  • Authentication: NextAuth.js with credentials provider
  • State Management: React Query (TanStack Query)

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL 14+
  • Yarn or npm

Installation

  1. Clone the repository

    git clone https://github.com/DataDarling/ehr-practice-management.git
    cd ehr-practice-management
  2. Install dependencies

    yarn install
    # or
    npm install
  3. Set up environment variables

    Create a .env file in the root directory:

    DATABASE_URL="postgresql://username:password@localhost:5432/medportal?schema=public"
    NEXTAUTH_SECRET="your-secret-key-here"
    NEXTAUTH_URL="http://localhost:3000"
  4. Set up the database

    # Generate Prisma client
    yarn prisma generate
    
    # Run migrations
    yarn prisma migrate dev
    
    # Seed the database with sample data
    yarn prisma db seed
  5. Start the development server

    yarn dev
  6. Open your browser

    Navigate to http://localhost:3000

Demo Credentials

Role Email Password
Admin admin@medportal.com password123
Doctor sarah.chen@medportal.com password123
Receptionist reception@medportal.com password123

πŸ“ Project Structure

β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (dashboard)/          # Protected dashboard routes
β”‚   β”‚   β”œβ”€β”€ analytics/        # Analytics page
β”‚   β”‚   β”œβ”€β”€ appointments/     # Appointment management
β”‚   β”‚   β”œβ”€β”€ clinical-notes/   # Clinical notes
β”‚   β”‚   β”œβ”€β”€ dashboard/        # Main dashboard
β”‚   β”‚   β”œβ”€β”€ patients/         # Patient management
β”‚   β”‚   └── users/            # User management (admin)
β”‚   β”œβ”€β”€ api/                  # API routes
β”‚   └── login/                # Authentication pages
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/                   # Reusable UI components
β”‚   └── providers.tsx         # App providers
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ auth-options.ts       # NextAuth configuration
β”‚   β”œβ”€β”€ db.ts                 # Prisma client
β”‚   └── types.ts              # TypeScript types
β”œβ”€β”€ prisma/
β”‚   └── schema.prisma         # Database schema
└── scripts/
    └── seed.ts               # Database seeding script

πŸ“ˆ Sample Data

The seed script populates the database with:

  • 60+ patients with diverse demographics
  • 6 doctors across different specialties
  • 3,400+ appointments spanning 4 months
  • 100 clinical notes with SOAP documentation
  • Realistic show/no-show patterns (~18% no-show rate)

🎨 Features Preview

This application includes:

  • Interactive analytics dashboards with charts and heatmaps
  • Calendar-based appointment scheduling
  • SOAP-formatted clinical notes
  • Comprehensive patient management
  • Role-based access control

πŸ“„ License

This project is open source and available under the MIT License.

πŸ‘€ Author

Darling Ngoh


⭐ If you found this project helpful, please give it a star!

About

A modern, full-featured Electronic Health Records (EHR) practice management portal built with Next.js 14, demonstrating healthcare data analytics, appointment scheduling, patient management capabilities, and AI Assistant integrations.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages