using adas_core.Domain.Models;
using adas_core.Domain.Models.Filter;
using MongoDB.Bson;
using MongoDB.Driver;

namespace adas_core.Application.Repositories.Interfaces;

public interface ITreatmentRepository : IMongoRepository<PatientTreatment>
{
    Task<IEnumerable<PatientTreatment>> GetByPatientId(ObjectId patientId);
    Task<IAsyncCursor<PatientTreatment>> GetById(ObjectId id);
    new Task InsertOneAsync(PatientTreatment treatment);
    new Task DeleteAsync(ObjectId id);
    Task<bool> Update(PatientTreatment treatment);
    Task<IAsyncCursor<PatientTreatment>> FindByPatientIdAsync(ObjectId patientId);
    Task<IEnumerable<PatientTreatment>> FindByPatientId(ObjectId patientId);

    Task<bool> DeleteByPatientId(ObjectId patientId);
    Task<List<PatientTreatment>> FindBolusTreatments(ObjectId patientId);
    Task UpdateManyObjectId(string nameId, ObjectId id, ObjectId oldId);
    IFindFluent<PatientTreatment, PatientTreatment> GetPaginatedTreatments(PaginationFilter filter);
    Task<List<PatientTreatment>> GetActiveTreatmentsByPatientIdAndOrder(ObjectId patientId, string order);
}