using adas_core.Domain.Enums;
using adas_core.Domain.Models;
using adas_core.Domain.Models.DTO;
using adas_core.Domain.Models.Masters;
using adas_core.Domain.Models.MongoModels;
using MongoDB.Bson;

namespace adas_core.Application.Services.Interfaces;

public interface IDischargeService : IApiRequestService
{
    Task<Discharge?> GetDischargeByIdAsync(ObjectId dischargeId);
    Task<long> CountDischargesByUnitId(ObjectId unitId);
    Task DeleteDischargeByIdAsync(ObjectId dischargeId);
    Task DeleteDischargeAsync(Discharge discharge);
    Task UpdateDischargeAsync(Discharge discharge);
    Task<IEnumerable<Discharge>> GetDischargesAsync();
    Task<Discharge?> InsertDischarge(Discharge discharge);
    Task<Discharge?> GetDischargeByLocation(PatientLocation location);
    Task<Discharge?> GetDischargeByPatientId(ObjectId patientId);
    Task<Discharge?> GetDischargeByPointOfCareId(ObjectId location);
    Task<Discharge?> GetDischargeByPointOfCareIdWithLocale(ObjectId location, LocaleEnum dataLocale);
    void SendDischargeBroadcast(Discharge discharge, OperationType operation);
    Task UpdatePatientMasterListItemChange(UpdateOptionMasterListDto opt, IEnumerable<Unit> unitList, string typeName);
    Task DeletePatientMasterListItem(OptionList opt, IEnumerable<Unit> unitList, string typeName);
    Task DeleteDischargesByUnitId(ObjectId unitId);
}