Class ApiRoutes.Patients
Routes for Patients API (/api/patients)
public static class ApiRoutes.Patients
- Inheritance
-
ApiRoutes.Patients
- Inherited Members
Fields
BasePath
The base path for patient-related API endpoints, combining the base URL and controller name.
public const string BasePath = "api/patients"
Field Value
ById
The route segment used to identify a patient by their unique identifier.
public const string ById = "{id}"
Field Value
ByPhysician
Route segment for retrieving all patients assigned to a physician
public const string ByPhysician = "physician/{physicianId}"
Field Value
Controller
The base controller name for patient-related API endpoints.
public const string Controller = "patients"
Field Value
Search
Search route segment for querying patients by a search term.
public const string Search = "search"
Field Value
Methods
GetAll()
Base route for accessing all patients.
public static string GetAll()
Returns
- string
The base path for patients.
GetById(Guid)
Constructs a URL that fetches a patient by their unique identifier
public static string GetById(Guid id)
Parameters
idGuidThe unique identifier of the patient to be fetched
Returns
- string
The full path to the patient resource.
GetByPhysician(Guid)
Returns the API endpoint URL for retrieving patients assigned to the specified physician.
public static string GetByPhysician(Guid physicianId)
Parameters
physicianIdGuidThe unique identifier of the physician.
Returns
- string
The full path for querying patients by physician.
GetUnassigned()
Returns the API endpoint URL for retrieving unassigned patients.
public static string GetUnassigned()
Returns
- string
The full path for querying unassigned patients.
SearchByQuery(string)
Constructs a search URL using the specified query string.
public static string SearchByQuery(string query)
Parameters
querystringThe search query to include in the URL. Must not be
null.
Returns
- string
A string containing the full search URL with the query parameter properly escaped.