updated with real triage methodology

This commit is contained in:
2025-11-01 15:19:24 -04:00
parent 9a70435636
commit 7cf5510401
12 changed files with 2326 additions and 317 deletions
+3 -3
View File
@@ -181,18 +181,18 @@ class WristbandSimulator:
return int(hr), int(spo2), temp, self.activity_level
def _determine_tier(self, hr: int, spo2: int, temp: float) -> tuple:
"""Determine alert tier based on vitals"""
"""Determine flags based on vitals - tier determined by backend"""
flags = 0
# Battery warning
if self.battery < 15:
flags |= VitalFlags.LOW_BATT
# Check for critical vitals (EMERGENCY)
# Set EMERGENCY flag if critical vitals
if hr > 140 or hr < 45 or spo2 < 88 or temp > 39.5 or temp < 35.0:
flags |= VitalFlags.EMERGENCY
tier = "EMERGENCY"
# Check for concerning vitals (ALERT)
# Set ALERT flag if concerning vitals
elif hr > 110 or hr < 50 or spo2 < 92 or temp > 38.3 or temp < 35.5:
flags |= VitalFlags.ALERT
tier = "ALERT"