diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 225dfc3f6..f54a1f2c1 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -2598,6 +2598,11 @@
病灶Index
+
+
+ 病灶类型
+
+
是否获取预览
@@ -9695,7 +9700,7 @@
-
+
获取子元素
diff --git a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs
index d12f6a849..5c851af25 100644
--- a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs
@@ -539,10 +539,10 @@ namespace IRaCIS.Application.Services
}
Dictionary keys = new Dictionary() {
- {ClinicalLevel.Subject,0 },
- {ClinicalLevel.ImageRead,1 },
- {ClinicalLevel.OncologyRead,2 },
- {ClinicalLevel.SubjectVisit,3 },
+ {ClinicalLevel.SubjectVisit,0 },
+ {ClinicalLevel.ImageRead,2 },
+ {ClinicalLevel.OncologyRead,3 },
+ {ClinicalLevel.Subject,4 },
};
result.OrderBy(x => keys[x.ClinicalDataLevel]).ToList();
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index a0617a406..c89077615 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -643,7 +643,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string MergeName { get; set; }
-
+ ///
+ /// 病灶类型
+ ///
+ public LesionType? LesionType { get; set; }
}
public class GetReadingTableQuestionOrAnswerInDto
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs
index d6c2407be..46fa86f47 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs
@@ -52,7 +52,7 @@ namespace IRaCIS.Application.Services
{
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId && x.TaskId == item.VisitTaskId && x.GlobalAnswerType == answer.GlobalAnswerType && x.QuestionId == answer.QuestionId);
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == answer.QuestionId
- && x.Answer != answer.Answer && x.Answer != string.Empty
+ && x.Answer != answer.Answer && answer.Answer != string.Empty&& answer.Answer!=null
, x => new ReadingTaskQuestionAnswer()
{
GlobalChangeAnswer = answer.Answer,
@@ -96,10 +96,13 @@ namespace IRaCIS.Application.Services
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId && x.TaskId == visitTaskId && x.GlobalAnswerType == item.GlobalAnswerType && x.QuestionId == item.QuestionId);
- await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == item.QuestionId, x => new ReadingTaskQuestionAnswer()
- {
- GlobalChangeAnswer = item.Answer
- });
+ await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == item.QuestionId
+ && x.Answer != item.Answer && item.Answer != string.Empty && item.Answer != null
+ , x => new ReadingTaskQuestionAnswer()
+ {
+ GlobalChangeAnswer = item.Answer,
+ IsGlobalChange = true,
+ });
}
await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo()
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
index 726532914..db2c6f0a3 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
@@ -804,6 +804,27 @@ namespace IRaCIS.Application.Services
.OrderBy(x => x.ShowOrder).ToListAsync();
var result = new GetReadingTableQuestionOutDto();
+
+
+ List baseLineTableAnswer = new List();
+
+ if(inDto.TaskId!=null)
+ {
+ var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.TaskId).FirstNotNullAsync();
+ // 取基线
+ var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskInfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstNotNullAsync();
+
+ var baselineTaskId = await _visitTaskRepository.Where(x => x.SourceSubjectVisitId == baseLineVisitId
+ && x.ArmEnum == taskInfo.ArmEnum
+ && x.DoctorUserId == taskInfo.DoctorUserId
+ && x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
+ && x.TaskState == TaskState.Effect
+ &&x.TrialReadingCriterionId== taskInfo.TrialReadingCriterionId
+ ).Select(x => x.Id).FirstNotNullAsync();
+
+ baseLineTableAnswer = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == baselineTaskId).Include(x=>x.ReadingTableQuestionTrial).ToListAsync();
+
+ }
if (criterionInfo.FormType == FormType.MultiplePage)
{
qusetionList = qusetionList.Where(x => x.ReadingCriterionPageId != null).ToList();
@@ -822,7 +843,7 @@ namespace IRaCIS.Application.Services
var pageGroupList = newPageQusetionList.Where(x => x.Type == ReadingQestionType.Group || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
pageGroupList.ForEach(x =>
{
- this.FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos,inDto.OrganInfos);
+ this.FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos,inDto.OrganInfos, baseLineTableAnswer);
});
page.Childrens = pageGroupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count() == 0)).ToList();
@@ -839,7 +860,7 @@ namespace IRaCIS.Application.Services
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
groupList.ForEach(x =>
{
- this.FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos);
+ this.FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer);
});
groupList = groupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count() == 0)).ToList();
@@ -859,7 +880,7 @@ namespace IRaCIS.Application.Services
///
///
///
- private async void FindChildQuestion(TrialReadQuestionData item, List questionlists, List tableQuestionLists, List tableAnswers, List tableAnsweRowInfos,List organInfos)
+ private async void FindChildQuestion(TrialReadQuestionData item, List questionlists, List tableQuestionLists, List tableAnswers, List tableAnsweRowInfos,List organInfos, List baseLineTableAnswer)
{
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupName == item.GroupName)).ToList();
item.TableQuestions = new TrialReadTableQuestion();
@@ -993,6 +1014,10 @@ namespace IRaCIS.Application.Services
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());
+ if (rowInfo.LesionType == LesionType.BaselineLesions)
+ {
+ answers.Add("BaseLineLesionNumber", baseLineTableAnswer.Where(n=>n.ReadingTableQuestionTrial.QuestionMark==QuestionMark.LesionNumber&&n.RowIndex==rowInfo.RowIndex).Select(x=>x.Answer).FirstIsNullReturnEmpty());
+ }
item.TableQuestions.Answers.Add(answers);
@@ -1002,7 +1027,7 @@ namespace IRaCIS.Application.Services
{
item.Childrens.ForEach(x =>
{
- this.FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos);
+ this.FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos, baseLineTableAnswer);
});
}
}
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingJudgeTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingJudgeTaskService.cs
index 7a6120ef6..80dcbd86c 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingJudgeTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingJudgeTaskService.cs
@@ -88,6 +88,9 @@ namespace IRaCIS.Application.Services
public async Task GetJudgeReadingInfo(GetJudgeReadingInfo inDto)
{
var visitTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstOrDefaultAsync();
+
+
+ var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == visitTask.TrialReadingCriterionId).Select(x => x.CriterionType).FirstNotNullAsync();
GetJudgeReadingInfoOutDto judgeInfo = new GetJudgeReadingInfoOutDto()
{
ReadingTaskState = visitTask.ReadingTaskState,
@@ -302,14 +305,17 @@ namespace IRaCIS.Application.Services
};
-
- // 加全局是否更新 和访视点注释
- judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
+ if (criterionType != CriterionType.PCWG3)
{
- Answer = item.AfterQuestionList.Any(x => x.IsHaveChange),
- QuestionType = JudgeReadingQuestionType.GlobalChange,
+ // 加全局是否更新 和访视点注释 PCWG3不要
+ judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
+ {
+ Answer = item.AfterQuestionList.Any(x => x.IsHaveChange),
+ QuestionType = JudgeReadingQuestionType.GlobalChange,
- });
+ });
+ }
+
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
{
@@ -338,13 +344,21 @@ namespace IRaCIS.Application.Services
}).ToList()
};
- // 加全局是否更新 和访视点注释
- rTwoJudge.JudgeQuestionList.Add(new JudgeQuestion()
- {
- Answer = twoItem.AfterQuestionList.Any(x => x.IsHaveChange),
- QuestionType = JudgeReadingQuestionType.GlobalChange,
- });
+
+ if (criterionType != CriterionType.PCWG3)
+ {
+ // 加全局是否更新 和访视点注释
+ rTwoJudge.JudgeQuestionList.Add(new JudgeQuestion()
+ {
+ Answer = twoItem.AfterQuestionList.Any(x => x.IsHaveChange),
+ QuestionType = JudgeReadingQuestionType.GlobalChange,
+
+ });
+ }
+
+
+
rTwoJudge.JudgeQuestionList.Add(new JudgeQuestion()
{
diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
index 057e97d14..48bcc3903 100644
--- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
@@ -149,7 +149,8 @@ namespace IRaCIS.Core.Application.Service
CreateMap()
.ForMember(d => d.MergeName, u => u.MapFrom(s => s.MergeRow == null ? string.Empty : s.MergeRow.ReadingQuestionTrial.OrderMark + s.MergeRow.RowIndex.GetLesionMark()))
- .ForMember(d => d.SplitName, u => u.MapFrom(s => s.SplitRow == null ? string.Empty : s.SplitRow.ReadingQuestionTrial.OrderMark + s.SplitRow.RowIndex.GetLesionMark()));
+ .ForMember(d => d.SplitName, u => u.MapFrom(s => s.SplitRow == null ? string.Empty : s.SplitRow.ReadingQuestionTrial.OrderMark + s.SplitRow.RowIndex.GetLesionMark()))
+ .ForMember(d => d.LesionType, u => u.MapFrom(s => s.ReadingQuestionTrial == null ?null : s.ReadingQuestionTrial.LesionType));
CreateMap()
diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
index 943211ed6..aaf7986bd 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
@@ -121,7 +121,7 @@ namespace IRaCIS.Core.Domain.Models
///
/// 裁判类型
///
- public JudgeTypeEnum JudgeType { get; set; }
+ public JudgeTypeEnum JudgeType { get; set; } = JudgeTypeEnum.AnswerDisaffinity;
///
/// 创建人
diff --git a/IRaCIS.Core.Domain/SQLFile/Test.sql b/IRaCIS.Core.Domain/SQLFile/Test.sql
index 5899ca575..a82902899 100644
--- a/IRaCIS.Core.Domain/SQLFile/Test.sql
+++ b/IRaCIS.Core.Domain/SQLFile/Test.sql
@@ -941,4 +941,12 @@ where ReadingQuestionTrial.ReadingQuestionSystemId is not null and ReadingTableQ
--------------------------------------维护阅片标准签名状态----------------
- update ReadingQuestionCriterionTrial set IsSigned=1 where ReadingInfoSignTime is not null
\ No newline at end of file
+ update ReadingQuestionCriterionTrial set IsSigned=1 where ReadingInfoSignTime is not null
+
+
+
+
+
+ ---------------------------------------------2023-02-20-----------------------------------
+ --维护全局阅片是否修改状态
+ update ReadingTaskQuestionAnswer set IsGlobalChange=1 where GlobalChangeAnswer is not null and GlobalChangeAnswer!='' and Answer!=GlobalChangeAnswer
\ No newline at end of file