How khan4marketing/smarthospital-asp.net-mvc works
Smart Hospital is an ASP.NET Core MVC application for patient monitoring and bed allocation. The main workflow records patient vitals, evaluates critical status, and persists patient records; staff use the dashboard to review monitoring and sanitation alerts and allocate or release beds under safety rules. Separate workflows manage bed sanitation and occupancy, user registration and sign-in, and image uploads. The README documents these capabilities; the sampled source shows the controller, service, repository, and in-memory EF store wiring. Other documented routes are represented by their existing controller directories where source was not sampled.
Main entry points: Program.cs Application startup · DashboardController.cs Monitoring dashboard · PatientRepository.cs Patient repository · ApplicationDbContext.cs EF Core context
Components 21
Patient care
- Patient management
Controllers/PatientsController.cs - Patient repository
Data/PatientRepository.cs - Vitals evaluation
Services/VitalsService.cs - Monitoring dashboard
Controllers/DashboardController.cs - Notifications
Services/NotificationService.cs - Notification routes
Controllers/NotificationsController.cs
Bed operations
- Bed management
Controllers/BedsController.cs - Bed repository
Data/BedRepository.cs - Allocation rules
Services/AllocationService.cs
Identity
- Identity authentication
Controllers/AccountController.cs - Identity store
Data/ApplicationDbContext.cs
Application data
- Bed records
Models/Bed.cs - Patient records
Models/Patient.cs - EF Core context
Data/ApplicationDbContext.cs - Image uploads
Controllers/UploadController.cs - Upload paths
Services/UploadPaths.cs - Uploaded images
wwwroot/uploads - Public and home pages
Controllers/PublicController.cs - Application startup
Program.cs
Other components
- Hospital staff
- Patient user
Connections 31
- Hospital staff → Patient management: manage patients
- Patient management → Vitals evaluation: evaluate vitals
- Patient management → Patient repository: read and write
- Patient repository → EF Core context: query and save
- EF Core context → Patient records: stores
- Hospital staff → Monitoring dashboard: monitor care
- Monitoring dashboard → Patient repository: read patients
- Monitoring dashboard → Bed repository: read beds
- Monitoring dashboard → Vitals evaluation: build alerts
- Monitoring dashboard → Allocation rules: allocation actions
- Monitoring dashboard → Notifications: publish and read
- Notification routes → Notifications: manage notices
- Patient user → Identity authentication: register or sign in
- Identity authentication → Identity store: manage identity
- Identity authentication → Patient repository: link patient record
- Hospital staff → Bed management: manage beds
- Bed management → Bed repository: read and write
- Bed repository → EF Core context: query and save
- EF Core context → Bed records: stores
- Allocation rules → Patient repository: read and update
- Allocation rules → Bed repository: validate and occupy
- Hospital staff → Image uploads: upload image
- Image uploads → Upload paths: resolve storage
- Image uploads → Uploaded images: write and list
- Patient user → Public and home pages: browse pages
- Application startup → EF Core context: configure store
- Application startup → Identity store: configure identity
- Application startup → Patient repository: register repository
- Application startup → Bed repository: register repository
- Application startup → Allocation rules: register service
- Application startup → Notifications: register service