public interface IAnalyticsService
{
    Task<object> GetPopulationAsync(string code, decimal threshold, string direction,
        DateTimeOffset? from, DateTimeOffset? to);
    Task<object> GetObservationTrendAsync(Guid encounterId, string code,
        DateTimeOffset? from, DateTimeOffset? to);
    Task<object> GetAlertSummaryAsync(string? severity, string? department,
        DateTimeOffset? from, DateTimeOffset? to);
    Task<object> SearchPatientsAsync(string? q, string? department, string? status,
        int page, int pageSize);
}