rama creada apartir de master en j

This commit is contained in:
jrojas
2026-06-26 10:29:23 +02:00
parent 319fd3dfb0
commit c1517fda87
2810 changed files with 1927392 additions and 25392 deletions
@@ -3,6 +3,12 @@ using adas_core.Domain.Utils;
namespace adas_core.Domain.Models.Observations;
/// <summary>
/// Represents a medication-related observation, extending the base <see cref="Observation"/> type.
/// </summary>
/// <remarks>
/// Serves as a specialized observation for capturing and modeling medication-specific data within the inheritance hierarchy.
/// </remarks>
public class Medication : Observation
{
public Medication()
@@ -46,6 +52,9 @@ public class Medication : Observation
public Drug? Drug { get; set; }
}
/// <summary>
/// Represents a value or data entry associated with a drug, such as dosage, concentration, or other pharmaceutical-related information.
/// </summary>
public class DrugValue
{
public DrugValue()
@@ -69,17 +78,27 @@ public class DrugValue
public string? CodingSystem { get; set; }
public char? Result { get; set; } = 'R';
/// <summary>
/// Copies the values from the specified <see cref="DrugValue"/> instance into the current instance, replacing the existing Id, Text, Units, Time, CodingSystem, and Result properties.
/// </summary>
/// <param name="common">The <see cref="DrugValue"/> instance whose property values will be copied to the current instance.</param>
public void Copy(DrugValue common)
{
Id = common.Id;
Text = common.Text;
Units = common.Units;
Time = common.Time;
CodingSystem = common.CodingSystem;
Result = common.Result;
}
{
Id = common.Id;
Text = common.Text;
Units = common.Units;
Time = common.Time;
CodingSystem = common.CodingSystem;
Result = common.Result;
}
}
/// <summary>
/// Represents an abstract base class for drug values that are expressed as double-precision floating-point numbers, providing a common foundation for numerical drug-related data.
/// </summary>
/// <remarks>
/// As an abstract class, it must be inherited by a derived class that supplies the concrete implementation for the double-based drug value behavior.
/// </remarks>
public abstract class DrugDoubleValue : DrugValue
{
protected DrugDoubleValue(PumpElement pumpElement) : base(pumpElement)
@@ -91,29 +110,69 @@ public abstract class DrugDoubleValue : DrugValue
public double? Value { get; set; }
}
/// <summary>
/// Serves as an abstract base class for drug values represented as strings, extending <see cref="DrugValue"/>.
/// </summary>
/// <remarks>
/// Inherits from <see cref="DrugValue"/> and is intended to be derived by concrete classes that encapsulate string-typed drug data associated with a <see cref="PumpElement"/>.
/// </remarks>
public abstract class DrugStringValue(PumpElement pumpElement) : DrugValue(pumpElement)
{
public string? Value { get; set; } = pumpElement.Value?.ToString();
}
/// <summary>
/// Represents a double-precision drug value that describes the flow of a fluid for the specified <see cref="PumpElement"/>.
/// </summary>
public class FlowFluid(PumpElement pumpElement) : DrugDoubleValue(pumpElement);
/// <summary>
/// Represents the total volume of fluid delivered as a drug-related double value associated with a specific pump element.
/// </summary>
/// <remarks>
/// Inherits from <see cref="DrugDoubleValue"/>, sharing the pump element context with its base type.
/// </remarks>
public class VolumeFluidDeliveryTotal(PumpElement pumpElement) : DrugDoubleValue(pumpElement);
/// <summary>
/// Represents the delivery pressure of a pump as a drug-related double precision value.
/// </summary>
/// <remarks>
/// Inherits from <see cref="DrugDoubleValue"/> and is constructed with a <see cref="PumpElement"/> instance that is forwarded to the base constructor.
/// </remarks>
public class PumpDeliveryPressure(PumpElement pumpElement) : DrugDoubleValue(pumpElement);
/// <summary>
/// Represents the remaining volume of fluid to be infused (TBI) associated with a pump element, implemented as a drug-related double value.
/// </summary>
public class VolumeFluidTbiRemain(PumpElement pumpElement) : DrugDoubleValue(pumpElement);
/// <summary>
/// Represents the remaining time for volume fluid delivery, derived from a drug double value associated with a pump element.
/// </summary>
/// <remarks>
/// Inherits from <see cref="DrugDoubleValue"/> and is constructed with a <see cref="PumpElement"/> to capture time-related fluid volume metrics.
/// </remarks>
public class VolumeFluidTimePdRemain(PumpElement pumpElement) : DrugDoubleValue(pumpElement);
/// <summary>
/// Represents the active sources of a pump element as a drug string value.
/// Inherits from <see cref="DrugStringValue"/>, encapsulating source information for pump operations.
/// </summary>
public class PumpActiveSources(PumpElement pumpElement) : DrugStringValue(pumpElement)
{
public string? ValueId { get; set; } = pumpElement.ValueId;
public string? ValueCodingSystem { get; set; } = pumpElement.ValueCodingSystem;
}
/// <summary>
/// Represents a drug value associated with a pump element, inheriting from the DrugStringValue base class.
/// </summary>
public class Drug(PumpElement pumpElement) : DrugStringValue(pumpElement);
/// <summary>
/// Represents a pump mode as a drug-related string value, inheriting string-based value semantics from <see cref="DrugStringValue"/>.
/// </summary>
public class PumpMode : DrugStringValue
{
public PumpMode(PumpElement pumpElement) : base(pumpElement)
@@ -122,6 +181,9 @@ public class PumpMode : DrugStringValue
}
}
/// <summary>
/// Represents the operational status of a pump as a drug-related string value.
/// </summary>
public class PumpStatus : DrugStringValue
{
public PumpStatus(PumpElement pumpElement) : base(pumpElement)