修改
This commit is contained in:
+2
-2
@@ -87,7 +87,7 @@ namespace IRaCIS.Application.Services
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
if (taskInfo.ReadingCategory != ReadingCategory.Global)
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前任务不是全局阅片任务");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingGlobal_NotGlobal"]);
|
||||
}
|
||||
GetGlobalReadingInfoOutDto result = new GetGlobalReadingInfoOutDto()
|
||||
{
|
||||
@@ -186,7 +186,7 @@ namespace IRaCIS.Application.Services
|
||||
new GlobalQuestionInfo()
|
||||
{
|
||||
Answer = globalReadingQuestion.Where(y => y.TaskId == x.VisitTaskId && y.GlobalAnswerType == GlobalAnswerType.AgreeOrNot).Select(x => x.Answer).FirstOrDefault() ?? string.Empty,
|
||||
QuestionName = "是否同意访视整体评估",
|
||||
QuestionName = "",
|
||||
Type = "input",
|
||||
GlobalAnswerType=GlobalAnswerType.AgreeOrNot,
|
||||
GlobalReadingShowType= GlobalReadingShowType.AllShow,
|
||||
|
||||
+18
-18
@@ -311,12 +311,12 @@ namespace IRaCIS.Application.Services
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync();
|
||||
if (taskinfo.ReadingCategory != ReadingCategory.Visit)
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前任务不是访视任务");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NotVisit"]);
|
||||
}
|
||||
|
||||
if (await _subjectVisitRepository.AnyAsync(x => x.Id == taskinfo.SourceSubjectVisitId && x.IsBaseLine))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前是基线任务,无法拆分和合并病灶");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_CantSplit"]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,13 +332,13 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _visitTaskRepository.AnyAsync(x => x.Id == visitTaskid && x.ReadingTaskState == ReadingTaskState.HaveSigned))
|
||||
{
|
||||
throw new BusinessValidationFailedException($"当前任务已经签名!");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_BeSigned"]);
|
||||
}
|
||||
|
||||
|
||||
if (await _visitTaskRepository.AnyAsync(x => x.Id == visitTaskid && x.TaskState != TaskState.Effect))
|
||||
{
|
||||
throw new BusinessValidationFailedException($"当前任务已失效!");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_Beinvalid"]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -813,7 +813,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (rowsInfo.Count() != 2)
|
||||
{
|
||||
throw new BusinessValidationFailedException("合并的病灶并非同一个访视任务");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NotaTask"]);
|
||||
}
|
||||
|
||||
|
||||
@@ -938,7 +938,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (await _readingTableAnswerRowInfoRepository.AnyAsync(x => x.SplitRowId == deleteRowInfo.Id && x.MergeRowId == deleteRowInfo.Id))
|
||||
{
|
||||
throw new BusinessValidationFailedException($"当前病灶分裂出其他病灶或者其他病灶合并到了当前病灶,删除失败");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_DeleteError"]);
|
||||
}
|
||||
|
||||
var index = await _readingCalculateService.GetDeleteLesionStatrIndex(inDto);
|
||||
@@ -1072,7 +1072,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (!(await _dicomInstanceRepository.AnyAsync(x => x.Id == inDto.InstanceId && x.SeriesId == inDto.SeriesId)))
|
||||
{
|
||||
throw new BusinessValidationFailedException($"InstanceId和SeriesId不对应!");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_Idnotcorrespond"]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1090,7 +1090,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (tableQuestionIdGroup.Any(x => x.Count > 1))
|
||||
{
|
||||
throw new BusinessValidationFailedException($"相同问题传入两次!");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_Twice"]);
|
||||
}
|
||||
|
||||
if (inDto.RowIndex % 1 == 0)
|
||||
@@ -1104,7 +1104,7 @@ namespace IRaCIS.Application.Services
|
||||
&& x.QuestionId == inDto.QuestionId
|
||||
).CountAsync()) + 1))
|
||||
{
|
||||
throw new BusinessValidationFailedException($"当前提交问题最大问题数为{questionInfo.MaxQuestionCount}!");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_MaxQuestion", questionInfo.MaxQuestionCount]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1123,7 +1123,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
Dictionary<CriterionType, string> errorMsgDic = new Dictionary<CriterionType, string>()
|
||||
{
|
||||
{CriterionType.RECIST1Pointt1, $"按照RECIST1.1的相关规则,同一器官的靶病灶数量不超过{item.MaxRowCount.Value}个,请确认!"},
|
||||
{CriterionType.RECIST1Pointt1, _localizer["ReadingImage_Maxlesion", item.MaxRowCount.Value]},
|
||||
};
|
||||
string msg = string.Empty;
|
||||
try
|
||||
@@ -1133,7 +1133,7 @@ namespace IRaCIS.Application.Services
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
msg = $"问题{item.QuestionName}最大相同问题数为{item.MaxRowCount.Value},当前已存在{rowCount}条!";
|
||||
msg = _localizer["ReadingImage_Maximum", item.QuestionName, item.MaxRowCount.Value, rowCount] ;
|
||||
}
|
||||
|
||||
throw new BusinessValidationFailedException(msg);
|
||||
@@ -1353,7 +1353,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (readingQuestionList.Count() > 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException($" 必填问题{string.Join(',', readingQuestionList.Select(x => x.QuestionName))}的答案为空或未保存");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_RequiredQuestion", string.Join(',', readingQuestionList.Select(x => x.QuestionName))]);
|
||||
}
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
@@ -1380,7 +1380,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (readingQuestionList.Count() > 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException($" 必填问题{string.Join(',', readingQuestionList.Select(x => x.QuestionName))}的答案为空或未保存");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_RequiredQuestion", string.Join(',', readingQuestionList.Select(x => x.QuestionName))]);
|
||||
}
|
||||
|
||||
await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
|
||||
@@ -1412,7 +1412,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (isNeedReadClinicalData && !taskInfo.IsReadClinicalData)
|
||||
{
|
||||
throw new BusinessValidationFailedException($"临床数据未阅读!");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_ClinicalRead"]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1443,7 +1443,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (trialReadingCriterionId == null && inDto.VisitTaskId == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("当没有任务Id的时候,标准Id必传");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_IDMust"]);
|
||||
}
|
||||
|
||||
if (inDto.VisitTaskId != null)
|
||||
@@ -1484,7 +1484,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (currentSubject == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前受试者此次阅片任务已全部完成!");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"]);
|
||||
}
|
||||
|
||||
task = currentSubject.UnReadTaskList.Select(x => new GetReadingTaskDto()
|
||||
@@ -1519,7 +1519,7 @@ namespace IRaCIS.Application.Services
|
||||
}).FirstOrDefaultAsync();
|
||||
if (task == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前受试者此次阅片任务已全部完成!");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1609,7 +1609,7 @@ namespace IRaCIS.Application.Services
|
||||
int timespanMin = (DateTime.Now - cacheDate).Minutes;
|
||||
if (timespanMin > 120 && timespanMin < 140)
|
||||
{
|
||||
throw new BusinessValidationFailedException("您已连续阅片2个小时,请休息20分钟后,再继续阅片。");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest"]);
|
||||
}
|
||||
else if (timespanMin > 140)
|
||||
{
|
||||
|
||||
@@ -274,7 +274,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
Answer = item.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault(),
|
||||
QuestionType = JudgeReadingQuestionType.VisitRemark,
|
||||
QuestionName = "全局阅片备注",
|
||||
QuestionName = "",
|
||||
});
|
||||
|
||||
judgeReadingInfo.VisitTaskInfoList.Add(judgeReadingQuestion);
|
||||
@@ -309,7 +309,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
Answer = twoItem.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault(),
|
||||
QuestionType = JudgeReadingQuestionType.VisitRemark,
|
||||
QuestionName = "全局阅片备注",
|
||||
QuestionName = "",
|
||||
});
|
||||
|
||||
judgeReadingInfo.VisitTaskInfoList.Add(rTwoJudge);
|
||||
@@ -375,7 +375,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (taskInfo.SouceReadModuleId == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException($"当前裁判的全局任务的SouceId为null");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingJudge_SouceIdNull"]);
|
||||
}
|
||||
|
||||
var visitId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (taskInfo.ReadingCategory != ReadingCategory.Oncology)
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前任务不是肿瘤学任务");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingOncology_TaskError"]);
|
||||
}
|
||||
|
||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||
@@ -75,7 +75,7 @@ namespace IRaCIS.Application.Services
|
||||
var judgeResultTaskId = await _visitTaskRepository.Where(x => x.Id == globalTaskInfo.JudgeVisitTaskId).Select(x => x.JudgeResultTaskId).FirstOrDefaultAsync();
|
||||
if (judgeResultTaskId == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("异常,裁判结果为null");
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingOncology_Abnormal"]);
|
||||
}
|
||||
visitTask = await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user