Table of Contents

Class EfPatientRepository

Namespace
API.CliniCore.Data.Repositories
Assembly
API.CliniCore.dll

Entity Framework Core implementation of IPatientRepository. Provides SQLite-backed persistence for patient profiles.

public class EfPatientRepository : IPatientRepository, IRepository<PatientProfile>
Inheritance
EfPatientRepository
Implements
Inherited Members

Constructors

EfPatientRepository(CliniCoreDbContext)

public EfPatientRepository(CliniCoreDbContext context)

Parameters

context CliniCoreDbContext

Methods

Add(PatientProfile)

public void Add(PatientProfile patient)

Parameters

patient PatientProfile

Delete(Guid)

public void Delete(Guid id)

Parameters

id Guid

GetAll()

public IEnumerable<PatientProfile> GetAll()

Returns

IEnumerable<PatientProfile>

GetById(Guid)

public PatientProfile? GetById(Guid id)

Parameters

id Guid

Returns

PatientProfile

GetByPhysician(Guid)

Gets all patients assigned to a specific physician

public IEnumerable<PatientProfile> GetByPhysician(Guid physicianId)

Parameters

physicianId Guid

Returns

IEnumerable<PatientProfile>

GetByUsername(string)

Gets a patient by their username

public PatientProfile? GetByUsername(string username)

Parameters

username string

Returns

PatientProfile

GetUnassigned()

Gets all patients not assigned to any physician

public IEnumerable<PatientProfile> GetUnassigned()

Returns

IEnumerable<PatientProfile>

Search(string)

public IEnumerable<PatientProfile> Search(string query)

Parameters

query string

Returns

IEnumerable<PatientProfile>

Update(PatientProfile)

public void Update(PatientProfile patient)

Parameters

patient PatientProfile