Interface IPumpAlarmEventRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface IPumpAlarmEventRepository
- Extension Methods
Methods
DeleteByPatientId(ObjectId)
Deletes records associated with the specified patient identifier.
Task DeleteByPatientId(ObjectId patientId)
Parameters
patientIdObjectIdThe unique identifier of the patient whose records should be deleted.
Returns
FindByDeviceIdAsync(string, DateTime?, DateTime?, int?)
Retrieves pump alarm events associated with the specified device, optionally filtered by a date range and capped by a maximum result count.
Task<IEnumerable<PumpAlarmEvent>> FindByDeviceIdAsync(string deviceId, DateTime? from = null, DateTime? to = null, int? limit = null)
Parameters
deviceIdstringThe unique identifier of the device whose alarm events should be returned.
fromDateTime?Optional start of the date range used to filter the events.
toDateTime?Optional end of the date range used to filter the events.
limitint?Optional maximum number of alarm events to return.
Returns
- Task<IEnumerable<PumpAlarmEvent>>
A task that represents the asynchronous operation, containing the collection of pump alarm events matching the criteria.
FindLastByDeviceIdAsync(string)
Asynchronously retrieves the most recent pump alarm event associated with the specified device identifier. Returns null if no alarm event is found for the given device.
Task<PumpAlarmEvent?> FindLastByDeviceIdAsync(string deviceId)
Parameters
deviceIdstringThe unique identifier of the device whose last pump alarm event is to be retrieved.
Returns
- Task<PumpAlarmEvent>
A task that represents the asynchronous operation, containing the most recent PumpAlarmEvent for the device, or null if none exists.
InsertAsync(PumpAlarmEvent)
Asynchronously inserts a pump alarm event into the underlying data store.
Task InsertAsync(PumpAlarmEvent alarmEvent)
Parameters
alarmEventPumpAlarmEventThe pump alarm event to be persisted.
Returns
UpdateManyObjectIdByFiledNameAsync(string, ObjectId, ObjectId)
Asynchronously updates the ObjectId value of multiple records where the specified field currently matches the old identifier, replacing it with the new identifier.
Task<long> UpdateManyObjectIdByFiledNameAsync(string fieldName, ObjectId newId, ObjectId oldId)
Parameters
fieldNamestringThe name of the field whose value should be updated.
newIdObjectIdThe new ObjectId value to assign to the matching records.
oldIdObjectIdThe existing ObjectId value used to identify the records to be updated.