Class ScheduleConflictDetector
- Namespace
- Core.CliniCore.Scheduling.Management
- Assembly
- Core.CliniCore.dll
Resolves scheduling conflicts using Chain of Responsibility pattern. Uses IBookingStrategy to find alternative time slots when conflicts are detected.
public class ScheduleConflictDetector
- Inheritance
-
ScheduleConflictDetector
- Inherited Members
Constructors
ScheduleConflictDetector()
public ScheduleConflictDetector()
ScheduleConflictDetector(IBookingStrategy)
public ScheduleConflictDetector(IBookingStrategy bookingStrategy)
Parameters
bookingStrategyIBookingStrategy
Methods
AddStrategy(IConflictDetectionStrategy)
Adds a custom conflict resolution strategy
public void AddStrategy(IConflictDetectionStrategy strategy)
Parameters
strategyIConflictDetectionStrategy
CheckForConflicts(AppointmentTimeInterval, PhysicianSchedule, List<UnavailableTimeInterval>?, Guid?)
Detects all conflicts for a proposed appointment
public ConflictCheckResult CheckForConflicts(AppointmentTimeInterval proposedAppointment, PhysicianSchedule physicianSchedule, List<UnavailableTimeInterval>? facilityUnavailable = null, Guid? excludeAppointmentId = null)
Parameters
proposedAppointmentAppointmentTimeIntervalphysicianSchedulePhysicianSchedulefacilityUnavailableList<UnavailableTimeInterval>excludeAppointmentIdGuid?Optional appointment ID to exclude from conflict checking (for updates)
Returns
FindAlternative(ConflictCheckResult, PhysicianSchedule, List<UnavailableTimeInterval>?)
Attempts to resolve conflicts by suggesting alternative times. Uses the injected IBookingStrategy to find and evaluate alternatives.
public ConflictDetectionResult FindAlternative(ConflictCheckResult conflictResult, PhysicianSchedule physicianSchedule, List<UnavailableTimeInterval>? facilityUnavailable = null)
Parameters
conflictResultConflictCheckResultphysicianSchedulePhysicianSchedulefacilityUnavailableList<UnavailableTimeInterval>