feature: Console Replay Simulator

This commit is contained in:
voltsrage
2026-06-19 15:22:14 +08:00
parent 835311dffc
commit abc781c9c0
50 changed files with 11158 additions and 612 deletions
+20
View File
@@ -0,0 +1,20 @@
public class ApiPoller
{
private readonly VigilCareApiClient _client;
private readonly HashSet<Guid> _seenAlertIds = new();
public ApiPoller(VigilCareApiClient client) => _client = client;
public async Task PollAndDisplayAsync(Guid encounterId, string simTime)
{
var news2 = await _client.GetCurrentNews2Async(encounterId);
var allAlerts = await _client.GetAlertsAsync(encounterId);
var newAlerts = allAlerts.Where(a => _seenAlertIds.Add(a.Id)).ToList();
var bundle = await _client.GetSepsisBundleAsync(encounterId);
var result = new PollResult(news2, newAlerts, bundle);
SimulatorConsole.PollResults(simTime, result);
}
}
@@ -0,0 +1,4 @@
public record PollResult(
News2Response? News2,
List<AlertResponse> NewAlerts,
SepsisBundleResponse? SepsisBundle);