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

namespace adas_core.Application.Repositories.Interfaces;

public interface IAppointmentRepository : IMongoRepository<PatientAppointment>
{
    Task<List<PatientAppointment>> GetByPatient(ObjectId patientId);

    new Task InsertOneAsync(PatientAppointment appointment);
    Task Update(PatientAppointment appointment);
    Task UpdateManyObjectId(string nameId, ObjectId id, ObjectId oldId);
    new Task DeleteAsync(ObjectId id);
    Task<IAsyncCursor<PatientAppointment>> FindByPatientIdAsync(ObjectId patientId);
    Task DeleteByPatientId(ObjectId patientId);
    Task<PatientAppointment?> FindByPatientAndVisitNumber(ObjectId patientId, string visitNumber);
    Task<PatientAppointment?> FindByPatientAndReason(ObjectId patientId, string? appointmentReason);
    Task<List<PatientAppointment>> FindByLocation(PatientLocation location);
    Task<List<PatientAppointment>> FindByPoC(PointOfCare poc);
}