Files
adas-core/adas-core.Domain/Models/TreatmentRoute.cs
2026-06-26 10:29:23 +02:00

23 lines
776 B
C#

namespace adas_core.Domain.Models;
/// <summary>
/// Represents a treatment route, defining the pathway or method by which a treatment is administered or delivered.
/// </summary>
public class TreatmentRoute
{
public Code? Route { get; set; }
/// <summary>
/// Returns a string representation of the treatment route, including the route code when available.
/// </summary>
/// <returns>A formatted string identifying the treatment route, with the route code appended if <c>Route</c> is not null.</returns>
public override string ToString()
{
List<string> items = [];
if (Route != null) items.Add($", code: {Route}");
return "treatmentRoute[" + string.Join(", ", items) + "]";
}
}