A modern, full-featured Electronic Health Records (EHR) practice management portal built with Next.js 14, demonstrating healthcare data analytics, appointment scheduling, and patient management capabilities.
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.
- Admin: Full system access including user management
- Doctor: Patient records, appointments, clinical notes, personal analytics
- Receptionist: Patient registration, appointment scheduling
- 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
- Comprehensive patient records with demographics
- Insurance information tracking
- Medical history, allergies, and medications
- Advanced search and filtering
- 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
- SOAP note format (Subjective, Objective, Assessment, Plan)
- Linked to appointments and patients
- Expandable card interface
- Create and manage staff accounts
- Role assignment
- Account status control
- 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)
- Node.js 18+
- PostgreSQL 14+
- Yarn or npm
-
Clone the repository
git clone https://github.com/DataDarling/ehr-practice-management.git cd ehr-practice-management -
Install dependencies
yarn install # or npm install -
Set up environment variables
Create a
.envfile 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"
-
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
-
Start the development server
yarn dev
-
Open your browser
Navigate to http://localhost:3000
| Role | Password | |
|---|---|---|
| Admin | admin@medportal.com | password123 |
| Doctor | sarah.chen@medportal.com | password123 |
| Receptionist | reception@medportal.com | password123 |
├── 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
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)
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
This project is open source and available under the MIT License.
Darling Ngoh
- LinkedIn: linkedin.com/in/Darling-Ngoh
- GitHub: @DataDarling
⭐ If you found this project helpful, please give it a star!