Table of Contents

Class ApiRoutes.Appointments

Namespace
Core.CliniCore.Api
Assembly
Core.CliniCore.dll

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

string

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

string

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

string

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

string

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

string

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

string

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

string

Statuses

Represents the key used to identify statuses in a configuration or data context.

public const string Statuses = "statuses"

Field Value

string

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

physicianId Guid

The unique identifier of the physician whose schedule is being queried

start DateTime

The date and time of the start of the proposed appointment

durationMinutes int

The duration of the proposed appointment in minutes

excludeId Guid?

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

physicianId Guid

The unique identifier of the physician whose availability is being queried.

date DateTime

The date for which to retrieve available slots. Only the date component is used.

durationMinutes int

The 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

date DateTime

The 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

id Guid

The 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

patientId Guid

The 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

physicianId Guid

The 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

status string

The 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.