Interface IPumpService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface IPumpService : IApiRequestService
- Inherited Members
- Extension Methods
Methods
Archive(Patient)
Archives the specified patient, marking the patient record as archived in the system.
Task Archive(Patient patient)
Parameters
patientPatientThe patient to be archived.
Returns
ArchiveByPatientId(ObjectId)
Asynchronously archives the data associated with the specified patient identifier.
Task ArchiveByPatientId(ObjectId id)
Parameters
idObjectIdThe unique identifier of the patient whose data should be archived.
Returns
- Task
A task that represents the asynchronous archive operation.
DeleteByPatientId(ObjectId)
Asynchronously deletes records associated with the specified patient identifier.
Task DeleteByPatientId(ObjectId id)
Parameters
idObjectIdThe ObjectId of the patient whose related records should be deleted.
Returns
DeletePumpConfig(ConfigPumps)
Deletes the specified pump configuration.
Task<bool> DeletePumpConfig(ConfigPumps config)
Parameters
configConfigPumpsThe pump configuration to delete.
Returns
- Task<bool>
A task that represents the asynchronous delete operation. The task result is
trueif the configuration was deleted successfully; otherwise,false.
FindAllLastPatientObservationTime()
Asynchronously retrieves the most recent observation timestamp for every patient, returning a dictionary keyed by patient identifier.
Task<Dictionary<ObjectId, DateTime>> FindAllLastPatientObservationTime()
Returns
- Task<Dictionary<ObjectId, DateTime>>
A task that represents the asynchronous operation. The task result contains a dictionary mapping each patient's MongoDB.Bson.ObjectId to their last observation DateTime.
FindLastPumpObservations(ObjectId, int)
Retrieves the most recent pump observations for the specified patient.
Task<List<PumpObservation>> FindLastPumpObservations(ObjectId patientId, int num = 1)
Parameters
patientIdObjectIdThe unique identifier of the patient whose pump observations are being queried.
numintThe maximum number of recent observations to return. Defaults to 1.
Returns
- Task<List<PumpObservation>>
A task that represents the asynchronous operation. The task result contains a list of the most recent pump observations for the patient, up to the specified count.
GetAllPumpConfig()
Asynchronously retrieves the full list of pump configurations from the underlying data source.
Task<List<ConfigPumps>?> GetAllPumpConfig()
Returns
- Task<List<ConfigPumps>>
A task that resolves to a List<T> containing all pump configurations, or
nullif no configurations are available.
GetItemsById(string)
Retrieves the list of configuration pump items associated with the specified identifier.
Task<List<ConfigPumpItem>?> GetItemsById(string id)
Parameters
idstringThe unique identifier used to look up the configuration pump items.
Returns
- Task<List<ConfigPumpItem>>
A task that resolves to a list of ConfigPumpItem objects matching the given identifier, or
nullwhen no items are found.
GetPaginatedPump(PaginationFilter)
Retrieves a paginated collection of pump observations based on the provided filter criteria. Returns null when no pump observations match the supplied pagination filter.
Task<PaginationResponse<PumpObservation>?> GetPaginatedPump(PaginationFilter filter)
Parameters
filterPaginationFilterThe pagination filter that defines page size, page number, and any additional filtering criteria applied to the pump observations.
Returns
- Task<PaginationResponse<PumpObservation>>
A task that resolves to a PaginationResponse<T> containing the matching pump observations, or null when no results are found.
GetPumpConfigsById(string)
Asynchronously retrieves the pump configuration associated with the specified identifier.
Task<ConfigPumps?> GetPumpConfigsById(string id)
Parameters
idstringThe unique identifier of the pump configuration to retrieve.
Returns
- Task<ConfigPumps>
A task that represents the asynchronous operation. The task result contains the ConfigPumps instance matching the specified identifier, or null if no configuration is found.
InsertPumpConfig(ConfigPumps)
Inserts a new pump configuration into the system asynchronously.
Task<ConfigPumps?> InsertPumpConfig(ConfigPumps config)
Parameters
configConfigPumpsThe pump configuration to be inserted.
Returns
- Task<ConfigPumps>
A task that represents the asynchronous operation, containing the inserted ConfigPumps or
nullif the insertion fails.
InsertPumpObservation(PumpObservation)
Asynchronously inserts a pump observation record into the underlying data store.
Task InsertPumpObservation(PumpObservation obs)
Parameters
obsPumpObservationThe pump observation to persist.
Returns
MapPumpObservation(PumpObservation)
Asynchronously maps the specified pump observation to a resulting PumpObservation, returning null when no mapping result is produced.
Task<PumpObservation?> MapPumpObservation(PumpObservation obs)
Parameters
obsPumpObservationThe source pump observation to be mapped.
Returns
- Task<PumpObservation>
A task that represents the asynchronous mapping operation, containing the resulting PumpObservation or
nullif no result is available.
UpdateManyObjectId(string, ObjectId, ObjectId)
Asynchronously updates multiple records, replacing the specified old ObjectId with a new one in the field identified by nameId.
Task UpdateManyObjectId(string nameId, ObjectId id, ObjectId oldId)
Parameters
nameIdstringThe name of the field whose ObjectId value should be updated.
idObjectIdThe new ObjectId value to assign.
oldIdObjectIdThe existing ObjectId value to be replaced.
Returns
UpdatePumpConfig(ConfigPumps)
Asynchronously updates the pump configuration.
Task<ConfigPumps?> UpdatePumpConfig(ConfigPumps config)
Parameters
configConfigPumpsThe pump configuration to update.
Returns
- Task<ConfigPumps>
A task that represents the asynchronous operation, containing the updated ConfigPumps or null if not found.