From bd3d6ffe125b460018c386f64f7c68edb206986d Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 19 Aug 2024 11:28:02 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E5=AD=97=E5=85=B8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Fixed/CriterionAdditionalAssessment.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Fixed/CriterionAdditionalAssessment.cs b/IRaCIS.Core.Application/Service/Fixed/CriterionAdditionalAssessment.cs index 2cb4b236a..590f58a8a 100644 --- a/IRaCIS.Core.Application/Service/Fixed/CriterionAdditionalAssessment.cs +++ b/IRaCIS.Core.Application/Service/Fixed/CriterionAdditionalAssessment.cs @@ -66,7 +66,7 @@ namespace IRaCIS.Core.Application.Service { GroupId=gropId, LimitEdit=LimitEdit.OnlyBaseLine, - DictionaryCode="YesOrNoOrNa", + DictionaryCode="YesOrNoOrNe", IsJudgeQuestion=false, IsShowInDicom=false, GlobalReadingShowType=GlobalReadingShowType.NotShow, From 496f47a4e8e7358141894a4da8946217f3805c97 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 19 Aug 2024 11:32:41 +0800 Subject: [PATCH 02/15] =?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/Inspection/InspectionService.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index b3f13a70b..c73aa2032 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -3,6 +3,7 @@ using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.Service.Inspection.DTO; using IRaCIS.Core.Application.Service.Inspection.Interface; using IRaCIS.Core.Domain.Share; +using IRaCIS.Core.Infra.EFCore.Common; using IRaCIS.Core.Infrastructure; using Panda.DynamicWebApi.Attributes; @@ -58,8 +59,11 @@ namespace IRaCIS.Core.Application.Service.Inspection join usertype in _repository.GetQueryable().IgnoreQueryFilters() on leftuser.UserTypeId equals usertype.Id into usertypetemp from leftusertype in usertypetemp.DefaultIfEmpty() - //join trialCriterion in _repository.GetQueryable().IgnoreQueryFilters() on data.TrialReadingCriterionId equals trialCriterion.Id into criterion - //from leftCriterion in criterion.DefaultIfEmpty() + join visttask in _repository.GetQueryable().IgnoreQueryFilters() on data.VisitTaskId equals visttask.Id into visttasktemp + from leftvisttask in visttasktemp.DefaultIfEmpty() + + //join trialCriterion in _repository.GetQueryable().IgnoreQueryFilters() on data.TrialReadingCriterionId equals trialCriterion.Id into criterion + //from leftCriterion in criterion.DefaultIfEmpty() //join moduleTyped in _repository.GetQueryable().Where(x => x.Code == "ModuleType") on 1 equals 1 //join moduleTypec in _repository.GetQueryable() on new { ParentId = moduleTyped.Id, ModuleType = data.ModuleType } equals new { ParentId = moduleTypec.ParentId.Value, ModuleType = moduleTypec.Value } into moduleTypectemp @@ -131,7 +135,7 @@ namespace IRaCIS.Core.Application.Service.Inspection ExperimentName = leftrial.ExperimentName, - SubjectCode = leftsubject.Code, + SubjectCode = leftvisttask.BlindSubjectCode.IsNullOrEmpty()? leftsubject.Code: leftvisttask.BlindSubjectCode, SiteCode = lefttrialSite.TrialSiteCode, ResearchProgramNo = leftrial.ResearchProgramNo, From 1feb985eb77d4abead36753f931c34ad48a51542 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 19 Aug 2024 13:12:04 +0800 Subject: [PATCH 03/15] =?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.Infra.EFCore/Common/AuditingData.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 742a51a72..f1bbec00e 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -158,7 +158,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common t.IsTrialBasicLogicConfirmed, t.IsTrialProcessConfirmed, t.IsTrialUrgentConfirmed, - t.IsConfigureEmail + t.IsConfigureEmail, + t.IsPACSConnect, }).FirstOrDefaultAsync(); switch (_userInfo.RequestUrl) { @@ -172,6 +173,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common case "configTrialBasicInfo/ConfigTrialUrgentInfoConfirm": extraIdentification = $"/{oldentity.IsTrialUrgentConfirmed.ToString()}"; break; + case "TrialDicomAE/addOrUpdateDicomAE": + extraIdentification = $"/{oldentity.IsPACSConnect.ToString()}"; + break; case "TrialEmailNoticeConfig/setTrialEmail": From 768345616a073caa266f22c17463c3f56cfd2d94 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 19 Aug 2024 13:19:54 +0800 Subject: [PATCH 04/15] =?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.Infra.EFCore/Common/AuditingData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index f1bbec00e..ae9e2566b 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -173,7 +173,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common case "configTrialBasicInfo/ConfigTrialUrgentInfoConfirm": extraIdentification = $"/{oldentity.IsTrialUrgentConfirmed.ToString()}"; break; - case "TrialDicomAE/addOrUpdateDicomAE": + case "configTrialBasicInfo/ConfigTrialPACSInfoConfirm": extraIdentification = $"/{oldentity.IsPACSConnect.ToString()}"; break; From b1b82a016e806fc6e0fef117c476d09d7f6133a2 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 19 Aug 2024 13:24:41 +0800 Subject: [PATCH 05/15] =?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.Infra.EFCore/Common/AuditingData.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index ae9e2566b..be961736e 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -159,7 +159,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common t.IsTrialProcessConfirmed, t.IsTrialUrgentConfirmed, t.IsConfigureEmail, - t.IsPACSConnect, + t.IsTrialPACSConfirmed, }).FirstOrDefaultAsync(); switch (_userInfo.RequestUrl) { @@ -174,7 +174,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common extraIdentification = $"/{oldentity.IsTrialUrgentConfirmed.ToString()}"; break; case "configTrialBasicInfo/ConfigTrialPACSInfoConfirm": - extraIdentification = $"/{oldentity.IsPACSConnect.ToString()}"; + extraIdentification = $"/{oldentity.IsTrialPACSConfirmed.ToString()}"; break; case "TrialEmailNoticeConfig/setTrialEmail": From b8481207fcd1a09d53ad45a3ef2504c9f1c275e1 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 19 Aug 2024 14:22:18 +0800 Subject: [PATCH 06/15] =?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/Fixed/CriterionAdditionalAssessment.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Fixed/CriterionAdditionalAssessment.cs b/IRaCIS.Core.Application/Service/Fixed/CriterionAdditionalAssessment.cs index 590f58a8a..54ba91882 100644 --- a/IRaCIS.Core.Application/Service/Fixed/CriterionAdditionalAssessment.cs +++ b/IRaCIS.Core.Application/Service/Fixed/CriterionAdditionalAssessment.cs @@ -66,7 +66,7 @@ namespace IRaCIS.Core.Application.Service { GroupId=gropId, LimitEdit=LimitEdit.OnlyBaseLine, - DictionaryCode="YesOrNoOrNe", + DictionaryCode="YesOrNoOrNE", IsJudgeQuestion=false, IsShowInDicom=false, GlobalReadingShowType=GlobalReadingShowType.NotShow, From fbd9280b228b8f3bbfa507aae78a84e9baa547a6 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 19 Aug 2024 15:14:23 +0800 Subject: [PATCH 07/15] =?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/DTO/VisitTaskViewModel.cs | 4 +++- .../Allocation/TaskConsistentRuleService.cs | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 302351e3d..64e526983 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -211,7 +211,9 @@ namespace IRaCIS.Core.Application.ViewModel { public bool? IsSelfAnalysis { get; set; } - public bool IsReReadingOrBackInfluenceAnalysis { get; set; } + public int ConsistentClinicalDataCount { get; set; } = 0; + + public bool IsReReadingOrBackInfluenceAnalysis { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index 2e7d1c183..ce3162d81 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -32,6 +32,7 @@ namespace IRaCIS.Core.Application.Service private readonly IRepository _taskConsistentRuleRepository; private readonly IRepository _visitTaskRepository; + private readonly IRepository _readingConsistentClinicalDataRepository; private readonly IRepository _subjectUserRepository; private readonly IRepository _subjectRepository; private readonly IRepository _enrollRepository; @@ -44,11 +45,14 @@ namespace IRaCIS.Core.Application.Service private readonly IVisitTaskHelpeService _visitTaskCommonService; - public TaskConsistentRuleService(IRepository visitTaskRepository, IRepository enrollRepository, IRepository taskConsistentRuleRepository, IRepository subjectUserRepository, IRepository subjectRepository, IDistributedLockProvider distributedLockProvider, + public TaskConsistentRuleService(IRepository visitTaskRepository, + IRepository readingConsistentClinicalDataRepository, + IRepository enrollRepository, IRepository taskConsistentRuleRepository, IRepository subjectUserRepository, IRepository subjectRepository, IDistributedLockProvider distributedLockProvider, IRepository trialRepository, IRepository trialSiteRepository, IRepository trialVirtualSiteCodeUpdateRepository, IVisitTaskHelpeService visitTaskCommonService) { _taskConsistentRuleRepository = taskConsistentRuleRepository; _visitTaskRepository = visitTaskRepository; + this._readingConsistentClinicalDataRepository = readingConsistentClinicalDataRepository; _subjectUserRepository = subjectUserRepository; _subjectRepository = subjectRepository; _enrollRepository = enrollRepository; @@ -117,6 +121,18 @@ namespace IRaCIS.Core.Application.Service var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId), nameof(VisitTask.VisitTaskNum) }; var pageList = await visitTaskQueryable.ToPagedListAsync(queryVisitTask.PageIndex, queryVisitTask.PageSize, queryVisitTask.SortField, queryVisitTask.Asc, string.IsNullOrWhiteSpace(queryVisitTask.SortField), defalutSortArray); + #region 统计一致性分析临床数据数量 + var readingIdList = pageList.CurrentPageData.Select(x => x.SouceReadModuleId).ToList(); + + readingIdList.AddRange(pageList.CurrentPageData.Select(x => x.SourceSubjectVisitId).ToList()); + readingIdList = readingIdList.Where(x => x != null).ToList(); + + var readIds = await _readingConsistentClinicalDataRepository.Where(x => readingIdList.Contains(x.Id)).Select(x => x.ReadingId).ToListAsync(); + foreach (var item in pageList.CurrentPageData) + { + item.ConsistentClinicalDataCount = readIds.Select(x => x == item.SouceReadModuleId).Count() + readIds.Select(x => x == item.SourceSubjectVisitId).Count(); + } + #endregion var trialTaskConfig = _repository.Where(t => t.Id == queryVisitTask.TrialId).Select(t => new { IsHaveDoubleReadCriterion = t.TrialReadingCriterionList.Any(t => t.IsSigned && t.IsConfirm && t.ReadingType == ReadingMethod.Double), t.VitrualSiteCode }).FirstOrDefault(); From 127e1249938b8b87a1dfd867d67d62a4e6cf8794 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 19 Aug 2024 15:22:19 +0800 Subject: [PATCH 08/15] =?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/ClinicalData/ReadingClinicalDataService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs index 934262818..f7694241b 100644 --- a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs @@ -1227,6 +1227,7 @@ namespace IRaCIS.Application.Services entity.ReadingClinicalDataState = ReadingClinicalDataStatus.HaveUploaded; entity.IsSign = false; entity.FileCount = fileCount; + entity.CreateTime=DateTime.Now; var success = await _readingConsistentClinicalDataRepository.SaveChangesAsync(); return ResponseOutput.Ok(entity.Id); From 7be63f08b523177d6e22e04b87f0b14d6632042e Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 19 Aug 2024 15:27:51 +0800 Subject: [PATCH 09/15] =?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/TaskConsistentRuleService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index ce3162d81..c36eb0f58 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -127,7 +127,7 @@ namespace IRaCIS.Core.Application.Service readingIdList.AddRange(pageList.CurrentPageData.Select(x => x.SourceSubjectVisitId).ToList()); readingIdList = readingIdList.Where(x => x != null).ToList(); - var readIds = await _readingConsistentClinicalDataRepository.Where(x => readingIdList.Contains(x.Id)).Select(x => x.ReadingId).ToListAsync(); + var readIds = await _readingConsistentClinicalDataRepository.Where(x => readingIdList.Contains(x.ReadingId)).Select(x => x.ReadingId).ToListAsync(); foreach (var item in pageList.CurrentPageData) { item.ConsistentClinicalDataCount = readIds.Select(x => x == item.SouceReadModuleId).Count() + readIds.Select(x => x == item.SourceSubjectVisitId).Count(); From 718234f631f0069ee804526b7f1ed449d3af6760 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 19 Aug 2024 15:33:52 +0800 Subject: [PATCH 10/15] =?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/TaskConsistentRuleService.cs | 18 ++++++++++++------ .../Interface/IReadingClinicalDataService.cs | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index c36eb0f58..77e0a2737 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -20,6 +20,7 @@ using IRaCIS.Core.Infrastructure.Extention; using System; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using NPOI.SS.Formula.Functions; +using IRaCIS.Core.Application.Service.Reading.Dto; namespace IRaCIS.Core.Application.Service { @@ -33,6 +34,7 @@ namespace IRaCIS.Core.Application.Service private readonly IRepository _taskConsistentRuleRepository; private readonly IRepository _visitTaskRepository; private readonly IRepository _readingConsistentClinicalDataRepository; + private readonly IReadingClinicalDataService _readingClinicalDataService; private readonly IRepository _subjectUserRepository; private readonly IRepository _subjectRepository; private readonly IRepository _enrollRepository; @@ -47,12 +49,14 @@ namespace IRaCIS.Core.Application.Service public TaskConsistentRuleService(IRepository visitTaskRepository, IRepository readingConsistentClinicalDataRepository, + IReadingClinicalDataService readingClinicalDataService, IRepository enrollRepository, IRepository taskConsistentRuleRepository, IRepository subjectUserRepository, IRepository subjectRepository, IDistributedLockProvider distributedLockProvider, IRepository trialRepository, IRepository trialSiteRepository, IRepository trialVirtualSiteCodeUpdateRepository, IVisitTaskHelpeService visitTaskCommonService) { _taskConsistentRuleRepository = taskConsistentRuleRepository; _visitTaskRepository = visitTaskRepository; this._readingConsistentClinicalDataRepository = readingConsistentClinicalDataRepository; + this._readingClinicalDataService = readingClinicalDataService; _subjectUserRepository = subjectUserRepository; _subjectRepository = subjectRepository; _enrollRepository = enrollRepository; @@ -122,15 +126,17 @@ namespace IRaCIS.Core.Application.Service var pageList = await visitTaskQueryable.ToPagedListAsync(queryVisitTask.PageIndex, queryVisitTask.PageSize, queryVisitTask.SortField, queryVisitTask.Asc, string.IsNullOrWhiteSpace(queryVisitTask.SortField), defalutSortArray); #region 统计一致性分析临床数据数量 - var readingIdList = pageList.CurrentPageData.Select(x => x.SouceReadModuleId).ToList(); - readingIdList.AddRange(pageList.CurrentPageData.Select(x => x.SourceSubjectVisitId).ToList()); - readingIdList = readingIdList.Where(x => x != null).ToList(); - - var readIds = await _readingConsistentClinicalDataRepository.Where(x => readingIdList.Contains(x.ReadingId)).Select(x => x.ReadingId).ToListAsync(); foreach (var item in pageList.CurrentPageData) { - item.ConsistentClinicalDataCount = readIds.Select(x => x == item.SouceReadModuleId).Count() + readIds.Select(x => x == item.SourceSubjectVisitId).Count(); + item.ConsistentClinicalDataCount = (await _readingClinicalDataService.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto() + { + SubjectId = item.SubjectId, + TrialId = item.TrialId, + SelectIsSign = false, + IsGetAllConsistencyAnalysis = false, + VisitTaskId = item.Id, + })).Count(); } #endregion diff --git a/IRaCIS.Core.Application/Service/Reading/Interface/IReadingClinicalDataService.cs b/IRaCIS.Core.Application/Service/Reading/Interface/IReadingClinicalDataService.cs index 521a9d843..24c4a39ad 100644 --- a/IRaCIS.Core.Application/Service/Reading/Interface/IReadingClinicalDataService.cs +++ b/IRaCIS.Core.Application/Service/Reading/Interface/IReadingClinicalDataService.cs @@ -31,5 +31,6 @@ namespace IRaCIS.Core.Application.Contracts Task DealVisiTaskClinicalDataSignedAsync(Guid trialId, Guid subjectId, Guid readingId, bool isVisit, Guid trialReadingCritrialId); Task SignConsistencyAnalysisReadingClinicalData(SignConsistencyAnalysisReadingClinicalDataInDto inDto); + } } \ No newline at end of file From 92facb02e8a1393cb1c0c31d717da0381e53eb3f Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 20 Aug 2024 10:35:37 +0800 Subject: [PATCH 11/15] =?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/Management/UserService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 3fe37375c..f10149ce6 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -816,6 +816,8 @@ namespace IRaCIS.Application.Services if (loginUser.LastLoginIP != iPRegion) { loginUser.LoginState = 2; + Console.WriteLine("loginUser.LastLoginIP:" + loginUser.LastLoginIP); + Console.WriteLine("iPRegion:" + iPRegion); } From 2740ed109acf0b3bf02db4c245b8f23480dca10b Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 20 Aug 2024 10:37:58 +0800 Subject: [PATCH 12/15] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs index 3f22371f2..7c2b014d7 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs @@ -41,6 +41,7 @@ namespace IRaCIS.Application.Contracts public string RealName { get; set; } = string.Empty; public int? Sex { get; set; } // 1-男 2-女 + /// /// LastLoginIP /// From d093c172a4c3e23452133fed0acfe174dc6e7be8 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 20 Aug 2024 10:56:00 +0800 Subject: [PATCH 13/15] =?UTF-8?q?=E4=BB=A3=E7=A0=81=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/Management/UserService.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index f10149ce6..3fe37375c 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -816,8 +816,6 @@ namespace IRaCIS.Application.Services if (loginUser.LastLoginIP != iPRegion) { loginUser.LoginState = 2; - Console.WriteLine("loginUser.LastLoginIP:" + loginUser.LastLoginIP); - Console.WriteLine("iPRegion:" + iPRegion); } From 92430c93b3983537f8019255546d68a29bdd4f24 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 20 Aug 2024 16:03:17 +0800 Subject: [PATCH 14/15] =?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/ClinicalData/ReadingClinicalDataService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs index f7694241b..e5ea2ae3e 100644 --- a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ReadingClinicalDataService.cs @@ -255,7 +255,7 @@ namespace IRaCIS.Application.Services var query = _readingClinicalDataRepository.AsQueryable(); if (inDto.StudyId != null) { - query = query.Where(x => x.StudyId == inDto.StudyId.Value); + query = query.Where(x => x.StudyId == inDto.StudyId.Value && x.TrialId==inDto.TrialId&&x.SubjectId==inDto.SubjectId); } else { From ee4fede7afb7c775a31983b96d56ee7150e88f76 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 21 Aug 2024 13:26:43 +0800 Subject: [PATCH 15/15] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/VisitTaskHelpeService.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 72553ebd3..3be59de67 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -17,6 +17,7 @@ using IRaCIS.Core.Infra.EFCore.Common; using System.Linq.Expressions; using IRaCIS.Core.Domain.Share.Reading; using IRaCIS.Core.Application.Service.Reading.Dto; +using System.Runtime.InteropServices; namespace IRaCIS.Core.Application.Service { @@ -26,7 +27,7 @@ namespace IRaCIS.Core.Application.Service /// 访视读片任务 /// [ApiExplorerSettings(GroupName = "Trial")] - public class VisitTaskHelpeService : IVisitTaskHelpeService + public class VisitTaskHelpeService : BaseService, IVisitTaskHelpeService { private readonly IRepository _visitTaskRepository; @@ -450,6 +451,19 @@ namespace IRaCIS.Core.Application.Service } + /// + /// 获取GetIsClinicalDataSignTest + /// + /// + /// + public async Task GetIsClinicalDataSignTest(Guid visitTask) + { + var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTask).FirstNotNullAsync(); + var clinicalDataConfirmList = _trialClinicalDataSetRepository.Where(t => t.TrialId == taskinfo.TrialId && t.IsConfirm).Include(t => t.TrialClinicalDataSetCriteriaList).ToList(); + + Guid readingid = taskinfo.SourceSubjectVisitId == null ? taskinfo.SouceReadModuleId!.Value : taskinfo.SourceSubjectVisitId.Value; + return IsClinicalDataSign(taskinfo.ReadingCategory, taskinfo.VisitTaskNum == 0m, taskinfo.TrialReadingCriterionId, clinicalDataConfirmList, readingid, taskinfo.TrialId); ; + } // 有可能在任务生成之前 就签名完了临床数据 private bool IsClinicalDataSign(ReadingCategory readingCategory, bool isbaseLine, Guid trialReadingCriterionId, List trialClinicalDataSetList, Guid readingId, Guid trialId) @@ -468,7 +482,9 @@ namespace IRaCIS.Core.Application.Service //CRC 的自动签名 不用管 只用处理PM的就好 var haveSignedCount = _readingClinicalDataRepository - .Where(t => t.TrialId == trialId && t.IsSign && t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned && t.ReadingId == readingId && t.ClinicalDataTrialSet.UploadRole == UploadRole.PM).Count(); + .Where(t => t.TrialId == trialId && t.IsSign + && t.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(x=>x.TrialReadingCriterionId== trialReadingCriterionId) + && t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned && t.ReadingId == readingId && t.ClinicalDataTrialSet.UploadRole == UploadRole.PM).Count(); var readModule = _readModuleRepository.Where(t => t.Id == readingId).FirstOrDefault();