From 9a905019f73015ae7f5a14a88e14f4f64459eb84 Mon Sep 17 00:00:00 2001 From: H Vs Date: Thu, 21 Nov 2024 15:52:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=83=8E=E5=BF=83=E7=AE=97?= =?UTF-8?q?=E6=B3=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HealthMonitor.Service/Biz/db/TDengineService.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/HealthMonitor.Service/Biz/db/TDengineService.cs b/HealthMonitor.Service/Biz/db/TDengineService.cs index 042958e..8841425 100644 --- a/HealthMonitor.Service/Biz/db/TDengineService.cs +++ b/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!); }