=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -15,6 +15,7 @@ namespace adas_core.Infrastructure.Repositories
|
||||
/// Repositorio de archivo para observaciones de bombas.
|
||||
/// Colección: archive_pumpobservations (configurable por ApiSettings.ArchivePumpObservations).
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=46323e9 -->
|
||||
public class PumpArchiveRepository : MongoRepository<PumpObservation>, IPumpArchiveRepository
|
||||
{
|
||||
private readonly ApiSettings _apiSettings;
|
||||
@@ -76,6 +77,7 @@ namespace adas_core.Infrastructure.Repositories
|
||||
/// Asynchronously inserts a <see cref="PumpObservation"/> into the underlying MongoDB collection.
|
||||
/// </summary>
|
||||
/// <param name="obs">The pump observation to persist.</param>
|
||||
/// <!-- aidoc:v1 sig=2e9b63d body=ff40c9a -->
|
||||
public async Task InsertAsync(PumpObservation obs)
|
||||
{
|
||||
await Collection.InsertOneAsync(obs);
|
||||
@@ -85,6 +87,7 @@ namespace adas_core.Infrastructure.Repositories
|
||||
/// Asynchronously inserts a batch of pump observations into the underlying data store. If the collection is empty, the method completes without performing any insertion.
|
||||
/// </summary>
|
||||
/// <param name="observations">The pump observations to insert into the collection.</param>
|
||||
/// <!-- aidoc:v1 sig=1891edb body=80cfb77 -->
|
||||
public async Task InsertManyAsync(IEnumerable<PumpObservation> observations)
|
||||
{
|
||||
var list = observations as IList<PumpObservation> ?? observations.ToList();
|
||||
@@ -101,6 +104,7 @@ namespace adas_core.Infrastructure.Repositories
|
||||
/// <param name="to">Optional inclusive upper bound for the observation time. When provided, only observations on or before this time are returned.</param>
|
||||
/// <param name="limit">Optional maximum number of observations to return. When null, all matching observations are returned.</param>
|
||||
/// <returns>A task that represents the asynchronous operation. The task result contains an <see cref="IEnumerable{PumpObservation}"/> of matching observations ordered from newest to oldest.</returns>
|
||||
/// <!-- aidoc:v1 sig=d24c731 body=afb5adf -->
|
||||
public async Task<IEnumerable<PumpObservation>> FindByPatientIdAsync(
|
||||
ObjectId patientId, DateTime? from = null, DateTime? to = null, int? limit = null)
|
||||
{
|
||||
@@ -124,6 +128,7 @@ namespace adas_core.Infrastructure.Repositories
|
||||
/// Deletes all pump observations whose recording time is earlier than the specified cutoff date.
|
||||
/// </summary>
|
||||
/// <param name="addDays">The cutoff date; observations with a timestamp before this value are removed.</param>
|
||||
/// <!-- aidoc:v1 sig=f776d6a body=426aa60 -->
|
||||
public async Task DeleteBeforeDate(DateTime addDays)
|
||||
{
|
||||
var filter = Builders<PumpObservation>.Filter.Lt(x => x.Time, addDays);
|
||||
|
||||
Reference in New Issue
Block a user