diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index 9dfacdcfe..81092d152 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -1546,6 +1546,20 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public QuestionClassify? QuestionClassify { get; set; }
}
+ public class GetFilterTableQuestionInDto
+ {
+ public Guid TrialId { get; set; }
+
+ public Guid VisitTaskId { get; set; }
+
+ public Guid QuestionId { get; set; }
+
+ ///
+ /// 问题分类
+ ///
+ public QuestionClassify? QuestionClassify { get; set; }
+ }
+
#endregion
public class GetHistoryGlobalInfoOutDto
{
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
index d2a04e586..92b8767fc 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
@@ -1401,6 +1401,38 @@ namespace IRaCIS.Core.Application.Service
}); ;
}
+ ///
+ /// 获取单个表格问题及答案 过滤问题
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task GetFilterTableQuestion(GetFilterTableQuestionInDto inDto)
+ {
+ var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
+ var tableAnswers = await _readingTableQuestionAnswerRepository
+ .ProjectTo(_mapper.ConfigurationProvider)
+ .Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
+ var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
+ var organIds = tableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
+ var organList = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync();
+ var questionPage = await GetReadingTableQuestion(
+ new GetReadingTableQuestionOrAnswerInDto()
+ {
+ TrialReadingCriterionId = taskinfo.TrialReadingCriterionId,
+ TaskId = inDto.VisitTaskId,
+ TableAnswers = tableAnswers,
+ TableAnsweRowInfos = tableAnsweRowInfos,
+ OrganInfos = organList,
+ QuestionClassify = inDto.QuestionClassify,
+ });
+
+
+ var result = questionPage.SinglePage.SelectMany(x => x.Childrens).Where(x => x.Id == inDto.QuestionId).FirstOrDefault();
+
+ return ResponseOutput.Ok(result);
+ }
+
///
/// 获取自定义问题以及答案
///
diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs
index 4604158c4..ed0469fe2 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs
@@ -518,6 +518,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
};
+ Dictionary yesOrNo = new Dictionary()
+ {
+ { "是","1"},
+ { "否","0"},
+ { "Yes","1"},
+ { "No","0"},
+ };
+
List measuredValueList = new List();
var errorRow = new List { };
@@ -526,6 +534,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
IVUSMeasuredValue iVUSMeasuredValue = new IVUSMeasuredValue() { };
try
{
+ // 手动抛出异常进入catch
+ if (!yesOrNo.ContainsKey(dataTable.Rows[i]["D"].ToString()))
+ {
+ throw new InvalidOperationException("NullError");
+ }
+
iVUSMeasuredValue = new IVUSMeasuredValue()
{
//PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
@@ -651,7 +665,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
// 斑块破裂
tableAnswers.Add(new ReadingTableQuestionAnswer()
{
- Answer = isPresent[item.PlaqueRupture.ToString()],
+ Answer = yesOrNo[item.PlaqueRupture.ToString()],
QuestionId = questionInfo.Id,
TrialId = taskinfo.TrialId,
VisitTaskId = taskinfo.Id,
diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs
index aeed5b0ae..862855b7d 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs
@@ -336,6 +336,15 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
List measuredValueList = new List();
var errorRow = new List { };
+ Dictionary yesOrNo = new Dictionary()
+ {
+ { "是","1"},
+ { "否","0"},
+ { "Yes","1"},
+ { "No","0"},
+ };
+
+
string getNone(string value)
{
if (value == string.Empty || value == null)
@@ -351,6 +360,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{
try
{
+
+ // 手动抛出异常进入catch
+ if (!yesOrNo.ContainsKey(dataTable.Rows[i]["K"].ToString())|| !yesOrNo.ContainsKey(dataTable.Rows[i]["L"].ToString()))
+ {
+ throw new InvalidOperationException("NullError");
+ }
+
measuredValueList.Add(new OCTFCTUploadData()
{
//PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
@@ -604,7 +620,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
// 斑块破裂
tableAnswers.Add(new ReadingTableQuestionAnswer()
{
- Answer = isPresent[item.PlaqueRupture.ToString()],
+ Answer = yesOrNo[item.PlaqueRupture.ToString()],
QuestionId = questionInfo.Id,
TrialId = taskinfo.TrialId,
VisitTaskId = taskinfo.Id,
@@ -616,7 +632,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
// 斑块愈合
tableAnswers.Add(new ReadingTableQuestionAnswer()
{
- Answer = isPresent[item.PlaqueHealing.ToString()],
+ Answer = yesOrNo[item.PlaqueHealing.ToString()],
QuestionId = questionInfo.Id,
TrialId = taskinfo.TrialId,
VisitTaskId = taskinfo.Id,