From 864ab17ff30635189f2a8d3afb3431d8a37d54c6 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 20 Mar 2024 10:20:00 +0800 Subject: [PATCH 01/25] =?UTF-8?q?=E7=96=BE=E7=97=85=E8=BF=9B=E5=B1=95?= =?UTF-8?q?=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ReadingCalculate/LuganoCalculateService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index 4777364ae..f0a2f9e69 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1039,7 +1039,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate x.RowIndex >= (int)Math.Floor(inDto.RowNumber) && x.RowIndex < ((int)Math.Floor(inDto.RowNumber) + 1) && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.MajorAxis && x.QuestionId== targetQuestion.Id - ).Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0(); + ).Select(x => x.Answer).ToListAsync()).Select(x => x.IsNullOrEmptyReturn0()).Sum(); // 短径 var shortAxis = (await _readingTableQuestionAnswerRepository.Where(x => @@ -1047,7 +1047,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate x.RowIndex >= (int)Math.Floor(inDto.RowNumber) && x.RowIndex < ((int)Math.Floor(inDto.RowNumber) + 1) && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.ShortAxis && x.QuestionId == targetQuestion.Id - ).Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0(); + ).Select(x => x.Answer).ToListAsync()).Select(x => x.IsNullOrEmptyReturn0()).Sum(); // 找到ppd问题 var ppdQuestion = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == targetQuestion.Id && x.QuestionMark == QuestionMark.PPD).FirstOrDefaultAsync(); From 8f08746377df8cfd41251410f683e609c1af9c75 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 20 Mar 2024 13:16:35 +0800 Subject: [PATCH 02/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/Dto/ReadingImageTaskViewModel.cs | 17 +++++++++++- .../ReadingImageTaskService.cs | 27 +++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index e55631197..a8b548954 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -1442,7 +1442,22 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// 是否是第一次转化的任务 /// public bool IsFirstChangeTask { get; set; } = false; - } + + /// + /// 融合的PTSeriesId + /// + public Guid? PTSeriesId { get; set; } + + /// + /// 融合的CTSeriesId + /// + public Guid? CTSeriesId { get; set; } + + /// + /// StudyId + /// + public Guid? OtherStudyId { get; set; } + } public class GetVisitReadingQuestionOutDto { diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 2427928c1..8c233c226 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -612,7 +612,22 @@ namespace IRaCIS.Application.Services result = result.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToList(); } - foreach (var item in result) + + var visitaskIds = result.Select(x => x.VisitTaskId).ToList(); + + var otherStudys = await _readingTableAnswerRowInfoRepository.Where(x => visitaskIds.Contains(x.VisitTaskId)) + .Where(x=>x.CTSeriesId!=null&&x.PTSeriesId!=null) + .Select(x => new + { + x.OtherStudyId, + x.CTSeriesId, + x.PTSeriesId, + x.VisitTaskId, + x.UpdateTime + }).ToListAsync(); + + + foreach (var item in result) { var clinicalDataList = await _readingClinicalDataService.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto() { @@ -623,7 +638,15 @@ namespace IRaCIS.Application.Services }); item.IsExistsClinicalData = clinicalDataList.Count > 0; - } + var otherStudy = otherStudys.Where(x => x.VisitTaskId == item.VisitTaskId).OrderByDescending(x => x.UpdateTime).FirstOrDefault(); + if (otherStudy != null) + { + item.PTSeriesId = otherStudy.PTSeriesId; + item.CTSeriesId = otherStudy.CTSeriesId; + item.OtherStudyId = otherStudy.OtherStudyId; + } + + } From b08908b1dc59aac3c6673c57d4c17efcfc409ca9 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 20 Mar 2024 15:12:05 +0800 Subject: [PATCH 03/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/ReadingImageTask/ReadingImageTaskService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 8c233c226..bcedb8948 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1881,7 +1881,7 @@ namespace IRaCIS.Application.Services }); if (!(await _readingTableAnswerRowInfoRepository.AnyAsync(x => x.SplitRowId == deleteRowInfo.SplitRowId && x.Id != deleteRowInfo.Id))) { - await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.Id == deleteRowInfo.SplitRowId, x => new ReadingTableAnswerRowInfo() + await _readingTableAnswerRowInfoRepository.BatchUpdateNoTrackingAsync(x => x.Id == deleteRowInfo.SplitRowId, x => new ReadingTableAnswerRowInfo() { SplitOrMergeType = null, }); From 12adf2f3a95480373368fd28ea0e0ae04d1f3f29 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 20 Mar 2024 15:56:40 +0800 Subject: [PATCH 04/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 15 +++++++++++++++ .../ReadingImageTask/ReadingImageTaskService.cs | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index f00c10d6d..47c6eaa12 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -5526,6 +5526,21 @@ 是否是第一次转化的任务 + + + 融合的PTSeriesId + + + + + 融合的CTSeriesId + + + + + StudyId + + 当新答案为空的时候 是否是有原数据 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index bcedb8948..0190b61db 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1874,7 +1874,7 @@ namespace IRaCIS.Application.Services var index = await _readingCalculateService.GetDeleteLesionStatrIndex(inDto); - await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.RowId == inDto.RowId, x => new ReadingTableQuestionAnswer() + await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.RowId == inDto.RowId, x => new ReadingTableQuestionAnswer() { IsDeleted = true @@ -1888,7 +1888,7 @@ namespace IRaCIS.Application.Services } - await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.RowId, x => new ReadingTableAnswerRowInfo() + await _readingTableAnswerRowInfoRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.RowId, x => new ReadingTableAnswerRowInfo() { IsDeleted = true From 5e6db93250eb8d5a63ab07c88f97247eff1c8707 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 20 Mar 2024 16:03:57 +0800 Subject: [PATCH 05/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ReadingCalculate/LuganoCalculateService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index f0a2f9e69..651ed4672 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1107,7 +1107,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 符合疾病进展 if (accord) { - await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => + await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == (int)Math.Floor(inDto.RowNumber) && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && @@ -1119,7 +1119,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate } else if (state == TargetState.DiseaseProgression.GetEnumInt()) { - await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => + await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == (int)Math.Floor(inDto.RowNumber) && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && From f0d4a1c075764772c0486de7401f71e8452611ad Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 20 Mar 2024 16:41:03 +0800 Subject: [PATCH 06/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/ReadingImageTask/ReadingImageTaskService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 0190b61db..f130d1dfb 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1669,7 +1669,8 @@ namespace IRaCIS.Application.Services var query = _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == rowinfo.VisitTaskId && x.QuestionId == rowinfo.QuestionId && x.Id != rowinfo.Id) .Where(x => x.SplitOrMergeType != SplitOrMergeType.Split && x.SplitOrMergeType != SplitOrMergeType.SplitMain - &&x.SplitOrMergeType!=SplitOrMergeType.Merge && x.SplitOrMergeType != SplitOrMergeType.MergeMain && x.SplitOrMergeType != SplitOrMergeType.MergeMained && x.SplitOrMergeType != SplitOrMergeType.Merged); + &&x.SplitOrMergeType!=SplitOrMergeType.Merge && x.SplitOrMergeType != SplitOrMergeType.MergeMain + && x.SplitOrMergeType != SplitOrMergeType.Merged); switch (taskInfo.TrialReadingCriterion.CriterionType) { From 49a0cf3ece530870d18949b975d1c8147a8d8ea4 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 20 Mar 2024 17:08:26 +0800 Subject: [PATCH 07/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LuganoCalculateService.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index 651ed4672..7a178bd51 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1374,15 +1374,20 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var addList = _mapper.Map>(tableRowAnswers).OrderBy(x => x.RowIndex).ToList(); - await _readingTaskQuestionMarkRepository.AddRangeAsync(questionMarkList); - await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList); - await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); - addList.ForEach(x => + foreach (var item in addList) { - x.MergeRow = null; - x.SplitRow = null; + await _readingTableAnswerRowInfoRepository.AddAsync(item); + await _readingTableQuestionAnswerRepository.SaveChangesAsync(); + } + await _readingTaskQuestionMarkRepository.AddRangeAsync(questionMarkList); + //await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList); + await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); + //addList.ForEach(x => + //{ + // x.MergeRow = null; + // x.SplitRow = null; - }); + //}); await _readingTableQuestionAnswerRepository.SaveChangesAsync(); } From dd2d142340bda6c1a69fb2c017d7ddcf95ca2de7 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 21 Mar 2024 09:55:32 +0800 Subject: [PATCH 08/25] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/QC/QCOperationService.cs | 12 +++++++++--- IRaCIS.Core.Domain.Share/QC/AuditStateEnum.cs | 3 +++ IRaCIS.Core.Domain/Visit/SubjectVisit.cs | 4 +++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index f50e8e922..eb6d0cd0b 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -928,9 +928,13 @@ namespace IRaCIS.Core.Application.Image.QA return new GetNextIQCQualityOutDto() { }; break; case TrialQCProcess.SingleAudit: - visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))).Include(x => x.Subject).ToListAsync(); + visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted + && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))).Include(x => x.Subject).ToListAsync(); - subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId).OrderBy(x=>x.VisitNum).FirstOrDefault(); + subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId) + .Where(x=>x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator) + + .OrderBy(x=>x.VisitNum).FirstOrDefault(); if(subjectVisit!=null) { return new GetNextIQCQualityOutDto() { @@ -957,7 +961,9 @@ namespace IRaCIS.Core.Application.Image.QA visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && ((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id))) - ).Include(x => x.Subject).ToListAsync(); + ) + .Where(x => x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator) + .Include(x => x.Subject).ToListAsync(); if (subjectVisit != null) { return new GetNextIQCQualityOutDto() diff --git a/IRaCIS.Core.Domain.Share/QC/AuditStateEnum.cs b/IRaCIS.Core.Domain.Share/QC/AuditStateEnum.cs index 3e32a2761..35f4dc763 100644 --- a/IRaCIS.Core.Domain.Share/QC/AuditStateEnum.cs +++ b/IRaCIS.Core.Domain.Share/QC/AuditStateEnum.cs @@ -14,6 +14,9 @@ namespace IRaCIS.Core.Domain.Share //1st QC进行了操作 InPrimaryQC = 4, + /// + /// 单审通过 + /// PrimaryQCPassed = 5, //2nd QC进行操作 diff --git a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs index e5e6edaca..1073f3b12 100644 --- a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs +++ b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs @@ -84,7 +84,9 @@ namespace IRaCIS.Core.Domain.Models public Guid? ForwardUserId { get; set; } public DateTime? ForwardTime { get; set; } - // 质控领取人 + /// + /// 当前质控领取人 + /// public Guid? CurrentActionUserId { get; set; } public DateTime? CurrentActionUserExpireTime { get; set; } From 55f60e897a2651f5178cd2752ad05e3db4397521 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 21 Mar 2024 10:49:24 +0800 Subject: [PATCH 09/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/QCOperationService.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index eb6d0cd0b..f3317dc50 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -929,10 +929,12 @@ namespace IRaCIS.Core.Application.Image.QA break; case TrialQCProcess.SingleAudit: visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted - && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))).Include(x => x.Subject).ToListAsync(); + && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) + .Where(x => !(x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)) + .Include(x => x.Subject).ToListAsync(); subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId) - .Where(x=>x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator) + .OrderBy(x=>x.VisitNum).FirstOrDefault(); if(subjectVisit!=null) @@ -962,7 +964,7 @@ namespace IRaCIS.Core.Application.Image.QA visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && ((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id))) ) - .Where(x => x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator) + .Where(x => !(x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)) .Include(x => x.Subject).ToListAsync(); if (subjectVisit != null) { From 18496246b29eb0aea0354fbc618f450a41d0f1bb Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 21 Mar 2024 11:22:04 +0800 Subject: [PATCH 10/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/QCOperationService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index f3317dc50..a19fb249c 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -930,7 +930,7 @@ namespace IRaCIS.Core.Application.Image.QA case TrialQCProcess.SingleAudit: visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) - .Where(x => !(x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)) + .Where(x => !(x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.IQC)) .Include(x => x.Subject).ToListAsync(); subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId) @@ -964,7 +964,7 @@ namespace IRaCIS.Core.Application.Image.QA visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && ((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id))) ) - .Where(x => !(x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)) + .Where(x => !(x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum != UserTypeEnum.IQC)) .Include(x => x.Subject).ToListAsync(); if (subjectVisit != null) { From 8f17d4b110c39258738a1fb175a0e8bfb85634f2 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 21 Mar 2024 11:29:16 +0800 Subject: [PATCH 11/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/QCOperationService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index a19fb249c..d1fafaa35 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -964,7 +964,7 @@ namespace IRaCIS.Core.Application.Image.QA visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && ((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id))) ) - .Where(x => !(x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum != UserTypeEnum.IQC)) + .Where(x => !(x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.IQC)) .Include(x => x.Subject).ToListAsync(); if (subjectVisit != null) { From 12318937f4791294fd5143adfe2444f4ba30c5de Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 21 Mar 2024 11:37:01 +0800 Subject: [PATCH 12/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/QCOperationService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index d1fafaa35..f8e77db0e 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -930,7 +930,7 @@ namespace IRaCIS.Core.Application.Image.QA case TrialQCProcess.SingleAudit: visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) - .Where(x => !(x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.IQC)) + .Where(x => !(x.QCChallengeList.Count() > 0 && x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.IQC)) .Include(x => x.Subject).ToListAsync(); subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId) @@ -964,7 +964,7 @@ namespace IRaCIS.Core.Application.Image.QA visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && ((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id))) ) - .Where(x => !(x.QCChallengeDialogList.Count() > 0 && x.QCChallengeDialogList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.IQC)) + .Where(x => !(x.QCChallengeList.Count() > 0 && x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.IQC)) .Include(x => x.Subject).ToListAsync(); if (subjectVisit != null) { From 510104d0ff93c09bc0dcecd8a49d36ced1043530 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 21 Mar 2024 13:26:46 +0800 Subject: [PATCH 13/25] =?UTF-8?q?=E9=9C=80=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/QCOperationService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index f8e77db0e..44bdd3fc5 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -930,7 +930,7 @@ namespace IRaCIS.Core.Application.Image.QA case TrialQCProcess.SingleAudit: visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) - .Where(x => !(x.QCChallengeList.Count() > 0 && x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.IQC)) + .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum != UserTypeEnum.IQC) .Include(x => x.Subject).ToListAsync(); subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId) @@ -964,7 +964,7 @@ namespace IRaCIS.Core.Application.Image.QA visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && ((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id))) ) - .Where(x => !(x.QCChallengeList.Count() > 0 && x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.IQC)) + .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum != UserTypeEnum.IQC) .Include(x => x.Subject).ToListAsync(); if (subjectVisit != null) { From 726a2be71e4cdeae9d469be3579a8b4abfe291d2 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 21 Mar 2024 14:07:04 +0800 Subject: [PATCH 14/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/QC/DTO/QCListViewModel.cs | 8 +++- .../Service/QC/QCListService.cs | 39 ++++++++++--------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index f73cd2887..99da29c06 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -34,7 +34,9 @@ namespace IRaCIS.Core.Application.Contracts public class GetNextQCInfoInDto { public Guid TrialId { get; set; } - } + + public Guid? VisitId { get; set; } + } public class QCVisitSearchDTO : PageInput { @@ -50,7 +52,9 @@ namespace IRaCIS.Core.Application.Contracts public bool? IsUrgent { get; set; } public Guid TrialId { get; set; } public Guid? SiteId { get; set; } - public Guid? SubjectId { get; set; } + + public Guid? VisitId { get; set; } + public Guid? SubjectId { get; set; } public string SubjectInfo { get; set; } = String.Empty; diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index 60d2bfdc1..b85b2b380 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -248,26 +248,26 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPost] - public async Task GetNextQCInfo(GetNextQCInfoInDto inDto) - { - var result= await GetQCVisitList(new QCVisitSearchDTO() - { + public async Task GetNextQCInfo(GetNextQCInfoInDto inDto) + { + var result = await GetQCVisitList(new QCVisitSearchDTO() + { + TrialId = inDto.TrialId, + CurrentActionUserId = _userInfo.Id, + VisitId = inDto.VisitId, + PageIndex = 1, + PageSize = 1, + }); - TrialId = inDto.TrialId, - CurrentActionUserId=_userInfo.Id, - PageIndex=1, - PageSize=1, - }); + return result.Item1.CurrentPageData.Count > 0 ? result.Item1.CurrentPageData[0] : null; + } - return result.Item1.CurrentPageData.Count > 0 ? result.Item1.CurrentPageData[0] : null; - } - - /// - /// QC 访视列表 - /// - /// - /// - [HttpPost] + /// + /// QC 访视列表 + /// + /// + /// + [HttpPost] public async Task<(PageOutput, TrialSubjectAndSVConfig)> GetQCVisitList(QCVisitSearchDTO visitSearchDTO) { @@ -431,7 +431,8 @@ namespace IRaCIS.Core.Application.Image.QA var svExpression = QCCommon.GetSubjectVisitFilter(visitSearchDTO.VisitPlanArray); var query = _subjectVisitRepository.Where(x => x.TrialId == visitSearchDTO.TrialId) - .WhereIf(visitSearchDTO.CurrentActionUserId != null, t => t.CurrentActionUserId == visitSearchDTO.CurrentActionUserId) + .WhereIf(visitSearchDTO.VisitId != null, t => t.Id == visitSearchDTO.VisitId) + .WhereIf(visitSearchDTO.CurrentActionUserId != null, t => t.CurrentActionUserId == visitSearchDTO.CurrentActionUserId) .WhereIf(visitSearchDTO.ChallengeState != null, t => t.ChallengeState == visitSearchDTO.ChallengeState) .WhereIf(visitSearchDTO.SiteId != null, t => t.SiteId == visitSearchDTO.SiteId) .WhereIf(visitSearchDTO.SubjectId != null, t => t.Subject.Id == visitSearchDTO.SubjectId) From 282368b9e033bf6bfd859b81e6dc86ba74cf96f8 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 21 Mar 2024 16:18:42 +0800 Subject: [PATCH 15/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/QCOperationService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 44bdd3fc5..f3cacf8f5 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -930,7 +930,7 @@ namespace IRaCIS.Core.Application.Image.QA case TrialQCProcess.SingleAudit: visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) - .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum != UserTypeEnum.IQC) + .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.Id) .Include(x => x.Subject).ToListAsync(); subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId) @@ -964,7 +964,7 @@ namespace IRaCIS.Core.Application.Image.QA visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && ((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id))) ) - .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum != UserTypeEnum.IQC) + .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId !=_userInfo.Id) .Include(x => x.Subject).ToListAsync(); if (subjectVisit != null) { From c73968f490457be354855e1c4d53a93632716d95 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 21 Mar 2024 16:22:43 +0800 Subject: [PATCH 16/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/QCOperationService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index f3cacf8f5..44442d108 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -930,7 +930,7 @@ namespace IRaCIS.Core.Application.Image.QA case TrialQCProcess.SingleAudit: visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) - .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.Id) + .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y=>!y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.Id) .Include(x => x.Subject).ToListAsync(); subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId) @@ -964,7 +964,7 @@ namespace IRaCIS.Core.Application.Image.QA visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && ((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id))) ) - .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId !=_userInfo.Id) + .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId !=_userInfo.Id) .Include(x => x.Subject).ToListAsync(); if (subjectVisit != null) { From 90a1a920fa4c28eeb622caf332255fd569f83297 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 22 Mar 2024 11:08:08 +0800 Subject: [PATCH 17/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/ReadingImageTask/ReadingImageTaskService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index f130d1dfb..622056ea4 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -202,13 +202,13 @@ namespace IRaCIS.Application.Services .OrderBy(x => x.VisitTask.VisitTaskNum).Select(x => new GetPreviousOtherPicturePathOutDto() { VisitTaskId = x.VisitTaskId, - PicturePath = x.PicturePath, + PicturePath = x.OtherPicturePath, TaskBlindName = x.VisitTask.TaskBlindName }).ToListAsync(); } - - return result.Where(x=>x.PicturePath!=string.Empty).ToList(); + + return result.Where(x => x.PicturePath != string.Empty && x.PicturePath != null).ToList(); } /// From 855242e6febda72de852bf3d6829b6ca43081301 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 22 Mar 2024 13:01:26 +0800 Subject: [PATCH 18/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/ReadingImageTask/ReadingImageTaskService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 622056ea4..7c64cde1a 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1822,7 +1822,11 @@ namespace IRaCIS.Application.Services }).ToListAsync(); var markquestionId = inDto.QuestionMarkInfoList.Select(y => y.QuestionId).ToList(); - await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId&& markquestionId.Contains(x.QuestionId)); + + var needDeleteMarkQuestonIds = inDto.Answers.Where(x => x.Answer == string.Empty).Select(x => x.Id).ToList(); + + await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && needDeleteMarkQuestonIds.Contains(x.QuestionId)); + await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId&& markquestionId.Contains(x.QuestionId)); var datetime = DateTime.Now; var markList = _mapper.Map, List>(inDto.QuestionMarkInfoList); From 99828dd82ecb71ccb22f59fc200ba0ffea1ec06c Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 22 Mar 2024 13:51:55 +0800 Subject: [PATCH 19/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingImageTaskService.cs | 18 +++++++++++++++++- IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs | 9 +++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 7c64cde1a..5c1490e3b 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1824,9 +1824,25 @@ namespace IRaCIS.Application.Services var markquestionId = inDto.QuestionMarkInfoList.Select(y => y.QuestionId).ToList(); var needDeleteMarkQuestonIds = inDto.Answers.Where(x => x.Answer == string.Empty).Select(x => x.Id).ToList(); + await _readingTaskQuestionMarkRepository.BatchUpdateNoTrackingAsync(x => + (x.QuestionType == QuestionType.SplenicTopPosition || x.QuestionType == QuestionType.SplenicBottomPosition) || + x.VisitTaskId == inDto.VisitTaskId && markquestionId.Contains(x.QuestionId), x => new ReadingTaskQuestionMark() + { + PicturePath = string.Empty, + MeasureData = string.Empty, + }) ; + + await _readingTaskQuestionMarkRepository.BatchUpdateNoTrackingAsync(x => + (x.QuestionType == QuestionType.LiverSUVmax || x.QuestionType == QuestionType.MediastinumSUVmax) || + x.VisitTaskId == inDto.VisitTaskId && markquestionId.Contains(x.QuestionId), x => new ReadingTaskQuestionMark() + { + OtherPicturePath = string.Empty, + OtherMeasureData=string.Empty, + }); + await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && needDeleteMarkQuestonIds.Contains(x.QuestionId)); - await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId&& markquestionId.Contains(x.QuestionId)); + var datetime = DateTime.Now; var markList = _mapper.Map, List>(inDto.QuestionMarkInfoList); diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index 42f5cdb4a..b4bf54ad2 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -2278,6 +2278,15 @@ public enum SUVChangeVSBaseline /// PSScoreRemarks = 59, + /// + /// 脾尖位置 + /// + SplenicTopPosition = 60, + + /// + /// 脾底位置 + /// + SplenicBottomPosition = 61, } From 2c859e71861685f7b26c1ae2a7e946edf7c4f356 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 22 Mar 2024 15:11:41 +0800 Subject: [PATCH 20/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/ReadingImageTask/ReadingImageTaskService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 5c1490e3b..5cedc737a 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1841,9 +1841,9 @@ namespace IRaCIS.Application.Services }); - await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && needDeleteMarkQuestonIds.Contains(x.QuestionId)); - - var datetime = DateTime.Now; + await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && markquestionId.Contains(x.QuestionId)); + + var datetime = DateTime.Now; var markList = _mapper.Map, List>(inDto.QuestionMarkInfoList); markList.ForEach(x => { From 8823656231855452f8b3da2a942f1f5e096bb6a7 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 22 Mar 2024 15:22:09 +0800 Subject: [PATCH 21/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/ReadingImageTask/ReadingImageTaskService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 5cedc737a..078a7b1ac 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1824,9 +1824,11 @@ namespace IRaCIS.Application.Services var markquestionId = inDto.QuestionMarkInfoList.Select(y => y.QuestionId).ToList(); var needDeleteMarkQuestonIds = inDto.Answers.Where(x => x.Answer == string.Empty).Select(x => x.Id).ToList(); + + await _readingTaskQuestionMarkRepository.BatchUpdateNoTrackingAsync(x => (x.QuestionType == QuestionType.SplenicTopPosition || x.QuestionType == QuestionType.SplenicBottomPosition) || - x.VisitTaskId == inDto.VisitTaskId && markquestionId.Contains(x.QuestionId), x => new ReadingTaskQuestionMark() + x.VisitTaskId == inDto.VisitTaskId && needDeleteMarkQuestonIds.Contains(x.QuestionId), x => new ReadingTaskQuestionMark() { PicturePath = string.Empty, MeasureData = string.Empty, @@ -1834,7 +1836,7 @@ namespace IRaCIS.Application.Services await _readingTaskQuestionMarkRepository.BatchUpdateNoTrackingAsync(x => (x.QuestionType == QuestionType.LiverSUVmax || x.QuestionType == QuestionType.MediastinumSUVmax) || - x.VisitTaskId == inDto.VisitTaskId && markquestionId.Contains(x.QuestionId), x => new ReadingTaskQuestionMark() + x.VisitTaskId == inDto.VisitTaskId && needDeleteMarkQuestonIds.Contains(x.QuestionId), x => new ReadingTaskQuestionMark() { OtherPicturePath = string.Empty, OtherMeasureData=string.Empty, From d6dacb93dd75ee2e9a8a29b119793c5491a06c7d Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 22 Mar 2024 15:22:49 +0800 Subject: [PATCH 22/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/ReadingImageTask/ReadingImageTaskService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 078a7b1ac..4aba2d23d 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1827,7 +1827,7 @@ namespace IRaCIS.Application.Services await _readingTaskQuestionMarkRepository.BatchUpdateNoTrackingAsync(x => - (x.QuestionType == QuestionType.SplenicTopPosition || x.QuestionType == QuestionType.SplenicBottomPosition) || + (x.QuestionType == QuestionType.SplenicTopPosition || x.QuestionType == QuestionType.SplenicBottomPosition) && x.VisitTaskId == inDto.VisitTaskId && needDeleteMarkQuestonIds.Contains(x.QuestionId), x => new ReadingTaskQuestionMark() { PicturePath = string.Empty, @@ -1835,7 +1835,7 @@ namespace IRaCIS.Application.Services }) ; await _readingTaskQuestionMarkRepository.BatchUpdateNoTrackingAsync(x => - (x.QuestionType == QuestionType.LiverSUVmax || x.QuestionType == QuestionType.MediastinumSUVmax) || + (x.QuestionType == QuestionType.LiverSUVmax || x.QuestionType == QuestionType.MediastinumSUVmax) && x.VisitTaskId == inDto.VisitTaskId && needDeleteMarkQuestonIds.Contains(x.QuestionId), x => new ReadingTaskQuestionMark() { OtherPicturePath = string.Empty, From 960f479b91622df79d6b012f2ac200b1af71d1e5 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 25 Mar 2024 09:30:12 +0800 Subject: [PATCH 23/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/TaskMedicalReviewService.cs | 2 +- .../Allocation/TaskMedicalReview.cs | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs index 8ce0fb61a..7b4c39d75 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs @@ -230,7 +230,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.IsInvalid != null, t => t.IsInvalid == inQuery.IsInvalid) .WhereIf(inQuery.IsGetBeRead,x=>!x.IsInvalid&&x.AuditState!= MedicalReviewAuditState.HaveSigned) .WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId) - .OrderBy(x => x.AuditState).ThenBy(x=>x.VisitTask.SubjectId).ThenBy(x=>x.VisitTask.ArmEnum).ThenBy(x=>x.VisitTask.VisitTaskNum) + .OrderBy(x => x.AuditStateSort).ThenBy(x=>x.VisitTask.SubjectId).ThenBy(x=>x.VisitTask.ArmEnum).ThenBy(x=>x.VisitTask.VisitTaskNum) .ProjectTo(_mapper.ConfigurationProvider); diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs index 556b96ccf..326635a80 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs @@ -59,12 +59,20 @@ namespace IRaCIS.Core.Domain.Models [Required] public MedicalReviewAuditState AuditState { get; set; } + public int AuditStateSort { + + get + { + return AuditState==MedicalReviewAuditState.HaveSigned?2:1; + } + } - /// - /// 审核通过时间 - /// - public DateTime? AuditSignTime { get; set; } + + /// + /// 审核通过时间 + /// + public DateTime? AuditSignTime { get; set; } /// /// 阅片人是否认同 From f2b53cd35934df941a2540f44941f3b0e562d128 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 25 Mar 2024 10:42:09 +0800 Subject: [PATCH 24/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/TaskMedicalReviewService.cs | 2 +- IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs index 7b4c39d75..0771faa0c 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs @@ -230,7 +230,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.IsInvalid != null, t => t.IsInvalid == inQuery.IsInvalid) .WhereIf(inQuery.IsGetBeRead,x=>!x.IsInvalid&&x.AuditState!= MedicalReviewAuditState.HaveSigned) .WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId) - .OrderBy(x => x.AuditStateSort).ThenBy(x=>x.VisitTask.SubjectId).ThenBy(x=>x.VisitTask.ArmEnum).ThenBy(x=>x.VisitTask.VisitTaskNum) + .OrderBy(x => x.AuditState== MedicalReviewAuditState.WaitAudit|| x.AuditState == MedicalReviewAuditState.Auditing).ThenBy(x=>x.VisitTask.SubjectId).ThenBy(x=>x.VisitTask.ArmEnum).ThenBy(x=>x.VisitTask.VisitTaskNum) .ProjectTo(_mapper.ConfigurationProvider); diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs index 326635a80..54ba087db 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs @@ -59,14 +59,6 @@ namespace IRaCIS.Core.Domain.Models [Required] public MedicalReviewAuditState AuditState { get; set; } - public int AuditStateSort { - - get - { - return AuditState==MedicalReviewAuditState.HaveSigned?2:1; - } - } - /// From a98799daaf21ae3664bde949d930803e5bdaba78 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 25 Mar 2024 10:46:20 +0800 Subject: [PATCH 25/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/TaskMedicalReviewService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs index 0771faa0c..3832948ec 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs @@ -230,7 +230,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.IsInvalid != null, t => t.IsInvalid == inQuery.IsInvalid) .WhereIf(inQuery.IsGetBeRead,x=>!x.IsInvalid&&x.AuditState!= MedicalReviewAuditState.HaveSigned) .WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId) - .OrderBy(x => x.AuditState== MedicalReviewAuditState.WaitAudit|| x.AuditState == MedicalReviewAuditState.Auditing).ThenBy(x=>x.VisitTask.SubjectId).ThenBy(x=>x.VisitTask.ArmEnum).ThenBy(x=>x.VisitTask.VisitTaskNum) + .OrderBy(x => x.AuditState!= MedicalReviewAuditState.WaitAudit&& x.AuditState != MedicalReviewAuditState.Auditing).ThenBy(x=>x.VisitTask.SubjectId).ThenBy(x=>x.VisitTask.ArmEnum).ThenBy(x=>x.VisitTask.VisitTaskNum) .ProjectTo(_mapper.ConfigurationProvider);