From 80ad4be4cb8f096117dc944f822db5429a72333d Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 5 May 2023 10:08:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs | 2 +- IRaCIS.Core.Domain/Dcotor/Doctor.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs index 25fb24457..9b95cf41d 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs @@ -92,7 +92,7 @@ namespace IRaCIS.Application.Services .WhereIf(!string.IsNullOrWhiteSpace(selectionQuery.Name), t => t.ChineseName.Contains(selectionQuery.Name) || (t.LastName + t.FirstName).Contains(selectionQuery.Name)) .WhereIf(evaluationCriteriaCount > 0, t => t.TrialExperienceCriteriaList.Count(t => selectionQuery.EvaluationCriteriaIdList.Contains(t.EvaluationCriteriaId)) == evaluationCriteriaCount) //用户类型 看到简历的范围这里需要确认 - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ReviewerCoordinator, t => t.UserList.Any(u => u.UserId == _userInfo.Id)) + //.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ReviewerCoordinator, t => t.UserList.Any(u => u.UserId == _userInfo.Id)) .WhereIf(count > 0, t => t.DoctorDicRelationList.Count(u => guidList.Contains(u.DictionaryId)) == count) .WhereIf(selectionQuery.EnrollStatus != null && selectionQuery.EnrollStatus == (int)ReviewerEnrollStatus.Yes, t => t.EnrollList.Any(u => u.EnrollStatus == EnrollStatus.DoctorReading)) diff --git a/IRaCIS.Core.Domain/Dcotor/Doctor.cs b/IRaCIS.Core.Domain/Dcotor/Doctor.cs index ab0837d23..fcfdcfff7 100644 --- a/IRaCIS.Core.Domain/Dcotor/Doctor.cs +++ b/IRaCIS.Core.Domain/Dcotor/Doctor.cs @@ -18,9 +18,9 @@ namespace IRaCIS.Core.Domain.Models public List TrialExperienceCriteriaList { get; set; } - // UserDoctor һҽ ɱû - [JsonIgnore] - public List UserList { get; set; } + //// UserDoctor һҽ ɱû + //[JsonIgnore] + //public List UserList { get; set; } [JsonIgnore] public List EnrollList { get; set; } From 3b37cec42dee9c1650315a964cdb1be8c6a92259 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 5 May 2023 10:18:50 +0800 Subject: [PATCH 2/3] =?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/Doctor/DoctorService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs index 6a1b78599..bb8df3f3a 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs @@ -94,7 +94,7 @@ namespace IRaCIS.Application.Services await _doctorRepository.AddAsync(doctor); //_doctorRepository.Add(doctor); - await _repository.AddAsync(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id }); + //await _repository.AddAsync(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id }); //_userDoctorRepository.Add(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id }); var success = await _repository.SaveChangesAsync(); From f9277de9efa416bf467dcb7383f0ab659cbe314c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 5 May 2023 14:18:48 +0800 Subject: [PATCH 3/3] =?UTF-8?q?IR=20=E7=94=B3=E8=AF=B7=E9=87=8D=E9=98=85?= =?UTF-8?q?=EF=BC=8C=E4=BB=85=E4=BB=85=E7=94=9F=E6=95=88=E7=9A=84=E8=AE=BF?= =?UTF-8?q?=E8=A7=86=E4=BB=BB=E5=8A=A1=EF=BC=8CPM=E5=90=8C=E6=84=8F?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E6=89=8D=E7=94=9F=E6=88=90?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/VisitTaskService.cs | 8 +++++--- .../Service/ImageAndDoc/DicomArchiveService.cs | 6 +++--- .../SiteSurvey/TrialSiteSurveyService.cs | 18 +++++++++--------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 6108b46bf..d2d3ce0b7 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1854,6 +1854,8 @@ namespace IRaCIS.Core.Application.Service.Allocation foreach (var influenceTask in influenceTaskList) { + var beforeTaskState = influenceTask.TaskState; + //已签名的任务 设置转变后的标志 if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) { @@ -1879,7 +1881,7 @@ namespace IRaCIS.Core.Application.Service.Allocation } - var beforeTaskState = influenceTask.TaskState; + if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) { @@ -1895,7 +1897,7 @@ namespace IRaCIS.Core.Application.Service.Allocation } // 影响的任务 仅仅访视类别的才生成 或者就是IR 申请的任务 - if (influenceTask.ReadingCategory == ReadingCategory.Visit || influenceTask.Id == origenalTask.Id) + if ((beforeTaskState==TaskState.Effect && influenceTask.ReadingCategory == ReadingCategory.Visit) || influenceTask.Id == origenalTask.Id) { @@ -1907,7 +1909,7 @@ namespace IRaCIS.Core.Application.Service.Allocation } - //当前任务是转变任务,并且影响列表里有转变之前的任务 那么该访视任务就不生成 + // i1.1标准 当前任务是转变任务,并且影响列表里有转变之前的任务 那么该访视任务就不生成 if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.BeforeConvertedTaskId != null && influenceTaskList.Any(t => t.Id == influenceTask.BeforeConvertedTaskId)) { continue; diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs index 0af64f1d0..f797c8ca4 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs @@ -393,9 +393,9 @@ namespace IRaCIS.Core.Application.Services ProtocolName = dataset.GetSingleValueOrDefault(DicomTag.ProtocolName, string.Empty), ImagerPixelSpacing = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty), - AcquisitionTime = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty), - AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty), - TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty), + AcquisitionTime = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionTime, string.Empty), + AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionNumber, string.Empty), + TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.TriggerTime, string.Empty), SiteId = dicomStudy.SiteId, TrialId = dicomStudy.TrialId, diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index d54842b95..cba0db1e8 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -872,16 +872,16 @@ namespace IRaCIS.Core.Application.Contracts //判断TrialUser中是否存在 不存在就插入 if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == userId, true)) { - - await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now }); - - await _repository.AddAsync(new TrialSiteUser() { TrialId = trialId, SiteId = siteId, UserId = userId }); - - await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable }); - - await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == userInfo.Id, u => new TrialSiteUserSurvey() { IsJoin = true }); - + await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now }); } + if (!await _repository.AnyAsync(t => t.TrialId == trialId && t.UserId == userId && t.SiteId==siteId, true)) + { + await _repository.AddAsync(new TrialSiteUser() { TrialId = trialId, SiteId = siteId, UserId = userId }); + } + + await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable }); + + await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == userInfo.Id, u => new TrialSiteUserSurvey() { IsJoin = true }); await _mailVerificationService.SiteSurveyUserJoinEmail(trialId, userId, joinCommand.BaseUrl, joinCommand.RouteUrl);