using adas_core.Domain.Enums;
using adas_core.Domain.Models.MongoModels;

namespace adas_core.Domain.Models;

/// <summary>
/// Represents an alarm condition associated with a patient observation value, extending the base patient observation value type.
/// </summary>
public class PatientObservationAlarm : BasePatientObservationValue
{
    public InactivationState? InactivationState { get; set; }
    public AlarmEnum.EventPhase EventPhase { get; set; } = AlarmEnum.EventPhase.Continue;
    public string? Event { get; set; }
    public string? EventId { get; set; }
    public AlarmEnum.ObservationAlarmState? State { get; set; }
    public AlarmEnum.ObservationAlarmPriority? Priority { get; set; }
    public int? PriorityLevel { get; set; }
    public AlarmConfig? AlarmConfig { get; set; }
    public AlarmEnum.ObservationAlarmType? Type { get; set; }
    public string? AlertColor { get; set; }

    //MSH Time of HL7
    public DateTime MessageTime { get; set; }
    public bool? Persist { get; set; }

    public bool Expired { get; set; }

    public int? Expires { get; set; }

    public List<Source>? Sources { get; set; }
}

/// <summary>
/// Represents a state indicating that an entity or process is currently inactive.
/// </summary>
public class InactivationState
{
    public AlarmEnum.AudioVideoState? Audio { get; set; }
    public AlarmEnum.AudioVideoState? Visual { get; set; }
    public bool? Acknowledge { get; set; }
}

/// <summary>
/// Represents a source entity, serving as a base or generic type for defining source-related data or behavior.
/// </summary>
public class Source
{
    public string? Code { get; set; }

    public string? OriginalName { get; set; }

    public string? CodeSystem { get; set; }
    public string? Units { get; set; }

    public object? Value { get; set; }
    public string? Result { get; set; }
}