Browse Source

高频心率启动+5秒

datasub12_fetal_heart_rate_0
H Vs 8 months ago
parent
commit
8a4ba0edad
2 changed files with 7 additions and 7 deletions
  1. +5
    -5
      HealthMonitor.Service/Biz/db/TDengineService.cs
  2. +2
    -2
      HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs

+ 5
- 5
HealthMonitor.Service/Biz/db/TDengineService.cs View File

@@ -892,15 +892,15 @@ namespace HealthMonitor.Service.Biz.db
// 奇数个元素,取中间的数 // 奇数个元素,取中间的数
median = sortedRes[count / 2]; median = sortedRes[count / 2];
} }
Console.WriteLine("中位数是: " + median);
//Console.WriteLine("中位数是: " + median);
_logger.LogInformation($"{serialNo} 中位数是: " + median);
// 找出最接近平均值的众数 // 找出最接近平均值的众数
//var closestToAverage = modes.OrderBy(m => Math.Abs(m - average)).First(); //var closestToAverage = modes.OrderBy(m => Math.Abs(m - average)).First();
//Console.WriteLine("最接近平均值的众数是: " + closestToAverage); //Console.WriteLine("最接近平均值的众数是: " + closestToAverage);


// 找出最接近中位数的众数 // 找出最接近中位数的众数
var closestToMedian = modes.OrderBy(m => Math.Abs(m - median)).First(); var closestToMedian = modes.OrderBy(m => Math.Abs(m - median)).First();
Console.WriteLine("最接近中位数的众数是: " + closestToMedian);
_logger.LogInformation($"{serialNo} 最接近中位数的众数是: " + closestToMedian);
mode = closestToMedian; mode = closestToMedian;
} }
#endregion #endregion
@@ -914,8 +914,8 @@ namespace HealthMonitor.Service.Biz.db
.ToList(); .ToList();


// 输出新数据集 // 输出新数据集
Console.WriteLine("新数据集: " + string.Join(", ", closestToModeData));
Console.WriteLine("新数据集的数量: " + closestToModeData.Count);
_logger.LogInformation($"{serialNo} 新数据集: " + string.Join(", ", closestToModeData));
_logger.LogInformation($"{serialNo} 新数据集的数量: " + closestToModeData.Count);


var fhrMap = _mgrFhrPhrMapCache.GetHeartRatesMap(); var fhrMap = _mgrFhrPhrMapCache.GetHeartRatesMap();
var watchConfig = await _deviceCacheMgr.GetGpsDeviceWatchConfigCacheObjectBySerialNoAsync(serialNo, "0067"); var watchConfig = await _deviceCacheMgr.GetGpsDeviceWatchConfigCacheObjectBySerialNoAsync(serialNo, "0067");


+ 2
- 2
HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs View File

@@ -152,8 +152,8 @@ namespace HealthMonitor.Service.Resolver
// 如果需要,将时间差转换为秒 // 如果需要,将时间差转换为秒
var timeDiffInSeconds = timeDiff.TotalSeconds; var timeDiffInSeconds = timeDiff.TotalSeconds;


// 高频心率启动
if (timeDiffInSeconds <= highFreqSampleInterval)
// 高频心率启动,highFreqSampleInterval = highFreqSampleInterval+5,增加5秒兼容
if (timeDiffInSeconds <= (highFreqSampleInterval+5))
{ {


var phrFreqstatus = await _deviceCacheMgr.GetPregnancyHeartRateFreqStatusAsync(heartRate.Serialno); var phrFreqstatus = await _deviceCacheMgr.GetPregnancyHeartRateFreqStatusAsync(heartRate.Serialno);


Loading…
Cancel
Save