Full SOFA Score: Data Layer + Scoring Engine

Glasgow Coma Scale: Data Layer + Scoring Engine
This commit is contained in:
voltsrage
2026-06-21 01:09:50 +08:00
parent 78c043e4d3
commit 93ea473d2b
62 changed files with 7133 additions and 72 deletions
@@ -27,7 +27,8 @@ public class KafkaTopicProvisioner : IHostedService
_options.Topics.AlertAcknowledged,
_options.Topics.EncounterStatusChanged,
_options.Topics.SepsisBundleCreated,
_options.Topics.SepsisBundleUpdated
_options.Topics.SepsisBundleUpdated,
_options.Topics.GcsScored
};
var specs = topicNames.Select(name => new TopicSpecification
@@ -44,7 +45,9 @@ public class KafkaTopicProvisioner : IHostedService
}
catch (CreateTopicsException ex)
{
var errors = ex.Results.Where(r => r.Error.Code != ErrorCode.TopicAlreadyExists).ToList();
var errors = ex.Results
.Where(r => r.Error.Code is not (ErrorCode.NoError or ErrorCode.TopicAlreadyExists))
.ToList();
if (errors.Count > 0)
throw new InvalidOperationException(
$"Failed to create Kafka topics: {string.Join(", ", errors.Select(e => e.Error.Reason))}");