Table of Contents

Class ApiRoutes.Patients

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

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

string

ById

The route segment used to identify a patient by their unique identifier.

public const string ById = "{id}"

Field Value

string

ByPhysician

Route segment for retrieving all patients assigned to a physician

public const string ByPhysician = "physician/{physicianId}"

Field Value

string

Controller

The base controller name for patient-related API endpoints.

public const string Controller = "patients"

Field Value

string

Search route segment for querying patients by a search term.

public const string Search = "search"

Field Value

string

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

id Guid

The 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

physicianId Guid

The 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

query string

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