Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
						commit
						a6b65378d9
					
				| 
						 | 
				
			
			@ -197,12 +197,14 @@
 | 
			
		|||
  "ReadingGlobal_NotGlobal": "System call error. The current read is not a global review read.",
 | 
			
		||||
  //ReadingImageTaskService
 | 
			
		||||
  "ReadingImage_NotVisit": "System call error. The current read is not a timepoint read.",
 | 
			
		||||
  "ReadingImage_CantSplit": "The current read is a baseline read, and lesion split is allowed.",
 | 
			
		||||
  "ReadingImage_CantSplit": "The current read is a baseline read, and lesion split is not allowed.",
 | 
			
		||||
  "ReadingImage_BeSigned": "The current read has already been signed off. Please do not submit it again.",
 | 
			
		||||
  "ReadingImage_Beinvalid": "The current read has already been invalidated, and reading is not allowed anymore.",
 | 
			
		||||
  "ReadingImage_NotaTask": "The coalesced lesions are not from the same timepoint. ",
 | 
			
		||||
  "ReadingImage_DeleteError": "Other lesions have split from or coalesced into the current lesion. Deletion failed.",
 | 
			
		||||
  "ReadingImage_Idnotcorrespond": "Failed to add the lesion mark. The Instance ID and Series ID of the image do not match.",
 | 
			
		||||
  "ReadingImage_IsLymphNotbigger": "The short diameter of this nodal non-target lesion on the current visit is smaller than the value on the previous visit, and the state cannot be set to \"Unequivocal progression\".",
 | 
			
		||||
  "ReadingImage_NotLymphNotbigger": "The long diameter of this non-nodal non-target lesion on the current visit is smaller than the value on the previous visit, and the state cannot be set to \"Unequivocal progression\".",
 | 
			
		||||
  "ReadingImage_Twice": "System call error. Questions & answers submitted are duplicated.",
 | 
			
		||||
  "ReadingImage_MaxQuestion": "According to the imaging charter, the number of the current type of lesion cannot exceed {0}.",
 | 
			
		||||
  "ReadingImage_Maxlesion": "According to the imaging charter, the number of target lesions in the same organ cannot exceed {0}. Please confirm.",
 | 
			
		||||
| 
						 | 
				
			
			@ -254,6 +256,8 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -194,8 +194,6 @@
 | 
			
		|||
 | 
			
		||||
  //SystemAnonymizationService
 | 
			
		||||
 | 
			
		||||
  //ReadingGlobalTaskService
 | 
			
		||||
  "ReadingGlobal_NotGlobal": "系统调用错误,当前任务不是全局阅片任务。",
 | 
			
		||||
  //ReadingImageTaskService
 | 
			
		||||
  "ReadingImage_NotVisit": "系统调用错误,当前任务不是访视任务。",
 | 
			
		||||
  "ReadingImage_CantSplit": "当前任务是基线任务,不能执行分裂病灶的操作。",
 | 
			
		||||
| 
						 | 
				
			
			@ -204,6 +202,8 @@
 | 
			
		|||
  "ReadingImage_NotaTask": "合并的病灶并非同一个访视任务",
 | 
			
		||||
  "ReadingImage_DeleteError": "当前病灶分裂出其他病灶或者其他病灶合并到了当前病灶,删除失败。",
 | 
			
		||||
  "ReadingImage_Idnotcorrespond": "病灶标记添加失败,影像的Instance ID和Series ID不对应。",
 | 
			
		||||
  "ReadingImage_IsLymphNotbigger": "当前访视该淋巴结病灶的短径小于上一访视的值,不能设置为显著增大。",
 | 
			
		||||
  "ReadingImage_NotLymphNotbigger": "当前访视该非淋巴结病灶的长径小于上一访视的值,不能设置为显著增大。",
 | 
			
		||||
  "ReadingImage_Twice": "系统调用错误,提交的问题及答案重复。",
 | 
			
		||||
  "ReadingImage_MaxQuestion": "按照《独立影像评估章程》的相关规则,当前病灶类型的病灶数量不超过{0}个。",
 | 
			
		||||
  "ReadingImage_Maxlesion": "按照《独立影像评估章程》的相关规则,同一器官的靶病灶数量不超过{0}个,请确认",
 | 
			
		||||
