|
@@ -26,6 +26,7 @@ using HealthMonitor.Model.Service; |
|
|
using Microsoft.Extensions.Options; |
|
|
using Microsoft.Extensions.Options; |
|
|
using HealthMonitor.Model.Config; |
|
|
using HealthMonitor.Model.Config; |
|
|
using HealthMonitor.Model.Service.Mapper; |
|
|
using HealthMonitor.Model.Service.Mapper; |
|
|
|
|
|
using Mvccpb; |
|
|
|
|
|
|
|
|
namespace HealthMonitor.Service.Resolver |
|
|
namespace HealthMonitor.Service.Resolver |
|
|
{ |
|
|
{ |
|
@@ -157,7 +158,7 @@ namespace HealthMonitor.Service.Resolver |
|
|
systolicRefValue = bpRef!.Systolic;//? |
|
|
systolicRefValue = bpRef!.Systolic;//? |
|
|
diastolicRefValue = bpRef!.Diastolic;//? |
|
|
diastolicRefValue = bpRef!.Diastolic;//? |
|
|
#endregion |
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"Person Remarks 值:{person?.Person.Remarks}"); |
|
|
if (string.IsNullOrWhiteSpace(person?.Person.Remarks)) |
|
|
if (string.IsNullOrWhiteSpace(person?.Person.Remarks)) |
|
|
{ |
|
|
{ |
|
|
#region 初始化计算增量值(个人血压信息) |
|
|
#region 初始化计算增量值(个人血压信息) |
|
@@ -172,7 +173,7 @@ namespace HealthMonitor.Service.Resolver |
|
|
remarkFlag = await _serviceIotWebApi.UpdatePersonRemarksAsync(bp.Serialno, (int)systolicRefValue!, (int)diastolicRefValue!, systolicInc, diastolicInc).ConfigureAwait(false); |
|
|
remarkFlag = await _serviceIotWebApi.UpdatePersonRemarksAsync(bp.Serialno, (int)systolicRefValue!, (int)diastolicRefValue!, systolicInc, diastolicInc).ConfigureAwait(false); |
|
|
if (remarkFlag) |
|
|
if (remarkFlag) |
|
|
{ |
|
|
{ |
|
|
Console.WriteLine($"{nameof(BloodpressResolver)} 开启血压标定值下发: {_configBoodPressResolver.EnableBPRefPush}"); |
|
|
|
|
|
|
|
|
_logger.LogInformation($"{nameof(BloodpressResolver)} 开启血压标定值下发: {_configBoodPressResolver.EnableBPRefPush}"); |
|
|
// 启血压标定值下发开关 |
|
|
// 启血压标定值下发开关 |
|
|
if (_configBoodPressResolver.EnableBPRefPush) |
|
|
if (_configBoodPressResolver.EnableBPRefPush) |
|
|
{ |
|
|
{ |
|
@@ -277,7 +278,11 @@ namespace HealthMonitor.Service.Resolver |
|
|
var hmBpResponse = await _serviceTDengine.ExecuteSelectRestResponseAsync("stb_hm_bloodpress", condition); |
|
|
var hmBpResponse = await _serviceTDengine.ExecuteSelectRestResponseAsync("stb_hm_bloodpress", condition); |
|
|
var hmBpParser = JsonConvert.DeserializeObject<ParseTDengineRestResponse<BloodPressureModel>>(hmBpResponse!); |
|
|
var hmBpParser = JsonConvert.DeserializeObject<ParseTDengineRestResponse<BloodPressureModel>>(hmBpResponse!); |
|
|
var hmBp = hmBpParser?.Select(); |
|
|
var hmBp = hmBpParser?.Select(); |
|
|
|
|
|
|
|
|
|
|
|
if (hmBp?.ToList().Count < 2) |
|
|
|
|
|
{ |
|
|
|
|
|
_logger.LogInformation($"{bp.Serialno} 数据值不足"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
// 最大值 |
|
|
// 最大值 |
|
|
systolicMax = (int)hmBpParser?.Select(i => i.SystolicValue).Max()!; |
|
|
systolicMax = (int)hmBpParser?.Select(i => i.SystolicValue).Max()!; |
|
|
diastolicMax = (int)hmBpParser?.Select(i => i.DiastolicValue).Max()!; |
|
|
diastolicMax = (int)hmBpParser?.Select(i => i.DiastolicValue).Max()!; |
|
|