Table of Contents

Class RemoteAppointmentRepository

Namespace
Core.CliniCore.Repositories.Remote
Assembly
Core.CliniCore.dll

Remote repository implementation that calls the API for appointment operations. Uses ApiRoutes for all endpoint paths (single source of truth).

public class RemoteAppointmentRepository : RemoteRepositoryBase, IAppointmentRepository, IRepository<AppointmentTimeInterval>
Inheritance
RemoteAppointmentRepository
Implements
Inherited Members

Constructors

RemoteAppointmentRepository(HttpClient)

Remote repository implementation that calls the API for appointment operations. Uses ApiRoutes for all endpoint paths (single source of truth).

public RemoteAppointmentRepository(HttpClient httpClient)

Parameters

httpClient HttpClient

Methods

Add(AppointmentTimeInterval)

public void Add(AppointmentTimeInterval entity)

Parameters

entity AppointmentTimeInterval

Delete(Guid)

public void Delete(Guid id)

Parameters

id Guid

GetAll()

public IEnumerable<AppointmentTimeInterval> GetAll()

Returns

IEnumerable<AppointmentTimeInterval>

GetAvailableSlots(Guid, DateTime, TimeSpan)

Gets available time slots for a physician on a given date

public IEnumerable<(DateTime Start, DateTime End)> GetAvailableSlots(Guid physicianId, DateTime date, TimeSpan duration)

Parameters

physicianId Guid
date DateTime
duration TimeSpan

Returns

IEnumerable<(DateTime Start, DateTime End)>

GetByDate(DateTime)

Gets all appointments for a specific date

public IEnumerable<AppointmentTimeInterval> GetByDate(DateTime date)

Parameters

date DateTime

Returns

IEnumerable<AppointmentTimeInterval>

GetById(Guid)

public AppointmentTimeInterval? GetById(Guid id)

Parameters

id Guid

Returns

AppointmentTimeInterval

GetByPatient(Guid)

Gets all appointments for a specific patient

public IEnumerable<AppointmentTimeInterval> GetByPatient(Guid patientId)

Parameters

patientId Guid

Returns

IEnumerable<AppointmentTimeInterval>

GetByPhysician(Guid)

Gets all appointments for a specific physician

public IEnumerable<AppointmentTimeInterval> GetByPhysician(Guid physicianId)

Parameters

physicianId Guid

Returns

IEnumerable<AppointmentTimeInterval>

GetByStatus(AppointmentStatus)

Gets appointments filtered by status

public IEnumerable<AppointmentTimeInterval> GetByStatus(AppointmentStatus status)

Parameters

status AppointmentStatus

Returns

IEnumerable<AppointmentTimeInterval>

HasConflict(Guid, DateTime, TimeSpan, Guid?)

Checks if a proposed appointment would conflict with existing ones

public bool HasConflict(Guid physicianId, DateTime start, TimeSpan duration, Guid? excludeAppointmentId = null)

Parameters

physicianId Guid
start DateTime
duration TimeSpan
excludeAppointmentId Guid?

Returns

bool

Search(string)

public IEnumerable<AppointmentTimeInterval> Search(string query)

Parameters

query string

Returns

IEnumerable<AppointmentTimeInterval>

Update(AppointmentTimeInterval)

public void Update(AppointmentTimeInterval entity)

Parameters

entity AppointmentTimeInterval