Class AppointmentTimeInterval
- Namespace
- Core.CliniCore.Scheduling
- Assembly
- Core.CliniCore.dll
Represents a scheduled medical appointment time interval
public class AppointmentTimeInterval : AbstractTimeInterval, ITimeInterval, IIdentifiable
- Inheritance
-
AppointmentTimeInterval
- Implements
- Inherited Members
- Extension Methods
Constructors
AppointmentTimeInterval(DateTime, DateTime, Guid, Guid, string, AppointmentStatus)
public AppointmentTimeInterval(DateTime start, DateTime end, Guid patientId, Guid physicianId, string description = "", AppointmentStatus status = AppointmentStatus.Scheduled)
Parameters
startDateTimeendDateTimepatientIdGuidphysicianIdGuiddescriptionstringstatusAppointmentStatus
Properties
AppointmentType
Type of appointment based on duration
public string AppointmentType { get; set; }
Property Value
CancellationReason
If this appointment was cancelled, the reason
public string? CancellationReason { get; set; }
Property Value
ClinicalDocumentId
ID of the clinical document created during this appointment
public Guid? ClinicalDocumentId { get; set; }
Property Value
- Guid?
CreatedAt
When this appointment was created
public DateTime CreatedAt { get; set; }
Property Value
Description
Override to add appointment-specific description
public override string Description { get; protected set; }
Property Value
ModifiedAt
When this appointment was last modified
public DateTime? ModifiedAt { get; set; }
Property Value
Notes
Any notes about this appointment
public string? Notes { get; set; }
Property Value
PatientId
The patient this appointment is for
public Guid PatientId { get; set; }
Property Value
PhysicianId
The physician conducting this appointment
public Guid PhysicianId { get; set; }
Property Value
ReasonForVisit
Reason for visit / chief complaint
public string? ReasonForVisit { get; set; }
Property Value
RescheduledFromId
If this appointment was rescheduled from another
public Guid? RescheduledFromId { get; set; }
Property Value
- Guid?
RoomNumber
Room number where the appointment takes place (1-999). Used to prevent double-booking of rooms.
public int? RoomNumber { get; set; }
Property Value
- int?
Status
Current status of the appointment
public AppointmentStatus Status { get; set; }
Property Value
Methods
CanCancel()
Checks if this appointment can be cancelled
public bool CanCancel()
Returns
CanReschedule()
Checks if this appointment can be rescheduled
public bool CanReschedule()
Returns
Cancel(string)
Marks the appointment as cancelled
public void Cancel(string reason = "")
Parameters
reasonstring
ConflictsWith(AppointmentTimeInterval)
Checks if this appointment conflicts with another for the same physician
public bool ConflictsWith(AppointmentTimeInterval other)
Parameters
otherAppointmentTimeInterval
Returns
CreateMergedInterval(DateTime, DateTime, string, ITimeInterval)
Creates a merged appointment interval (not typically used, but required by base)
protected override ITimeInterval? CreateMergedInterval(DateTime start, DateTime end, string description, ITimeInterval other)
Parameters
startDateTimeendDateTimedescriptionstringotherITimeInterval
Returns
GetSpecificValidationErrors()
Override to add appointment-specific validation
protected override List<string> GetSpecificValidationErrors()
Returns
MarkCompleted()
Marks the appointment as completed
public void MarkCompleted()
MarkNoShow()
Marks the appointment as no-show
public void MarkNoShow()
Reschedule(DateTime, DateTime)
Creates a rescheduled copy of this appointment
public AppointmentTimeInterval Reschedule(DateTime newStart, DateTime newEnd)
Parameters
Returns
ToString()
Gets a display string for this interval
public override string ToString()
Returns
UpdateDuration(int)
Updates the duration of this appointment by changing the end time
public void UpdateDuration(int durationMinutes)
Parameters
durationMinutesint