feature: Sepsis Engine Refactor: Remove SIRS, Rewire qSOFA + Bundle

Frontend: GCS Entry, SOFA Display, Sepsis UI Refactor
This commit is contained in:
voltsrage
2026-06-21 03:56:27 +08:00
parent 93ea473d2b
commit bf46e6554a
48 changed files with 2686 additions and 714 deletions
+18 -2
View File
@@ -1,4 +1,3 @@
```markdown
# Sepsis Engine Design Decisions
## Why Redis for SIRS state, not a PostgreSQL time-range query
@@ -50,4 +49,21 @@ and no additional infrastructure. The trade-off: if this system needed to scale
multi-hospital network with 50,000+ concurrent inpatients (~5,000 observations/second),
Flink would become the right choice. The architecture decision is correct at this scale
and defensible at interview with a clear scale inflection point named.
```
## Phase 27 — Migration from SIRS to SOFA
**Rationale:** Sepsis-3 (2016) replaced SIRS with SOFA for organ dysfunction assessment.
SIRS is non-specific (post-exercise tachycardia, mild fever). Doctor feedback aligned with
moving sepsis **confirmation** to SOFA delta ≥ 2 while retaining qSOFA as a **bedside screen**.
**What changed:**
- `SirsDetector` / `SirsEvaluator` deleted — no new `SEPSIS_WARNING` alerts
- qSOFA ≥ 2 → `QSOFA_SCREEN` (WARNING, suppressible) with lab-order recommendation
- Sepsis hour-1 bundle triggers from `SOFA_SEPSIS` only (Phase 26 delta ≥ 2)
- Historical `SEPSIS_WARNING` and `QSOFA_WARNING` rows remain queryable
**Redis key patterns after Phase 27:**
- `qsofa:{encounterId}:{code}` — qSOFA screening (30 min TTL)
- `sofa:{encounterId}:{code}` — SOFA lab carry-forward (Phase 26)
- `gcs:{encounterId}:{code}` — GCS components (Phase 25)
- ~~`sirs:{encounterId}:{code}`~~ — removed (legacy keys expire)