namespace adas_core.Domain.Models;

/// <summary>
/// Represents a treatment route, defining the pathway or method by which a treatment is administered or delivered.
/// </summary>
/// <!-- aidoc:v1 sig=bcc07b7 -->
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>
    /// <!-- aidoc:v1 sig=d27f326 body=8a0f0f8 -->
    public override string ToString()
        {
            List<string> items = [];
    
            if (Route != null) items.Add($", code:  {Route}");
    
    
            return "treatmentRoute[" + string.Join(", ", items) + "]";
        }
}