Table of Contents

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

bookingStrategy IBookingStrategy

Methods

AddStrategy(IConflictDetectionStrategy)

Adds a custom conflict resolution strategy

public void AddStrategy(IConflictDetectionStrategy strategy)

Parameters

strategy IConflictDetectionStrategy

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

proposedAppointment AppointmentTimeInterval
physicianSchedule PhysicianSchedule
facilityUnavailable List<UnavailableTimeInterval>
excludeAppointmentId Guid?

Optional appointment ID to exclude from conflict checking (for updates)

Returns

ConflictCheckResult

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

conflictResult ConflictCheckResult
physicianSchedule PhysicianSchedule
facilityUnavailable List<UnavailableTimeInterval>

Returns

ConflictDetectionResult