namespace adas_core.Domain.Models.Observations;
///
/// Represents an observation that conveys a boolean value, extending the base type.
///
public class BoolObservation : Observation
{
public bool Value { get; set; }
///
/// Creates a from the first item in the provided list of patient observations.
/// Returns when the list is empty.
///
/// The list of patient observations from which the first entry is converted.
/// A containing the boolean value of the first observation, or if the list contains no observations.
internal static BoolObservation? From(List obs)
{
if (obs.Count > 0)
return new BoolObservation
{
Value = (bool)obs[0].Value
};
return null;
}
}