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) + "]";
        }
}