using adas_core.Application.Services.Interfaces;
using adas_core.Domain.Enums;
using adas_core.Domain.Models;
using adas_core.Domain.Models.Pumps;
using MongoDB.Bson;

namespace adas_core.Application.Services;

public class DefaultCalculatedObservations : ICalculatedObservations
{
    public Task CalculateMedicineObservation(List<Medicine> activeMedicines, ObjectId patientId)
    {
        return Task.CompletedTask;
    }

    public Task CalculateActiveBolus(ObjectId patientId)
    {
        return Task.CompletedTask;
    }

    public Task<T?> Map<T>(T obs, bool onlyByName) where T : BasePatientObservation
    {
        return Task.FromResult(obs)!;
    }

    public Task<PatientTreatment> Map(PatientTreatment treatment)
    {
        return Task.FromResult(treatment);
    }

    public Task<IEnumerable<PatientTreatment?>> GetActiveTreatmentsByPatient(ObjectId id)
    {
        return Task.FromResult<IEnumerable<PatientTreatment?>>(new List<PatientTreatment?>());
    }

    public Task<PatientDiagnosis> Map(PatientDiagnosis diagnosis)
    {
        return Task.FromResult(diagnosis);
    }

    public Task<PumpObservation> Map(PumpObservation pumpObservation)
    {
        throw new NotImplementedException();
    }

    public Task<PatientObservation?> FixTimeInconsistencyWithLast(PatientObservation newObservation)
    {
        return Task.FromResult<PatientObservation?>(newObservation);
    }

    public Task<List<PatientObservation>> PreMapList(List<PatientObservation> listToInsert)
    {
        return Task.FromResult(listToInsert);
    }

    public Task<PatientObservation> MapSourceAlarm(PatientObservation obs, PatientObservationAlarm alarmToInsert)
    {
        return Task.FromResult(obs);
    }

    public Task SendAlarm(PatientObservation obs, string name, AlarmEnum.Name? code)
    {
        throw new NotImplementedException();
    }
}