|
@@ -2761,9 +2761,15 @@ namespace HealthMonitor.WebApi |
|
|
.OrderBy(i => i.LastUpdate).ToList(); |
|
|
.OrderBy(i => i.LastUpdate).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (filterPhr.Count < 2) |
|
|
|
|
|
|
|
|
//if (filterPhr.Count < 2) |
|
|
|
|
|
//{ |
|
|
|
|
|
// _logger.LogWarning($"{heartRate.Serialno} 胎动统计数据少于2条,不统计,{string.Join('-', filterPhr.Select(i=>i.LastUpdate))}"); |
|
|
|
|
|
// return; |
|
|
|
|
|
//} |
|
|
|
|
|
|
|
|
|
|
|
if (filterPhr.Count < 1) |
|
|
{ |
|
|
{ |
|
|
_logger.LogWarning($"{heartRate.Serialno} 胎动统计数据少于2条,不统计,{string.Join('-', filterPhr.Select(i=>i.LastUpdate))}"); |
|
|
|
|
|
|
|
|
_logger.LogWarning($"{heartRate.Serialno} 胎动统计数据少于1条,不统计,{string.Join('-', filterPhr.Select(i => i.LastUpdate))}"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -2823,7 +2829,7 @@ namespace HealthMonitor.WebApi |
|
|
var phrRange = segmentPhr.OrderByDescending(i => i.LastUpdate) |
|
|
var phrRange = segmentPhr.OrderByDescending(i => i.LastUpdate) |
|
|
.Select(i => i.LastUpdate) |
|
|
.Select(i => i.LastUpdate) |
|
|
.ToList(); |
|
|
.ToList(); |
|
|
if (phrRange.Count >= 2) |
|
|
|
|
|
|
|
|
if (phrRange.Count >= 1) |
|
|
{ |
|
|
{ |
|
|
// 读取胎心数据 |
|
|
// 读取胎心数据 |
|
|
GeneralParam param = new() |
|
|
GeneralParam param = new() |
|
@@ -2888,21 +2894,24 @@ namespace HealthMonitor.WebApi |
|
|
; |
|
|
; |
|
|
|
|
|
|
|
|
// var fetalMovementTimeVar = (fetalMovementMapValue * duringMins * 2) / 120; |
|
|
// var fetalMovementTimeVar = (fetalMovementMapValue * duringMins * 2) / 120; |
|
|
var fetalMovementTimeVar = (fetalMovementMapValue * duringMins) / 60; |
|
|
|
|
|
|
|
|
#region 取消使用时间长度比例 |
|
|
|
|
|
//var fetalMovementTimeVar = (fetalMovementMapValue * duringMins) / 60; |
|
|
|
|
|
|
|
|
if (duringMins < 59) |
|
|
|
|
|
{ |
|
|
|
|
|
// 取12小时胎动总数最小值 |
|
|
|
|
|
fetalMovementMapValue = fetalMovementMap |
|
|
|
|
|
.Where(i => i.PregnancyPeriod![0] <= pregnancyWeeks && i.PregnancyPeriod[1] >= pregnancyWeeks) |
|
|
|
|
|
.First() |
|
|
|
|
|
.TwelveHourMovementRange[0]; |
|
|
|
|
|
//取12小时胎动总数最小值的平均值 |
|
|
|
|
|
fetalMovementTimeVar = fetalMovementMapValue / 12; |
|
|
|
|
|
|
|
|
|
|
|
_logger.LogWarning($"{heartRate.Serialno} 佩戴不足1小时,12小时胎动总数最小值{fetalMovementMapValue},平均值{fetalMovementTimeVar}"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//if (duringMins < 59) |
|
|
|
|
|
//{ |
|
|
|
|
|
// // 取12小时胎动总数最小值 |
|
|
|
|
|
// fetalMovementMapValue = fetalMovementMap |
|
|
|
|
|
// .Where(i => i.PregnancyPeriod![0] <= pregnancyWeeks && i.PregnancyPeriod[1] >= pregnancyWeeks) |
|
|
|
|
|
// .First() |
|
|
|
|
|
// .TwelveHourMovementRange[0]; |
|
|
|
|
|
// //取12小时胎动总数最小值的平均值 |
|
|
|
|
|
// fetalMovementTimeVar = fetalMovementMapValue / 12; |
|
|
|
|
|
|
|
|
|
|
|
// _logger.LogWarning($"{heartRate.Serialno} 佩戴不足1小时,12小时胎动总数最小值{fetalMovementMapValue},平均值{fetalMovementTimeVar}"); |
|
|
|
|
|
//} |
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
var fetalMovementTimeVar = (double)fetalMovementMapValue; |
|
|
|
|
|
|
|
|
#region 生理健康与胎动的关系 |
|
|
#region 生理健康与胎动的关系 |
|
|
/// (步数)运动步数超过1500步则加1; |
|
|
/// (步数)运动步数超过1500步则加1; |
|
@@ -3161,7 +3170,7 @@ namespace HealthMonitor.WebApi |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
_logger.LogInformation($"{heartRate.Serialno} 胎动记录{isFetalMovementExisted},数据采样时间:{fetalMovementSampleTime}|{statStartTime.ToString("yyyy-MM-dd HH:mm:ss")}, 周期:{statStartTime}-{statEndTime} 不足两条,不能判断是否持续佩戴"); |
|
|
|
|
|
|
|
|
_logger.LogInformation($"{heartRate.Serialno} 胎动记录{isFetalMovementExisted},数据采样时间:{fetalMovementSampleTime}|{statStartTime.ToString("yyyy-MM-dd HH:mm:ss")}, 周期:{statStartTime}-{statEndTime} 不足1条,不能判断是否持续佩戴"); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|