Documentation modifications

This commit is contained in:
julian
2026-06-27 15:23:26 -07:00
parent a633fe6c06
commit a19fb90902
218 changed files with 2882 additions and 0 deletions
@@ -19,6 +19,13 @@ public class TreatmentRepository : MongoRepository<PatientTreatment>, ITreatment
private readonly ApiSettings _apiSettings;
/// <summary>
/// Initializes a new instance of the <see cref="TreatmentRepository"/> class by forwarding the <paramref name="database"/> to the base constructor and caching the <see cref="ApiSettings"/> resolved from <paramref name="apiSettings"/>.
/// </summary>
/// <param name="apiSettings">The <see cref="IOptions{ApiSettings}"/> providing the <see cref="ApiSettings"/> instance stored by the repository.</param>
/// <param name="database">The <see cref="IMongoDatabase"/> passed to the base class for MongoDB access.</param>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="apiSettings"/> is null.</exception>
/// <!-- aidoc:v1 sig=3b30d15 body=d2b18a3 -->
public TreatmentRepository(IOptions<ApiSettings> apiSettings, IMongoDatabase database) : base(database)
{
if (apiSettings == null) throw new ArgumentNullException(nameof(apiSettings));
@@ -203,6 +210,12 @@ public class TreatmentRepository : MongoRepository<PatientTreatment>, ITreatment
return result.ToEnumerable();
}
/// <summary>
/// Retrieves a paginated, filterable query of <see cref="PatientTreatment"/> records sorted by <see cref="PatientTreatment.OrderTime"/> in descending order. When <paramref name="filter"/> carries a <c>FilteredRequest</c>, the query is narrowed by <see cref="PatientTreatment.PatientId"/>, an optional date range, and the active-treatments flag; otherwise default time-based filters are applied.
/// </summary>
/// <param name="filter">The pagination and search criteria used to build the MongoDB filter pipeline.</param>
/// <returns>An <see cref="IFindFluent{TSource, TDocument}"/> of <see cref="PatientTreatment"/> that can be paged or iterated.</returns>
/// <!-- aidoc:v1 sig=4a06ded body=ea0fa2f -->
public IFindFluent<PatientTreatment, PatientTreatment> GetPaginatedTreatments(PaginationFilter filter)
{
var filterBuilder = Builders<PatientTreatment>.Filter;