=== 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,11 +15,13 @@ public interface IUnitService
|
||||
/// </summary>
|
||||
/// <param name="withPocs">Indicates whether the returned units should include their associated POCs.</param>
|
||||
/// <returns>A task representing the asynchronous operation, containing the list of units.</returns>
|
||||
/// <!-- aidoc:v1 sig=d5d641e -->
|
||||
Task<List<Unit>> GetAll(bool withPocs = false);
|
||||
/// <summary>
|
||||
/// Asynchronously retrieves a compact list of all units, returning minimal summary information for each unit.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation. The task result contains a list of <see cref="UnitInfoDto"/> objects with the compact information of all units.</returns>
|
||||
/// <!-- aidoc:v1 sig=85c8e61 -->
|
||||
Task<List<UnitInfoDto>> GetAllCompact();
|
||||
|
||||
/// <summary>
|
||||
@@ -27,6 +29,7 @@ public interface IUnitService
|
||||
/// </summary>
|
||||
/// <param name="id">The unique identifier of the unit to retrieve.</param>
|
||||
/// <returns>A task that represents the asynchronous operation, containing the compact unit information.</returns>
|
||||
/// <!-- aidoc:v1 sig=ea6d80a -->
|
||||
Task<UnitInfoDto> GetOneCompact(ObjectId id);
|
||||
|
||||
// Task<Unit?> GetByCodeSysAndCode(string unit);
|
||||
@@ -35,6 +38,7 @@ public interface IUnitService
|
||||
/// </summary>
|
||||
/// <param name="unit">The name of the unit to look up.</param>
|
||||
/// <returns>A task that represents the asynchronous operation. The task result contains the matching <see cref="Unit"/> if found; otherwise, <c>null</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=d855f4f -->
|
||||
Task<Unit?> GetByName(string unit);
|
||||
|
||||
// Task<Unit?> GetByPointOfCare(PointOfCare pointOfCare);
|
||||
@@ -46,6 +50,7 @@ public interface IUnitService
|
||||
/// <param name="fillLists">When <see langword="true"/>, populates the related lists on the returned unit.</param>
|
||||
/// <param name="withPoCs">When <see langword="true"/>, includes the unit's points of contact in the result.</param>
|
||||
/// <returns>A task that yields the located <see cref="Unit"/>, or <see langword="null"/> if no unit matches the given id.</returns>
|
||||
/// <!-- aidoc:v1 sig=59363d0 -->
|
||||
Task<Unit?> GetInfo(ObjectId id, LocaleEnum? dataLocale, bool fillLists = true, bool withPoCs = false);
|
||||
/// <summary>
|
||||
/// Retrieves information about a unit identified by the specified <paramref name="id"/>, optionally including related points of contact and devices.
|
||||
@@ -54,6 +59,7 @@ public interface IUnitService
|
||||
/// <param name="withPoCs">Indicates whether related points of contact should be included in the result. Defaults to <c>true</c>.</param>
|
||||
/// <param name="withDevices">Indicates whether related devices should be included in the result. Defaults to <c>true</c>.</param>
|
||||
/// <returns>A task that represents the asynchronous operation. The task result contains the <c>Unit</c> if found, or <c>null</c> if no unit matches the specified identifier.</returns>
|
||||
/// <!-- aidoc:v1 sig=83c1253 -->
|
||||
Task<Unit?> GetInfo(ObjectId id, bool withPoCs = true, bool withDevices = true);
|
||||
|
||||
/// <summary>
|
||||
@@ -61,6 +67,7 @@ public interface IUnitService
|
||||
/// </summary>
|
||||
/// <param name="patientId">The unique identifier of the patient whose unit is being looked up.</param>
|
||||
/// <returns>A task that represents the asynchronous lookup, containing the matching <see cref="Unit"/> if found, or <c>null</c> if no unit is associated with the patient.</returns>
|
||||
/// <!-- aidoc:v1 sig=2a55026 -->
|
||||
Task<Unit?> FindByPatientId(ObjectId patientId);
|
||||
|
||||
// Task<List<Unit>?> FindByLocation(PatientLocation location);
|
||||
@@ -69,12 +76,14 @@ public interface IUnitService
|
||||
/// </summary>
|
||||
/// <param name="id">The unique identifier of the <see cref="Unit"/> to retrieve. May be <c>null</c>.</param>
|
||||
/// <returns>A task that represents the asynchronous operation. The task result contains the <see cref="Unit"/> if found; otherwise, <c>null</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=31e43d9 -->
|
||||
Task<Unit?> FindById(ObjectId? id);
|
||||
/// <summary>
|
||||
/// Asynchronously retrieves a <see cref="Unit"/> entity matching the specified name.
|
||||
/// </summary>
|
||||
/// <param name="name">The name used to look up the unit. Can be null.</param>
|
||||
/// <returns>A task that resolves to the matching <see cref="Unit"/> if found; otherwise, null.</returns>
|
||||
/// <!-- aidoc:v1 sig=1e5dd65 -->
|
||||
Task<Unit?> FindByName(string? name);
|
||||
|
||||
/// <summary>
|
||||
@@ -84,6 +93,8 @@ public interface IUnitService
|
||||
/// <param name="name">The unit name to search for. May be <c>null</c>.</param>
|
||||
/// <param name="pocName">The point-of-contact (POC) name to search for. May be <c>null</c>.</param>
|
||||
/// <returns>A <see cref="Task{Unit}"/> containing the matched <see cref="Unit"/>, or <c>null</c> if no unit is found.</returns>
|
||||
/// <!-- aidoc-review:v1 severity=low kind=wrong_returns
|
||||
/// "<see cref=\"Task{Unit}\"/> should be <see cref=\"Task{Unit?}\"/> to reflect the nullable Unit return type; text correctly describes null result." -->
|
||||
Task<Unit?> FindByUnitNameOrPocName(string? name, string? pocName);
|
||||
|
||||
//Task<Unit?> FindByPointOfCare(PointOfCare pointOfCare);
|
||||
@@ -92,12 +103,14 @@ public interface IUnitService
|
||||
/// </summary>
|
||||
/// <param name="unit">The <see cref="Unit"/> instance to be inserted.</param>
|
||||
/// <returns>A task that resolves to the inserted <see cref="Unit"/>, or <c>null</c> if the insertion did not produce a result.</returns>
|
||||
/// <!-- aidoc:v1 sig=dcc73fd -->
|
||||
Task<Unit?> InsertOne(Unit unit);
|
||||
/// <summary>
|
||||
/// Updates the specified unit in the system.
|
||||
/// </summary>
|
||||
/// <param name="unit">The unit containing the updated information to persist.</param>
|
||||
/// <returns>A task that returns the updated <see cref="Unit"/>, or <c>null</c> if the unit was not found.</returns>
|
||||
/// <!-- aidoc:v1 sig=fb3e248 -->
|
||||
Task<Unit?> UpdateUnit(Unit unit);
|
||||
/// <summary>
|
||||
/// Asynchronously retrieves the collection of units associated with the specified master list identifier and master list type.
|
||||
@@ -106,6 +119,7 @@ public interface IUnitService
|
||||
/// <param name="masterListId">The unique identifier of the master list whose units should be retrieved.</param>
|
||||
/// <param name="masterListType">The type of the master list used to scope the unit lookup.</param>
|
||||
/// <returns>A task that returns an <see cref="IEnumerable{T}"/> of <see cref="Unit"/> when matches exist, or null when no matching units are found.</returns>
|
||||
/// <!-- aidoc:v1 sig=af11dcc -->
|
||||
Task<IEnumerable<Unit>?> FindUnitsByMasterListId(ObjectId masterListId, MasterListType masterListType);
|
||||
/// <summary>
|
||||
/// Asynchronously counts the number of units associated with the specified master list, filtered by the given master list type.
|
||||
@@ -113,18 +127,21 @@ public interface IUnitService
|
||||
/// <param name="masterListId">The unique identifier of the master list whose units should be counted.</param>
|
||||
/// <param name="masterListType">The type of the master list used to scope the count to the appropriate unit category.</param>
|
||||
/// <returns>A <see cref="Task{Int64}"/> that represents the asynchronous operation, containing the total number of units matching the specified master list.</returns>
|
||||
/// <!-- aidoc:v1 sig=64362ca -->
|
||||
Task<long> CountUnitsByMasterListId(ObjectId masterListId, MasterListType masterListType);
|
||||
/// <summary>
|
||||
/// Asynchronously retrieves the collection of units associated with the specified master list identifier.
|
||||
/// </summary>
|
||||
/// <param name="masterListId">The identifier of the master list whose units are to be retrieved.</param>
|
||||
/// <returns>A task that represents the asynchronous operation, containing the collection of units that belong to the specified master list.</returns>
|
||||
/// <!-- aidoc:v1 sig=2e9fc3b -->
|
||||
Task<IEnumerable<Unit>> FindUnitsByMasterListId(ObjectId masterListId);
|
||||
/// <summary>
|
||||
/// Updates the unit master list based on the provided unit ID list DTO.
|
||||
/// </summary>
|
||||
/// <param name="updateUnitListDto">The DTO containing the list of unit IDs to be used for updating the master list.</param>
|
||||
/// <returns>A task that represents the asynchronous operation. The task result contains the updated <see cref="Unit"/>, or <c>null</c> if the update was not applicable.</returns>
|
||||
/// <!-- aidoc:v1 sig=4b7663f -->
|
||||
Task<Unit?> UpdateUnitMasterList(UpdateUnitIdListDto updateUnitListDto);
|
||||
/// <summary>
|
||||
/// Asynchronously updates the configuration for the specified unit using the provided configuration data.
|
||||
@@ -132,12 +149,14 @@ public interface IUnitService
|
||||
/// <param name="unitIdParsed">The parsed identifier of the unit whose configuration will be updated.</param>
|
||||
/// <param name="unitConfiguration">The new configuration values to apply to the unit.</param>
|
||||
/// <returns>A task that resolves to <c>true</c> if the configuration was successfully updated; otherwise, <c>false</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=bfe899b -->
|
||||
Task<bool> UpdateConfiguration(ObjectId unitIdParsed, UnitConfiguration unitConfiguration);
|
||||
/// <summary>
|
||||
/// Asynchronously deletes a unit identified by the provided <paramref name="unit"/> entity's identifier.
|
||||
/// </summary>
|
||||
/// <param name="unit">The unit entity whose identifier is used to locate and delete the record.</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous operation, containing a value indicating whether the unit was successfully deleted.</returns>
|
||||
/// <!-- aidoc:v1 sig=734db28 -->
|
||||
Task<bool> DeleteUnitById(Unit unit);
|
||||
/// <summary>
|
||||
/// Updates the information of an existing unit identified by <paramref name="unitId"/>, including its name, title, and optionally its configuration object ID.
|
||||
@@ -148,6 +167,7 @@ public interface IUnitService
|
||||
/// <param name="title">The new title to assign to the unit.</param>
|
||||
/// <param name="configObsId">An optional configuration object ID to associate with the unit.</param>
|
||||
/// <returns>A task that yields the updated <see cref="Unit"/>, or <c>null</c> if the unit does not exist.</returns>
|
||||
/// <!-- aidoc:v1 sig=89b9f8d -->
|
||||
Task<Unit?> UpdateUnitInfo(ObjectId unitId, string name, string title, string? configObsId = null);
|
||||
/// <summary>
|
||||
/// Retrieves a paginated list of units based on the provided filter, optionally including their associated points of contact.
|
||||
@@ -155,5 +175,6 @@ public interface IUnitService
|
||||
/// <param name="filter">The pagination filter that defines the page size, page number, and any additional query criteria.</param>
|
||||
/// <param name="withPoCs">A flag indicating whether the response should include the points of contact associated with each unit.</param>
|
||||
/// <returns>A task that represents the asynchronous operation, containing the paginated response of units.</returns>
|
||||
/// <!-- aidoc:v1 sig=5b42d0a -->
|
||||
Task<PaginationResponse<Unit>> GetPaginatedUnits(PaginationFilter filter, bool withPoCs);
|
||||
}
|
||||
Reference in New Issue
Block a user