Documentation modifications
This commit is contained in:
@@ -20,6 +20,13 @@ public class PointOfCareRepository : MongoRepository<PointOfCare>, IPointOfCareR
|
||||
{
|
||||
private readonly ApiSettings _apiSettings;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PointOfCareRepository"/> repository, capturing the configured <see cref="ApiSettings"/> and delegating the <see cref="IMongoDatabase"/> to the base class.
|
||||
/// </summary>
|
||||
/// <param name="apiSettings">The <see cref="IOptions{ApiSettings}"/> providing access to the configured <see cref="ApiSettings"/>.</param>
|
||||
/// <param name="database">The <see cref="IMongoDatabase"/> forwarded to the base constructor.</param>
|
||||
/// <exception cref="ArgumentNullException">Thrown when <paramref name="apiSettings"/> is <c>null</c>.</exception>
|
||||
/// <!-- aidoc:v1 sig=5b54ed9 body=99d85d9 -->
|
||||
public PointOfCareRepository(IOptions<ApiSettings>? apiSettings, IMongoDatabase database) : base(database)
|
||||
{
|
||||
if (apiSettings != null)
|
||||
@@ -242,6 +249,14 @@ public class PointOfCareRepository : MongoRepository<PointOfCare>, IPointOfCareR
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Asynchronously finds a <see cref="PointOfCare"/> matching the specified <paramref name="bed"/> and <paramref name="unitId"/>.
|
||||
/// Returns <see langword="null"/> when the bed is null or empty, when no matching document is found, or when an error occurs.
|
||||
/// </summary>
|
||||
/// <param name="bed">The bed identifier to search for. If null or empty, the method returns <see langword="null"/> without querying.</param>
|
||||
/// <param name="unitId">The unit identifier used to filter the <see cref="PointOfCare"/> documents.</param>
|
||||
/// <returns>A task containing the first matching <see cref="PointOfCare"/>, or <see langword="null"/> if no match is found.</returns>
|
||||
/// <!-- aidoc:v1 sig=03d5e9a body=92ba139 -->
|
||||
public async Task<PointOfCare?> FindByBedAndUnitId(string? bed, ObjectId unitId)
|
||||
{
|
||||
try
|
||||
@@ -386,6 +401,12 @@ public class PointOfCareRepository : MongoRepository<PointOfCare>, IPointOfCareR
|
||||
throw;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Asynchronously counts the <see cref="PointOfCare"/> records associated with the supplied <paramref name="unitId"/>, applying a filter that targets documents whose Bed value corresponds to one of the inactive <see cref="VirtualPointOfCare"/> states such as Pushed, Unknown, Deleted, NoBed, Cancelled, Recovered, UnitData, or Moved.
|
||||
/// </summary>
|
||||
/// <param name="unitId">The identifier of the unit whose associated <see cref="PointOfCare"/> documents are filtered and counted.</param>
|
||||
/// <returns>A <see cref="Task{Int64}"/> representing the asynchronous operation, with the result being the number of matching <see cref="PointOfCare"/> documents.</returns>
|
||||
/// <!-- aidoc:v1 sig=040b525 body=8d8d306 -->
|
||||
public async Task<long> CountVirtualsByUnitId(ObjectId unitId)
|
||||
{
|
||||
try
|
||||
@@ -680,6 +701,12 @@ public class PointOfCareRepository : MongoRepository<PointOfCare>, IPointOfCareR
|
||||
}
|
||||
|
||||
//Deprecated PatientLocation by UnitName
|
||||
/// <summary>
|
||||
/// Asynchronously searches for the first <see cref="PointOfCare"/> matching the supplied <paramref name="patientLocation"/> criteria, combining equality filters for <see cref="PatientLocation.UnitName"/>, <see cref="PatientLocation.Bed"/> and <see cref="PatientLocation.Room"/> when their values are provided; if no criteria are provided an empty filter is used.
|
||||
/// </summary>
|
||||
/// <param name="patientLocation">The <see cref="PatientLocation"/> whose non-empty fields (<see cref="PatientLocation.UnitName"/>, <see cref="PatientLocation.Bed"/>, <see cref="PatientLocation.Room"/>) are used to build the search filters.</param>
|
||||
/// <returns>A <see cref="Task{PointOfCare}"/> that yields the first matching <see cref="PointOfCare"/>, or <see langword="null"/> when no document matches or when an error is caught and logged.</returns>
|
||||
/// <!-- aidoc:v1 sig=ee884e8 body=c1e5afa -->
|
||||
public async Task<PointOfCare?> FindByPatientLocation(PatientLocation patientLocation)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user