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;

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>
    public async Task<List<PatientObservation>> FindArchivedPatientObservationsFromPatient(ObjectId patientId)
    {
        return await archivedPatientObservationService.FindAllFromPatient(patientId);
    }
}