feature: Explainable Alerts

This commit is contained in:
voltsrage
2026-06-25 00:25:31 +08:00
parent 279add1e45
commit 666d683d67
61 changed files with 9553 additions and 125 deletions
@@ -0,0 +1,7 @@
public class AlertExplanation
{
public List<ScoreContributor> ScoreContributors { get; set; } = new();
public TrendContext? Trend { get; set; }
public MedicationContext? MedicationContext { get; set; }
public string NarrativeSummary { get; set; } = string.Empty;
}
@@ -0,0 +1,8 @@
public class MedicationContext
{
public string DrugName { get; set; } = null!;
public string Dose { get; set; } = null!;
public string Route { get; set; } = null!;
public DateTimeOffset AdministeredAt { get; set; }
public string? RelevanceNote { get; set; }
}
@@ -0,0 +1,7 @@
public class ScoreContributor
{
public string Parameter { get; set; } = null!;
public int Points { get; set; }
public string? RawValue { get; set; }
public string? NormalRange { get; set; }
}
@@ -0,0 +1,7 @@
public class TrendContext
{
public string Parameter { get; set; } = null!;
public double PercentChange { get; set; }
public TimeSpan Duration { get; set; }
public string Direction { get; set; } = null!;
}