From f4b082b3c54d39f7d0d35632904ff0e3b379f92a Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Tue, 7 Mar 2023 10:58:22 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AF=81=E4=B9=A6?=
=?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=8E=AF=E5=A2=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../appsettings.CertificateApply.json | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 IRaCIS.Core.API/appsettings.CertificateApply.json
diff --git a/IRaCIS.Core.API/appsettings.CertificateApply.json b/IRaCIS.Core.API/appsettings.CertificateApply.json
new file mode 100644
index 000000000..2c04ce923
--- /dev/null
+++ b/IRaCIS.Core.API/appsettings.CertificateApply.json
@@ -0,0 +1,33 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "ConnectionStrings": {
+ "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_Certificate;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true",
+ "Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Hangfire_IRaCIS;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true"
+
+ },
+ "BasicSystemConfig": {
+
+ "OpenUserComplexPassword": false,
+
+ "OpenSignDocumentBeforeWork": false,
+
+ "OpenTrialRelationDelete": true,
+
+ "OpenLoginLimit": false
+ },
+
+ "SystemEmailSendConfig": {
+ "Port": 465,
+ "Host": "smtp.qiye.aliyun.com",
+ "FromEmail": "test@extimaging.com",
+ "FromName": "Test_IRC",
+ "AuthorizationCode": "SHzyyl2021"
+ }
+
+}
From c706cc97ccb7ee778fb97b3a2bb1a8aaae20baf9 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Tue, 7 Mar 2023 11:09:37 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E5=B8=83?=
=?UTF-8?q?=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.API/Properties/launchSettings.json | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/IRaCIS.Core.API/Properties/launchSettings.json b/IRaCIS.Core.API/Properties/launchSettings.json
index adf4910a2..a5c135eb9 100644
--- a/IRaCIS.Core.API/Properties/launchSettings.json
+++ b/IRaCIS.Core.API/Properties/launchSettings.json
@@ -45,6 +45,14 @@
"ASPNETCORE_ENVIRONMENT": "Production"
},
"applicationUrl": "http://localhost:6300"
+ },
+ "IRaCIS.CertificateApply": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "CertificateApply"
+ },
+ "applicationUrl": "http://localhost:6400"
}
}
}
\ No newline at end of file
From cad6ee8dfab9dcfd9a9450a8130088c1c646c35f Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Tue, 7 Mar 2023 11:27:28 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AB=E6=AC=A1?=
=?UTF-8?q?=E8=AE=BF=E8=A7=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 7 ++
.../Triggers/SubjectVisitFinalVisitTrigger.cs | 80 +++++++------------
2 files changed, 34 insertions(+), 53 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 26d9aad82..7f6c1b47c 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -8614,6 +8614,13 @@
处理 访视 末次评估 会影响Subject 状态
+
+
+ 处理生成阅片期 以及后续访视状态
+
+
+
+
处理 访视 1、提交状态 2、执行状态 3、最早最晚 拍片日期
diff --git a/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs b/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs
index 8164b7972..4f9665048 100644
--- a/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs
+++ b/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs
@@ -56,13 +56,9 @@ namespace IRaCIS.Core.Application.Triggers
{
await VerifyDealFinalVisitAsync(subjectVisit);
- await _subjectRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisit.SubjectId,
- u => new Subject() { Status = SubjectStatus.OutOfVisit, FinalSubjectVisitId = subjectVisit.Id });
+ await DealGenerateReadModuleAndSubjectVisit(subjectVisit);
-
- //末次访视后的 访视设置为不可用
- await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == subjectVisit.SubjectId && t.VisitNum > subjectVisit.VisitNum &&
- t.VisitExecuted == VisitExecutedEnum.UnExecuted, u => new SubjectVisit() { VisitExecuted = VisitExecutedEnum.Unavailable });
+
}
else
{
@@ -73,18 +69,6 @@ namespace IRaCIS.Core.Application.Triggers
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == subjectVisit.SubjectId && t.VisitExecuted == VisitExecutedEnum.Unavailable, u => new SubjectVisit() { VisitExecuted = VisitExecutedEnum.UnExecuted });
- //var readingPeriodSet =await _readingPeriodSetRepository.Where(x => x.TrialId == subjectVisit.TrialId && x.IsGlobal).FirstOrDefaultAsync();
-
- //if (readingPeriodSet != null)
- //{
- // await _readingPeriodPlanRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == readingPeriodSet.Id && x.SubjectVisitId == subjectVisit.Id);
- // await _readModuleRepository.UpdatePartialFromQueryAsync(x => x.SubjectVisitId == subjectVisit.Id && x.ReadingPeriodSetId == readingPeriodSet.Id,x=> new ReadModule() {
- // IsDeleted = true
- // });
- // await _readModuleRepository.SaveChangesAsync();
- //}
-
-
}
}
@@ -93,19 +77,29 @@ namespace IRaCIS.Core.Application.Triggers
else if (context.ChangeType == ChangeType.Added && subjectVisit.IsFinalVisit)
{
await VerifyDealFinalVisitAsync(subjectVisit);
+
+ await DealGenerateReadModuleAndSubjectVisit(subjectVisit);
}
}
- private async Task VerifyDealFinalVisitAsync(SubjectVisit subjectVisit)
+ ///
+ /// 处理生成阅片期 以及后续访视状态
+ ///
+ ///
+ ///
+ private async Task DealGenerateReadModuleAndSubjectVisit(SubjectVisit subjectVisit)
{
- if (await _subjectVisitRepository.AnyAsync(t => t.SubjectId == subjectVisit.SubjectId && t.VisitNum > subjectVisit.VisitNum &&
- (t.SubmitState == SubmitStateEnum.ToSubmit || t.SubmitState == SubmitStateEnum.Submitted)))
- {
- throw new BusinessValidationFailedException("该受试者已有后续访视已上传影像或已提交,当前访视不允许设置为末次访视。");
- }
+
+ await _subjectRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisit.SubjectId,
+ u => new Subject() { Status = SubjectStatus.OutOfVisit, FinalSubjectVisitId = subjectVisit.Id });
- #region 末次访视生成阅片器和任务 更换位置 废弃
+ //末次访视后的 访视设置为不可用
+ await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == subjectVisit.SubjectId && t.VisitNum > subjectVisit.VisitNum &&
+ t.VisitExecuted == VisitExecutedEnum.UnExecuted, u => new SubjectVisit() { VisitExecuted = VisitExecutedEnum.Unavailable });
+
+
+ #region 末次访视生成阅片器和任务
var trialId = subjectVisit.TrialId;
@@ -121,34 +115,6 @@ namespace IRaCIS.Core.Application.Triggers
var criterionList = await _repository.Where(x => x.TrialId == trialId && x.ReadingInfoSignTime != null && x.IsConfirm && x.IsReadingPeriod && x.IsReadingTaskViewInOrder).ToListAsync();
foreach (var item in criterionList)
{
- //ReadingPeriodSet? readingPeriodSet = await _readingPeriodSetRepository.FirstOrDefaultNoTrackingAsync(x => x.TrialId == trialId && x.IsGlobal && x.TrialReadingCriterionId == item.Id);
-
- //if (readingPeriodSet == null)
- //{
- // readingPeriodSet = new ReadingPeriodSet()
- // {
- // Id = NewId.NextGuid(),
- // ReadingScope = ReadingScopeEnum.All,
- // ReadingSetType = ReadingSetType.ImageReading,
- // IsTakeEffect = ReadingPeriodStatus.TakeEffect,
- // ReadingPeriodName = "Global",
- // TrialId = trialId,
- // EffectOfTime = DateTime.Now,
- // IsGlobal = true,
- // TrialReadingCriterionId = item.Id,
- // };
-
- // await _readingPeriodSetRepository.AddAsync(readingPeriodSet);
-
- //}
-
- //await _readingPeriodPlanRepository.AddAsync(new ReadingPeriodPlan()
- //{
- // SubjectVisitId = subjectVisitId,
- // ReadingPeriodSetId = readingPeriodSet.Id,
- //});
-
-
var readModule = await _readModuleRepository.Where(x => x.ReadingSetType == ReadingSetType.ImageReading && x.TrialReadingCriterionId == item.Id && x.SubjectVisitId == subjectVisitId).FirstOrDefaultAsync();
@@ -207,7 +173,15 @@ namespace IRaCIS.Core.Application.Triggers
#endregion
+ }
+ private async Task VerifyDealFinalVisitAsync(SubjectVisit subjectVisit)
+ {
+ if (await _subjectVisitRepository.AnyAsync(t => t.SubjectId == subjectVisit.SubjectId && t.VisitNum > subjectVisit.VisitNum &&
+ (t.SubmitState == SubmitStateEnum.ToSubmit || t.SubmitState == SubmitStateEnum.Submitted)))
+ {
+ throw new BusinessValidationFailedException("该受试者已有后续访视已上传影像或已提交,当前访视不允许设置为末次访视。");
+ }
}
}
From 81406bfcccad1bfb8237bbaaa62810febd512b9f Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Tue, 7 Mar 2023 13:53:22 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E5=AF=BC=E5=87=BAbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Application/Service/Common/ExcelExportService.cs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
index 94470861c..167d08412 100644
--- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
+++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
@@ -461,8 +461,9 @@ namespace IRaCIS.Core.Application.Service.Common
var dicomStudyQuery = _repository.Where(t => t.TrialId == studyQuery.TrialId)
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
- .WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
+ .WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
+ .Where(x => x.SubjectVisit.AuditState == AuditStateEnum.QCPassed)
.Select(t => new UnionStudyExportDTO()
{
VisitName = t.SubjectVisit.VisitName,
@@ -490,7 +491,7 @@ namespace IRaCIS.Core.Application.Service.Common
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression2)
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
-
+ .Where(x => x.SubjectVisit.AuditState == AuditStateEnum.QCPassed)
.Select(t => new UnionStudyExportDTO()
{
From 4a05a09da5f61616e8fd1af83fa13b3a7ae01b6b Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Tue, 7 Mar 2023 15:15:12 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=9E=E9=80=80?=
=?UTF-8?q?=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
index 2b0f0ba19..7e5d58c6f 100644
--- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
@@ -1982,7 +1982,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
if (criterionConfig.IsReadingTaskViewInOrder)
{
- Expression> filterExpression = t => t.TrialId == trialId && t.SubjectId == task.SubjectId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false;
+ Expression> filterExpression = t => t.TrialId == trialId && t.SubjectId == task.SubjectId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.TaskAllocationState == TaskAllocationState.Allocated;
//另一个阅片人的任务根据任务进度自动进入PM退回或PM申请重阅