Ver código fonte

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

datasub12_fetal_heart_rate
H Vs 3 meses atrás
pai
commit
8a562938ef
1 arquivos alterados com 23 adições e 11 exclusões
  1. +23
    -11
      HealthMonitor.Service/Biz/db/TDengineService.cs

+ 23
- 11
HealthMonitor.Service/Biz/db/TDengineService.cs Ver arquivo

@@ -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()
{


Carregando…
Cancelar
Salvar