Browse Source

调整胎心算法调整

datasub12_fetal_heart_rate_1
H Vs 2 days ago
parent
commit
9a905019f7
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      HealthMonitor.Service/Biz/db/TDengineService.cs

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

@@ -1365,12 +1365,13 @@ namespace HealthMonitor.Service.Biz.db
// 触发高频监测的心率下限值 // 触发高频监测的心率下限值
var triggerHighFreqLow = (int)watchConfig["triggerHighFreqLow"]!; var triggerHighFreqLow = (int)watchConfig["triggerHighFreqLow"]!;
//增量系数 = (正常胎心最大值 - 正常胎心最小值) / (阀值最大值 - 阀值最小值) //增量系数 = (正常胎心最大值 - 正常胎心最小值) / (阀值最大值 - 阀值最小值)
var coefficient = (NormaletalHeartRateMax - NormaletalHeartRateMin) / (triggerHighFreqHigh - triggerHighFreqLow);
var coefficient = (double)(NormaletalHeartRateMax - NormaletalHeartRateMin)! / (triggerHighFreqHigh - triggerHighFreqLow);



//胎心值 = 正常胎心最小值 + 增量系数 * (心率值 - 阀值最小值) //胎心值 = 正常胎心最小值 + 增量系数 * (心率值 - 阀值最小值)
var fetalHeartRate = NormaletalHeartRateMin + coefficient * (heartrateValue - triggerHighFreqLow); var fetalHeartRate = NormaletalHeartRateMin + coefficient * (heartrateValue - triggerHighFreqLow);


_logger.LogInformation($"{serialNo} 孕周:{pregnancyWeek}, 正常胎心最大值:{NormaletalHeartRateMax},正常胎心最小值:{NormaletalHeartRateMin},阀值最大值:{triggerHighFreqHigh} ,阀值最小值:{triggerHighFreqLow}, 增量系数:{coefficient}");
_logger.LogInformation($"{serialNo} 孕周:{pregnancyWeek}, 正常胎心最大值:{NormaletalHeartRateMax},正常胎心最小值:{NormaletalHeartRateMin},阀值最大值:{triggerHighFreqHigh} ,阀值最小值:{triggerHighFreqLow}, 本次增量系数:{coefficient},本次心率值:{heartrateValue}");
return SafeType.SafeInt(fetalHeartRate!); return SafeType.SafeInt(fetalHeartRate!);
} }




Loading…
Cancel
Save