Przeglądaj źródła

调整日志

master
H Vs 2 miesięcy temu
rodzic
commit
ce697c9563
1 zmienionych plików z 8 dodań i 1 usunięć
  1. +8
    -1
      HealthMonitor.WebApi/Worker.cs

+ 8
- 1
HealthMonitor.WebApi/Worker.cs Wyświetl plik

@@ -2459,9 +2459,16 @@ namespace HealthMonitor.WebApi
public async Task CalculateNormalFetalHeartRateIntervalAsync(HisGpsHeartRate heartRate, PregnancyCommonHeartRateModel commonPHR,int highFreqSampleInterval) public async Task CalculateNormalFetalHeartRateIntervalAsync(HisGpsHeartRate heartRate, PregnancyCommonHeartRateModel commonPHR,int highFreqSampleInterval)
{ {
var daysPhr = await _serviceTDengine.GetBySerialNoAsync<PregnancyHeartRateModel>(heartRate.Serialno, 7); var daysPhr = await _serviceTDengine.GetBySerialNoAsync<PregnancyHeartRateModel>(heartRate.Serialno, 7);
var filteredPhr = daysPhr.Where(i => i.LastUpdate >= heartRate.LastUpdate && i.LastUpdate <= DateTime.Now).ToList();
var now = DateTime.Now;
var filteredPhr = daysPhr.Where(i => i.LastUpdate >= heartRate.LastUpdate && i.LastUpdate <= now).ToList();
// 去除高频 // 去除高频
var normalPhr = GetNonFreqPregnancyHeartRate(filteredPhr, highFreqSampleInterval).OrderBy(i => i.LastUpdate); var normalPhr = GetNonFreqPregnancyHeartRate(filteredPhr, highFreqSampleInterval).OrderBy(i => i.LastUpdate);
if (normalPhr.ToList().Count==0)
{
_logger.LogWarning($"{heartRate.Serialno} 时间段{heartRate.LastUpdate}-{now},去除高频心率数据后,没有常规数据,不计算常规胎心数据");
return;
}


var startPhr = normalPhr.First(); var startPhr = normalPhr.First();
var endPhr = normalPhr.Last(); var endPhr = normalPhr.Last();


Ładowanie…
Anuluj
Zapisz