|
@@ -15,6 +15,7 @@ using HealthMonitor.Service.Etcd; |
|
|
using HealthMonitor.Service.MessageQueue; |
|
|
using HealthMonitor.Service.MessageQueue; |
|
|
using HealthMonitor.Service.Sub; |
|
|
using HealthMonitor.Service.Sub; |
|
|
using Microsoft.AspNetCore.Mvc.RazorPages; |
|
|
using Microsoft.AspNetCore.Mvc.RazorPages; |
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata; |
|
|
using Microsoft.EntityFrameworkCore.Metadata.Internal; |
|
|
using Microsoft.EntityFrameworkCore.Metadata.Internal; |
|
|
using Microsoft.Extensions.Options; |
|
|
using Microsoft.Extensions.Options; |
|
|
using NetTaste; |
|
|
using NetTaste; |
|
@@ -1100,8 +1101,13 @@ namespace HealthMonitor.WebApi |
|
|
await _hisFetalHeartApiClient.AddAsync(gpsFetalHeartRate).ConfigureAwait(false); |
|
|
await _hisFetalHeartApiClient.AddAsync(gpsFetalHeartRate).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
// 推送到api/v1/open/OpenIot/SetFetalHeartRateConfig |
|
|
// 推送到api/v1/open/OpenIot/SetFetalHeartRateConfig |
|
|
await _serviceIotApi.SetFetalHeartRateConfig(heartRate.Serialno, fetalHeartRate, sampleTime, isAbnormal); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 推送最后一条平常心率到iot设备 |
|
|
|
|
|
var lastPhr = await _serviceTDengine.GetLastAsync<PregnancyHeartRateModel>(heartRate.Serialno); |
|
|
|
|
|
if (lastPhr.MessageId== heartRate.MessageId) |
|
|
|
|
|
{ |
|
|
|
|
|
await _serviceIotApi.SetFetalHeartRateConfig(heartRate.Serialno, fetalHeartRate, sampleTime, isAbnormal); |
|
|
|
|
|
_logger.LogInformation($"{heartRate.Serialno} 推送最后一条常规心率计算的胎心数据到iot设备"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var device = await _deviceCacheMgr.GetDeviceBySerialNoAsync(heartRate.Serialno).ConfigureAwait(false); |
|
|
var device = await _deviceCacheMgr.GetDeviceBySerialNoAsync(heartRate.Serialno).ConfigureAwait(false); |
|
|
var fhrMsgId = $"{heartRate.Serialno}-{sampleTime}-{Guid.NewGuid().ToString("D")[^3..]}"; |
|
|
var fhrMsgId = $"{heartRate.Serialno}-{sampleTime}-{Guid.NewGuid().ToString("D")[^3..]}"; |
|
|