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
@@ -35,6 +35,20 @@ public class DischargeService : IDischargeService
private readonly ISubscribersService _subscribersService;
private readonly IUnitService _unitService;
/// <summary>
/// Initializes a new instance of the <see cref="DischargeService"/> class, which coordinates discharge-related operations by injecting its required collaborators into private fields for logging, persistence, patient access, messaging, auditing, and unit/master list resolution.
/// </summary>
/// <param name="logger">The <see cref="ILogger{TCategoryName}"/> used to record diagnostic information for the <see cref="DischargeService"/>.</param>
/// <param name="subscribersService">The <see cref="ISubscribersService"/> used to manage subscribers tied to discharge events.</param>
/// <param name="dischargeRepository">The <see cref="IDischargeRepository"/> used to persist and retrieve discharge records.</param>
/// <param name="patientServiceLazy">The <see cref="Lazy{T}"/> wrapping <see cref="IPatientService"/> to defer patient service resolution.</param>
/// <param name="clientMessageService">The <see cref="IClientMessageService"/> used to send client-facing messages.</param>
/// <param name="pointOfCareService">The <see cref="IPointOfCareService"/> used to interact with point-of-care operations.</param>
/// <param name="httpContextAccessor">The <see cref="IHttpContextAccessor"/> used to access the current HTTP context.</param>
/// <param name="auditService">The <see cref="ILocalAuditService"/> used to record local audit entries.</param>
/// <param name="unitService">The <see cref="IUnitService"/> used to look up unit-related information.</param>
/// <param name="masterListServiceFactory">The <see cref="IMasterListServiceFactory"/> used to create master list services on demand.</param>
/// <!-- aidoc:v1 sig=5a98484 body=4f2b947 -->
public DischargeService(ILogger<DischargeService> logger,
ISubscribersService subscribersService,
IDischargeRepository dischargeRepository,
@@ -281,6 +295,11 @@ public class DischargeService : IDischargeService
}
/// <summary>
/// Processes an <see cref="ApiRequest"/> for patient discharge operations. Based on <paramref name="apiRequest"/>.Type it handles three cases: "NewDischarge" inserts a new discharge, creates an audit log, and sends a discharge broadcast (only when the patient status is "Altable"); "UpdateDischarge" updates the existing discharge; "DeleteDischarge" deletes the discharge (only when the patient status is "NoAltable"). The method returns early and logs an error when the discharge or patient is null, when the patient cannot be found, or when the corresponding discharge-status validation fails.
/// </summary>
/// <param name="apiRequest">The API request containing the discharge payload and the operation type to perform.</param>
/// <!-- aidoc:v1 sig=229d8cd body=acbd395 -->
public async Task SaveRequest(ApiRequest apiRequest)
{
try