Interface IRecordingAlertRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface IRecordingAlertRepository : IMongoRepository<PatientRecordingAlert>
- Inherited Members
- Extension Methods
Methods
AggregatedPatientLastObservations(ObjectId, int)
Retrieves an aggregated list of the most recent patient recording alerts for the specified patient.
Task<List<PatientRecordingAlert>> AggregatedPatientLastObservations(ObjectId patientId, int num)
Parameters
patientIdObjectIdThe unique identifier of the patient whose recent alerts are being retrieved.
numintThe maximum number of recent observations to return.
Returns
- Task<List<PatientRecordingAlert>>
A task that represents the asynchronous operation, containing a list of PatientRecordingAlert entries for the patient's last observations.
DeleteByPatientId(ObjectId)
Asynchronously deletes records associated with the specified patient identifier.
Task DeleteByPatientId(ObjectId patientId)
Parameters
patientIdObjectIdThe unique MongoDB.Bson.ObjectId of the patient whose related records should be removed.
Returns
DeleteOlderDaysAsync(string, int)
Asynchronously deletes records older than the specified number of days, identified by the given name.
Task DeleteOlderDaysAsync(string name, int value)
Parameters
namestringThe identifier or key used to locate the records to be evaluated for deletion.
valueintThe age threshold, in days, used to determine which records are considered older and eligible for deletion.
Returns
DeleteOlderNumberAsync(string, int)
Asynchronously deletes a number record matching the specified name and value.
Task DeleteOlderNumberAsync(string name, int value)
Parameters
namestringThe name associated with the number to delete.
valueintThe numeric value of the record to delete.
Returns
- Task
A task that represents the asynchronous delete operation.
FindByPatientIdAsync(ObjectId)
Asynchronously retrieves all patient recording alerts associated with the specified patient identifier.
Task<IAsyncCursor<PatientRecordingAlert>> FindByPatientIdAsync(ObjectId patientId)
Parameters
patientIdObjectIdThe unique identifier of the patient whose recording alerts are being queried.
Returns
- Task<IAsyncCursor<PatientRecordingAlert>>
A task that represents the asynchronous operation, containing an asynchronous cursor over the matching PatientRecordingAlert documents.
FindLastObservations(ObjectId, string, int)
Retrieves the most recent observations of a specified type for a given patient.
Task<List<PatientRecordingAlert>> FindLastObservations(ObjectId patientId, string name, int num = 2)
Parameters
patientIdObjectIdThe unique identifier of the patient whose observations are queried.
namestringThe name of the observation to filter by.
numintThe maximum number of recent observations to return. Defaults to 2.
Returns
- Task<List<PatientRecordingAlert>>
A task that represents the asynchronous operation. The task result contains a list of PatientRecordingAlert entries representing the matching observations.
InsertOneAsync(PatientRecordingAlert)
Asynchronously inserts a single PatientRecordingAlert into the underlying data store.
Task InsertOneAsync(PatientRecordingAlert patientRecordingAlert)
Parameters
patientRecordingAlertPatientRecordingAlertThe patient recording alert to be inserted.
Returns
UpdateManyObjectId(string, ObjectId, ObjectId)
Updates many records by replacing the specified oldId with the new id within the collection identified by nameId.
Task UpdateManyObjectId(string nameId, ObjectId id, ObjectId oldId)
Parameters
nameIdstringThe name or identifier of the collection in which the update is performed.
idObjectIdThe new ObjectId to assign to the matching records.
oldIdObjectIdThe existing ObjectId used to locate the records to be updated.