Files
adas-core/adas-core.Application/Services/ArchivedPatientService.cs
T

25 lines
1.1 KiB
C#

using adas_core.Application.Repositories.Interfaces;
using adas_core.Application.Services.Interfaces;
using adas_core.Domain.Models.MongoModels;
namespace adas_core.Application.Services;
/// <summary>
/// Provides services for managing archived patient data, implementing the <see cref="IArchivedPatientService"/> interface.
/// </summary>
/// <remarks>
/// This class uses an <see cref="IPatientArchiveRepository"/> to perform operations on archived patient records, following the repository pattern.
/// </remarks>
/// <!-- aidoc:v1 sig=d476f9b -->
public class ArchivedPatientService(IPatientArchiveRepository archivedPatientRepository) : IArchivedPatientService
{
/// <summary>
/// Retrieves all archived patients by delegating to the archived patient repository.
/// </summary>
/// <returns>A task representing the asynchronous operation, containing a list of all archived <see cref="Patient"/> entities.</returns>
/// <!-- aidoc:v1 sig=3e765a0 body=6db7118 -->
public async Task<List<Patient>> FindAllPatients()
{
return await archivedPatientRepository.FindAll();
}
}