=== 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;
|
||||
/// Repository for managing patient observation alarms in MongoDB. Provides methods to retrieve aggregated patient observations based on specified fields and expiration status.
|
||||
/// Implements the IAlarmRepository interface and extends the MongoRepository base class for common MongoDB operations.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=38c745c -->
|
||||
public class AlarmRepository : MongoRepository<PatientObservationAlarm>, IAlarmRepository
|
||||
{
|
||||
/// <summary>
|
||||
@@ -35,6 +36,8 @@ public class AlarmRepository : MongoRepository<PatientObservationAlarm>, IAlarmR
|
||||
/// <param name="database">The MongoDB database instance.</param>
|
||||
/// <param name="logger">The logger instance for logging errors and information.</param>
|
||||
/// <exception cref="ArgumentNullException">Thrown when any of the input parameters are null.</exception>
|
||||
/// <!-- aidoc-review:v1 severity=high kind=wrong_exception
|
||||
/// "Documents ArgumentNullException as thrown 'when any of the input parameters are null', but the code only null-checks apiSettings; database and logger are not validated." -->
|
||||
public AlarmRepository(IOptions<ApiSettings> apiSettings, IMongoDatabase database, ILogger<AlarmRepository> logger)
|
||||
: base(database)
|
||||
{
|
||||
@@ -51,6 +54,7 @@ public class AlarmRepository : MongoRepository<PatientObservationAlarm>, IAlarmR
|
||||
/// <param name="patientId">The unique identifier of the patient.</param>
|
||||
/// <param name="filterObservations">A list of fields to filter the observations. If null, all observations for the patient are retrieved.</param>
|
||||
/// <returns>A list of patient observation alarms matching the filter criteria.</returns>
|
||||
/// <!-- aidoc:v1 sig=43640c3 body=c02d57d -->
|
||||
public async Task<List<PatientObservationAlarm>> AggregatedPatientLastObservationsByField(ObjectId patientId,
|
||||
List<Field>? filterObservations = null)
|
||||
{
|
||||
@@ -118,6 +122,7 @@ public class AlarmRepository : MongoRepository<PatientObservationAlarm>, IAlarmR
|
||||
/// <param name="filterObservations">A list of fields to filter the observations. If null, all observations for the patient are retrieved.</param>
|
||||
/// <param name="configAlarm">A list of configuration settings for the observations, including expiration times.</param>
|
||||
/// <returns>A list of patient observation alarms matching the filter criteria and expiration settings.</returns>
|
||||
/// <!-- aidoc:v1 sig=4c42a94 body=1caea2e -->
|
||||
public async Task<List<PatientObservationAlarm>> AggregatedPatientNotExpiredObservationsByField(
|
||||
ObjectId patientId,
|
||||
List<Field>? filterObservations,
|
||||
@@ -193,6 +198,7 @@ public class AlarmRepository : MongoRepository<PatientObservationAlarm>, IAlarmR
|
||||
/// If the collection name is not specified in the API settings, it defaults to "patients_alarms".
|
||||
/// </summary>
|
||||
/// <returns>The name of the MongoDB collection for patient observation alarms.</returns>
|
||||
/// <!-- aidoc:v1 sig=94e22ff body=e2ee5dc -->
|
||||
public override string GetCollectionName()
|
||||
{
|
||||
return _apiSettings.PatientsAlarms ?? "patients_alarms";
|
||||
@@ -202,6 +208,7 @@ public class AlarmRepository : MongoRepository<PatientObservationAlarm>, IAlarmR
|
||||
/// Creates indexes for the patient observation alarms collection in MongoDB to optimize query performance.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation of creating indexes.</returns>
|
||||
/// <!-- aidoc:v1 sig=4955da2 body=340db89 -->
|
||||
public override async Task CreateIndexes()
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user