浏览代码

调整胎心算法调整

datasub12_fetal_heart_rate_1
H Vs 2 天前
父节点
当前提交
9a905019f7
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      HealthMonitor.Service/Biz/db/TDengineService.cs

+ 3
- 2
HealthMonitor.Service/Biz/db/TDengineService.cs 查看文件

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



正在加载...
取消
保存