Browse Source

系数极值,最小值不能少于60,最大值不能少于100

datasub12_fetal_heart_rate
H Vs 2 months ago
parent
commit
8a562938ef
1 changed files with 23 additions and 11 deletions
  1. +23
    -11
      HealthMonitor.Service/Biz/db/TDengineService.cs

+ 23
- 11
HealthMonitor.Service/Biz/db/TDengineService.cs View File

@@ -1151,6 +1151,23 @@ namespace HealthMonitor.Service.Biz.db
float statMaxValueFprCoefficient = 0f;
float statMinValueFprCoefficient = 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周之间
if (pregnancyWeek >= 12 && pregnancyWeek <= 45)
{
@@ -1164,20 +1181,15 @@ namespace HealthMonitor.Service.Biz.db

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);
}
}
// 如果最大值与最小值在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()
{


Loading…
Cancel
Save