|
@@ -1151,6 +1151,23 @@ namespace HealthMonitor.Service.Biz.db |
|
|
float statMaxValueFprCoefficient = 0f; |
|
|
float statMaxValueFprCoefficient = 0f; |
|
|
float statMinValueFprCoefficient = 0f; |
|
|
float statMinValueFprCoefficient = 0f; |
|
|
float StatModeAvgFprCoefficient = 0f; |
|
|
float StatModeAvgFprCoefficient = 0f; |
|
|
|
|
|
|
|
|
|
|
|
// 如果最大值与最小值在60~100范围内,都按个固定值下发高频阈值。 |
|
|
|
|
|
var maxValue = closestToModeData.Max(); |
|
|
|
|
|
var minValue = closestToModeData.Min(); |
|
|
|
|
|
|
|
|
|
|
|
//if ((maxValue >= 60 && maxValue <= 100) && (minValue >= 60 && minValue <= 100)) |
|
|
|
|
|
//{ |
|
|
|
|
|
// minValue = 60; |
|
|
|
|
|
// maxValue = 100; |
|
|
|
|
|
//} |
|
|
|
|
|
// 最小值不能少于60 |
|
|
|
|
|
minValue = minValue < 60 ? 60 : minValue; |
|
|
|
|
|
|
|
|
|
|
|
// 最大值不能少于100 |
|
|
|
|
|
maxValue= maxValue < 100 ? 100 : maxValue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 20-45周之间 |
|
|
// 20-45周之间 |
|
|
if (pregnancyWeek >= 12 && pregnancyWeek <= 45) |
|
|
if (pregnancyWeek >= 12 && pregnancyWeek <= 45) |
|
|
{ |
|
|
{ |
|
@@ -1164,20 +1181,15 @@ namespace HealthMonitor.Service.Biz.db |
|
|
|
|
|
|
|
|
if (map != null) |
|
|
if (map != null) |
|
|
{ |
|
|
{ |
|
|
statMaxValueFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateRange![1] / closestToModeData.Max(), 3); |
|
|
|
|
|
statMinValueFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateRange[0] / closestToModeData.Min(), 3); |
|
|
|
|
|
|
|
|
//statMaxValueFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateRange![1] / closestToModeData.Max(), 3); |
|
|
|
|
|
//statMinValueFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateRange[0] / closestToModeData.Min(), 3); |
|
|
|
|
|
|
|
|
|
|
|
statMaxValueFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateRange![1] / maxValue, 3); |
|
|
|
|
|
statMinValueFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateRange[0] / minValue, 3); |
|
|
StatModeAvgFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateAverage / mode, 3); |
|
|
StatModeAvgFprCoefficient = (float)Math.Round((decimal)map.FetalHeartRateAverage / mode, 3); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 如果最大值与最小值在60~100范围内,都按个固定值下发高频阈值。 |
|
|
|
|
|
var maxValue = closestToModeData.Max(); |
|
|
|
|
|
var minValue = closestToModeData.Min(); |
|
|
|
|
|
|
|
|
|
|
|
if ((maxValue >= 60 && maxValue <= 100) && (minValue >= 60 && minValue <= 100)) |
|
|
|
|
|
{ |
|
|
|
|
|
minValue = 60; |
|
|
|
|
|
maxValue = 100; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new PregnancyCommonHeartRateModel() |
|
|
return new PregnancyCommonHeartRateModel() |
|
|
{ |
|
|
{ |
|
|