=== 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:
julian
2026-06-28 02:50:05 -07:00
parent a19fb90902
commit 586f02a2ca
654 changed files with 5260 additions and 0 deletions
@@ -13,33 +13,39 @@ public interface ITreatmentService : IApiRequestService
/// Inserts a new <see cref="PatientTreatment"/> record into the underlying data store.
/// </summary>
/// <param name="treatment">The patient treatment entity to be added.</param>
/// <!-- aidoc:v1 sig=64e0091 -->
Task Insert(PatientTreatment treatment);
/// <summary>
/// Asynchronously deletes an entity associated with the specified patient identifier.
/// </summary>
/// <param name="id">The <see cref="ObjectId"/> representing the unique identifier of the patient whose related entity should be removed.</param>
/// <returns>A <see cref="Task{TResult}"/> containing <c>true</c> if the deletion was successful; otherwise, <c>false</c>.</returns>
/// <!-- aidoc:v1 sig=fa9d1b9 -->
Task<bool> DeleteByPatientId(ObjectId id);
/// <summary>
/// Asynchronously deletes the entity identified by the specified identifier.
/// </summary>
/// <param name="id">The unique identifier of the entity to delete.</param>
/// <!-- aidoc:v1 sig=9d4aeba -->
Task DeleteById(ObjectId id);
/// <summary>
/// Archives records associated with the specified patient identifier.
/// </summary>
/// <param name="id">The ObjectId of the patient whose records should be archived.</param>
/// <!-- aidoc:v1 sig=e5916ec -->
Task ArchiveByPatientId(ObjectId id);
/// <summary>
/// Archives the specified patient, marking them as archived in the system.
/// </summary>
/// <param name="patient">The patient to archive.</param>
/// <!-- aidoc:v1 sig=52c2373 -->
Task Archive(Patient patient);
/// <summary>
/// Updates an existing patient treatment record in the system.
/// </summary>
/// <param name="patientTreatment">The patient treatment entity containing the updated information to be persisted.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains <c>true</c> if the treatment was updated successfully; otherwise, <c>false</c>.</returns>
/// <!-- aidoc:v1 sig=fa7946f -->
Task<bool> UpdateTreatment(PatientTreatment patientTreatment);
/// <summary>
/// Updates many records by replacing the specified old ObjectId with the new ObjectId in the field identified by nameId.
@@ -47,42 +53,49 @@ public interface ITreatmentService : IApiRequestService
/// <param name="nameId">The name of the field that contains the ObjectId to be updated.</param>
/// <param name="id">The new ObjectId value that will replace the existing one.</param>
/// <param name="oldId">The existing ObjectId value to be replaced.</param>
/// <!-- aidoc:v1 sig=24ef97c -->
Task UpdateManyObjectId(string nameId, ObjectId id, ObjectId oldId);
/// <summary>
/// Retrieves all treatments associated with the specified patient identifier.
/// </summary>
/// <param name="id">The unique identifier of the patient whose treatments are to be retrieved.</param>
/// <returns>A task that represents the asynchronous operation, containing a collection of PatientTreatment objects for the specified patient.</returns>
/// <!-- aidoc:v1 sig=464e56c -->
Task<IEnumerable<PatientTreatment>> GetTreatmentsByPatientId(ObjectId id);
/// <summary>
/// Retrieves the active treatment records associated with the specified patient identifier.
/// </summary>
/// <param name="id">The unique identifier of the patient whose active treatments should be retrieved.</param>
/// <returns>A task that represents the asynchronous operation, containing an enumerable collection of active <see cref="PatientTreatment"/> records, which may include null entries.</returns>
/// <!-- aidoc:v1 sig=9eb0d98 -->
Task<IEnumerable<PatientTreatment?>> GetActiveTreatmentsByPatient(ObjectId id);
/// <summary>
/// Asynchronously retrieves a cursor over the <see cref="PatientTreatment"/> records associated with the specified patient identifier.
/// </summary>
/// <param name="patientId">The unique identifier of the patient whose treatments should be returned.</param>
/// <returns>A <see cref="Task{TResult}"/> yielding an <see cref="IAsyncCursor{TDocument}"/> that iterates the matching <see cref="PatientTreatment"/> documents.</returns>
/// <!-- aidoc:v1 sig=1be8597 -->
Task<IAsyncCursor<PatientTreatment>> FindByPatientIdAsync(ObjectId patientId);
/// <summary>
/// Asynchronously retrieves all patient treatments associated with the specified patient identifier.
/// </summary>
/// <param name="patientId">The unique identifier of the patient whose treatments are being queried.</param>
/// <returns>A task that represents the asynchronous operation, containing a collection of <see cref="PatientTreatment"/> instances for the specified patient.</returns>
/// <!-- aidoc:v1 sig=8e33f27 -->
Task<IEnumerable<PatientTreatment>> FindByPatientId(ObjectId patientId);
/// <summary>
/// Retrieves the list of bolus treatments associated with the specified patient.
/// </summary>
/// <param name="patientId">The unique identifier of the patient whose bolus treatments are being retrieved.</param>
/// <returns>A task that represents the asynchronous operation, containing a list of <see cref="PatientTreatment"/> records representing the patient's bolus treatments.</returns>
/// <!-- aidoc:v1 sig=e8ec7d6 -->
Task<List<PatientTreatment>> GetBolusTreatments(ObjectId patientId);
/// <summary>
/// Retrieves a paginated list of patient treatments based on the specified filter criteria.
/// </summary>
/// <param name="filter">The pagination filter used to control the page number, page size, and other query options.</param>
/// <returns>A task that represents the asynchronous operation, containing the paginated patient treatment results.</returns>
/// <!-- aidoc:v1 sig=b165424 -->
Task<PaginationResponse<PatientTreatment>> GetPaginatedTreatments(PaginationFilter filter);
/// <summary>
/// Retrieves the list of active treatments associated with the specified patient, sorted according to the provided order parameter.
@@ -90,5 +103,6 @@ public interface ITreatmentService : IApiRequestService
/// <param name="patientId">The unique identifier of the patient whose active treatments are being queried.</param>
/// <param name="order">A string defining the ordering criteria applied to the returned treatments.</param>
/// <returns>A task that represents the asynchronous operation, containing a list of active <see cref="PatientTreatment"/> entries for the patient.</returns>
/// <!-- aidoc:v1 sig=d9fb0b1 -->
Task<List<PatientTreatment>> GetActiveTreatmentsByPatientIdAndOrder(ObjectId patientId, string order);
}