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
@@ -18,6 +18,10 @@ using Options = Microsoft.Extensions.Options.Options;
namespace adas_core.Test.Services;
/// <summary>
/// Serves as a NUnit test fixture that verifies the behavior of <see cref="ObservationService"/>.
/// </summary>
/// <!-- aidoc:v1 sig=195961f -->
[TestFixture]
public class ObservationServiceTest
{
@@ -159,6 +163,10 @@ public class ObservationServiceTest
private static readonly DateTime Now = DateTime.Now;
private static readonly ObjectId PatientId = ObjectId.GenerateNewId();
/// <summary>
/// Verifies that when an <see cref="ApiRequest"/> contains allergy observations stating that the patient has no known allergies, the observation service does not insert a new <see cref="PatientObservation"/> named "AllergiesObs" for the patient.
/// </summary>
/// <!-- aidoc:v1 sig=6c516f0 body=db4def1 -->
[Test]
public async Task ProcessAllergiesObservation__apiRequest_No_Allergies_Return_Nothing()
{
@@ -229,6 +237,12 @@ public class ObservationServiceTest
)), Times.Never);
}
/// <summary>
/// Verifies that the observation processing pipeline correctly handles an <see cref="ApiRequest"/> containing a latex allergy entry,
/// ensuring that the mapped <see cref="PatientObservation"/> with its <see cref="PatientAllergiesValue"/> list is persisted via the
/// repository's <c>InsertOneAsync</c> call after being resolved through the patient, configuration, and unit services.
/// </summary>
/// <!-- aidoc:v1 sig=28d5b94 body=563ca14 -->
[Test]
public async Task ProcessAllergiesObservation_apiRequest_Allergies_Latex_Return_AllergiesObs_Latex()
{
@@ -328,6 +342,10 @@ public class ObservationServiceTest
_observationRepository.Verify(o => o.InsertOneAsync(expectedObs));
}
/// <summary>
/// Verifies that <see cref="ObservationService.SaveRequest"/> correctly handles an <see cref="ApiRequest"/> of type "ORU_R01" containing allergy-related <see cref="PatientObservation"/> entries, consolidating them into a single <see cref="PatientObservation"/> whose value groups the allergies by type with their allergen and notes, and that the resulting observation is persisted via <see cref="ObservationRepository.InsertOneAsync"/>.
/// </summary>
/// <!-- aidoc:v1 sig=60d4186 body=38528af -->
[Test]
public async Task ProcessAllergiesObservation_apiRequest_Allergies_Return_AllergiesObs()
{
@@ -512,6 +530,10 @@ public class ObservationServiceTest
}
/// <summary>
/// Verifies that <c>SaveRequest</c> processes an <see cref="ApiRequest"/> of type "ORU_R01" carrying drainages-related <see cref="PatientObservation"/> entries (volume, location, type and column height) and persists the resulting <see cref="PatientObservation"/> through the repository insert operation with the mapped <see cref="PatientDrainagesValue"/> collection as its value.
/// </summary>
/// <!-- aidoc:v1 sig=02099ca body=0538544 -->
[Test]
public async Task ProcessDrainagesObservation_apiRequest_Drainages_Return_DrainagesObs()
{
@@ -816,6 +838,10 @@ public class ObservationServiceTest
)));
}
/// <summary>
/// Verifies that <see cref="ObservationService.SaveRequest"/> processes an <c>ORU_R01</c> message containing a SNOMED-coded intravenous line observation (peripheral epicatheter at the right temporal zone) and inserts a <see cref="PatientObservation"/> carrying a <see cref="PatientIntravenousLinesValue"/> with the expected <see cref="PatientObservation.Code"/>, <see cref="PatientObservation.CodingSystem"/>, <see cref="PatientObservation.Time"/>, <see cref="PatientObservation.MessageTime"/>, <see cref="PatientObservation.PatientId"/>, and <see cref="PatientObservation.Value"/>.
/// </summary>
/// <!-- aidoc:v1 sig=d3137cf body=16202aa -->
[Test]
public async Task ProcessIntravenousLinesObservation_Return_PositionObs()
{