using adas_core.Domain.Models;
using adas_core.Domain.Models.MongoModels;
using adas_core.Domain.Models.Providers;
using Microsoft.Extensions.Options;

namespace adas_core.Application.Providers;

public abstract class BaseProvider(
    IOptions<ProvidersSettings> providerSettings,
    IHttpClientFactory httpClientFactory)
{
    protected IHttpClientFactory HttpClientFactory = httpClientFactory;
    protected string Url { get; set; } = providerSettings.Value.Url;

    /// <summary>
    /// Asynchronously retrieves the list of clinical observations associated with the specified patient.
    /// </summary>
    /// <param name="patient">The patient whose observations are being requested.</param>
    /// <returns>A task that represents the asynchronous operation, containing a list of <see cref="PatientObservation"/> entries for the patient.</returns>
    public abstract Task<List<PatientObservation>> GetObservations(Patient patient);
}