| 
						 | 
				
			
			@ -251,5 +251,6 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1370,8 +1370,135 @@ namespace IRaCIS.Application.Services
 | 
			
		|||
                    throw new BusinessValidationFailedException(_localizer["ReadingImage_Idnotcorrespond"]);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
 | 
			
		||||
 | 
			
		||||
            switch (taskinfo.TrialReadingCriterion.CriterionType)
 | 
			
		||||
            {
 | 
			
		||||
                // 对于非靶病灶,如果状态选择为显著增大,请验证:
 | 
			
		||||
                // 1) 对于非淋巴结病灶,验证当前访视该病灶的长径 > 上一访视该病灶的长径。
 | 
			
		||||
                // 约束条件:两次访视该病灶的长径有测量值。
 | 
			
		||||
                // 提示语:当前访视该非淋巴结病灶的长径小于上一访视的值,不能设置为显著增大。
 | 
			
		||||
                // 2) 对于淋巴结病灶,验证当前访视该病灶的短径 > 上一访视该病灶的短径。
 | 
			
		||||
                // 约束条件:两次访视该病灶的短径有测量值。
 | 
			
		||||
                // 提示语:当前访视该淋巴结病灶的短径小于上一访视的值,不能设置为显著增大。
 | 
			
		||||
                case CriterionType.RECIST1Pointt1:
 | 
			
		||||
                    var lastTaskinfo = await _visitTaskRepository
 | 
			
		||||
                        .Where(x => x.IsAnalysisCreate == taskinfo.IsAnalysisCreate &&
 | 
			
		||||
                        x.SubjectId==taskinfo.SubjectId&&
 | 
			
		||||
                            x.ReadingCategory == taskinfo.ReadingCategory &&
 | 
			
		||||
                            x.DoctorUserId == taskinfo.DoctorUserId &&
 | 
			
		||||
                            x.ArmEnum == taskinfo.ArmEnum &&
 | 
			
		||||
                            x.TrialReadingCriterionId==taskinfo.TrialReadingCriterionId&&
 | 
			
		||||
                            x.ReadingTaskState==ReadingTaskState.HaveSigned&&
 | 
			
		||||
                            x.TaskState == TaskState.Effect &&
 | 
			
		||||
                            x.IsSelfAnalysis == taskinfo.IsSelfAnalysis &&
 | 
			
		||||
                            x.VisitTaskNum < taskinfo.VisitTaskNum
 | 
			
		||||
                            ).OrderByDescending(x => x.VisitTaskNum).FirstOrDefaultAsync();
 | 
			
		||||
                    if (lastTaskinfo != null)
 | 
			
		||||
                    {
 | 
			
		||||
                        var tablequestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == taskinfo.TrialReadingCriterionId&&x.ReadingQuestionTrial.LesionType==LesionType.NonTargetLesions).ToListAsync();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                        // 判断表格问题是否为空
 | 
			
		||||
                        if (tablequestionList.Count > 0)
 | 
			
		||||
                        {
 | 
			
		||||
                            // 找到状态值
 | 
			
		||||
                            var stateQuestion = tablequestionList.Where(x => x.QuestionMark == QuestionMark.State).FirstOrDefault();
 | 
			
		||||
 | 
			
		||||
                            if (stateQuestion != null)
 | 
			
		||||
                            {
 | 
			
		||||
                                // 判断是否为非靶病灶
 | 
			
		||||
                                if (inDto.QuestionId == tablequestionList[0].ReadingQuestionId && inDto.AnswerList.Any(x => x.TableQuestionId== stateQuestion.Id&&x.Answer.EqEnum(NoTargetState.Increase)))
 | 
			
		||||
                                {
 | 
			
		||||
                                    var lymphQuestion = tablequestionList.Where(x => x.QuestionMark == QuestionMark.IsLymph).FirstOrDefault();
 | 
			
		||||
                                    if (lymphQuestion != null)
 | 
			
		||||
                                    {
 | 
			
		||||
 | 
			
		||||
                                        // 判断是否是淋巴结
 | 
			
		||||
                                        if (inDto.AnswerList.Any(x => x.TableQuestionId == lymphQuestion.Id && x.Answer.EqEnum(YesOrNoOrNa.Yes)))
 | 
			
		||||
                                        {
 | 
			
		||||
                                            var shortAxisQuestion = tablequestionList.Where(x => x.QuestionMark == QuestionMark.ShortAxis).FirstOrDefault();
 | 
			
		||||
                                            if (shortAxisQuestion != null)
 | 
			
		||||
                                            {
 | 
			
		||||
                                                var lastAnswer = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == lastTaskinfo.Id && x.TableQuestionId == shortAxisQuestion.Id
 | 
			
		||||
                                                  && x.RowIndex == inDto.RowIndex
 | 
			
		||||
                                                ).Select(x => x.Answer).FirstOrDefaultAsync();
 | 
			
		||||
 | 
			
		||||
                                                var thisAnswer = inDto.AnswerList.Where(x => x.TableQuestionId == shortAxisQuestion.Id).Select(x => x.Answer).FirstOrDefault();
 | 
			
		||||
                                                if (!lastAnswer.IsNullOrEmpty() && !thisAnswer.IsNullOrEmpty())
 | 
			
		||||
                                                {
 | 
			
		||||
 | 
			
		||||
                                                    var lastvalue = 0m;
 | 
			
		||||
                                                    var thisvalue = 0m;
 | 
			
		||||
                                                    try
 | 
			
		||||
                                                    {
 | 
			
		||||
                                                        lastvalue = decimal.Parse(lastAnswer);
 | 
			
		||||
                                                        thisvalue = decimal.Parse(thisAnswer);
 | 
			
		||||
                                                    }
 | 
			
		||||
                                                    catch (Exception)
 | 
			
		||||
                                                    {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                                                    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                                                    if (lastvalue >= thisvalue)
 | 
			
		||||
                                                    {
 | 
			
		||||
                                                        throw new BusinessValidationFailedException(_localizer["ReadingImage_IsLymphNotbigger"]);
 | 
			
		||||
                                                    }
 | 
			
		||||
 | 
			
		||||
           
 | 
			
		||||
                                                }
 | 
			
		||||
                                            }
 | 
			
		||||
                                        }
 | 
			
		||||
                                        else
 | 
			
		||||
 | 
			
		||||
                                        {
 | 
			
		||||
                                            var majorAxisQuestion = tablequestionList.Where(x => x.QuestionMark == QuestionMark.MajorAxis).FirstOrDefault();
 | 
			
		||||
                                            if (majorAxisQuestion != null)
 | 
			
		||||
                                            {
 | 
			
		||||
                                                var lastAnswer = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == lastTaskinfo.Id && x.TableQuestionId == majorAxisQuestion.Id
 | 
			
		||||
                                                  && x.RowIndex == inDto.RowIndex
 | 
			
		||||
                                                ).Select(x => x.Answer).FirstOrDefaultAsync();
 | 
			
		||||
 | 
			
		||||
                                                var thisAnswer = inDto.AnswerList.Where(x => x.TableQuestionId == majorAxisQuestion.Id).Select(x => x.Answer).FirstOrDefault();
 | 
			
		||||
                                                if (!lastAnswer.IsNullOrEmpty() && !thisAnswer.IsNullOrEmpty())
 | 
			
		||||
                                                {
 | 
			
		||||
                                                    var lastvalue = 0m;
 | 
			
		||||
                                                    var thisvalue = 0m;
 | 
			
		||||
                                                    try
 | 
			
		||||
                                                    {
 | 
			
		||||
                                                         lastvalue = decimal.Parse(lastAnswer);
 | 
			
		||||
                                                         thisvalue = decimal.Parse(thisAnswer);
 | 
			
		||||
                                                    }
 | 
			
		||||
                                                    catch (Exception)
 | 
			
		||||
                                                    {
 | 
			
		||||
 | 
			
		||||
                                                       
 | 
			
		||||
                                                    }
 | 
			
		||||
                                                  
 | 
			
		||||
 | 
			
		||||
                                                    if (lastvalue >= thisvalue)
 | 
			
		||||
                                                    {
 | 
			
		||||
                                                        throw new BusinessValidationFailedException(_localizer["ReadingImage_NotLymphNotbigger"]);
 | 
			
		||||
                                                    }
 | 
			
		||||
                                                   
 | 
			
		||||
                                                }
 | 
			
		||||
                                            }
 | 
			
		||||
                                        }
 | 
			
		||||
                                    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                          
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                    break;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
 | 
			
		||||
            var questionInfo = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.QuestionId).FirstNotNullAsync();
 | 
			
		||||
            var criterionId = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.TrialReadingCriterionId).FirstOrDefaultAsync();
 | 
			
		||||
            var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == criterionId).FirstNotNullAsync();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										
											BIN
										
									
								
								后端提示语.xlsx
								
								
								
								
							
							
						
						
									
										
											BIN
										
									
								
								后端提示语.xlsx
								
								
								
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
		Reference in New Issue