Class ApiRoutes.Appointments
Routes for Appointments API (/api/appointments)
public static class ApiRoutes.Appointments
- Inheritance
-
ApiRoutes.Appointments
- Inherited Members
Fields
AvailableSlots
Represents the endpoint template for retrieving available slots for a specific physician.
public const string AvailableSlots = "physician/{physicianId}/available-slots"
Field Value
Remarks
The placeholder {physicianId} in the template should be replaced with
the unique identifier of the physician whose available slots are being queried.
BasePath
Represents the base path for the appointments API, combining the base URL and the controller name.
public const string BasePath = "api/appointments"
Field Value
Remarks
This constant is constructed by concatenating the base URL and the appointment controller
name. Ensure that the Base and Controller constants are properly defined before using this
value.
ById
Represents a placeholder string used to identify a resource by its unique identifier.
public const string ById = "{id}"
Field Value
Remarks
This constant is typically used in route templates or query strings where a resource ID is required.
ByPatient
Represents the route template for accessing resources by patient ID.
public const string ByPatient = "patient/{patientId}"
Field Value
Remarks
This constant defines the route pattern "patient/{patientId}", where
{patientId} is a placeholder for the unique identifier of a patient.
ByPhysician
Represents the route template for accessing resources by a specific physician.
public const string ByPhysician = "physician/{physicianId}"
Field Value
Remarks
The route includes a placeholder for the physician's unique identifier, which
should be replaced with the actual physicianId when constructing the route.
Cancel
Represents the endpoint path for canceling an operation with a specific identifier.
public const string Cancel = "{id}/cancel"
Field Value
Remarks
The placeholder {id} in the path should be replaced with the unique
identifier of the operation to be canceled.
Controller
Represents the controller name used for handling appointment-related operations.
public const string Controller = "appointments"
Field Value
Statuses
Represents the key used to identify statuses in a configuration or data context.
public const string Statuses = "statuses"
Field Value
Methods
CheckConflict(Guid, DateTime, int, Guid?)
Constructs a URL that checks for scheduling conflicts for a proposed appointment.
public static string CheckConflict(Guid physicianId, DateTime start, int durationMinutes, Guid? excludeId = null)
Parameters
physicianIdGuidThe unique identifier of the physician whose schedule is being queried
startDateTimeThe date and time of the start of the proposed appointment
durationMinutesintThe duration of the proposed appointment in minutes
excludeIdGuid?The unique identifier of the appointment to optionally exclude
Returns
- string
A string representing the API path used to check for scheduling conflicts.
GetAll()
Gets the base path used by the application.
public static string GetAll()
Returns
- string
The base path as a string.
GetAvailableSlots(Guid, DateTime, int)
Constructs a URL to retrieve available appointment slots for a specified physician on a given date.
public static string GetAvailableSlots(Guid physicianId, DateTime date, int durationMinutes)
Parameters
physicianIdGuidThe unique identifier of the physician whose availability is being queried.
dateDateTimeThe date for which to retrieve available slots. Only the date component is used.
durationMinutesintThe desired duration of the appointment slots, in minutes.
Returns
- string
A string representing the URL to query available slots for the specified parameters.
GetByDate(DateTime)
Constructs a URL path for retrieving data associated with a specific date.
public static string GetByDate(DateTime date)
Parameters
dateDateTimeThe date for which the URL path is generated. The date is formatted as "yyyy-MM-dd".
Returns
- string
A string representing the URL path for the specified date.
GetById(Guid)
Constructs a URL path by appending the specified identifier to the base path.
public static string GetById(Guid id)
Parameters
idGuidThe unique identifier to append to the base path.
Returns
- string
A string representing the full URL path, including the base path and the specified identifier.
GetByPatient(Guid)
Constructs a URL path for retrieving resources associated with a specific patient.
public static string GetByPatient(Guid patientId)
Parameters
patientIdGuidThe unique identifier of the patient.
Returns
- string
A string representing the URL path for the specified patient.
GetByPhysician(Guid)
Constructs a URL path for retrieving resources associated with a specific physician.
public static string GetByPhysician(Guid physicianId)
Parameters
physicianIdGuidThe unique identifier of the physician.
Returns
- string
A string representing the URL path for the specified physician.
GetByStatus(string)
Constructs a URL for retrieving resources filtered by the specified status.
public static string GetByStatus(string status)
Parameters
statusstringThe status used to filter the resources. This value is appended to the URL path.
Returns
- string
A string representing the constructed URL for the specified status.