A comprehensive web-based Hospital Management System built with ASP.NET Core MVC that streamlines hospital operations, patient management, and medical workflows.
This system provides an efficient platform for managing patients, doctors, appointments, and medical records in a healthcare environment.
- π Features
- π» Technologies Used
- π Project Structure
- π§ Installation & Setup
- π― Key Implementation Details
- π Professional Skills Demonstrated
- π Future Enhancements
- π License
- π€ Contributing
- Role-based access control with ASP.NET Core Identity
- Secure user registration and login
- Custom authorization policies for different user types
- Patient Management: Full patient profiles, medical history, and records
- Doctor Management: Schedules, specialties, and availability
- Appointment System: Book, reschedule, and manage appointments
- Medical Records: Securely store and manage patient data
- Department Management: Organize hospital departments and services
- Responsive UI with Bootstrap 5
- Data access via Entity Framework Core
- Repository Pattern and Dependency Injection for clean architecture
- MVC Architecture ensuring separation of concerns
- Integrated SQL Server Database
- Dynamic rendering with Razor Pages
- ASP.NET Core 9.0 β Web framework
- Entity Framework Core β ORM
- ASP.NET Core Identity β Authentication
- Dependency Injection β Loosely coupled architecture
- Repository Pattern β Data abstraction layer
- Bootstrap 5 β Responsive design
- Razor Syntax β Server-side rendering
- HTML5 / CSS3 / JavaScript β Client-side UI
- SQL Server β Primary database
- EF Core Migrations β Database versioning and schema management
Hospital-Management-System/
β
βββ π Hospital.Core/ # Core Domain Layer
β β
β βββ π Consts/ # Constant Files
β β βββ ImagePaths.cs
β β βββ OrderBy.cs
β β βββ WebSiteRoles.cs
β β
β βββ π Helpers/ # Helper Classes
β β βββ EmailSender.cs
β β βββ GenericResponse.cs
β β βββ IDbInitializer.cs
β β βββ ImageOperation.cs
β β βββ PagedResult.cs
β β
β βββ π Hubs/ # Hubs
β β βββ NotificationHub.cs
β β
β βββ π Models/ # Entity Models
β β βββ ApplicationUser.cs
β β βββ Appointment.cs
β β βββ Bill.cs
β β βββ Contact.cs
β β βββ Department.cs
β β βββ HospitalInfo.cs
β β βββ Insurance.cs
β β βββ Lab.cs
β β βββ Medicine.cs
β β βββ MedicineReport.cs
β β βββ Notification.cs
β β βββ PatientReport.cs
β β βββ Payroll.cs
β β βββ PrescribedMedicine.cs
β β βββ Room.cs
β β βββ Supplier.cs
β β βββ TestPrice.cs
β β βββ Timing.cs
β β
β βββ π Repositories/ # Repository Interfaces
β β βββ IGenericRepository.cs
β β βββ IUnitOfWork.cs
β β
β βββ π Services/ # Service Interfaces
β β βββ IApplicationUserService.cs
β β βββ IAppointmentService.cs
β β βββ IContactService.cs
β β βββ IDoctorService.cs
β β βββ IHospitalInfoService.cs
β β βββ INotificationService.cs
β β βββ IRoomService.cs
β β βββ ITimingService.cs
β β
β βββ π Settings/ # Settings
β β βββ FileSettings.cs
β β
β βββ π ViewModels/ # View Models
β β βββ ApplicationUserViewModel.cs
β β βββ BookAppointmentViewModel.cs
β β βββ ContactViewModel.cs
β β βββ DoctorViewModel.cs
β β βββ HospitalInfoViewModel.cs
β β βββ NotificationsViewModel.cs
β β βββ RoomViewModel.cs
β β βββ SlotViewModel.cs
β β βββ TimingViewModel.cs
β β
β βββ π Hospital.Core.csproj
β
βββ π Hospital.EF/ # Data Access Layer
β β
β βββ π Helpers/ # Helper Classes
β β βββ DbInitializer.cs
β β βββ NameIdentifierUserIdProvider.cs
β β
β βββ π Migrations/ # EF Core Migrations
β β
β βββ π Repositories/ # Repository Implementations
β β βββ GenericRepository.cs
β β βββ UnitOfWork.cs
β β
β βββ π Services/ # Service Implementations
β β βββ ApplicationUserService.cs
β β βββ AppointmentService.cs
β β βββ ContactService.cs
β β βββ DoctorService.cs
β β βββ HospitalInfoService.cs
β β βββ NotificationService.cs
β β βββ RoomService.cs
β β βββ TimingService.cs
| β
β βββ ApplicationDbContext.cs
β βββ Hospital.EF.csproj
β
βββ π Hospital.Web/ # Web API Layer
β β
β βββ π Areas/
β β βββ π Admin/
β β β βββ π Controllers/ # API Controllers
β β β β βββ ApplicationUsersController.cs
β β β β βββ AppointmentsController.cs
β β β β βββ ContactsController.cs
β β β β βββ DoctorsController.cs
β β β β βββ HomeController.cs
β β β β βββ HospitalsController.cs
β β β β βββ NotificationsController.cs
β β β β βββ RoomsController.cs
β β β β βββ TimingsController.cs
β β β β
β β β βββ π Views/ # Views
β β β β βββ π ApplicationUsers/
β β β β βββ π Appointments/
β β β β βββ π Contacts/
β β β β βββ π Doctors/
β β β β βββ π Home/
β β β β βββ π Hospitals/
β β β β βββ π Notifications/
β β β β βββ π Rooms/
β β β β βββ π Timings/
β β β
β β βββ π Identity/Pages/
β β β
β β βββ _ViewImports.cshtml
β β βββ _ViewStart.cshtml
β β
β βββ π Properties/
β β βοΈ launchSettings.json
β β
β βββ π wwwroot/
β β
β βββ Hospital.Web.csproj
β βββ Program.cs
β βββ appsettings.Development.json
β βββ appsettings.json
β βββ libman.json
-
Clone the repository
git clone https://github.com/youssef-darrag/Hospital-Management-System.git
-
Configure the database connection Update the connection string in appsettings.json.
-
Apply migrations
dotnet ef database update
-
Run the application
dotnet run
- MVC Pattern β Separation between Model, View, and Controller
- Repository Pattern β Abstracted data access
- Dependency Injection β Inversion of control for better testability
- Password hashing & salting
- Role-based authorization
- Secure session management
- Input validation and sanitization
- Normalized schema
- Defined relationships between entities
- Indexed columns for performance
- Foreign key constraints for integrity
- ASP.NET Core MVC
- Entity Framework Core
- Authentication & Authorization
- RESTful API Design
- Database optimization
- Responsive design with Bootstrap
- Client-side validation
- AJAX integration
- Enhanced UX/UI
- Clean code & architecture
- Version control (Git)
- Debugging & optimization
- Scalable project design
- Real-time notifications
- Advanced reporting and analytics
- Mobile app integration
- AI-powered appointment suggestions
- Telemedicine features
This project is licensed under the MIT License β see the LICENSE file for details.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page and submit a pull request.