🚀 A comprehensive, enterprise-grade healthcare management system built with Java 21, featuring advanced patient management, intelligent appointment scheduling, automated billing, and powerful reporting capabilities with modern UI/UX design.
📚 📖 Complete Project Documentation - Detailed documentation, guides, and specifications
🚀 Quick Start • 📊 UML Diagrams • 📋 Features • 🏗️ Architecture • 📖 API Docs
| Section | Description |
|---|---|
| 📊 UML Class Diagrams | System architecture and design patterns visualization |
| 📋 Features | Comprehensive feature overview and capabilities |
| 🛠️ Technology Stack | Technologies, frameworks, and tools used |
| 🏗️ Architecture | System design and architectural patterns |
| 🚀 Getting Started | Installation guide and setup instructions |
| 📖 Usage Guide | Step-by-step usage instructions |
| 🗃️ Database Schema | Database structure and relationships |
| 🔧 Configuration | Application configuration and customization |
| 🧪 Testing | Testing guidelines and procedures |
| 📚 API Documentation | API reference and code examples |
| 🤝 Contributing | How to contribute to the project |
| 📜 License & Legal | Licensing information and compliance |
| 👨💻 Authors & Acknowledgments | Credits and acknowledgments |
| 📞 Support & Community | Getting help and community resources |
🏗️ Complete Overview • 📊 Entity Relationships • 👤 Patient Management • 📅 Appointments • 💰 Billing • 👨⚕️ Staff Roles • 📋 Reports • 🔐 Security
💡 Tip: Right-click any image and select "Open image in new tab" to view at maximum quality
💡 Tip: You can view this Diagrams more comfortably with 📖 Complete Project Documentation
Complete system architecture showing all components, design patterns, and their relationships
Database schema and table relationships for the healthcare management system
Implementation of Memento pattern for patient history tracking and Prototype pattern for record templates
Mediator pattern implementation for handling appointment conflicts and scheduling logic
Chain of Responsibility pattern for processing insurance claims and payment workflows
Decorator pattern implementation for flexible role-based access control system
Visitor pattern for extensible report generation and data analysis capabilities
Security architecture using Decorator pattern for permissions and DAO pattern for secure data access
|
|
| Report Type | Features | Output Format | Key Benefits |
|---|---|---|---|
| 💰 Financial Reports | Revenue analysis, payment tracking, aged receivables | PDF, Excel | Business intelligence & decision making |
| 👥 Patient Analytics | Demographics, visit patterns, treatment outcomes | PDF, Charts | Improved patient care & resource planning |
| 📈 Operational Reports | Staff productivity, appointment efficiency, resource utilization | Dashboard, PDF | Operational optimization & cost reduction |
| 🏥 Service Analysis | Department performance, service revenue, trend analysis | Visual Charts | Strategic planning & service improvement |
🖥️ Modern Desktop Application • 🌓 Dark/Light Themes • ⌨️ Keyboard Shortcuts • 📱 Responsive Design • 🎯 Intuitive Navigation
🚀 Built with Enterprise Patterns: Memento, Mediator, Chain of Responsibility, Decorator, Visitor, and DAO patterns for maintainable, scalable architecture
| Component | Technology | Version | Purpose |
|---|---|---|---|
| Backend Language | ☕ Java | 17+ | Core application logic & enterprise features |
| Frontend Framework | 🖥️ Java Swing | Built-in | Desktop GUI interface with modern theming |
| Database Engine | 🗄️ MySQL | 8.0+ | Robust data persistence & ACID compliance |
| Build Automation | 🔧 Apache Maven | 3.9+ | Dependency management & project lifecycle |
| PDF Generation | 📄 iText | 5.5.13.3 | Professional bill & report generation |
| PDF Processing | 📋 Apache PDFBox | 2.0.29 | Advanced PDF manipulation utilities |
| Design Patterns | 🏗️ Gang of Four | Multiple | Enterprise architecture patterns |
|
|
graph TB
A[🖥️ UI Layer - Swing Components] --> B[🎮 Controller Layer - MVC Pattern]
B --> C[💼 Business Logic Layer]
C --> D[🗄️ Data Access Layer - DAO Pattern]
D --> E[🐬 MySQL Database]
F[📝 Memento Pattern] --> G[👤 Patient History]
H[🤝 Mediator Pattern] --> I[📅 Appointment Scheduling]
J[⛓️ Chain of Responsibility] --> K[💰 Insurance Processing]
L[🎨 Decorator Pattern] --> M[🔐 User Permissions]
N[👁️ Visitor Pattern] --> O[📊 Report Generation]
style A fill:#e1f5fe
style B fill:#f3e5f5
style C fill:#e8f5e8
style D fill:#fff3e0
style E fill:#ffebee
// Role-based access with Decorator Pattern
IUser user = new BaseUser(username, role, doctorId);
user = new AdminRole(user); // Adds admin permissions
user = new DoctorRole(user); // Adds doctor permissions
// Check permissions
if (user.hasPermission("PATIENT_MANAGEMENT")) {
// Access granted
}// History tracking with Memento Pattern
RecordHistory history = new RecordHistory(patientRecord);
history.save(); // Create snapshot
patientRecord.update(); // Make changes
history.undo(); // Restore previous state
// Prototype pattern for templates
PatientRecord template = TemplateManager.getTemplate("BASIC_PATIENT");
PatientRecord newPatient = template.clone();// Conflict resolution with Mediator Pattern
SchedulingMediator mediator = new SchedulingMediator();
AppointmentResult result = mediator.scheduleAppointment(
patient, doctor, dateTime, duration
);
if (result.hasConflict()) {
List<TimeSlot> alternatives = result.getAlternatives();
}// Chain of Responsibility for claims
ClaimProcessor basicProcessor = new BasicClaimProcessor();
ClaimProcessor premiumProcessor = new PremiumClaimProcessor();
ClaimProcessor vipProcessor = new VIPClaimProcessor();
basicProcessor.setNext(premiumProcessor).setNext(vipProcessor);
ClaimResult result = basicProcessor.process(claim);| Requirement | Version | Download Link | Purpose |
|---|---|---|---|
| ☕ Java Development Kit (JDK) | 17+ | Oracle JDK | OpenJDK | Core runtime & development |
| 🗄️ MySQL Server | 8.0+ | MySQL Downloads | Database engine |
| 🔧 Apache Maven | 3.9+ | Maven Downloads | Build automation |
| 🖥️ IDE (Recommended) | Latest | IntelliJ IDEA | Eclipse | VS Code | Development environment |
💡 Note: This project uses Java 17+ features for optimal performance and compatibility across different environments..
-
📥 Clone the Repository
git clone https://github.com/isharax9/healthcare-system.git cd healthcare-system -
🗄️ Database Setup
# Start MySQL and create database mysql -u root -pCREATE DATABASE globemed_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; USE globemed_db; SOURCE globemed_db.sql;
-
⚙️ Configure Database Connection
Update
src/main/java/com/globemed/db/DatabaseManager.java:private static final String JDBC_URL = "jdbc:mysql://localhost:3306/globemed_db"; private static final String USERNAME = "your_username"; // Update this private static final String PASSWORD = "your_password"; // Update this
-
🔧 Build and Run
# Clean and compile the project mvn clean compile # Run the application mvn exec:java -Dexec.mainClass="com.globemed.Main" # Create executable JAR mvn clean package # Run the executable JAR java -jar target/healthcare-system-1.0-SNAPSHOT-executable.jar
The project includes automated CI/CD pipelines that generate native executables for all major platforms:
| Platform | File Types | Installation Method |
|---|---|---|
| 🖥️ Windows | .exe installer |
Double-click to install, includes Start Menu shortcuts |
| 🍎 macOS | .dmg, .app bundle |
Drag to Applications folder or run DMG installer |
| 🐧 Linux | .deb, .rpm, portable scripts |
Package manager installation or direct execution |
| ☕ Universal | .jar executable |
Run with java -jar (requires Java 17+) |
Important: Automated releases are temporarily disabled. Use manual tag-based releases.
- Manual Process: Create version tags to trigger releases (
git tag v1.0.1 && git push origin v1.0.1) - Cross-Platform Builds: Automatic builds for Windows, macOS, and Linux on tag push
- Release Packaging: Tagged releases automatically create distributable packages
- GitHub Actions: Fully automated build pipeline with artifact uploads
- Complete Control: Manual control over release timing and versioning
📋 Release Guide: Follow the Manual Release Guide for step-by-step instructions on creating releases. 🔐 CI/CD Configuration: For automated builds with database integration, see the GitHub Secrets Setup Guide to configure repository secrets properly.
# Build for all platforms (requires platform-specific runners)
mvn clean package -DskipTests
# Create Windows installer (requires Windows with jpackage)
jpackage --input target --name "GlobeMed Healthcare System" --main-jar healthcare-system-1.0-SNAPSHOT-executable.jar --main-class com.globemed.Main --type exe
# Create macOS app (requires macOS with jpackage)
jpackage --input target --name "GlobeMed Healthcare System" --main-jar healthcare-system-1.0-SNAPSHOT-executable.jar --main-class com.globemed.Main --type dmg
# Create Linux packages (requires Linux with jpackage)
jpackage --input target --name "globemed-healthcare-system" --main-jar healthcare-system-1.0-SNAPSHOT-executable.jar --main-class com.globemed.Main --type debUpon successful launch, you'll see the modern Swing GUI with login screen.
💡 Pro Tip: Use the default credentials below to explore all features immediately!
| 👤 Role | 🔐 Username | 🗝️ Password | 🎯 Access Level | 📋 Capabilities |
|---|---|---|---|---|
| 👑 Admin | admin |
admin123 |
🔓 Full system access | User management, system configuration, all reports |
| 👨⚕️ Doctor | doctor1 |
doc123 |
📋 Clinical access | Patient records, appointments, medical reports |
| 👩⚕️ Nurse | nurse1 |
nurse123 |
📝 Limited access | Basic patient info, appointment viewing |
⚠️ Security Note: Change these default credentials immediately in production environments!
- Navigate to Patient Records tab
- Add New Patient: Fill in demographic and insurance information
- Update Records: Modify existing patient information with automatic history tracking
- Search Patients: Use filters to quickly locate patient records
- Go to Appointments tab
- Schedule New: Select patient, doctor, and available time slot
- Manage Existing: View, reschedule, or cancel appointments
- Conflict Resolution: System automatically detects and prevents double-booking
- Access Billing module
- Create Bills: Generate charges for services rendered
- Process Insurance: Automatic calculation of coverage and patient responsibility
- Payment Tracking: Record payments and manage outstanding balances
- Navigate to Reports section
- Select Report Type: Choose from financial, patient, or operational reports
- Set Parameters: Define date ranges and filters
- Generate & Export: Create PDF reports for analysis or printing
-- Patient Management
patients (patient_id, name, dob, gender, address, phone, email, insurance_plan_id)
insurance_plans (plan_id, plan_name, coverage_percent, deductible)
-- Appointment System
appointments (appointment_id, patient_id, doctor_id, appointment_datetime, status)
doctors (doctor_id, name, specialization, phone, email)
-- Billing & Finance
billing (bill_id, patient_id, service_description, amount, status)
payments (payment_id, bill_id, amount_paid, payment_date, payment_method)
-- Staff Management
staff (staff_id, name, role, department, hire_date, salary)
users (user_id, username, password_hash, role, staff_id)- One-to-Many: Patient → Appointments, Patient → Bills
- Many-to-One: Appointments → Doctor, Bills → Insurance Plan
- One-to-One: User → Staff (for authentication)
The application supports flexible database configuration through environment variables, system properties, or configuration files.
📚 Multiple Configuration Guides Available:
- Environment Setup Guide - Local development setup
- GitHub Secrets Setup Guide - CI/CD and repository configuration
- Contributing Guide - Development workflow
Set the following environment variables:
# Linux/macOS
export DB_URL="jdbc:mysql://localhost:3306/globemed_db"
export DB_USERNAME="your_username"
export DB_PASSWORD="your_password"
# Windows Command Prompt
set DB_URL=jdbc:mysql://localhost:3306/globemed_db
set DB_USERNAME=your_username
set DB_PASSWORD=your_password
# Windows PowerShell
$env:DB_URL="jdbc:mysql://localhost:3306/globemed_db"
$env:DB_USERNAME="your_username"
$env:DB_PASSWORD="your_password"When running the application:
java -jar healthcare-system-1.0-SNAPSHOT-executable.jar \
-Ddb.url="jdbc:mysql://localhost:3306/globemed_db" \
-Ddb.username="your_username" \
-Ddb.password="your_password"
# Or with Maven
mvn exec:java -Ddb.url="jdbc:mysql://localhost:3306/globemed_db" \
-Ddb.username="your_username" \
-Ddb.password="your_password"Edit src/main/resources/application.properties:
# Database Configuration
db.url=jdbc:mysql://localhost:3306/globemed_db
db.username=root
db.password=your_password
db.driver=com.mysql.cj.jdbc.Driver
# Application Settings
app.name=GlobeMed Healthcare System
app.version=1.0-SNAPSHOT
app.theme=light
# Report Settings
reports.output.path=./reports/
reports.logo.path=./assets/logo.pngThe application uses the following priority order for configuration:
- Environment Variables (highest priority)
- System Properties
- Application Properties File (lowest priority)
This allows for flexible deployment across different environments without code changes.
The system supports custom themes through the UI. Users can toggle between:
- 🌞 Light Theme: Default professional appearance
- 🌙 Dark Theme: Reduced eye strain for extended use
# Run all tests
mvn test
# Run specific test class
mvn test -Dtest=PatientDAOTest
# Generate test coverage report
mvn jacoco:report# Database integration tests
mvn verify -Pintegration-tests
# UI component tests
mvn test -Dtest=*UITestpublic class PatientService {
public PatientRecord createPatient(PatientData data);
public List<PatientRecord> searchPatients(SearchCriteria criteria);
public PatientRecord updatePatient(String patientId, PatientData data);
public void deletePatient(String patientId);
}public class AppointmentService {
public Appointment scheduleAppointment(AppointmentRequest request);
public List<Appointment> getAppointmentsByDate(LocalDate date);
public void cancelAppointment(int appointmentId);
public List<TimeSlot> getAvailableSlots(String doctorId, LocalDate date);
}public class BillingService {
public MedicalBill createBill(BillRequest request);
public PaymentResult processPayment(PaymentRequest request);
public List<MedicalBill> getOutstandingBills(String patientId);
public void generatePDFBill(MedicalBill bill, OutputStream output);
}We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Java coding conventions
- Add JavaDoc comments for public methods
- Write unit tests for new features
- Ensure Maven build passes
- Update documentation for new features
Please include:
- 🐛 Clear description of the issue
- 📝 Steps to reproduce the problem
- 🖥️ Environment details (OS, Java version, MySQL version)
- 📸 Screenshots if applicable
This project is licensed under the MIT License - see the LICENSE file for complete details.
This software includes several third-party libraries with their respective licenses:
| Component | License | Usage |
|---|---|---|
| 🔗 iText PDF | AGPL v3.0 | PDF generation for bills and reports |
| 📄 Apache PDFBox | Apache 2.0 | Additional PDF processing utilities |
| 🗄️ MySQL Connector/J | GPL v2.0 + FOSS Exception | Database connectivity |
⚠️ Important: This software handles sensitive healthcare data. Ensure compliance with:
- HIPAA (United States) - Health Insurance Portability and Accountability Act
- GDPR (European Union) - General Data Protection Regulation
- PIPEDA (Canada) - Personal Information Protection and Electronic Documents Act
- Other applicable local healthcare privacy regulations
This software is provided for educational and demonstration purposes. While implementing industry-standard security practices, it should be thoroughly reviewed and customized before production use in healthcare environments.
- Development Team: GlobeMed Healthcare Solutions
- Lead Developer: @isharax9
- Architecture: Design Patterns implementation for enterprise healthcare
- Java Community for excellent documentation
- iText team for PDF generation capabilities
- MySQL for robust database support
- Apache Maven for build automation
| Platform | Link | Purpose |
|---|---|---|
| [email protected] | Direct support & inquiries | |
| 💬 Telegram | @mac_knight141 | Quick questions & community |
| isharax9 | Professional networking | |
| @mac_knight141 | Updates & behind-the-scenes | |
| @isharax9 | Announcements & tech discussions |
| Type | Link | Description |
|---|---|---|
| 🐛 Bug Reports | GitHub Issues | Report bugs and request features |
| 💬 Discussions | GitHub Discussions | Community Q&A and ideas |
| 📖 Documentation | Project Docs | Complete guides and references |
⭐ Star this repository if it helped you!
Made with ❤️ by Ishara Lakshitha • © 2025
Empowering Healthcare Through Technology







