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
@@ -11,10 +11,20 @@ namespace adas_core.Domain.Models.Observations;
/// </remarks>
public class Medication : Observation
{
/// <summary>
/// Initializes a new instance of the <see cref="Medication"/> class with default values.
/// </summary>
/// <!-- aidoc:v1 sig=bb98407 body=4448e1d -->
public Medication()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="Medication"/> class, which represents medication delivery state, by reading pump-related properties from <paramref name="obj"/> when their MDC codes are present and assigning <paramref name="id"/> to <see cref="Medication.Id"/>.
/// </summary>
/// <param name="id">The identifier stored in <see cref="Medication.Id"/>.</param>
/// <param name="obj">A <see cref="Dictionary{TKey,TValue}"/> of <see cref="PumpElement"/> entries keyed by MDC code, consulted via <see cref="Dictionary{TKey,TValue}.TryGetValue"/>.</param>
/// <!-- aidoc:v1 sig=b107edc body=3412539 -->
public Medication(string id, Dictionary<string, PumpElement> obj)
{
if (obj.TryGetValue("MDC_184504", out var mode)) PumpMode = new PumpMode(mode);
@@ -57,10 +67,20 @@ public class Medication : Observation
/// </summary>
public class DrugValue
{
/// <summary>
/// Initializes a new instance of the <see cref="DrugValue"/> class using default values. The <see cref="DrugValue"/> type represents the value associated with a drug.
/// </summary>
/// <!-- aidoc:v1 sig=b79012f body=4448e1d -->
public DrugValue()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="DrugValue"/> class by copying the medication-related values from the specified <see cref="PumpElement"/>.
/// This constructor populates the properties <see cref="DrugValue.Id"/>, <see cref="DrugValue.Text"/>, <see cref="DrugValue.Time"/>, <see cref="DrugValue.Units"/>, <see cref="DrugValue.CodingSystem"/>, and <see cref="DrugValue.Result"/> from the source element.
/// </summary>
/// <param name="pumpElement">The <see cref="PumpElement"/> from which to copy the medication data.</param>
/// <!-- aidoc:v1 sig=8c84a69 body=a72ec1a -->
public DrugValue(PumpElement pumpElement)
{
Id = pumpElement.Id;
@@ -101,6 +121,11 @@ public class DrugValue
/// </remarks>
public abstract class DrugDoubleValue : DrugValue
{
/// <summary>
/// Initializes a new instance of the <see cref="DrugDoubleValue"/> class by forwarding <paramref name="pumpElement"/> to the base constructor and parsing its textual value as a <see cref="double"/> to set the Value property when the conversion succeeds.
/// </summary>
/// <param name="pumpElement">The <see cref="PumpElement"/> whose string representation is parsed as a <see cref="double"/> to initialize the Value property.</param>
/// <!-- aidoc:v1 sig=d14bd75 body=29c2c0d -->
protected DrugDoubleValue(PumpElement pumpElement) : base(pumpElement)
{
if (double.TryParse(pumpElement.Value?.ToString(), out var valueParsed))
@@ -175,6 +200,11 @@ public class Drug(PumpElement pumpElement) : DrugStringValue(pumpElement);
/// </summary>
public class PumpMode : DrugStringValue
{
/// <summary>
/// Initializes a new instance of the <see cref="PumpMode"/> class by forwarding the supplied <see cref="PumpElement"/> to the base constructor and computing the normalized mode identifier from its raw value. The type represents a pump mode value extracted from a pump element.
/// </summary>
/// <param name="pumpElement">The source element providing the raw mode text that is normalized to produce the mode identifier.</param>
/// <!-- aidoc:v1 sig=97f7b03 body=bdf432f -->
public PumpMode(PumpElement pumpElement) : base(pumpElement)
{
Value = pumpElement.Value?.ToString()?.SubstringAfter("pump-mode-").Replace("-", "_");
@@ -186,6 +216,11 @@ public class PumpMode : DrugStringValue
/// </summary>
public class PumpStatus : DrugStringValue
{
/// <summary>
/// Initializes a new instance of the <see cref="PumpStatus"/> class from the specified <paramref name="pumpElement"/>, deriving the <see cref="PumpStatus.Value"/> by stripping the "pump-status-" prefix and normalizing dashes to underscores.
/// </summary>
/// <param name="pumpElement">The <see cref="PumpElement"/> whose value is parsed to populate the status.</param>
/// <!-- aidoc:v1 sig=526c2d6 body=d13ab1e -->
public PumpStatus(PumpElement pumpElement) : base(pumpElement)
{
Value = pumpElement.Value?.ToString()?.SubstringAfter("pump-status-").Replace("-", "_");