IVUS计算
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
{
|
||||
@@ -82,7 +84,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
//public async Task<FileResult> GetMeasuredValueTemplate(GetMeasuredValueTemplateInDto inDto)
|
||||
//{
|
||||
|
||||
|
||||
//}
|
||||
|
||||
#region 获取阅片报告
|
||||
@@ -449,23 +451,20 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
#region 计算 这里顺序非常重要 后面计算的值要依赖前面计算的结果
|
||||
var needAddList = new List<ReadingTaskQuestionAnswer>();
|
||||
|
||||
// 计算斑块数据统计和PVA数据
|
||||
await this.CalculatePatchDataStatisticsAndPVA(inDto);
|
||||
|
||||
List<ReadingCalculateData> calculateList = new List<ReadingCalculateData>()
|
||||
{
|
||||
// EEM求和
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.EEMSum,GetDecimalNullFun=GetEEM},
|
||||
// 斑块1-PAV
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.Plaque1PVA,GetDecimalNullFun=GetPlaque1PVA},
|
||||
|
||||
// (EEM-Lumen)求和
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.EEMLumenSum,GetDecimalNullFun=GetEEMLumenSum},
|
||||
// 斑块2-PAV
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.Plaque2PVA,GetDecimalNullFun=GetPlaque2PVA},
|
||||
|
||||
// 计算NTAV的(EEM-Lumen)求和/回撤中的图像数
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.NTAVEEMLumenSumOrRetraceImageCount,GetDecimalNullFun=GetNTAVEEMLumenSumOrRetraceImageCount},
|
||||
// 斑块3-PAV
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.Plaque3PVA,GetDecimalNullFun=GetPlaque3PVA},
|
||||
|
||||
// 冠状动脉粥样硬化体积百分比(PAV)
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.PAV,GetDecimalNullFun=GetPAV},
|
||||
|
||||
// 总动脉粥样硬化体积(NTAV)
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.NTAV,GetDecimalNullFun=GetNTAV},
|
||||
|
||||
|
||||
|
||||
@@ -562,8 +561,177 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 计算斑块数据统计和PVA数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task CalculatePatchDataStatisticsAndPVA(ReadingCalculateDto inDto)
|
||||
{
|
||||
// 斑块的表格问题Id
|
||||
var questionInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.PatchDataStatistics).FirstOrDefault();
|
||||
|
||||
// pAV 问题信息
|
||||
var pAVquestionInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.PAV).FirstOrDefault();
|
||||
|
||||
|
||||
// 测量值集合
|
||||
var matchValuesAnswerList = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.MatchValues).SelectMany(x => x.TableRowInfoList).ToList();
|
||||
|
||||
// 获取编号
|
||||
var nums = matchValuesAnswerList.SelectMany(x => x.TableQuestionList).Where(x => x.QuestionMark == QuestionMark.PlaqueNumber).Select(x => int.Parse(x.Answer)).Distinct().OrderBy(x => x).ToList();
|
||||
|
||||
List<ReadingTableAnswerRowInfo> tableAnsweRowInfos = new List<ReadingTableAnswerRowInfo>();
|
||||
List<ReadingTableQuestionAnswer> tableAnswers = new List<ReadingTableQuestionAnswer>();
|
||||
|
||||
foreach (var item in nums)
|
||||
{
|
||||
var newRowId = NewId.NextGuid();
|
||||
|
||||
var thisnumTableRows = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.MatchValues).SelectMany(x => x.TableRowInfoList).Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.PlaqueNumber && y.Answer == item.ToString())).ToList();
|
||||
|
||||
// 斑块数据统计
|
||||
tableAnsweRowInfos.Add(new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
Id = newRowId,
|
||||
QuestionId = questionInfo!.QuestionId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
TrialId = inDto.TrialId,
|
||||
RowIndex = item,
|
||||
IsCurrentTaskAdd = true,
|
||||
BlindName = inDto.BlindName,
|
||||
OrderMark = questionInfo.OrderMark,
|
||||
FristAddTaskNum = inDto.VisitTaskNum,
|
||||
FristAddTaskId = inDto.VisitTaskId,
|
||||
RowMark = questionInfo.OrderMark + decimal.Parse(item.ToString()).GetLesionMark()
|
||||
});
|
||||
|
||||
// 斑块
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = item.ToString(),
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = questionInfo!.QuestionId,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == questionInfo.QuestionId && x.QuestionMark == QuestionMark.PlaqueNumber).Select(x => x.Id).FirstOrDefaultAsync(),
|
||||
});
|
||||
|
||||
|
||||
|
||||
#region 数据计算
|
||||
var emm = thisnumTableRows.SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.ElasticArea).Select(x => x.Answer.IsNullOrEmptyReturn0()).Sum().ToString();
|
||||
|
||||
var EEMLumen = thisnumTableRows.SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.ElasticAreaDiffValue).Select(x => x.Answer.IsNullOrEmptyReturn0()).Sum().ToString();
|
||||
|
||||
var pav = "";
|
||||
|
||||
if (emm != null && EEMLumen != null)
|
||||
{
|
||||
var emmNum = decimal.Round(decimal.Parse(emm ?? "0"));
|
||||
var EEMLumenNum = decimal.Round(decimal.Parse(EEMLumen ?? "0"));
|
||||
if (emmNum != 0)
|
||||
{
|
||||
pav = (EEMLumenNum * 100 / emmNum).ToString();
|
||||
}
|
||||
}
|
||||
|
||||
if (inDto.DigitPlaces != -1)
|
||||
{
|
||||
emm = decimal.Round(decimal.Parse(emm ?? "0"), inDto.DigitPlaces).ToString("F" + inDto.DigitPlaces.ToString());
|
||||
EEMLumen = decimal.Round(decimal.Parse(EEMLumen ?? "0"), inDto.DigitPlaces).ToString("F" + inDto.DigitPlaces.ToString());
|
||||
pav = decimal.Round(decimal.Parse(pav ?? "0"), inDto.DigitPlaces).ToString("F" + inDto.DigitPlaces.ToString());
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 冠状动脉粥样硬化体积百分比(PAV)
|
||||
|
||||
var newPAVRowId = NewId.NextGuid();
|
||||
// 斑块数据统计
|
||||
tableAnsweRowInfos.Add(new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
Id = newPAVRowId,
|
||||
QuestionId = pAVquestionInfo!.QuestionId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
TrialId = inDto.TrialId,
|
||||
RowIndex = item,
|
||||
IsCurrentTaskAdd = true,
|
||||
BlindName = inDto.BlindName,
|
||||
OrderMark = pAVquestionInfo.OrderMark,
|
||||
FristAddTaskNum = inDto.VisitTaskNum,
|
||||
FristAddTaskId = inDto.VisitTaskId,
|
||||
RowMark = pAVquestionInfo.OrderMark + decimal.Parse(item.ToString()).GetLesionMark()
|
||||
});
|
||||
|
||||
// 斑块
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = item.ToString(),
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = pAVquestionInfo!.QuestionId,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newPAVRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == pAVquestionInfo.QuestionId && x.QuestionMark == QuestionMark.PlaqueNumber).Select(x => x.Id).FirstOrDefaultAsync(),
|
||||
});
|
||||
|
||||
|
||||
|
||||
// PAV
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = pav,
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = pAVquestionInfo!.QuestionId,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newPAVRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == pAVquestionInfo.QuestionId && x.QuestionMark == QuestionMark.PAV).Select(x => x.Id).FirstOrDefaultAsync(),
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
// EMM 求和
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = emm,
|
||||
QuestionId = questionInfo!.QuestionId,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == questionInfo.QuestionId && x.QuestionMark == QuestionMark.EEMSum).Select(x => x.Id).FirstOrDefaultAsync(),
|
||||
});
|
||||
|
||||
// (EEM-Lumen)求和
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = EEMLumen,
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = questionInfo!.QuestionId,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == questionInfo.QuestionId && x.QuestionMark == QuestionMark.EEMSubtractLumenSum).Select(x => x.Id).FirstOrDefaultAsync(),
|
||||
});
|
||||
}
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => (x.QuestionId == questionInfo.QuestionId || x.QuestionId == pAVquestionInfo.QuestionId) && x.VisitTaskId == inDto.VisitTaskId);
|
||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => (x.QuestionId == questionInfo.QuestionId || x.QuestionId == pAVquestionInfo.QuestionId) && x.VisitTaskId == inDto.VisitTaskId);
|
||||
await _readingTableAnswerRowInfoRepository.AddRangeAsync(tableAnsweRowInfos);
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
|
||||
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证访视提交
|
||||
@@ -576,98 +744,132 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 计算NTAV的EEM
|
||||
/// 获取斑块1-PAV
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<decimal?> GetEEM(ReadingCalculateDto inDto)
|
||||
public async Task<decimal?> GetPlaque1PVA(ReadingCalculateDto inDto)
|
||||
{
|
||||
if (inDto.QuestionInfo.Where(x => x.LesionType == LesionType.MatchValues).SelectMany(x => x.TableRowInfoList).Count() == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.MatchValues).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.ElasticArea).Select(x => x.Answer.IsNullOrEmptyReturn0()).Sum();
|
||||
|
||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.PAV).SelectMany(x => x.TableRowInfoList).Where(x=>x.TableQuestionList.Any(y=>y.QuestionMark==QuestionMark.PlaqueNumber&&y.Answer.IsNullOrEmptyReturn0()==1)).SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.PAV).Select(x=>x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturn0();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取(EEM-Lumen)求和
|
||||
/// 获取斑块2-PAV
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<decimal?> GetEEMLumenSum(ReadingCalculateDto inDto)
|
||||
public async Task<decimal?> GetPlaque2PVA(ReadingCalculateDto inDto)
|
||||
{
|
||||
if (inDto.QuestionInfo.Where(x => x.LesionType == LesionType.MatchValues).SelectMany(x => x.TableRowInfoList).Count() == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.MatchValues).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.ElasticAreaDiffValue).Select(x => x.Answer.IsNullOrEmptyReturn0()).Sum();
|
||||
|
||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.PAV).SelectMany(x => x.TableRowInfoList).Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.PlaqueNumber && y.Answer.IsNullOrEmptyReturn0() == 2)).SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.PAV).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturn0();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 计算NTAV的(EEM-Lumen)求和/回撤中的图像数
|
||||
/// 获取斑块3-PAV
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<decimal?> GetNTAVEEMLumenSumOrRetraceImageCount(ReadingCalculateDto inDto)
|
||||
public async Task<decimal?> GetPlaque3PVA(ReadingCalculateDto inDto)
|
||||
{
|
||||
var eEMLumenSum = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.EEMLumenSum).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||
var retracedFramesNumber = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.RetracedFramesNumber).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||
|
||||
if (eEMLumenSum == 0 || retracedFramesNumber == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return eEMLumenSum / retracedFramesNumber;
|
||||
|
||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.PAV).SelectMany(x => x.TableRowInfoList).Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.PlaqueNumber && y.Answer.IsNullOrEmptyReturn0() == 3)).SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.PAV).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturn0();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 冠状动脉粥样硬化体积百分比(PAV)
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// (EEM-Lumen)求和/EEM求和✖️100,单位%
|
||||
/// </remarks>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<decimal?> GetPAV(ReadingCalculateDto inDto)
|
||||
{
|
||||
var eEMLumenSum = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.EEMLumenSum).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||
var eEMSum = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.EEMSum).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||
///// <summary>
|
||||
///// 计算NTAV的EEM
|
||||
///// </summary>
|
||||
///// <param name="inDto"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<decimal?> GetEEM(ReadingCalculateDto inDto)
|
||||
//{
|
||||
// if (inDto.QuestionInfo.Where(x => x.LesionType == LesionType.MatchValues).SelectMany(x => x.TableRowInfoList).Count() == 0)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.MatchValues).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList)
|
||||
// .Where(x => x.QuestionMark == QuestionMark.ElasticArea).Select(x => x.Answer.IsNullOrEmptyReturn0()).Sum();
|
||||
|
||||
if (eEMSum == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return eEMLumenSum / eEMSum * 100;
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 总动脉粥样硬化体积(NTAV)
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<decimal?> GetNTAV(ReadingCalculateDto inDto)
|
||||
{
|
||||
var result = await GetNTAVEEMLumenSumOrRetraceImageCount(inDto);
|
||||
///// <summary>
|
||||
///// 获取(EEM-Lumen)求和
|
||||
///// </summary>
|
||||
///// <param name="inDto"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<decimal?> GetEEMLumenSum(ReadingCalculateDto inDto)
|
||||
//{
|
||||
// if (inDto.QuestionInfo.Where(x => x.LesionType == LesionType.MatchValues).SelectMany(x => x.TableRowInfoList).Count() == 0)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.MatchValues).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList)
|
||||
// .Where(x => x.QuestionMark == QuestionMark.ElasticAreaDiffValue).Select(x => x.Answer.IsNullOrEmptyReturn0()).Sum();
|
||||
|
||||
var medianFrame = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.MedianFrame).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||
if (result == null || medianFrame == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return result.Value * medianFrame;
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 计算NTAV的(EEM-Lumen)求和/回撤中的图像数
|
||||
///// </summary>
|
||||
///// <param name="inDto"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<decimal?> GetNTAVEEMLumenSumOrRetraceImageCount(ReadingCalculateDto inDto)
|
||||
//{
|
||||
// var eEMLumenSum = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.EEMLumenSum).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||
// var retracedFramesNumber = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.RetracedFramesNumber).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||
|
||||
// if (eEMLumenSum == 0 || retracedFramesNumber == 0)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// return eEMLumenSum / retracedFramesNumber;
|
||||
|
||||
//}
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 冠状动脉粥样硬化体积百分比(PAV)
|
||||
///// </summary>
|
||||
///// <remarks>
|
||||
///// (EEM-Lumen)求和/EEM求和✖️100,单位%
|
||||
///// </remarks>
|
||||
///// <param name="inDto"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<decimal?> GetPAV(ReadingCalculateDto inDto)
|
||||
//{
|
||||
// var eEMLumenSum = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.EEMLumenSum).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||
// var eEMSum = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.EEMSum).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||
|
||||
// if (eEMSum == 0)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return eEMLumenSum / eEMSum * 100;
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 总动脉粥样硬化体积(NTAV)
|
||||
///// </summary>
|
||||
///// <param name="inDto"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<decimal?> GetNTAV(ReadingCalculateDto inDto)
|
||||
//{
|
||||
// var result = await GetNTAVEEMLumenSumOrRetraceImageCount(inDto);
|
||||
|
||||
// var medianFrame = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.MedianFrame).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||
// if (result == null || medianFrame == 0)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return result.Value * medianFrame;
|
||||
// }
|
||||
//}
|
||||
|
||||
#region 将上一次的访视病灶添加到这一次
|
||||
|
||||
|
||||
@@ -449,17 +449,17 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
List<ReadingCalculateData> calculateList = new List<ReadingCalculateData>()
|
||||
{
|
||||
// 匹配动脉段最小FCT
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.MinFCT,GetDecimalNullFun=GetAllMinFCT},
|
||||
//// 匹配动脉段最小FCT
|
||||
//new ReadingCalculateData (){QuestionType=QuestionType.MinFCT,GetDecimalNullFun=GetAllMinFCT},
|
||||
|
||||
// 平均最小FCT
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.AverageMinFCT,GetDecimalNullFun=GetAvgMinFCT},
|
||||
// // 平均最小FCT
|
||||
// new ReadingCalculateData (){QuestionType=QuestionType.AverageMinFCT,GetDecimalNullFun=GetAvgMinFCT},
|
||||
|
||||
// 脂质角度平均值
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.AvgLipidAngle,GetDecimalNullFun=GetAvgMinLipidAngle},
|
||||
// // 脂质角度平均值
|
||||
// new ReadingCalculateData (){QuestionType=QuestionType.AvgLipidAngle,GetDecimalNullFun=GetAvgMinLipidAngle},
|
||||
|
||||
// 脂质角度最大值
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.MaxLipidAngle,GetDecimalNullFun=GetAllMaxLipidAngle},
|
||||
// // 脂质角度最大值
|
||||
// new ReadingCalculateData (){QuestionType=QuestionType.MaxLipidAngle,GetDecimalNullFun=GetAllMaxLipidAngle},
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user