修改警告

This commit is contained in:
he
2023-12-05 11:03:00 +08:00
parent a8e0c1691d
commit 8cc9cb8caf
15 changed files with 125 additions and 113 deletions
@@ -231,10 +231,10 @@ namespace IRaCIS.Application.Services
ArmEnum = taskInfo.ArmEnum,
VisitNum = x.SourceSubjectVisit.VisitNum,
IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
VisitId = x.SourceSubjectVisitId.Value,
VisitId = x.SourceSubjectVisitId!.Value,
LesionCountList=x.LesionList.GroupBy(y=>y.ReadingQuestionTrial.LesionType).Select(x => new LesionDto
{
LesionType = x.Key.Value,
LesionType = x.Key!.Value,
Count = x.ToList().Count()
}).ToList(),
//CrterionDictionaryGroup= x.CrterionDictionaryGroup,
@@ -342,7 +342,7 @@ namespace IRaCIS.Application.Services
var globalAnswer = globalAnswers.Where(z => z.QuestionId == y.QuestionId&&z.TaskId==x.VisitTaskId).Select(z => z.Answer).FirstOrDefault();
if (!globalAnswer.IsNullOrEmpty())
{
y.Answer = globalAnswer;
y.Answer = globalAnswer??string.Empty;
y.IsGlobalAnswer = true;
}
@@ -627,7 +627,7 @@ namespace IRaCIS.Application.Services
{
x.IsReadingShowPreviousResults,
x.IsReadingShowSubjectInfo
}).FirstOrDefaultAsync();
}).FirstNotNullAsync();
var trialInfo = await _trialRepository.Where(x => x.Id == visitTask.TrialId).Select(x => new
{
x.ClinicalInformationTransmissionEnum,
@@ -637,7 +637,7 @@ namespace IRaCIS.Application.Services
{
VisitTaskId = visitTask.Id,
SubjectId = visitTask.SubjectId,
SubjectCode = visitTask.BlindSubjectCode.IsNullOrEmpty() ? subjectCode : visitTask.BlindSubjectCode,
SubjectCode = visitTask.BlindSubjectCode.IsNullOrEmpty() ? subjectCode??string.Empty : visitTask.BlindSubjectCode,
ReadingCategory = visitTask.ReadingCategory,
TaskBlindName = visitTask.TaskBlindName,
IsReadingShowPreviousResults = criterionInfo.IsReadingShowPreviousResults,
@@ -796,7 +796,7 @@ namespace IRaCIS.Application.Services
var groupids = questions.Where(x => x.Type != ReadingQestionType.Group).Select(x => x.GroupId).ToList();
var result = questions.Where(x => x.Type == ReadingQestionType.Group && groupids.Contains(x.Id))
.WhereIf(groupClassifyList!=null,x=>x.GroupClassify!=null&& groupClassifyList.Contains(x.GroupClassify.Value))
.WhereIf(groupClassifyList!=null,x=>x.GroupClassify!=null&& groupClassifyList!=null&& groupClassifyList.Contains(x.GroupClassify.Value))
.ToList();
foreach (var item in result)
@@ -1342,7 +1342,7 @@ namespace IRaCIS.Application.Services
answers.Add("OtherNumberOfFrames", rowInfo == null || rowInfo.OtherNumberOfFrames == null ? string.Empty : rowInfo.OtherNumberOfFrames.ToString());
answers.Add("OtherMarkTool", rowInfo == null || rowInfo.OtherMarkTool == null ? string.Empty : rowInfo.OtherMarkTool.ToString());
answers.Add("RowIndex", x.ToString());
answers.Add("RowId", rowInfo.Id.ToString());
answers.Add("RowId", rowInfo==null?string.Empty: rowInfo.Id.ToString());
answers.Add("MarkTool", rowInfo.MarkTool);
answers.Add("StudyId", rowInfo.StudyId.ToString());
answers.Add("OrganInfoId", rowInfo.OrganInfoId.ToString());
@@ -1351,8 +1351,8 @@ namespace IRaCIS.Application.Services
answers.Add("InstanceId", rowInfo == null ? string.Empty : rowInfo.InstanceId.ToString());
answers.Add("SeriesId", rowInfo == null ? string.Empty : rowInfo.SeriesId.ToString());
answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString());
answers.Add("SplitOrMergeLesionName", rowInfo.SplitName.IsNullOrEmpty() ? rowInfo.MergeName : rowInfo.SplitName);
answers.Add("SplitOrMergeType", rowInfo.SplitOrMergeType == null ? string.Empty : ((int)rowInfo.SplitOrMergeType).ToString());
answers.Add("SplitOrMergeLesionName", rowInfo == null ? string.Empty : rowInfo.SplitName.IsNullOrEmpty() ? rowInfo.MergeName : rowInfo.SplitName);
answers.Add("SplitOrMergeType", rowInfo == null ? string.Empty : rowInfo.SplitOrMergeType == null ? string.Empty : ((int)rowInfo.SplitOrMergeType).ToString());
answers.Add("LastTaskState", lastTaskTableAnswer.Where(n=>n.QuestionId== item.Id&&n.ReadingTableQuestionTrial.QuestionMark==QuestionMark.State&&n.RowIndex==x).Select(n=>n.Answer).FirstOrDefault()??string.Empty);
answers.Add("LastTaskMajorAxis", lastTaskTableAnswer.Where(n => n.QuestionId == item.Id && n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.MajorAxis && n.RowIndex == x).Select(n => n.Answer).FirstOrDefault() ?? string.Empty);
answers.Add("LastTaskShortAxis", lastTaskTableAnswer.Where(n => n.QuestionId == item.Id && n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.ShortAxis && n.RowIndex == x).Select(n => n.Answer).FirstOrDefault() ?? string.Empty);
@@ -2086,7 +2086,7 @@ namespace IRaCIS.Application.Services
}
ReadingTableAnswerRowInfo rowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == (inDto.RowId ?? default(Guid))).IgnoreAutoIncludes().FirstOrDefaultAsync();
ReadingTableAnswerRowInfo? rowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == (inDto.RowId ?? default(Guid))).IgnoreAutoIncludes().FirstOrDefaultAsync();
rowInfo = rowInfo == null ? new ReadingTableAnswerRowInfo() : rowInfo;
@@ -2499,7 +2499,7 @@ namespace IRaCIS.Application.Services
if (task.SubjectCode.IsNullOrEmpty())
{
task.SubjectCode = await _subjectRepository.Where(x => x.Id == task.SubjectId).Select(x => x.Code).FirstOrDefaultAsync();
task.SubjectCode = await _subjectRepository.Where(x => x.Id == task.SubjectId).Select(x => x.Code).FirstNotNullAsync();
}
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == task.VisitTaskId && x.FirstReadingTime == null, x => new VisitTask()
@@ -2521,7 +2521,7 @@ namespace IRaCIS.Application.Services
x.CriterionType,
x.IseCRFShowInDicomReading,
x.IsReadingTaskViewInOrder,
}).FirstOrDefaultAsync();
}).FirstNotNullAsync();
task.IsReadingShowPreviousResults = criterionInfo.IsReadingShowPreviousResults;
task.IsReadingShowSubjectInfo = criterionInfo.IsReadingShowSubjectInfo;
@@ -88,7 +88,7 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task<GetJudgeReadingInfoOutDto> GetJudgeReadingInfo(GetJudgeReadingInfo inDto)
{
var visitTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstOrDefaultAsync();
var visitTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == visitTask.TrialReadingCriterionId).Select(x => x.CriterionType).FirstNotNullAsync();
@@ -185,7 +185,7 @@ namespace IRaCIS.Application.Services
JudgeReadingInfoDto judgeReadingInfoDto = new JudgeReadingInfoDto()
{
VisitId = globalTaskInfos[0].SourceSubjectVisitId.Value,
VisitId = globalTaskInfos[0].SourceSubjectVisitId!.Value,
VisitName = globalTaskInfos[0].TaskBlindName,
VisitTaskInfoList = new List<JudgeReadingQuestion>(),
};
@@ -213,7 +213,7 @@ namespace IRaCIS.Application.Services
judgeReadingInfoDto.VisitTaskInfoList.Add(new JudgeReadingQuestion()
{
ArmEnum = towtask.ArmEnum,
ArmEnum = towtask!.ArmEnum,
VisitTaskId = towtask.Id,
JudgeQuestionList = judgeQuestionTwoAnswer.Where(x => x.VisitTaskId == towtask.Id).OrderBy(x => x.ShowOrder)
.Select(x => new JudgeQuestion()
@@ -235,7 +235,7 @@ namespace IRaCIS.Application.Services
{
JudgeReadingInfoDto judgeReadingInfoDto = new JudgeReadingInfoDto()
{
VisitId = taskList[0].SourceSubjectVisitId.Value,
VisitId = taskList[0].SourceSubjectVisitId!.Value,
VisitName = taskList[0].TaskBlindName,
VisitTaskInfoList = new List<JudgeReadingQuestion>(),
};
@@ -298,7 +298,7 @@ namespace IRaCIS.Application.Services
{
Answer = x.Answer,
QuestionId = x.QuestionId.Value,
QuestionId = x.QuestionId!.Value,
QuestionName = x.QuestionName,
QuestionGenre=x.QuestionGenre,
DictionaryCode=x.DictionaryCode,
@@ -320,7 +320,7 @@ namespace IRaCIS.Application.Services
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
{
Answer = item.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault(),
Answer = item.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault()??string.Empty,
QuestionType = JudgeReadingQuestionType.VisitRemark,
QuestionName = "",
});
@@ -338,7 +338,7 @@ namespace IRaCIS.Application.Services
{
Answer = x.Answer,
QuestionId = x.QuestionId.Value,
QuestionId = x.QuestionId==null?default(Guid): x.QuestionId.Value,
QuestionName = x.QuestionName,
QuestionGenre = x.QuestionGenre,
DictionaryCode = x.DictionaryCode,
@@ -363,7 +363,7 @@ namespace IRaCIS.Application.Services
rTwoJudge.JudgeQuestionList.Add(new JudgeQuestion()
{
Answer = twoItem.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault(),
Answer = twoItem.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault()??string.Empty,
QuestionType = JudgeReadingQuestionType.VisitRemark,
QuestionName = "",
});
@@ -682,7 +682,7 @@ namespace IRaCIS.Application.Services
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new { x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
{
QuestionId = x.Key.QuestionId.Value,
QuestionId = x.Key.QuestionId!.Value,
AnswerGroup = x.Key.AnswerGroup,
AnswerCombination = x.Key.AnswerCombination,
JudgeType = x.Key.JudgeType,
@@ -741,7 +741,7 @@ namespace IRaCIS.Application.Services
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new { x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
{
QuestionId = x.Key.QuestionId.Value,
QuestionId = x.Key.QuestionId!.Value,
AnswerGroup = x.Key.AnswerGroup,
AnswerCombination = x.Key.AnswerCombination,
JudgeType = x.Key.JudgeType,