Class ApiRoutes.Physicians
Routes for Physicians API (/api/physicians)
public static class ApiRoutes.Physicians
- Inheritance
-
ApiRoutes.Physicians
- Inherited Members
Fields
AssignPatient
Represents the route template for assigning a patient to an entity by identifier.
public const string AssignPatient = "{id}/patients/{patientId}"
Field Value
Remarks
The template includes placeholders for id and patientId, which
should be replaced with the appropriate values when constructing the route.
BasePath
Represents the base path for the controller, combining the base route and controller name.
public const string BasePath = "api/physicians"
Field Value
Remarks
Use this constant to construct API endpoints or route URLs that require the controller's base path.
ById
Represents the route segment used to identify a physician by its unique identifier in HTTP GET requests.
public const string ById = "{id}"
Field Value
Remarks
This constant is typically used in route templates to specify endpoints that
operate on a single resource, such as GET /items/{id}.
BySpecialization
Represents the route template for accessing resources by specialization.
public const string BySpecialization = "specialization/{specialization}"
Field Value
Controller
Represents the route segment used to identify physician-related controllers in API endpoints.
public const string Controller = "physicians"
Field Value
Remarks
This constant can be used to construct URLs or route templates for endpoints that manage physician resources.
Search
Represents the string value used to identify the "search" operation or resource.
public const string Search = "search"
Field Value
Specializations
Represents the key used to access the set of valid physician specializations from the API.
public const string Specializations = "specializations"
Field Value
Methods
GetAll()
Gets the base route string used for retrieving all physicians.
public static string GetAll()
Returns
- string
The base route string for retrieving all physicians
GetAvailableOn(DateTime)
Generates a URI string for querying available resources on the specified date.
public static string GetAvailableOn(DateTime date)
Parameters
dateDateTimeThe date for which to retrieve available resources. The date is formatted as "yyyy-MM-dd" in the resulting URI.
Returns
- string
A URI string that can be used to request available resources for the specified date.
GetById(Guid)
Returns the resource path corresponding to the specified physician's unique identifier.
public static string GetById(Guid id)
Parameters
Returns
- string
A string containing the resource path for the specified
id.
GetBySpecialization(string)
Returns the API endpoint URL for retrieving physicians by specialization.
public static string GetBySpecialization(string specialization)
Parameters
specializationstringThe specialization identifier to include in the endpoint URL. Must not be null or empty.
Returns
- string
A string containing the full API endpoint URL for the specified specialization.
SearchByQuery(string)
Constructs a search URL using the specified query string.
public static string SearchByQuery(string query)
Parameters
Returns
- string
A string containing the search URL with the query parameter encoded.