|
@@ -118,7 +118,7 @@ namespace HealthMonitor.Service.Resolver |
|
|
//停止高频心率采样心率连续正常次数 |
|
|
//停止高频心率采样心率连续正常次数 |
|
|
var stopHighFreqSampleCount = (int)watchConfig["stopHighFreqSampleCount"]!; |
|
|
var stopHighFreqSampleCount = (int)watchConfig["stopHighFreqSampleCount"]!; |
|
|
// 高频心率采集时长 0 为持续采集,非零为高频心率的采集时长 |
|
|
// 高频心率采集时长 0 为持续采集,非零为高频心率的采集时长 |
|
|
var highFreqSampleTimes = (int)watchConfig["stopHighFreqSampleCount"]!; |
|
|
|
|
|
|
|
|
var highFreqSampleTimes = (int)watchConfig["highFreqSampleTimes"]!; |
|
|
// 告警上限阀值 |
|
|
// 告警上限阀值 |
|
|
var upperAlarmThreshold = (int)watchConfig["upperAlarmThreshold"]!; |
|
|
var upperAlarmThreshold = (int)watchConfig["upperAlarmThreshold"]!; |
|
|
// 告警下限阀值 |
|
|
// 告警下限阀值 |
|
@@ -223,7 +223,7 @@ namespace HealthMonitor.Service.Resolver |
|
|
if (highFreqSampleTimes > 0 && heartRate.LastUpdate >= (phrFreqstatus?.LastUpdate + TimeSpan.FromSeconds(highFreqSampleTimes))) |
|
|
if (highFreqSampleTimes > 0 && heartRate.LastUpdate >= (phrFreqstatus?.LastUpdate + TimeSpan.FromSeconds(highFreqSampleTimes))) |
|
|
{ |
|
|
{ |
|
|
var filterPhr = phr |
|
|
var filterPhr = phr |
|
|
.Where(i => i.Timestamp >= phrFreqstatus?.Timestamp); |
|
|
|
|
|
|
|
|
.Where(i => i.LastUpdate >= phrFreqstatus?.LastUpdate); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -238,7 +238,7 @@ namespace HealthMonitor.Service.Resolver |
|
|
//await SaveAndPushFreqFetalHeartRateAsync(heartRate, commonPHR, upperAlarmThreshold, lowerAlarmThreshold, avgPhr, DateTimeUtil.ConvertToTimeStamp(DateTime.Now).ToString()); |
|
|
//await SaveAndPushFreqFetalHeartRateAsync(heartRate, commonPHR, upperAlarmThreshold, lowerAlarmThreshold, avgPhr, DateTimeUtil.ConvertToTimeStamp(DateTime.Now).ToString()); |
|
|
// 高频数据不建模 |
|
|
// 高频数据不建模 |
|
|
FreqStatsEnd = firstTwoPhr[1]; |
|
|
FreqStatsEnd = firstTwoPhr[1]; |
|
|
_logger.LogInformation($"{heartRate.Serialno} 高频状态已经持续{(FreqStatsEnd - phrFreqstatus!.LastUpdate).TotalSeconds} 秒,超过规定的 {highFreqSampleTimes} 秒,即将结束高频状态,将下发指令"); |
|
|
|
|
|
|
|
|
_logger.LogInformation($"{heartRate.Serialno} 高频状态已经持续{(FreqStatsEnd - phrFreqstatus!.LastUpdate).TotalSeconds} 秒,超过约定的 {highFreqSampleTimes} 秒,即将结束高频状态,将下发指令"); |
|
|
|
|
|
|
|
|
await SaveAndPushFreqFetalHeartRateAsync(heartRate, commonPHR, upperAlarmThreshold, lowerAlarmThreshold, avgPhr, DateTimeUtil.ConvertToTimeStamp(phrFreqstatus!.LastUpdate).ToString()); |
|
|
await SaveAndPushFreqFetalHeartRateAsync(heartRate, commonPHR, upperAlarmThreshold, lowerAlarmThreshold, avgPhr, DateTimeUtil.ConvertToTimeStamp(phrFreqstatus!.LastUpdate).ToString()); |
|
|
} |
|
|
} |
|
|