Table of Contents

Interface IBookingStrategy

Namespace
Core.CliniCore.Scheduling.BookingStrategies
Assembly
Core.CliniCore.dll

Interface for appointment booking strategies using Strategy pattern

public interface IBookingStrategy

Properties

Description

Gets a description of how this strategy works

string Description { get; }

Property Value

string

StrategyName

Gets the name of this booking strategy

string StrategyName { get; }

Property Value

string

Methods

FindAvailableSlots(PhysicianSchedule, TimeSpan, DateTime, int, List<UnavailableTimeInterval>?)

Finds multiple available slots based on the strategy

List<AppointmentSlot> FindAvailableSlots(PhysicianSchedule physicianSchedule, TimeSpan requestedDuration, DateTime earliestTime, int maxResults = 5, List<UnavailableTimeInterval>? facilityUnavailable = null)

Parameters

physicianSchedule PhysicianSchedule

The physician's schedule

requestedDuration TimeSpan

Duration needed for the appointment

earliestTime DateTime

Earliest time to consider

maxResults int

Maximum number of results to return

facilityUnavailable List<UnavailableTimeInterval>

Facility-wide unavailable blocks

Returns

List<AppointmentSlot>

List of available slots

FindNextAvailableSlot(PhysicianSchedule, TimeSpan, DateTime, List<UnavailableTimeInterval>?)

Finds the next available appointment slot based on the strategy

AppointmentSlot? FindNextAvailableSlot(PhysicianSchedule physicianSchedule, TimeSpan requestedDuration, DateTime earliestTime, List<UnavailableTimeInterval>? facilityUnavailable = null)

Parameters

physicianSchedule PhysicianSchedule

The physician's schedule

requestedDuration TimeSpan

Duration needed for the appointment

earliestTime DateTime

Earliest time to consider

facilityUnavailable List<UnavailableTimeInterval>

Facility-wide unavailable blocks

Returns

AppointmentSlot

Next available slot, or null if none found