diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs
index dd903fa93..baea61a56 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs
@@ -244,11 +244,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public class OCTFCTUploadData
{
- ///
- /// 斑块编号
- ///
- public int PlaqueNum { get; set; }
-
///
/// 第一次
///
@@ -290,7 +285,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public decimal? LumenAreaMeasurement { get; set; }
-
+ ///
+ /// 脂质角度
+ ///
+ public decimal? LipidAngle { get; set; }
public decimal Avg { get {
diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs
index 9364b1357..1b22edf3e 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs
@@ -338,15 +338,16 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{
measuredValueList.Add(new OCTFCTUploadData()
{
- PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
- FirstData = getdecimalData(dataTable.Rows[i]["B"].ToString()),
- SecondData = getdecimalData(dataTable.Rows[i]["C"].ToString()),
- ThirdData = getdecimalData(dataTable.Rows[i]["D"].ToString()),
- MacrophageInfiltrationMeasurement = dataTable.Rows[i]["E"].ToString() ?? string.Empty,
- MacrophageInfiltrationAngle = getdecimalEmptyData(dataTable.Rows[i]["F"].ToString() ?? string.Empty),
- MicrochannelMeasurement =dataTable.Rows[i]["G"].ToString() ?? string.Empty,
- CholesterolCrystalMeasurement = dataTable.Rows[i]["H"].ToString() ?? string.Empty,
- LumenAreaMeasurement = getdecimalEmptyData(dataTable.Rows[i]["I"].ToString() ?? string.Empty),
+ //PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
+ FirstData = getdecimalData(dataTable.Rows[i]["A"].ToString()),
+ SecondData = getdecimalData(dataTable.Rows[i]["B"].ToString()),
+ ThirdData = getdecimalData(dataTable.Rows[i]["C"].ToString()),
+ MacrophageInfiltrationMeasurement = dataTable.Rows[i]["D"].ToString() ?? string.Empty,
+ MacrophageInfiltrationAngle = getdecimalEmptyData(dataTable.Rows[i]["E"].ToString() ?? string.Empty),
+ MicrochannelMeasurement =dataTable.Rows[i]["F"].ToString() ?? string.Empty,
+ CholesterolCrystalMeasurement = dataTable.Rows[i]["G"].ToString() ?? string.Empty,
+ LumenAreaMeasurement = getdecimalEmptyData(dataTable.Rows[i]["H"].ToString() ?? string.Empty),
+ LipidAngle = getdecimalEmptyData(dataTable.Rows[i]["I"].ToString() ?? string.Empty),
});
}
catch (Exception)
@@ -356,7 +357,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
}
}
- measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
+
@@ -366,12 +367,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
throw new BusinessValidationFailedException(_localizer["Service_TemplateException", errorRows]);
}
- List nums = new List() { 1, 2, 3 };
- if (measuredValueList.Any(x => !nums.Contains(x.PlaqueNum)))
- {
- throw new BusinessValidationFailedException(_localizer["IVUSOCT_PlaqueNum123"]);
- }
-
Dictionary isPresent = new Dictionary()
{
{ "有","1"},
@@ -442,16 +437,16 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
});
// 编号
- tableAnswers.Add(new ReadingTableQuestionAnswer()
- {
- Answer = item.PlaqueNum.ToString(),
- QuestionId = questionInfo.Id,
- TrialId = taskinfo.TrialId,
- VisitTaskId = taskinfo.Id,
- RowId = newRowId,
- RowIndex = maxnum,
- TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.PlaqueNumber).Select(x => x.Id).FirstOrDefault(),
- });
+ //tableAnswers.Add(new ReadingTableQuestionAnswer()
+ //{
+ // Answer = item.PlaqueNum.ToString(),
+ // QuestionId = questionInfo.Id,
+ // TrialId = taskinfo.TrialId,
+ // VisitTaskId = taskinfo.Id,
+ // RowId = newRowId,
+ // RowIndex = maxnum,
+ // TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.PlaqueNumber).Select(x => x.Id).FirstOrDefault(),
+ //});
var avg = item.Avg.ToString();
@@ -570,6 +565,18 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.LumenAreaMeasurement).Select(x => x.Id).FirstOrDefault(),
});
+ // 脂质角度
+ tableAnswers.Add(new ReadingTableQuestionAnswer()
+ {
+ Answer = item.LipidAngle.ToString(),
+ QuestionId = questionInfo.Id,
+ TrialId = taskinfo.TrialId,
+ VisitTaskId = taskinfo.Id,
+ RowId = newRowId,
+ RowIndex = maxnum,
+ TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.LipidAngle).Select(x => x.Id).FirstOrDefault(),
+ });
+
}
catch (Exception)
{
@@ -636,173 +643,176 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
[HttpPost]
public async Task UploadOCTLipidAngleTemplate()
{
- var request = httpContext.HttpContext!.Request;
- var file = request.Form.Files[0];
- Guid visitTaskId = Guid.Parse(request.Form["VisitTaskId"]);
- var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Include(x => x.Subject).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
- var uploadInfo = await _generalCalculateService.GetDataTableFromUpload(file, "OCTLipidAngle", taskinfo.TrialId);
- List sheetNames = new List()
- {
- "脂质角度","LipidAngle"
- };
+ #region 这个导入没有了 代码全部注释
+ //var request = httpContext.HttpContext!.Request;
+ //var file = request.Form.Files[0];
+ //Guid visitTaskId = Guid.Parse(request.Form["VisitTaskId"]);
+ //var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Include(x => x.Subject).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
+ //var uploadInfo = await _generalCalculateService.GetDataTableFromUpload(file, "OCTLipidAngle", taskinfo.TrialId);
+ //List sheetNames = new List()
+ //{
+ // "脂质角度","LipidAngle"
+ //};
- if (sheetNames.Intersect(uploadInfo.SheetNames).Count() == 0)
- {
- throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]);
- }
- var dataTable = uploadInfo.DataTable;
+ //if (sheetNames.Intersect(uploadInfo.SheetNames).Count() == 0)
+ //{
+ // throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]);
+ //}
+ //var dataTable = uploadInfo.DataTable;
- var values = new TemplateData()
- {
- SubjectID = taskinfo.BlindSubjectCode.IsNullOrEmpty() ? taskinfo.Subject.Code : taskinfo.BlindSubjectCode,
- TaskBlindName = taskinfo.TaskBlindName,
- };
+ //var values = new TemplateData()
+ //{
+ // SubjectID = taskinfo.BlindSubjectCode.IsNullOrEmpty() ? taskinfo.Subject.Code : taskinfo.BlindSubjectCode,
+ // TaskBlindName = taskinfo.TaskBlindName,
+ //};
- if (values.SubjectID != dataTable.Rows[0]["B"].ToString() || values.TaskBlindName != dataTable.Rows[1]["B"].ToString())
- {
- throw new BusinessValidationFailedException(_localizer["IVUS_UploadVisitTaskError"]);
- }
+ //if (values.SubjectID != dataTable.Rows[0]["B"].ToString() || values.TaskBlindName != dataTable.Rows[1]["B"].ToString())
+ //{
+ // throw new BusinessValidationFailedException(_localizer["IVUS_UploadVisitTaskError"]);
+ //}
- var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
- decimal getdecimalData(string value)
- {
- return decimal.Parse(decimal.Round(decimal.Parse(value ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString()));
- }
- ;
+ //var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
+ //decimal getdecimalData(string value)
+ //{
+ // return decimal.Parse(decimal.Round(decimal.Parse(value ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString()));
+ //}
+ //;
- List measuredValueList = new List();
- var errorRow = new List { };
+ //List measuredValueList = new List();
+ //var errorRow = new List { };
- for (int i = 3; i < dataTable.Rows.Count; i++)
- {
- try
- {
- measuredValueList.Add(new OCTFCTUploadData()
- {
- PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
- FirstData = getdecimalData(dataTable.Rows[i]["B"].ToString()),
+ //for (int i = 3; i < dataTable.Rows.Count; i++)
+ //{
+ // try
+ // {
+ // measuredValueList.Add(new OCTFCTUploadData()
+ // {
+ // PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
+ // FirstData = getdecimalData(dataTable.Rows[i]["B"].ToString()),
- });
- }
- catch (Exception)
- {
+ // });
+ // }
+ // catch (Exception)
+ // {
- errorRow.Add(i+1);
- }
+ // errorRow.Add(i + 1);
+ // }
- }
+ //}
- measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
+ //measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
- if (errorRow.Count() > 0)
- {
- var errorRows = string.Join(',', errorRow.Select(i => i.ToString()));
- throw new BusinessValidationFailedException(_localizer["Service_TemplateException", errorRows]);
- }
+ //if (errorRow.Count() > 0)
+ //{
+ // var errorRows = string.Join(',', errorRow.Select(i => i.ToString()));
+ // throw new BusinessValidationFailedException(_localizer["Service_TemplateException", errorRows]);
+ //}
- List nums = new List() { 1, 2, 3 };
- if (measuredValueList.Any(x => !nums.Contains(x.PlaqueNum)))
- {
- throw new BusinessValidationFailedException(_localizer["IVUSOCT_PlaqueNum123"]);
- }
+ //List nums = new List() { 1, 2, 3 };
+ //if (measuredValueList.Any(x => !nums.Contains(x.PlaqueNum)))
+ //{
+ // throw new BusinessValidationFailedException(_localizer["IVUSOCT_PlaqueNum123"]);
+ //}
- foreach (var item in measuredValueList)
- {
- if (item.FirstData > 360)
- {
- throw new BusinessValidationFailedException(_localizer["IVUS_LipidAngleLess360"]);
- }
- }
+ //foreach (var item in measuredValueList)
+ //{
+ // if (item.FirstData > 360)
+ // {
+ // throw new BusinessValidationFailedException(_localizer["IVUS_LipidAngleLess360"]);
+ // }
+ //}
- var questionInfo = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.LesionType == LesionType.LipidAngle).FirstNotNullAsync();
- var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == questionInfo.Id).ToListAsync();
- List tableAnsweRowInfos = new List();
- List tableAnswers = new List();
+ //var questionInfo = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.LesionType == LesionType.LipidAngle).FirstNotNullAsync();
+ //var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == questionInfo.Id).ToListAsync();
+ //List tableAnsweRowInfos = new List();
+ //List tableAnswers = new List();
- var maxnum = 0;
+ //var maxnum = 0;
- foreach (var item in measuredValueList)
- {
- maxnum = maxnum + 1;
- var newRowId = NewId.NextGuid();
- // 斑块数据统计
- tableAnsweRowInfos.Add(new ReadingTableAnswerRowInfo()
- {
- Id = newRowId,
- QuestionId = questionInfo.Id,
- VisitTaskId = taskinfo.Id,
- TrialId = taskinfo.TrialId,
- RowIndex = maxnum,
- IsCurrentTaskAdd = true,
- BlindName = taskinfo.TaskBlindName,
- OrderMark = questionInfo.OrderMark,
- FristAddTaskId = taskinfo.Id,
- RowMark = questionInfo.OrderMark + decimal.Parse(maxnum.ToString()).GetLesionMark()
- });
+ //foreach (var item in measuredValueList)
+ //{
+ // maxnum = maxnum + 1;
+ // var newRowId = NewId.NextGuid();
+ // // 斑块数据统计
+ // tableAnsweRowInfos.Add(new ReadingTableAnswerRowInfo()
+ // {
+ // Id = newRowId,
+ // QuestionId = questionInfo.Id,
+ // VisitTaskId = taskinfo.Id,
+ // TrialId = taskinfo.TrialId,
+ // RowIndex = maxnum,
+ // IsCurrentTaskAdd = true,
+ // BlindName = taskinfo.TaskBlindName,
+ // OrderMark = questionInfo.OrderMark,
+ // FristAddTaskId = taskinfo.Id,
+ // RowMark = questionInfo.OrderMark + decimal.Parse(maxnum.ToString()).GetLesionMark()
+ // });
- // 编号
- tableAnswers.Add(new ReadingTableQuestionAnswer()
- {
- Answer = item.PlaqueNum.ToString(),
- QuestionId = questionInfo.Id,
- TrialId = taskinfo.TrialId,
- VisitTaskId = taskinfo.Id,
- RowId = newRowId,
- RowIndex = maxnum,
- TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.PlaqueNumber).Select(x => x.Id).FirstOrDefault(),
- });
+ // // 编号
+ // tableAnswers.Add(new ReadingTableQuestionAnswer()
+ // {
+ // Answer = item.PlaqueNum.ToString(),
+ // QuestionId = questionInfo.Id,
+ // TrialId = taskinfo.TrialId,
+ // VisitTaskId = taskinfo.Id,
+ // RowId = newRowId,
+ // RowIndex = maxnum,
+ // TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.PlaqueNumber).Select(x => x.Id).FirstOrDefault(),
+ // });
- var avg = item.Avg.ToString();
+ // var avg = item.Avg.ToString();
- if (taskinfo.TrialReadingCriterion.DigitPlaces != -1)
- {
- avg = decimal.Round(decimal.Parse(avg ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
+ // if (taskinfo.TrialReadingCriterion.DigitPlaces != -1)
+ // {
+ // avg = decimal.Round(decimal.Parse(avg ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
- }
+ // }
- // 脂质角度
- tableAnswers.Add(new ReadingTableQuestionAnswer()
- {
- Answer = item.FirstData.ToString(),
- QuestionId = questionInfo.Id,
- TrialId = taskinfo.TrialId,
- VisitTaskId = taskinfo.Id,
- RowId = newRowId,
- RowIndex = maxnum,
- TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.LipidAngle).Select(x => x.Id).FirstOrDefault(),
- });
+ // // 脂质角度
+ // tableAnswers.Add(new ReadingTableQuestionAnswer()
+ // {
+ // Answer = item.FirstData.ToString(),
+ // QuestionId = questionInfo.Id,
+ // TrialId = taskinfo.TrialId,
+ // VisitTaskId = taskinfo.Id,
+ // RowId = newRowId,
+ // RowIndex = maxnum,
+ // TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.LipidAngle).Select(x => x.Id).FirstOrDefault(),
+ // });
- // 添加其他问题答案
- foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
- {
- tableAnswers.Add(new ReadingTableQuestionAnswer()
- {
- Answer = string.Empty,
- QuestionId = questionInfo.Id,
- TrialId = taskinfo.TrialId,
- VisitTaskId = taskinfo.Id,
- RowId = newRowId,
- RowIndex = maxnum,
- TableQuestionId = otherQuestion.Id,
- });
- }
- }
- await _readingTableAnswerRowInfoRepository.DeleteFromQueryAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
- await _readingTableQuestionAnswerRepository.DeleteFromQueryAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
- await _readingTableQuestionAnswerRepository.SaveChangesAsync();
- await _readingTableAnswerRowInfoRepository.AddRangeAsync(tableAnsweRowInfos);
- await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
- await _readingTableQuestionAnswerRepository.SaveChangesAsync();
+ // // 添加其他问题答案
+ // foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
+ // {
+ // tableAnswers.Add(new ReadingTableQuestionAnswer()
+ // {
+ // Answer = string.Empty,
+ // QuestionId = questionInfo.Id,
+ // TrialId = taskinfo.TrialId,
+ // VisitTaskId = taskinfo.Id,
+ // RowId = newRowId,
+ // RowIndex = maxnum,
+ // TableQuestionId = otherQuestion.Id,
+ // });
+ // }
+ //}
+ //await _readingTableAnswerRowInfoRepository.DeleteFromQueryAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
+ //await _readingTableQuestionAnswerRepository.DeleteFromQueryAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
+ //await _readingTableQuestionAnswerRepository.SaveChangesAsync();
+ //await _readingTableAnswerRowInfoRepository.AddRangeAsync(tableAnsweRowInfos);
+ //await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
+ //await _readingTableQuestionAnswerRepository.SaveChangesAsync();
- await this.CalculateTask(new CalculateTaskInDto()
- {
+ //await this.CalculateTask(new CalculateTaskInDto()
+ //{
+
+ // VisitTaskId = taskinfo.Id,
+ //});
+ #endregion
- VisitTaskId = taskinfo.Id,
- });
}
@@ -814,7 +824,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
///
public async Task ReadingCalculate(ReadingCalculateDto inDto, List? calculateType = null)
{
- return;
+
#region 计算 这里顺序非常重要 后面计算的值要依赖前面计算的结果
var needAddList = new List();
@@ -824,23 +834,33 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
ComputationTrigger.SaveEICRFQuestions,
};
- if (!computationTriggers.Contains(inDto.ComputationTrigger))
- {
- // 计算斑块统计数据
- await this.CalculatePatchDataStatistics(inDto);
- inDto = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
- }
+ //if (!computationTriggers.Contains(inDto.ComputationTrigger))
+ //{
+ // // 计算斑块统计数据
+ // await this.CalculatePatchDataStatistics(inDto);
+ // inDto = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
+ //}
List calculateList = new List()
{
- // 斑块1-匹配动脉段最小FCT
- new ReadingCalculateData (){QuestionType=QuestionType.Plaque1MinFCT,GetDecimalNullFun=GetPlaque1MinFCT},
+ //// 斑块1-匹配动脉段最小FCT
+ //new ReadingCalculateData (){QuestionType=QuestionType.Plaque1MinFCT,GetDecimalNullFun=GetPlaque1MinFCT},
- // 斑块2-匹配动脉段最小FCT
- new ReadingCalculateData (){QuestionType=QuestionType.Plaque2MinFCT,GetDecimalNullFun=GetPlaque2MinFCT},
+ // // 斑块2-匹配动脉段最小FCT
+ //new ReadingCalculateData (){QuestionType=QuestionType.Plaque2MinFCT,GetDecimalNullFun=GetPlaque2MinFCT},
- // 斑块3-匹配动脉段最小FCT
- new ReadingCalculateData (){QuestionType=QuestionType.Plaque3MinFCT,GetDecimalNullFun=GetPlaque3MinFCT},
+ // // 斑块3-匹配动脉段最小FCT
+ //new ReadingCalculateData (){QuestionType=QuestionType.Plaque3MinFCT,GetDecimalNullFun=GetPlaque3MinFCT},
+
+
+ // 匹配动脉段最小FCT
+ new ReadingCalculateData (){QuestionType=QuestionType.MatchingTheMinimumFCT,GetDecimalNullFun=GetMinFCT},
+
+ // 平均最小FCT
+ new ReadingCalculateData (){QuestionType=QuestionType.AvgMinFCT,GetDecimalNullFun=GetAvgFCT},
+
+ // 脂质角度平均值
+ new ReadingCalculateData (){QuestionType=QuestionType.AvgLipidAngle,GetDecimalNullFun=GetAvgLipidAngle},
};
@@ -1220,6 +1240,41 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
.Where(x => x.QuestionMark == QuestionMark.MiniMumFCT).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturnNull();
}
+
+ ///
+ /// 匹配动脉段最小FCT (平均值的最小值)
+ ///
+ ///
+ ///
+ public async Task GetMinFCT(ReadingCalculateDto inDto)
+ {
+ return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.FCT).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList)
+ .Where(x => x.QuestionMark == QuestionMark.AvgFCT).Select(x => x.Answer.IsNullOrEmptyReturn0()).MinOrDefault();
+ }
+
+ ///
+ /// 平均最小FCT (平均值的平均值)
+ ///
+ ///
+ ///
+ public async Task GetAvgFCT(ReadingCalculateDto inDto)
+ {
+ return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.FCT).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList)
+ .Where(x => x.QuestionMark == QuestionMark.AvgFCT).Select(x => x.Answer.IsNullOrEmptyReturn0()).Average();
+ }
+
+ ///
+ /// 脂质角度平均值
+ ///
+ ///
+ ///
+ public async Task GetAvgLipidAngle(ReadingCalculateDto inDto)
+ {
+ return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.FCT).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList)
+ .Where(x => x.QuestionMark == QuestionMark.LipidAngle).Select(x => x.Answer.IsNullOrEmptyReturn0()).Average();
+ }
+
+
///
/// 验证访视提交
///
diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
index e71caced5..efce1bca0 100644
--- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
+++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
@@ -2970,6 +2970,41 @@ namespace IRaCIS.Core.Domain.Share
///
TargetSegmentRemarks = 1012,
+ ///
+ /// ROI起始回撤距离
+ ///
+ ROIStart = 1013,
+
+ ///
+ /// ROI终止回撤距离
+ ///
+ ROIEnd = 1014,
+
+ ///
+ /// ROI段落总长度
+ ///
+ ROIAllLength = 1015,
+
+ ///
+ /// 匹配动脉段最小FCT
+ ///
+ MatchingTheMinimumFCT = 1022,
+
+ ///
+ /// 平均最小FCT
+ ///
+ AvgMinFCT = 1023,
+
+ ///
+ /// 脂质角度平均值
+ ///
+ AvgLipidAngle = 1024,
+
+ ///
+ /// 脂质角度最大值
+ ///
+ MaxLipidAngle = 1025,
+
///
/// 脂肪分数总平均值
///