Browse Source

调整参数

datasub12_fetal_heart_rate_0
H Vs 3 months ago
parent
commit
859aa173a4
2 changed files with 4 additions and 3 deletions
  1. +1
    -0
      HealthMonitor.Service/Cache/DeviceCacheManager.cs
  2. +3
    -3
      HealthMonitor.Service/Resolver/PregnancyHeartRateResolver.cs

+ 1
- 0
HealthMonitor.Service/Cache/DeviceCacheManager.cs View File

@@ -64,6 +64,7 @@ namespace HealthMonitor.Service.Cache
var config = await RedisHelperDb7.HGetAsync(CACHE_KEY_GPSDEVICE_WATCH_CONFIG, $"{sn}_{bizCode}").ConfigureAwait(false); var config = await RedisHelperDb7.HGetAsync(CACHE_KEY_GPSDEVICE_WATCH_CONFIG, $"{sn}_{bizCode}").ConfigureAwait(false);


if (config == null) return null; if (config == null) return null;
_logger.LogInformation($"{sn} 配置信息 {config}");
return (JObject)JsonConvert.DeserializeObject(config)!; return (JObject)JsonConvert.DeserializeObject(config)!;
} }
catch (Exception ex) catch (Exception ex)


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

@@ -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());
} }


Loading…
Cancel
Save