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/ReadingImageTask/ReadingGlobalTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs index d6c2407be..165e48f76 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,9 +96,12 @@ 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() + await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == answer.QuestionId + && x.Answer != item.Answer && x.Answer != string.Empty + , x => new ReadingTaskQuestionAnswer() { - GlobalChangeAnswer = item.Answer + GlobalChangeAnswer = item.Answer, + IsGlobalChange = true, }); }