Require minimum 7 days of overnight HRV data before calculating baseline status to prevent unreliable POOR status in first few days

This commit is contained in:
Gideon Zenz
2025-12-20 19:07:34 +01:00
committed by José Rebelo
parent 9df32ad1ac
commit 8c0b8934ee
@@ -227,7 +227,9 @@ public class ComputedHrvSummarySampleProvider implements TimeSampleProvider<HrvS
cal.add(Calendar.DATE, -1); cal.add(Calendar.DATE, -1);
} }
if (overnightAverages.isEmpty()) { // Require at least 7 days of overnight data before calculating a baseline
// This prevents unreliable status calculations in the first few days
if (overnightAverages.size() < 7) {
return new BaselineValues(0, 0, 0); return new BaselineValues(0, 0, 0);
} }