How haroun08/ehr-management-system works
This is a .NET microservices platform for healthcare records, appointments, user access, AI-assisted chat, notifications, lab integration, and health content. The main user journey is to authenticate, access or update patient records, arrange care, and receive AI, laboratory, or notification results. Kafka and REST connect service boundaries; SignalR supports real-time communication. Shared infrastructure supplies CQRS conventions, persistence abstractions, authorization, and event-bus implementations. The README documents platform capabilities, but the excerpts mostly show repository behavior, so service-to-service flows are not inferred where their callers were not shown.
Main entry points: KafkaEventBus.cs Event bus · Program.cs API gateway · EHR (Health Records) Service Health records · AppointmentService Appointments
Components 21
Care workflows
- Health records
src/Services/EHR (Health Records) Service - Patient record queries
src/Services/EHR (Health Records) Service/EHR (Health Records) Service.Infrastructure/Repositories/PatientRepo/PatientQueryRepository.cs - Appointments
src/Services/AppointmentService - Schedule queries
src/Services/AppointmentService/AppointmentService.Infrastructure/Repositories/DoctorScheduleRepo/DoctorScheduleQueryRepository.cs - EHR document store
src/Services/EHR (Health Records) Service/EHR (Health Records) Service.Infrastructure/Repositories/PatientRepo/PatientQueryRepository.cs - Schedule SQL data
src/Services/AppointmentService/AppointmentService.Infrastructure/Repositories/DoctorScheduleRepo/DoctorScheduleQueryRepository.cs
Identity and platform access
- API gateway
src/GatewayAPI/ApiGateway.Host/Program.cs - User management
src/Services/EHR-UserManagementService
Patient engagement
- AI chatbot
src/Services/AIChatbotChatService - Chat session queries
src/Services/AIChatbotChatService/AIChatbotChatService.Infrastructure/Repositories/ChatSessionRepo/ChatSessionQueryRepository.cs - Notifications
src/Services/NotificationService - FAQ and blog
src/Services/FAQBlog Service - Redis chat data
src/Services/AIChatbotChatService/AIChatbotChatService.Infrastructure/Repositories/ChatSessionRepo/ChatSessionQueryRepository.cs
External and event integration
- Lab integration
src/Services/ExternalIntegrationService - Lab result queries
src/Services/ExternalIntegrationService/ExternalIntegrationService.Infrastructure/Repositories/LabResultQueryRepository.cs - Event bus
src/EHR-Management-System.SharedLibrary/Infrastructure/EventBus/Kafka/KafkaEventBus.cs - Kafka broker
- SignalR
- Lab SQL data
src/Services/ExternalIntegrationService/ExternalIntegrationService.Infrastructure/Repositories/LabResultQueryRepository.cs
Shared runtime
- Shared application runtime
src/EHR-Management-System.SharedLibrary
Other components
- Patient or clinician
Connections 18
- Patient or clinician → API gateway: sends API requests
- API gateway → User management: routes requests
- API gateway → Health records: routes requests
- API gateway → Appointments: routes requests
- API gateway → AI chatbot: routes requests
- Patient record queries → EHR document store: reads records
src/Services/EHR (Health Records) Service/EHR (Health Records) Service.Infrastructure/Repositories/PatientRepo/PatientQueryRepository.cs - Schedule queries → Schedule SQL data: queries schedules
src/Services/AppointmentService/AppointmentService.Infrastructure/Repositories/DoctorScheduleRepo/DoctorScheduleQueryRepository.cs - Lab result queries → Lab SQL data: queries results
src/Services/ExternalIntegrationService/ExternalIntegrationService.Infrastructure/Repositories/LabResultQueryRepository.cs - Chat session queries → Redis chat data: reads sessions
src/Services/AIChatbotChatService/AIChatbotChatService.Infrastructure/Repositories/ChatSessionRepo/ChatSessionQueryRepository.cs - Event bus → Kafka broker: publishes events
- Patient or clinician → SignalR: uses real-time chat
- Health records → Event bus: emits integration events
- Appointments → Event bus: emits integration events
- AI chatbot → Event bus: emits integration events
- Lab integration → Event bus: emits integration events
- Notifications → Event bus: uses event messaging
- Health records → Shared application runtime: uses shared kernel
src/Services/EHR (Health Records) Service/EHR (Health Records) Service.Infrastructure/Repositories/PatientRepo/PatientQueryRepository.cs - User management → Shared application runtime: uses shared kernel
src/Services/EHR-UserManagementService/EHR-UserManagementService.Infrastructure/Repositories/UserRepo/UserQueryRepository.cs