feature: Sepsis Early Warning Engine
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// Subset of the observation.recorded payload — only the fields the sepsis engine needs.
|
||||
public record SepsisObservationEvent(
|
||||
Guid EncounterId,
|
||||
Guid PatientId,
|
||||
string ObservationCode,
|
||||
decimal Value);
|
||||
@@ -0,0 +1,7 @@
|
||||
public enum SirsOutcome
|
||||
{
|
||||
NotSirsCode,
|
||||
InsufficientCriteria,
|
||||
AlertCreated,
|
||||
AlertAlreadyOpen
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// Discriminated result — allows tests and callers to assert the exact outcome
|
||||
// without inspecting PostgreSQL or Redis directly.
|
||||
public record SirsResult(SirsOutcome Outcome, int ActiveCount = 0)
|
||||
{
|
||||
public static readonly SirsResult NotSirsCode = new(SirsOutcome.NotSirsCode);
|
||||
public static readonly SirsResult AlertCreated = new(SirsOutcome.AlertCreated);
|
||||
public static readonly SirsResult AlertAlreadyOpen = new(SirsOutcome.AlertAlreadyOpen);
|
||||
|
||||
public static SirsResult InsufficientCriteria(int count) =>
|
||||
new(SirsOutcome.InsufficientCriteria, count);
|
||||
}
|
||||
Reference in New Issue
Block a user