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

namespace adas_core.Application.Services.Interfaces;

public interface IArchivePatientCarePlanService
{
    /// <summary>
    /// Retrieves a list of patient care plans associated with the specified patient identifier.
    /// </summary>
    /// <param name="id">The unique identifier of the patient whose care plans are being retrieved.</param>
    /// <returns>A task that represents the asynchronous operation. The task result contains a list of <see cref="PatientCarePlan"/> objects if found, or <c>null</c> if no care plans exist for the patient.</returns>
    Task<List<PatientCarePlan>?> FindByPatientId(ObjectId id);
    /// <summary>
    /// Retrieves the list of care plans associated with the specified patient identifier.
    /// </summary>
    /// <param name="id">The unique identifier of the patient whose care plans should be retrieved.</param>
    /// <returns>A task that returns a list of <see cref="PatientCarePlan"/> records for the patient, or <c>null</c> if no care plans are found.</returns>
    Task<List<PatientCarePlan>?> FindByPatientId(string id);
    /// <summary>
    /// Retrieves a list of patient care plans associated with the specified patient number.
    /// </summary>
    /// <param name="id">The patient number used to locate the associated care plans.</param>
    /// <returns>A task that returns a list of <see cref="PatientCarePlan"/> for the given patient number, or <c>null</c> if no care plans are found.</returns>
    Task<List<PatientCarePlan>?> FindByPatientNumber(string id);

    /// <summary>
    /// Asynchronously retrieves all patient care plans.
    /// </summary>
    /// <returns>A task that represents the asynchronous operation, containing a list of <see cref="PatientCarePlan"/> objects.</returns>
    Task<List<PatientCarePlan>> FindAll();

    // Task<PatientCarePlan?> UpdateTreatment(PatientCarePlan patientCarePla, List<OptionList> options);
    // Task<PatientCarePlan?> UpdateProcedure(PatientCarePlan patientCarePla, List<OptionList> options);
    /// <summary>
    /// Asynchronously inserts a single patient care plan and returns the inserted entity, or null if the insert did not produce a result.
    /// </summary>
    /// <param name="patientCarePla">The patient care plan to insert.</param>
    /// <returns>A <see cref="Task{PatientCarePlan}"/> that represents the asynchronous insert operation, containing the inserted <see cref="PatientCarePlan"/> or null if no entity was returned.</returns>
    Task<PatientCarePlan?> InsertOneAsync(PatientCarePlan patientCarePla);
    /// <summary>
    /// Asynchronously inserts a collection of patient care plans into the data store in a single bulk operation.
    /// </summary>
    /// <param name="patientCarePla">The list of <see cref="PatientCarePlan"/> entities to be inserted.</param>
    Task InsertManyAsync(List<PatientCarePlan> patientCarePla);

    // Task Update(PatientCarePlan oldPatientCarePla, PatientCarePlan newPatientCarePla);
    // Task<PatientCarePlan?> FindByIds(ObjectId oldPatientCarePlaId, string? oldPatientCarePlaPatientId, string? oldPatientCarePlaPatientNumber);
}