Class PhysicianSchedule
- Namespace
- Core.CliniCore.Scheduling
- Assembly
- Core.CliniCore.dll
Manages the schedule for an individual physician
public class PhysicianSchedule
- Inheritance
-
PhysicianSchedule
- Inherited Members
Constructors
PhysicianSchedule(Guid)
public PhysicianSchedule(Guid physicianId)
Parameters
physicianIdGuid
Properties
Appointments
All appointments for this physician
public IReadOnlyList<AppointmentTimeInterval> Appointments { get; }
Property Value
PhysicianId
The physician this schedule belongs to
public Guid PhysicianId { get; }
Property Value
StandardAvailability
Standard weekly availability pattern (e.g., which days physician works)
public Dictionary<DayOfWeek, (TimeSpan Start, TimeSpan End)> StandardAvailability { get; set; }
Property Value
UnavailableBlocks
All unavailable blocks for this physician
public IReadOnlyList<UnavailableTimeInterval> UnavailableBlocks { get; }
Property Value
Methods
AddUnavailableBlock(UnavailableTimeInterval)
Adds an unavailable block to the schedule
public void AddUnavailableBlock(UnavailableTimeInterval block)
Parameters
blockUnavailableTimeInterval
ClearOldAppointments(DateTime)
Clears old appointments from the schedule
public int ClearOldAppointments(DateTime beforeDate)
Parameters
beforeDateDateTime
Returns
FindNextAvailableSlot(TimeSpan, DateTime?)
Finds the next available time slot of a given duration
public DateTime? FindNextAvailableSlot(TimeSpan duration, DateTime? afterTime = null)
Parameters
Returns
GetAppointmentsForDate(DateTime)
Gets all appointments for a specific date
public IEnumerable<AppointmentTimeInterval> GetAppointmentsForDate(DateTime date)
Parameters
dateDateTime
Returns
GetAppointmentsInRange(DateTime, DateTime)
Gets all appointments in a date range
public IEnumerable<AppointmentTimeInterval> GetAppointmentsInRange(DateTime startDate, DateTime endDate)
Parameters
Returns
GetAvailabilitySummary(DateTime)
Gets availability summary for a date
public ScheduleAvailabilitySummary GetAvailabilitySummary(DateTime date)
Parameters
dateDateTime
Returns
HasConflict(AppointmentTimeInterval)
Checks if there's a conflict for a proposed appointment
public bool HasConflict(AppointmentTimeInterval proposedAppointment)
Parameters
proposedAppointmentAppointmentTimeInterval
Returns
IsTimeSlotAvailable(DateTime, DateTime)
Checks if a specific time slot is available
public bool IsTimeSlotAvailable(DateTime start, DateTime end)
Parameters
Returns
RemoveAppointment(Guid)
Removes an appointment from the schedule
public bool RemoveAppointment(Guid appointmentId)
Parameters
appointmentIdGuid
Returns
TryAddAppointment(AppointmentTimeInterval)
Adds an appointment to the schedule if no conflicts exist
public bool TryAddAppointment(AppointmentTimeInterval appointment)
Parameters
appointmentAppointmentTimeInterval