26 lines
1.2 KiB
C#
26 lines
1.2 KiB
C#
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;
|
|
|
|
/// <summary>
|
|
/// Provides an abstract base class for provider implementations that consume configuration through <see cref="IOptions{ProvidersSettings}"/> and create HTTP clients via <see cref="IHttpClientFactory"/>.
|
|
/// </summary>
|
|
/// <!-- aidoc:v1 sig=e744862 -->
|
|
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>
|
|
/// <!-- aidoc:v1 sig=a880577 -->
|
|
public abstract Task<List<PatientObservation>> GetObservations(Patient patient);
|
|
} |