28 lines
1.4 KiB
C#
28 lines
1.4 KiB
C#
using adas_core.Application.Repositories.Interfaces;
|
|
using adas_core.Application.Services.Interfaces;
|
|
using adas_core.Domain.Models;
|
|
using MongoDB.Bson;
|
|
|
|
namespace adas_core.Application.Services;
|
|
|
|
/// <summary>
|
|
/// Implements <see cref="IArchivedPatientObservationService"/> to archive patient observations through the supplied <see cref="IObservationArchiveRepository"/>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// The archive repository dependency is provided via the primary constructor and is used to perform the underlying archiving operations.
|
|
/// </remarks>
|
|
/// <!-- aidoc:v1 sig=a0ae303 -->
|
|
public class ArchivePatientObservationsService(IObservationArchiveRepository archivedPatientObservationService)
|
|
: IArchivedPatientObservationService
|
|
{
|
|
/// <summary>
|
|
/// Retrieves all archived patient observations associated with the specified patient.
|
|
/// </summary>
|
|
/// <param name="patientId">The unique identifier of the patient whose archived observations are being requested.</param>
|
|
/// <returns>A task that represents the asynchronous operation, containing a list of archived <see cref="PatientObservation"/> records for the patient.</returns>
|
|
/// <!-- aidoc:v1 sig=dc5c962 body=1b4970c -->
|
|
public async Task<List<PatientObservation>> FindArchivedPatientObservationsFromPatient(ObjectId patientId)
|
|
{
|
|
return await archivedPatientObservationService.FindAllFromPatient(patientId);
|
|
}
|
|
} |