|
@@ -242,8 +242,13 @@ namespace HealthMonitor.Service.Resolver |
|
|
/// 取连续正常次数正常值的平均值,推送到api/v1/open/OpenIot/SetFetalHeartRateConfig |
|
|
/// 取连续正常次数正常值的平均值,推送到api/v1/open/OpenIot/SetFetalHeartRateConfig |
|
|
#region 检查是否连续12个心率值都是正常的 |
|
|
#region 检查是否连续12个心率值都是正常的 |
|
|
// 获取最近连续正常次数个心率记录 |
|
|
// 获取最近连续正常次数个心率记录 |
|
|
var lastPhr = phr.OrderByDescending(i => i.LastUpdate).Take(stopHighFreqSampleCount).ToList(); |
|
|
|
|
|
|
|
|
_logger.LogInformation($"{heartRate.Serialno} 设置 stopHighFreqSampleCount {stopHighFreqSampleCount}"); |
|
|
|
|
|
|
|
|
|
|
|
var lastPhr = phr.OrderByDescending(i => i.LastUpdate).Take(stopHighFreqSampleCount).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"{heartRate.Serialno} 设置 lastPhr {lastPhr.Count}"); |
|
|
|
|
|
_logger.LogInformation($"{heartRate.Serialno} 设置 triggerHighFreqLow {triggerHighFreqLow}"); |
|
|
|
|
|
_logger.LogInformation($"{heartRate.Serialno} 设置 triggerHighFreqLow {triggerHighFreqHigh}"); |
|
|
// 检查是否连续12个值都是正常的 |
|
|
// 检查是否连续12个值都是正常的 |
|
|
if (lastPhr.All(i => i.PregnancyHeartRate >= triggerHighFreqLow && i.PregnancyHeartRate <= triggerHighFreqHigh)) |
|
|
if (lastPhr.All(i => i.PregnancyHeartRate >= triggerHighFreqLow && i.PregnancyHeartRate <= triggerHighFreqHigh)) |
|
|
{ |
|
|
{ |
|
|