using adas_core.Domain.Enums; using adas_core.Domain.Models; using adas_core.Domain.Models.Filter; using adas_core.Domain.Models.MongoModels; using adas_core.Domain.Models.Responses; using MongoDB.Bson; namespace adas_core.Application.Services.Interfaces; public interface ILightBeaconService { /// /// Sends the specified color command to the light beacon associated with the given point of control identifier. /// /// The identifier of the point of control that targets the light beacon. /// The color to apply to the light beacon. Task SendColor(ObjectId pocId, LightBeaconColor color); /// /// Sends a color command to the light beacon of the specified point of care device, /// updating its visual indicator to reflect the requested state. /// /// The identifier of the point of care device whose light beacon will be updated. /// The color to apply to the light beacon. /// A task that represents the asynchronous color send operation. Task SendColor(PointOfCare pocId, LightBeaconColor color); /// /// Sends a light beacon broadcast for the specified point of care, setting the beacon to display the specified color. /// /// The point of care device or location whose beacon will be updated. /// The color to display on the light beacon. Task SendBeaconBroadcast(PointOfCare poc, LightBeaconColor color); /// /// Sends a broadcast signal to the beacon associated with the specified point of care identifier using the given beacon color. /// /// The identifier of the point of care (or beacon) that will receive the broadcast. /// The color of the light beacon used for the broadcast. Task SendBeaconBroadcast(ObjectId poc, LightBeaconColor color); /// /// Asynchronously powers off the LED associated with the specified point of connection identifier. /// /// The identifier of the point of connection whose LED will be turned off. Task PowerOffLed(ObjectId pocId); /// /// Asynchronously powers off the LED indicator associated with the specified point of care. /// /// The point of care whose LED indicator should be turned off. Task PowerOffLed(PointOfCare poc); /// /// Generates a color-coded alert based on the provided patient observation. /// /// The patient observation used to determine the alert level and color. void GenerateColorAlert(PatientObservation obs); //TODO refactor, one patient can have multiple beacons /// /// Asynchronously retrieves the associated with the specified point of care identifier. /// /// The identifier of the point of care whose light beacon color is being requested. /// A task that represents the asynchronous operation, containing the for the specified point of care. public Task GetColor(ObjectId pocId); /// /// Asynchronously retrieves the light beacon color associated with the specified point of care. /// /// The point of care for which to look up the light beacon color. /// A task that represents the asynchronous operation. The task result contains the for the specified point of care. public Task GetColor(PointOfCare poc); /// /// Updates a single light beacon record in the data store. /// Returns when the beacon to update cannot be found. /// /// The light beacon containing the updated values to persist. /// A task that represents the asynchronous operation, containing the updated , or if no matching beacon was found. Task UpdateOne(LightBeacon beacon); /// /// Inserts a single light beacon into the data store. /// /// The light beacon entity to insert. /// A task that resolves to the inserted , or null when no result is produced. Task InsertOne(LightBeacon beacon); /// /// Asynchronously retrieves a paginated collection of light beacons based on the specified pagination filter. /// /// The pagination filter containing the criteria used to page the beacon results. /// A task that represents the asynchronous operation, containing a pagination response with the requested light beacons. Task> GetPaginatedBeacons(PaginationFilter request); /// /// Asynchronously searches for light beacons by name using the specified search text. /// /// The text used to search for matching light beacons by name. /// A task that represents the asynchronous operation. The task result contains a list of objects matching the search criteria. Task> GetSearchByName(string textToSearch); }