Files
adas-core/adas-core.Domain/Models/PatientRecordingAlert.cs
T

29 lines
1.2 KiB
C#

namespace adas_core.Domain.Models;
/// <summary>
/// Represents an alert generated from a patient recording, derived from base patient observation data.
/// </summary>
/// <remarks>
/// Inherits common observation functionality from <see cref="BasePatientObservation"/> and specializes it to surface alert conditions associated with patient recordings.
/// </remarks>
/// <!-- aidoc:v1 sig=54d15ef -->
public class PatientRecordingAlert : BasePatientObservation
{
public bool IsRecording { get; set; }
/// <summary>
/// Returns a string representation of the PatientRecordingAlert, including the patient identifier, source name when available, recording status, and time.
/// </summary>
/// <returns>A formatted string representation of the alert's key properties.</returns>
/// <!-- aidoc:v1 sig=d27f326 body=c094493 -->
public override string ToString()
{
var items = ToListString();
items.Add($"patientId: {PatientId}");
if (!string.IsNullOrEmpty(Name)) items.Add($"source: {Name}");
items.Add($"isRecording: {IsRecording}");
items.Add($"time: {Time}");
return "PatientRecordingAlert[" + string.Join(", ", items) + "]";
}
}