Przeglądaj źródła

高频心率启动+5秒

datasub12_fetal_heart_rate_0
H Vs 3 miesięcy temu
rodzic
commit
8a4ba0edad
2 zmienionych plików z 7 dodań i 7 usunięć
  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 Wyświetl plik

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

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


+ 2
- 2
HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs Wyświetl plik

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

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

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


Ładowanie…
Anuluj
Zapisz