Compare commits
59 Commits
Test_IRC_N
...
EICS-V1.5.
Author | SHA1 | Date |
---|---|---|
|
b0ef2dc8ab | |
|
ccf4bbdff9 | |
|
c3e36991b8 | |
|
81f6c10f23 | |
|
719ca071e1 | |
|
dad420a7e8 | |
|
d84aedf135 | |
|
34f3b1607e | |
|
7fa73e0054 | |
|
c146c2bfd2 | |
|
2a1220899e | |
|
874d36de28 | |
|
0283052555 | |
|
effef5ad65 | |
|
43d260e036 | |
|
19708240b2 | |
|
0999bae749 | |
|
e6bd35ae04 | |
|
102e193ae8 | |
|
20d557e795 | |
|
593ab42882 | |
|
b56d256e10 | |
|
614a3bd70e | |
|
2eb3b04365 | |
|
1fa3a5a181 | |
|
cd2007c4fd | |
|
67e710eac0 | |
|
ef451d82ec | |
|
899ebf2a30 | |
|
f233d27f96 | |
|
9e8ab8acca | |
|
2265387f47 | |
|
baf8f39bc6 | |
|
3fa14d92ae | |
|
e6c577e68b | |
|
bb111dbbeb | |
|
0df0b10a72 | |
|
0a7ba9f0f5 | |
|
cd88990c32 | |
|
d53a1300fc | |
|
07332ff3e1 | |
|
8195a1cf3e | |
|
f5e5a47624 | |
|
28608f3ecb | |
|
bb2da7ca81 | |
|
713518a68c | |
|
bc448da297 | |
|
8447878cb2 | |
|
1b5a9673f6 | |
|
27711f4184 | |
|
bb9bac1edf | |
|
41ae2febc7 | |
|
c072c526e2 | |
|
d6bb98b84f | |
|
42587ee59f | |
|
62a964a3ea | |
|
72447eb82f | |
|
2f83c27fde | |
|
b219593f61 |
|
@ -32,6 +32,7 @@ using IRaCIS.Core.Application.Contracts;
|
||||||
using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
||||||
using DocumentFormat.OpenXml.Spreadsheet;
|
using DocumentFormat.OpenXml.Spreadsheet;
|
||||||
using AutoMapper.QueryableExtensions;
|
using AutoMapper.QueryableExtensions;
|
||||||
|
using NetTopologySuite.Algorithm;
|
||||||
|
|
||||||
namespace IRaCIS.Api.Controllers
|
namespace IRaCIS.Api.Controllers
|
||||||
{
|
{
|
||||||
|
@ -226,23 +227,7 @@ namespace IRaCIS.Api.Controllers
|
||||||
|
|
||||||
var email = returnModel.Data.BasicInfo.EMail;
|
var email = returnModel.Data.BasicInfo.EMail;
|
||||||
|
|
||||||
#region 隐藏Email
|
var hiddenEmail = EmailMaskHelper.MaskEmail(email);
|
||||||
// 找到 "@" 符号的位置
|
|
||||||
int atIndex = email.IndexOf('@');
|
|
||||||
|
|
||||||
// 替换 "@" 符号前的中间两位为星号
|
|
||||||
string visiblePart = email.Substring(0, atIndex);
|
|
||||||
|
|
||||||
int startIndex = (visiblePart.Length - 2) / 2;
|
|
||||||
|
|
||||||
// 替换中间两位字符为星号
|
|
||||||
string hiddenPartBeforeAt = visiblePart.Substring(0, startIndex) + "**" + visiblePart.Substring(startIndex + 2);
|
|
||||||
|
|
||||||
string afterAt = email.Substring(atIndex + 1);
|
|
||||||
|
|
||||||
// 组合隐藏和可见部分
|
|
||||||
string hiddenEmail = hiddenPartBeforeAt + "@" + afterAt;
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
returnModel.Data.BasicInfo.EMail = hiddenEmail;
|
returnModel.Data.BasicInfo.EMail = hiddenEmail;
|
||||||
|
|
||||||
|
|
|
@ -530,6 +530,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
studyMonitor.StudyCode = noneDicomStudy.StudyCode;
|
studyMonitor.StudyCode = noneDicomStudy.StudyCode;
|
||||||
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
||||||
studyMonitor.IP = _userInfo.IP;
|
studyMonitor.IP = _userInfo.IP;
|
||||||
|
studyMonitor.IsSuccess = true;
|
||||||
|
|
||||||
await _repository.SaveChangesAsync();
|
await _repository.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,6 @@
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
|
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
|
||||||
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="2.0.3" />
|
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="2.0.3" />
|
||||||
<PackageReference Include="Serilog.Sinks.Email" Version="3.0.0" />
|
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.6.2" />
|
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.6.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -54,11 +54,11 @@
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:6100"
|
"applicationUrl": "http://localhost:6100"
|
||||||
},
|
},
|
||||||
"IRaCIS.US_IRC": {
|
"IRaCIS.US_Uat_IRC": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "US_IRC"
|
"ASPNETCORE_ENVIRONMENT": "US_Uat_IRC"
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:6100"
|
"applicationUrl": "http://localhost:6100"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
using Serilog.Sinks.Email;
|
//using Serilog.Sinks.Email;
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
"ObjectStoreUse": "AliyunOSS",
|
"ObjectStoreUse": "AliyunOSS",
|
||||||
"AliyunOSS": {
|
"AliyunOSS": {
|
||||||
"regionId": "cn-shanghai",
|
"regionId": "cn-shanghai",
|
||||||
|
"internalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
|
@ -42,7 +43,11 @@
|
||||||
"LoginMaxFailCount": 5,
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
"LoginFailLockMinutes": 30,
|
"LoginFailLockMinutes": 30,
|
||||||
"AutoLoginOutMinutes": 60
|
"AutoLoginOutMinutes": 60,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10
|
||||||
},
|
},
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
"Port": 465,
|
"Port": 465,
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
"ObjectStoreUse": "AliyunOSS",
|
"ObjectStoreUse": "AliyunOSS",
|
||||||
"AliyunOSS": {
|
"AliyunOSS": {
|
||||||
"regionId": "cn-shanghai",
|
"regionId": "cn-shanghai",
|
||||||
|
"internalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
|
@ -42,9 +43,13 @@
|
||||||
"LoginMaxFailCount": 5,
|
"LoginMaxFailCount": 5,
|
||||||
"LoginFailLockMinutes": 30,
|
"LoginFailLockMinutes": 30,
|
||||||
|
|
||||||
"AutoLoginOutMinutes": 60,
|
"AutoLoginOutMinutes": 360,
|
||||||
|
|
||||||
"OpenLoginMFA": false
|
"OpenLoginMFA": false,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -55,6 +60,8 @@
|
||||||
"FromName": "IRC",
|
"FromName": "IRC",
|
||||||
"AuthorizationCode": "ExtImg@2022",
|
"AuthorizationCode": "ExtImg@2022",
|
||||||
"SiteUrl": "http://irc.extimaging.com/login",
|
"SiteUrl": "http://irc.extimaging.com/login",
|
||||||
|
"OrganizationName": "Extlmaging",
|
||||||
|
"OrganizationNameCN": "Extlmaging",
|
||||||
"CompanyName": "Extensive Imaging",
|
"CompanyName": "Extensive Imaging",
|
||||||
"CompanyNameCN": "上海展影医疗科技有限公司",
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
"CompanyShortName": "Extensive Imaging",
|
"CompanyShortName": "Extensive Imaging",
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
"AliyunOSS": {
|
"AliyunOSS": {
|
||||||
"regionId": "cn-shanghai",
|
"regionId": "cn-shanghai",
|
||||||
|
"internalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
"endPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"endPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
|
@ -62,7 +63,11 @@
|
||||||
|
|
||||||
"AutoLoginOutMinutes": 1,
|
"AutoLoginOutMinutes": 1,
|
||||||
|
|
||||||
"OpenLoginMFA": false
|
"OpenLoginMFA": false,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10
|
||||||
},
|
},
|
||||||
|
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
|
@ -74,6 +79,8 @@
|
||||||
|
|
||||||
"SiteUrl": "http://irc.test.extimaging.com/login",
|
"SiteUrl": "http://irc.test.extimaging.com/login",
|
||||||
|
|
||||||
|
"OrganizationName": "Extlmaging",
|
||||||
|
"OrganizationNameCN": "Extlmaging",
|
||||||
"CompanyName": "Extensive Imaging",
|
"CompanyName": "Extensive Imaging",
|
||||||
"CompanyNameCN": "上海展影医疗科技有限公司",
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
"CompanyShortName": "Extensive Imaging",
|
"CompanyShortName": "Extensive Imaging",
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"RemoteNew": "Server=us-prod-mssql-service,1433;Database=US_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
"Hangfire": "Server=us-prod-mssql-service,1433;Database=US_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
//"RemoteNew": "Server=44.210.231.169,1435;Database=US_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
//"Hangfire": "Server=44.210.231.169,1435;Database=US_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
},
|
||||||
|
|
||||||
|
"ObjectStoreService": {
|
||||||
|
"ObjectStoreUse": "AWS",
|
||||||
|
"MinIO": {
|
||||||
|
"endPoint": "44.210.231.169",
|
||||||
|
"port": "9001",
|
||||||
|
"useSSL": false,
|
||||||
|
"accessKey": "e9bT1isTOqSAUxb6wd4n",
|
||||||
|
"secretKey": "b5TaDzNdQCBtCvfm8eZ3dR6yY7tfZu2JYze2Po1i",
|
||||||
|
"bucketName": "prod-irc-us",
|
||||||
|
"viewEndpoint": "http://44.210.231.169:9001/prod-irc-us/"
|
||||||
|
},
|
||||||
|
|
||||||
|
"AWS": {
|
||||||
|
"endPoint": "s3.us-east-1.amazonaws.com",
|
||||||
|
"useSSL": true,
|
||||||
|
"accessKey": "AKIAW3MEAFJX5P32P6NA",
|
||||||
|
"secretKey": "soKfYlzZE11Zi4RyTjXp0myXN0U3U+ka8rT49+B/",
|
||||||
|
"bucketName": "ei-med-s3-lili-store",
|
||||||
|
"viewEndpoint": "https://ei-med-s3-lili-store.s3.amazonaws.com/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BasicSystemConfig": {
|
||||||
|
|
||||||
|
"OpenUserComplexPassword": false,
|
||||||
|
|
||||||
|
"OpenSignDocumentBeforeWork": false,
|
||||||
|
|
||||||
|
"OpenTrialRelationDelete": true,
|
||||||
|
|
||||||
|
"OpenLoginLimit": false,
|
||||||
|
|
||||||
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
|
"LoginFailLockMinutes": 30,
|
||||||
|
|
||||||
|
"AutoLoginOutMinutes": 60,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10,
|
||||||
|
|
||||||
|
"OpenLoginMFA": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"SystemEmailSendConfig": {
|
||||||
|
"Port": 587,
|
||||||
|
"Host": "smtp-mail.outlook.com",
|
||||||
|
"FromEmail": "donotreply@elevateimaging.ai",
|
||||||
|
"FromName": "LiLi",
|
||||||
|
"AuthorizationCode": "Q#669869497420ul",
|
||||||
|
|
||||||
|
"OrganizationName": "Elevate Imaging",
|
||||||
|
"OrganizationNameCN": "Elevate Imaging",
|
||||||
|
"CompanyName": "Elevate Imaging Inc.",
|
||||||
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
|
"CompanyShortName": "Elevate Imaging",
|
||||||
|
"CompanyShortNameCN": "展影医疗",
|
||||||
|
"SiteUrl": "https://lili.elevateimaging.ai/login"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -7,19 +7,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"RemoteNew": "Server=us-mssql-service,1433;Database=Prod_US_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
"RemoteNew": "Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
"Hangfire": "Server=us-mssql-service,1433;Database=Prod_US_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
"Hangfire": "Server=106.14.89.110,1435;Database=Test_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
|
||||||
//"RemoteNew": "Server=44.218.11.19,1435;Database=Prod_US_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
|
||||||
//"Hangfire": "Server=44.218.11.19,1435;Database=Prod_US_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"ObjectStoreService": {
|
"ObjectStoreService": {
|
||||||
|
|
||||||
"ObjectStoreUse": "AWS",
|
"ObjectStoreUse": "MinIO",
|
||||||
|
|
||||||
"AliyunOSS": {
|
"AliyunOSS": {
|
||||||
"regionId": "cn-shanghai",
|
"regionId": "cn-shanghai",
|
||||||
|
"internalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
"endPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"endPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
|
@ -30,13 +27,20 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"MinIO": {
|
"MinIO": {
|
||||||
"endPoint": "192.168.3.68",
|
//"endPoint": "hir-oss.uat.extimaging.com",
|
||||||
"port": "8001",
|
//"port": "443",
|
||||||
|
//"useSSL": true,
|
||||||
|
//"viewEndpoint": "https://hir-oss.uat.extimaging.com/hir-uat",
|
||||||
|
|
||||||
|
"endPoint": "47.117.164.182",
|
||||||
|
"port": "9001",
|
||||||
"useSSL": false,
|
"useSSL": false,
|
||||||
"accessKey": "IDFkwEpWej0b4DtiuThL",
|
"viewEndpoint": "http://47.117.164.182:9001/test-irc-us",
|
||||||
"secretKey": "Lhuu83yMhVwu7c1SnjvGY6lq74jzpYqifK6Qtj4h",
|
|
||||||
"bucketName": "test",
|
"accessKey": "b9Ul0e98xPzt6PwRXA1Q",
|
||||||
"viewEndpoint": "http://192.168.3.68:8001/test/"
|
"secretKey": "DzMaU2L4OXl90uytwOmDXF2encN0Jf4Nxu2XkYqQ",
|
||||||
|
"bucketName": "test-irc-us"
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"AWS": {
|
"AWS": {
|
||||||
|
@ -61,19 +65,27 @@
|
||||||
"LoginMaxFailCount": 5,
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
"LoginFailLockMinutes": 30,
|
"LoginFailLockMinutes": 30,
|
||||||
"AutoLoginOutMinutes": 60
|
"AutoLoginOutMinutes": 60,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10
|
||||||
},
|
},
|
||||||
|
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
"Port": 465,
|
"Port": 587,
|
||||||
"Host": "smtp.qiye.aliyun.com",
|
"Host": "smtp-mail.outlook.com",
|
||||||
"FromEmail": "test@extimaging.com",
|
"FromEmail": "donotreply@elevateimaging.ai",
|
||||||
"FromName": "Test_IRC",
|
"FromName": "LiLi",
|
||||||
"AuthorizationCode": "SHzyyl2021",
|
"AuthorizationCode": "Q#669869497420ul",
|
||||||
"CompanyName": "Elevate Imaging",
|
|
||||||
|
"OrganizationName": "Elevate Imaging",
|
||||||
|
"OrganizationNameCN": "Elevate Imaging",
|
||||||
|
"CompanyName": "Elevate Imaging Inc.",
|
||||||
"CompanyNameCN": "上海展影医疗科技有限公司",
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
"CompanyShortName": "Elevate Imaging",
|
"CompanyShortName": "Elevate Imaging",
|
||||||
"CompanyShortNameCN": "展影医疗"
|
"CompanyShortNameCN": "展影医疗",
|
||||||
|
"SiteUrl": "https://lili.test.elevateimaging.ai/login"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"RemoteNew": "Server=us-mssql-service,1433;Database=US_Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
"Hangfire": "Server=us-mssql-service,1433;Database=US_Uat_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
|
||||||
|
//"RemoteNew": "Server=3.226.182.187,1435;Database=US_Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
//"Hangfire": "Server=3.226.182.187,1435;Database=US_Uat_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ObjectStoreService": {
|
||||||
|
|
||||||
|
"ObjectStoreUse": "AWS",
|
||||||
|
|
||||||
|
"MinIO": {
|
||||||
|
//"endPoint": "hir-minio.uat.elevateimaging.ai",
|
||||||
|
//"port": "443",
|
||||||
|
//"useSSL": true,
|
||||||
|
//"viewEndpoint": "https://hir-minio.uat.elevateimaging.ai/uat-irc-us",
|
||||||
|
|
||||||
|
"endPoint": "3.226.182.187",
|
||||||
|
"port": "9001",
|
||||||
|
"useSSL": false,
|
||||||
|
"viewEndpoint": "http://44.218.11.19:9001/uat-irc-us",
|
||||||
|
|
||||||
|
"accessKey": "lH8DkKskLuDqPaiubuSQ",
|
||||||
|
"secretKey": "pdPdicvvLeH7xAC5yFUrI7odMyBfOXxvVWMvKYV4",
|
||||||
|
"bucketName": "uat-irc-us"
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
"AWS": {
|
||||||
|
"endPoint": "s3.us-east-1.amazonaws.com",
|
||||||
|
"useSSL": true,
|
||||||
|
"accessKey": "AKIAW3MEAFJXUO6XYFYN",
|
||||||
|
"secretKey": "AeX5r4xHQH7tNJlTTFVv5/zBXie1Kj+mAayKrukp",
|
||||||
|
"bucketName": "ei-med-s3-lili-uat-store",
|
||||||
|
"viewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BasicSystemConfig": {
|
||||||
|
|
||||||
|
"OpenUserComplexPassword": false,
|
||||||
|
|
||||||
|
"OpenSignDocumentBeforeWork": false,
|
||||||
|
|
||||||
|
"OpenTrialRelationDelete": true,
|
||||||
|
|
||||||
|
"OpenLoginLimit": false,
|
||||||
|
|
||||||
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
|
"LoginFailLockMinutes": 30,
|
||||||
|
"AutoLoginOutMinutes": 60,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10,
|
||||||
|
|
||||||
|
"OpenLoginMFA": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"SystemEmailSendConfig": {
|
||||||
|
"Port": 587,
|
||||||
|
"Host": "smtp-mail.outlook.com",
|
||||||
|
"FromEmail": "donotreply@elevateimaging.ai",
|
||||||
|
"FromName": "LiLi",
|
||||||
|
"AuthorizationCode": "Q#669869497420ul",
|
||||||
|
|
||||||
|
"OrganizationName": "Elevate Imaging",
|
||||||
|
"OrganizationNameCN": "Elevate Imaging",
|
||||||
|
"CompanyName": "Elevate Imaging Inc.",
|
||||||
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
|
"CompanyShortName": "Elevate Imaging",
|
||||||
|
"CompanyShortNameCN": "展影医疗",
|
||||||
|
"SiteUrl": "https://lili.test.elevateimaging.ai/login"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -12,10 +12,11 @@
|
||||||
},
|
},
|
||||||
"ObjectStoreService": {
|
"ObjectStoreService": {
|
||||||
|
|
||||||
"ObjectStoreUse": "MinIO",
|
"ObjectStoreUse": "AliyunOSS",
|
||||||
|
|
||||||
"AliyunOSS": {
|
"AliyunOSS": {
|
||||||
"regionId": "cn-shanghai",
|
"regionId": "cn-shanghai",
|
||||||
|
"internalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
|
@ -27,12 +28,12 @@
|
||||||
|
|
||||||
"MinIO": {
|
"MinIO": {
|
||||||
"endPoint": "hir-oss.uat.extimaging.com",
|
"endPoint": "hir-oss.uat.extimaging.com",
|
||||||
"port": "80",
|
//"port": "80",
|
||||||
"useSSL": false,
|
//"useSSL": false,
|
||||||
"viewEndpoint": "http://hir-oss.uat.extimaging.com/irc-uat",
|
//"viewEndpoint": "http://hir-oss.uat.extimaging.com/irc-uat",
|
||||||
//"port": "443",
|
"port": "443",
|
||||||
//"useSSL": true,
|
"useSSL": true,
|
||||||
//"viewEndpoint": "https://hir-oss.uat.extimaging.com/irc-uat",
|
"viewEndpoint": "https://hir-oss.uat.extimaging.com/irc-uat",
|
||||||
"accessKey": "b9Ul0e98xPzt6PwRXA1Q",
|
"accessKey": "b9Ul0e98xPzt6PwRXA1Q",
|
||||||
"secretKey": "DzMaU2L4OXl90uytwOmDXF2encN0Jf4Nxu2XkYqQ",
|
"secretKey": "DzMaU2L4OXl90uytwOmDXF2encN0Jf4Nxu2XkYqQ",
|
||||||
"bucketName": "irc-uat"
|
"bucketName": "irc-uat"
|
||||||
|
@ -51,7 +52,11 @@
|
||||||
|
|
||||||
"LoginFailLockMinutes": 30,
|
"LoginFailLockMinutes": 30,
|
||||||
"AutoLoginOutMinutes": 60,
|
"AutoLoginOutMinutes": 60,
|
||||||
"OpenLoginMFA": false
|
"OpenLoginMFA": false,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10
|
||||||
|
|
||||||
},
|
},
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
|
@ -61,6 +66,8 @@
|
||||||
"FromName": "UAT_IRC",
|
"FromName": "UAT_IRC",
|
||||||
"AuthorizationCode": "SHzyyl2021",
|
"AuthorizationCode": "SHzyyl2021",
|
||||||
"SiteUrl": "http://irc.uat.extimaging.com/login",
|
"SiteUrl": "http://irc.uat.extimaging.com/login",
|
||||||
|
"OrganizationName": "Extlmaging",
|
||||||
|
"OrganizationNameCN": "Extlmaging",
|
||||||
"CompanyName": "Extensive Imaging",
|
"CompanyName": "Extensive Imaging",
|
||||||
"CompanyNameCN": "上海展影医疗科技有限公司",
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
"CompanyShortName": "Extensive Imaging",
|
"CompanyShortName": "Extensive Imaging",
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Helper
|
||||||
|
{
|
||||||
|
public static class EmailMaskHelper
|
||||||
|
{
|
||||||
|
|
||||||
|
//显示位数:3分之2的位数,向上取整
|
||||||
|
//取哪几个个值:最后一位和前面几位
|
||||||
|
//其他:3个***。
|
||||||
|
//比如:hlj23@126.com
|
||||||
|
//为:hlj***3@126.com
|
||||||
|
|
||||||
|
//he@126.com
|
||||||
|
//为:h*** e@126.com
|
||||||
|
|
||||||
|
public static string MaskEmail(string email)
|
||||||
|
{
|
||||||
|
|
||||||
|
// 找到 "@" 符号的位置
|
||||||
|
int atIndex = email.IndexOf('@');
|
||||||
|
|
||||||
|
string visiblePartBefore = email.Substring(0, atIndex);
|
||||||
|
|
||||||
|
string afterAt = email.Substring(atIndex + 1);
|
||||||
|
|
||||||
|
int visibleLength = (int)Math.Ceiling((double)visiblePartBefore.Length * 2 / 3);
|
||||||
|
|
||||||
|
// 替换中间两位字符为星号
|
||||||
|
string hiddenPartBeforeAt = visiblePartBefore.Substring(0, visibleLength - 1) + "***" + visiblePartBefore.Last();
|
||||||
|
|
||||||
|
|
||||||
|
// 组合隐藏和可见部分
|
||||||
|
string hiddenEmail = hiddenPartBeforeAt + "@" + afterAt;
|
||||||
|
|
||||||
|
return hiddenEmail;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -39,6 +39,9 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
public string regionId { get; set; }
|
public string regionId { get; set; }
|
||||||
public string accessKeyId { get; set; }
|
public string accessKeyId { get; set; }
|
||||||
public string accessKeySecret { get; set; }
|
public string accessKeySecret { get; set; }
|
||||||
|
|
||||||
|
public string internalEndpoint { get; set; }
|
||||||
|
|
||||||
public string endPoint { get; set; }
|
public string endPoint { get; set; }
|
||||||
public string bucketName { get; set; }
|
public string bucketName { get; set; }
|
||||||
|
|
||||||
|
@ -144,7 +147,7 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
{
|
{
|
||||||
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
|
||||||
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
var _ossClient = new OssClient(aliConfig.internalEndpoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -220,7 +223,7 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
{
|
{
|
||||||
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
|
||||||
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
var _ossClient = new OssClient(aliConfig.internalEndpoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
// 上传文件
|
// 上传文件
|
||||||
var result = _ossClient.PutObject(aliConfig.bucketName, ossRelativePath, localFilePath);
|
var result = _ossClient.PutObject(aliConfig.bucketName, ossRelativePath, localFilePath);
|
||||||
|
@ -279,7 +282,7 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
{
|
{
|
||||||
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
|
||||||
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
var _ossClient = new OssClient(aliConfig.internalEndpoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
// 上传文件
|
// 上传文件
|
||||||
var result = _ossClient.GetObject(aliConfig.bucketName, ossRelativePath);
|
var result = _ossClient.GetObject(aliConfig.bucketName, ossRelativePath);
|
||||||
|
@ -351,7 +354,7 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
{
|
{
|
||||||
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
|
||||||
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
var _ossClient = new OssClient(aliConfig.internalEndpoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
// 生成签名URL。
|
// 生成签名URL。
|
||||||
var req = new GeneratePresignedUriRequest(aliConfig.bucketName, ossRelativePath, SignHttpMethod.Get)
|
var req = new GeneratePresignedUriRequest(aliConfig.bucketName, ossRelativePath, SignHttpMethod.Get)
|
||||||
|
|
|
@ -29,7 +29,7 @@ public static class SendEmailHelper
|
||||||
|
|
||||||
//await smtp.AuthenticateAsync("zhou941003@qq.com", "sqfhlpfdvnexbcab");
|
//await smtp.AuthenticateAsync("zhou941003@qq.com", "sqfhlpfdvnexbcab");
|
||||||
|
|
||||||
await smtp.ConnectAsync(_systemEmailConfig.Host, _systemEmailConfig.Port, SecureSocketOptions.SslOnConnect);
|
await smtp.ConnectAsync(_systemEmailConfig.Host, _systemEmailConfig.Port, SecureSocketOptions.Auto);
|
||||||
|
|
||||||
await smtp.AuthenticateAsync(_systemEmailConfig.FromEmail, _systemEmailConfig.AuthorizationCode);
|
await smtp.AuthenticateAsync(_systemEmailConfig.FromEmail, _systemEmailConfig.AuthorizationCode);
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ public static class SendEmailHelper
|
||||||
using (var client = new MailKit.Net.Smtp.SmtpClient())
|
using (var client = new MailKit.Net.Smtp.SmtpClient())
|
||||||
{
|
{
|
||||||
|
|
||||||
await client.ConnectAsync(_systemEmailConfig.Host, _systemEmailConfig.Port, SecureSocketOptions.SslOnConnect);
|
await client.ConnectAsync(_systemEmailConfig.Host, _systemEmailConfig.Port, SecureSocketOptions.Auto);
|
||||||
|
|
||||||
await client.AuthenticateAsync(_systemEmailConfig.FromEmail, _systemEmailConfig.AuthorizationCode);
|
await client.AuthenticateAsync(_systemEmailConfig.FromEmail, _systemEmailConfig.AuthorizationCode);
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ public static class SendEmailHelper
|
||||||
|
|
||||||
smtp.ServerCertificateValidationCallback = (s, c, h, e) => true;
|
smtp.ServerCertificateValidationCallback = (s, c, h, e) => true;
|
||||||
|
|
||||||
await smtp.ConnectAsync(sMTPEmailConfig.Host, sMTPEmailConfig.Port, SecureSocketOptions.SslOnConnect);
|
await smtp.ConnectAsync(sMTPEmailConfig.Host, sMTPEmailConfig.Port, SecureSocketOptions.Auto);
|
||||||
|
|
||||||
await smtp.AuthenticateAsync(sMTPEmailConfig.UserName, sMTPEmailConfig.AuthorizationCode);
|
await smtp.AuthenticateAsync(sMTPEmailConfig.UserName, sMTPEmailConfig.AuthorizationCode);
|
||||||
|
|
||||||
|
|
|
@ -78,9 +78,9 @@
|
||||||
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.1.2" />
|
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.1.2" />
|
||||||
<PackageReference Include="fo-dicom.Codecs" Version="5.12.0" />
|
<PackageReference Include="fo-dicom.Codecs" Version="5.12.0" />
|
||||||
<PackageReference Include="IP2Region.Net" Version="2.0.2" />
|
<PackageReference Include="IP2Region.Net" Version="2.0.2" />
|
||||||
<PackageReference Include="MailKit" Version="4.5.0" />
|
<PackageReference Include="MailKit" Version="4.2.0" />
|
||||||
<PackageReference Include="MediatR" Version="12.2.0" />
|
<PackageReference Include="MediatR" Version="12.2.0" />
|
||||||
<PackageReference Include="MimeKit" Version="4.5.0" />
|
<PackageReference Include="MimeKit" Version="4.2.0" />
|
||||||
<PackageReference Include="MiniExcel" Version="1.32.0" />
|
<PackageReference Include="MiniExcel" Version="1.32.0" />
|
||||||
<PackageReference Include="Minio" Version="6.0.2" />
|
<PackageReference Include="Minio" Version="6.0.2" />
|
||||||
<PackageReference Include="MiniWord" Version="0.8.0" />
|
<PackageReference Include="MiniWord" Version="0.8.0" />
|
||||||
|
|
|
@ -13971,6 +13971,13 @@
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.ResetReadingTask(IRaCIS.Core.Application.Service.Reading.Dto.ResetReadingTaskInDto)">
|
||||||
|
<summary>
|
||||||
|
重置阅片任务
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.VerifyReadingRestTime">
|
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.VerifyReadingRestTime">
|
||||||
<summary>
|
<summary>
|
||||||
验证阅片休息时间
|
验证阅片休息时间
|
||||||
|
|
|
@ -259,7 +259,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
|
|
||||||
var defalutSortArray = new string[] { nameof(TaskMedicalReviewView.AuditState), nameof(TaskMedicalReviewView.SubjectId), nameof(TaskMedicalReviewView.ArmEnum), nameof(TaskMedicalReviewView.VisitTaskNum) };
|
var defalutSortArray = new string[] { nameof(TaskMedicalReviewView.SubjectId), nameof(TaskMedicalReviewView.ArmEnum), nameof(TaskMedicalReviewView.VisitTaskNum) };
|
||||||
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
|
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
|
||||||
|
|
||||||
return ResponseOutput.Ok(pageList, new
|
return ResponseOutput.Ok(pageList, new
|
||||||
|
|
|
@ -1416,6 +1416,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
{
|
{
|
||||||
task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed;
|
task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed;
|
||||||
|
|
||||||
|
|
||||||
|
//在PM 的申请重阅的影响列表里也不能申请重阅
|
||||||
|
|
||||||
|
var pmApply = await _visitTaskReReadingRepository.Where(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect && t.OriginalReReadingTask.ReadingCategory == ReadingCategory.Visit
|
||||||
|
&& t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.TrialGroupApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default).Include(t => t.OriginalReReadingTask).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
// 有序
|
// 有序
|
||||||
if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
|
@ -1429,10 +1436,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//在PM 的申请重阅的影响列表里也不能申请重阅
|
|
||||||
|
|
||||||
var pmApply = await _visitTaskReReadingRepository.Where(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect && t.OriginalReReadingTask.ReadingCategory == ReadingCategory.Visit
|
|
||||||
&& t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.TrialGroupApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default).Include(t => t.OriginalReReadingTask).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
if (pmApply != null)
|
if (pmApply != null)
|
||||||
{
|
{
|
||||||
|
@ -1461,13 +1464,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
throw new BusinessValidationFailedException(_localizer["VisitTask_LastReading"]);
|
throw new BusinessValidationFailedException(_localizer["VisitTask_LastReading"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task.ReadingCategory == ReadingCategory.Oncology && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Oncology)))
|
if (task.ReadingCategory == ReadingCategory.Oncology && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Oncology && t.ReadingTaskState==ReadingTaskState.HaveSigned)))
|
||||||
{
|
{
|
||||||
//---有序阅片,只允许申请该受试者阅片人最后一次完成肿瘤学任务重阅
|
//---有序阅片,只允许申请该受试者阅片人最后一次完成肿瘤学任务重阅
|
||||||
throw new BusinessValidationFailedException(_localizer["VisitTask_LastOncologistRecheck"]);
|
throw new BusinessValidationFailedException(_localizer["VisitTask_LastOncologistRecheck"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Judge)))
|
if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Judge && t.ReadingTaskState == ReadingTaskState.HaveSigned)))
|
||||||
{
|
{
|
||||||
//---有序阅片,只允许申请该受试者阅片人最后一次完成裁判的任务重阅
|
//---有序阅片,只允许申请该受试者阅片人最后一次完成裁判的任务重阅
|
||||||
throw new BusinessValidationFailedException(_localizer["VisitTask_LastAdjudicatorRecheck"]);
|
throw new BusinessValidationFailedException(_localizer["VisitTask_LastAdjudicatorRecheck"]);
|
||||||
|
@ -1476,9 +1479,27 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (task.ReadingCategory != ReadingCategory.Visit && task.ReadingCategory != ReadingCategory.Global)
|
|
||||||
|
if (pmApply != null)
|
||||||
{
|
{
|
||||||
//---无序阅片,仅仅允许IR 申请 全局和访视类型类别的任务进行重阅
|
var originalTask = pmApply.OriginalReReadingTask;
|
||||||
|
|
||||||
|
//PM 无序影响列表
|
||||||
|
if (await _visitTaskRepository.Where(t => t.TrialId == originalTask.TrialId && t.SubjectId == originalTask.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated && t.IsAnalysisCreate == false && t.TrialReadingCriterionId == originalTask.TrialReadingCriterionId )
|
||||||
|
.Where(t=>t.Id==originalTask.Id||t.Id==originalTask.JudgeVisitTaskId)
|
||||||
|
.AnyAsync(t => t.VisitTaskNum == task.VisitTaskNum))
|
||||||
|
{
|
||||||
|
//---当前为无序阅片,影像存在问题,项目组已申请回退,暂不能申请重阅
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_RandomInvalidRereading"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//也要支持裁判重阅240701
|
||||||
|
|
||||||
|
if (task.ReadingCategory != ReadingCategory.Visit && task.ReadingCategory != ReadingCategory.Judge)
|
||||||
|
{
|
||||||
|
//---无序阅片,仅仅允许IR 申请 访视、裁判类型类别的任务进行重阅
|
||||||
throw new BusinessValidationFailedException(_localizer["VisitTask_IRGlobalRecheck"]);
|
throw new BusinessValidationFailedException(_localizer["VisitTask_IRGlobalRecheck"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1606,8 +1627,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
if ((origenalTask.TaskState != TaskState.Effect && origenalTask.TaskState != TaskState.Freeze))
|
if ((origenalTask.TaskState != TaskState.Effect && origenalTask.TaskState != TaskState.Freeze))
|
||||||
{
|
{
|
||||||
|
await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new VisitTaskReReading() { RequestReReadingConfirmUserId = _userInfo.Id, RequestReReadingResultEnum = RequestReReadingResult.Invalid });
|
||||||
|
|
||||||
//---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作
|
//---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作
|
||||||
return ResponseOutput.NotOk(_localizer["VisitTask_ReapplyStatusConflict"]);
|
return ResponseOutput.Ok(string.Empty, msg:_localizer["VisitTask_ReapplyStatusConflict"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
"",
|
"Sir/Madam",
|
||||||
//---您正在进行邮箱重置密码操作
|
//---您正在进行邮箱重置密码操作
|
||||||
_localizer["Mail_ResettingPassword"],
|
_localizer["Mail_ResettingPassword"],
|
||||||
verificationCode
|
verificationCode
|
||||||
|
@ -320,7 +320,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
"Sir or Madam",
|
"Sir/Madam",
|
||||||
//---您正在参与展影医疗IRC项目
|
//---您正在参与展影医疗IRC项目
|
||||||
_localizer["Mail_IRCProject", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN],
|
_localizer["Mail_IRCProject", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN],
|
||||||
verificationCode
|
verificationCode
|
||||||
|
@ -387,7 +387,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
"Sir or Madam",
|
"Sir/Madam",
|
||||||
//---您正在参与展影医疗IRC项目中心调研工作
|
//---您正在参与展影医疗IRC项目中心调研工作
|
||||||
_localizer["Mail_CenterResearchReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN],
|
_localizer["Mail_CenterResearchReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN],
|
||||||
verificationCode
|
verificationCode
|
||||||
|
|
|
@ -52,6 +52,19 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
|
||||||
public string ImageResizePath { get; set; }
|
public string ImageResizePath { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class StudyInstanceInfo
|
||||||
|
{
|
||||||
|
|
||||||
|
public int ShowOrder { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public decimal RowIndex { get; set; }
|
||||||
|
|
||||||
|
public Guid? SeriesId { get; set; }
|
||||||
|
|
||||||
|
public Guid? StudyId { get; set; }
|
||||||
|
public Guid? InstanceId { get; set; }
|
||||||
|
}
|
||||||
public class InstanceBasicInfo
|
public class InstanceBasicInfo
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
|
@ -11,6 +11,7 @@ using MassTransit;
|
||||||
using MathNet.Numerics;
|
using MathNet.Numerics;
|
||||||
using Medallion.Threading;
|
using Medallion.Threading;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
@ -18,12 +19,13 @@ using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Web;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
{
|
{
|
||||||
public interface IDownloadAndUploadService
|
public interface IDownloadAndUploadService
|
||||||
{
|
{
|
||||||
Task PackageAndAnonymizImage(Guid trialId, Guid subjectVisitId, bool isAnonymize = true);
|
Task PackageAndAnonymizImage(Guid trialId, Guid subjectVisitId, bool isDicom, bool isAnonymize = true);
|
||||||
}
|
}
|
||||||
[ApiExplorerSettings(GroupName = "Trial")]
|
[ApiExplorerSettings(GroupName = "Trial")]
|
||||||
public class DownloadAndUploadService : BaseService, IDownloadAndUploadService
|
public class DownloadAndUploadService : BaseService, IDownloadAndUploadService
|
||||||
|
@ -484,24 +486,51 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="trialId"></param>
|
/// <param name="trialId"></param>
|
||||||
/// <param name="subjectVisitId"></param>
|
/// <param name="subjectVisitId"></param>
|
||||||
|
/// <param name="isDicom"></param>
|
||||||
/// <param name="isAnonymize"></param>
|
/// <param name="isAnonymize"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|
||||||
public async Task<IResponseOutput> RequestPackageAndAnonymizImage(Guid trialId, Guid subjectVisitId, bool isAnonymize = true)
|
public async Task<IResponseOutput> RequestPackageAndAnonymizImage(Guid trialId, Guid subjectVisitId, bool isDicom, bool isAnonymize = true)
|
||||||
{
|
{
|
||||||
var subjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId);
|
|
||||||
|
|
||||||
if (subjectVisit.PackState == PackState.WaitPack)
|
|
||||||
|
var extralConfig = _repository.Where<Trial>(t => t.Id == trialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
|
||||||
|
|
||||||
|
var config = JsonConvert.DeserializeObject<TrialExtraConfig>(extralConfig) ?? new TrialExtraConfig();
|
||||||
|
|
||||||
|
if (config.IsSupportQCDownloadImage == false)
|
||||||
{
|
{
|
||||||
HangfireJobHelper.NotImmediatelyOnceOnlyJob<IDownloadAndUploadService>(t => t.PackageAndAnonymizImage(trialId, subjectVisitId, isAnonymize), TimeSpan.FromSeconds(1));
|
throw new BusinessValidationFailedException("该项目不支持QC下载影像");
|
||||||
|
|
||||||
subjectVisit.PackState = PackState.Packing;
|
|
||||||
|
|
||||||
await _subjectVisitRepository.SaveChangesAsync();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResponseOutput.Ok(subjectVisit.VisitImageZipPath);
|
var subjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId);
|
||||||
|
|
||||||
|
var sujectCode = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).Select(t => t.Subject.Code).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
var packState = isDicom ? subjectVisit.PackState : subjectVisit.NoDicomPackState;
|
||||||
|
|
||||||
|
if (packState == PackState.WaitPack)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (isDicom)
|
||||||
|
{
|
||||||
|
subjectVisit.PackState = PackState.Packing;
|
||||||
|
HangfireJobHelper.NotImmediatelyOnceOnlyJob<IDownloadAndUploadService>(t => t.PackageAndAnonymizImage(trialId, subjectVisitId, true, isAnonymize), TimeSpan.FromSeconds(1));
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
subjectVisit.NoDicomPackState = PackState.Packing;
|
||||||
|
|
||||||
|
HangfireJobHelper.NotImmediatelyOnceOnlyJob<IDownloadAndUploadService>(t => t.PackageAndAnonymizImage(trialId, subjectVisitId, false, isAnonymize), TimeSpan.FromSeconds(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
await _subjectVisitRepository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(isDicom ? subjectVisit.VisitImageZipPath : subjectVisit.VisitNoDicomImageZipPath,
|
||||||
|
new { FileName = $"{sujectCode}_{subjectVisit.VisitName}_ImageStudy_{(isDicom ? "Dicom" : "NoneDicom")}.zip" });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -511,9 +540,10 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="trialId"></param>
|
/// <param name="trialId"></param>
|
||||||
/// <param name="subjectVisitId"></param>
|
/// <param name="subjectVisitId"></param>
|
||||||
|
/// <param name="isDicom"></param>
|
||||||
/// <param name="isAnonymize"></param>
|
/// <param name="isAnonymize"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task PackageAndAnonymizImage(Guid trialId, Guid subjectVisitId, bool isAnonymize = true)
|
public async Task PackageAndAnonymizImage(Guid trialId, Guid subjectVisitId, bool isDicom, bool isAnonymize = true)
|
||||||
{
|
{
|
||||||
|
|
||||||
var subjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId);
|
var subjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId);
|
||||||
|
@ -557,6 +587,20 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}),
|
||||||
|
|
||||||
|
NoneDicomStudyList = sv.NoneDicomStudyList.Select(nd => new
|
||||||
|
{
|
||||||
|
nd.Modality,
|
||||||
|
nd.StudyCode,
|
||||||
|
nd.ImageDate,
|
||||||
|
|
||||||
|
FileList = nd.NoneDicomFileList.Select(file => new
|
||||||
|
{
|
||||||
|
file.FileName,
|
||||||
|
file.Path,
|
||||||
|
file.FileType
|
||||||
|
})
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -568,22 +612,26 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
string tempFolderPath = Path.Combine(Directory.GetCurrentDirectory(), $"DownloadTemp_{NewId.NextGuid()}");
|
string tempFolderPath = Path.Combine(Directory.GetCurrentDirectory(), $"DownloadTemp_{NewId.NextGuid()}");
|
||||||
Directory.CreateDirectory(tempFolderPath);
|
Directory.CreateDirectory(tempFolderPath);
|
||||||
|
|
||||||
|
//dicom 处理
|
||||||
|
|
||||||
|
if (isDicom)
|
||||||
|
{
|
||||||
// 遍历查询结果
|
// 遍历查询结果
|
||||||
foreach (var studyInfo in info.StudyList)
|
foreach (var studyInfo in info.StudyList)
|
||||||
{
|
{
|
||||||
// 遍历 Series
|
// 遍历 Series
|
||||||
foreach (var seriesInfo in studyInfo.SeriesList)
|
foreach (var seriesInfo in studyInfo.SeriesList)
|
||||||
{
|
{
|
||||||
string studyFolderPath = Path.Combine(tempFolderPath, $"{info.SubjectCode}_{info.VisitName}", $"{studyInfo.StudyCode}_{studyInfo.StudyTime?.ToString("yyyy-MM-dd")}_{seriesInfo.Modality}");
|
string studyDicomFolderPath = Path.Combine(tempFolderPath, "Dicom",/* $"{info.SubjectCode}_{info.VisitName}",*/ $"{studyInfo.StudyCode}_{studyInfo.StudyTime?.ToString("yyyy-MM-dd")}_{seriesInfo.Modality}");
|
||||||
|
|
||||||
// 创建 影像 文件夹
|
// 创建 影像 文件夹
|
||||||
Directory.CreateDirectory(studyFolderPath);
|
Directory.CreateDirectory(studyDicomFolderPath);
|
||||||
|
|
||||||
// 遍历 InstancePathList
|
// 遍历 InstancePathList
|
||||||
foreach (var instanceInfo in seriesInfo.InstancePathList)
|
foreach (var instanceInfo in seriesInfo.InstancePathList)
|
||||||
{
|
{
|
||||||
// 复制文件到相应的文件夹
|
// 复制文件到相应的文件夹
|
||||||
string destinationPath = Path.Combine(studyFolderPath, Path.GetFileName(instanceInfo.Path));
|
string destinationPath = Path.Combine(studyDicomFolderPath, Path.GetFileName(instanceInfo.Path));
|
||||||
|
|
||||||
//下载到当前目录
|
//下载到当前目录
|
||||||
await _oSSService.DownLoadFromOSSAsync(instanceInfo.Path, destinationPath);
|
await _oSSService.DownLoadFromOSSAsync(instanceInfo.Path, destinationPath);
|
||||||
|
@ -652,23 +700,58 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var zipPath = Path.Combine(Directory.GetCurrentDirectory(), $"{info.SubjectCode}_{info.VisitName}_ImageStudy.zip");
|
|
||||||
|
|
||||||
ZipFile.CreateFromDirectory(tempFolderPath, zipPath);
|
|
||||||
|
|
||||||
|
var zipDicomPath = Path.Combine(Directory.GetCurrentDirectory(), $"{info.SubjectCode}_{info.VisitName}_ImageStudy_Dicom.zip");
|
||||||
|
ZipFile.CreateFromDirectory(Path.Combine(tempFolderPath, "Dicom"), zipDicomPath);
|
||||||
//上传到Oss
|
//上传到Oss
|
||||||
var relativePath = await _oSSService.UploadToOSSAsync(zipPath, $"download_zip", false);
|
var relativeDicomPath = await _oSSService.UploadToOSSAsync(zipDicomPath, $"download_zip", false);
|
||||||
|
|
||||||
|
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisitId, u => new SubjectVisit() { PackState = PackState.Packed, VisitImageZipPath = relativeDicomPath });
|
||||||
|
|
||||||
|
|
||||||
//subjectVisit.PackState = PackState.Packed;
|
File.Delete(zipDicomPath);
|
||||||
//subjectVisit.VisitImageZipPath = relativePath;
|
}
|
||||||
//await _subjectVisitRepository.SaveChangesAsync();
|
else
|
||||||
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisitId, u => new SubjectVisit() { PackState = PackState.Packed, VisitImageZipPath = relativePath });
|
{
|
||||||
|
var relativeNoneDicomPath = string.Empty;
|
||||||
|
|
||||||
|
if (info.NoneDicomStudyList.Count() == 1 && info.NoneDicomStudyList.SelectMany(t => t.FileList).Count() == 1)
|
||||||
|
{
|
||||||
|
relativeNoneDicomPath = info.NoneDicomStudyList.First().FileList.First().Path;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//非dicom 处理
|
||||||
|
|
||||||
|
foreach (var noneDicomStudy in info.NoneDicomStudyList)
|
||||||
|
{
|
||||||
|
string studyNoneDicomFolderPath = Path.Combine(tempFolderPath, "NoneDicom", /*$"{info.SubjectCode}_{info.VisitName}",*/ $"{noneDicomStudy.StudyCode}_{noneDicomStudy.ImageDate.ToString("yyyy-MM-dd")}_{noneDicomStudy.Modality}");
|
||||||
|
|
||||||
|
Directory.CreateDirectory(studyNoneDicomFolderPath);
|
||||||
|
|
||||||
|
foreach (var file in noneDicomStudy.FileList)
|
||||||
|
{
|
||||||
|
string destinationPath = Path.Combine(studyNoneDicomFolderPath, Path.GetFileName(file.FileName));
|
||||||
|
|
||||||
|
//下载到当前目录
|
||||||
|
await _oSSService.DownLoadFromOSSAsync(HttpUtility.UrlDecode(file.Path) , destinationPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var zipNoneDicomPath = Path.Combine(Directory.GetCurrentDirectory(), $"{info.SubjectCode}_{info.VisitName}_ImageStudy_NoneDicom.zip");
|
||||||
|
ZipFile.CreateFromDirectory(Path.Combine(tempFolderPath, "NoneDicom"), zipNoneDicomPath);
|
||||||
|
relativeNoneDicomPath = await _oSSService.UploadToOSSAsync(zipNoneDicomPath, $"download_zip", false);
|
||||||
|
|
||||||
|
File.Delete(zipNoneDicomPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisitId, u => new SubjectVisit() { PackState = PackState.Packed, VisitNoDicomImageZipPath = relativeNoneDicomPath });
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//清理文件夹
|
//清理文件夹
|
||||||
Directory.Delete(tempFolderPath, true);
|
Directory.Delete(tempFolderPath, true);
|
||||||
File.Delete(zipPath);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
||||||
using IRaCIS.Core.Application.Auth;
|
using IRaCIS.Core.Application.Auth;
|
||||||
using BeetleX.Redis.Commands;
|
using BeetleX.Redis.Commands;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
using IRaCIS.Core.Application.Helper;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -36,7 +37,7 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IEasyCachingProvider _cache;
|
private readonly IEasyCachingProvider _cache;
|
||||||
private readonly IReadingImageTaskService _readingImageTaskService;
|
private readonly IReadingImageTaskService _readingImageTaskService;
|
||||||
private readonly IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig;
|
private readonly IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig;
|
||||||
|
private readonly SystemEmailSendConfig _systemEmailConfig;
|
||||||
|
|
||||||
public UserService(IRepository<User> userRepository,
|
public UserService(IRepository<User> userRepository,
|
||||||
|
|
||||||
|
@ -47,6 +48,7 @@ namespace IRaCIS.Application.Services
|
||||||
IReadingImageTaskService readingImageTaskService,
|
IReadingImageTaskService readingImageTaskService,
|
||||||
IRepository<TrialUser> userTrialRepository,
|
IRepository<TrialUser> userTrialRepository,
|
||||||
IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig,
|
IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig,
|
||||||
|
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
|
||||||
IRepository<UserLog> userLogRepository,
|
IRepository<UserLog> userLogRepository,
|
||||||
IRepository<UserPassWordLog> userPassWordLogRepository
|
IRepository<UserPassWordLog> userPassWordLogRepository
|
||||||
,
|
,
|
||||||
|
@ -64,6 +66,8 @@ namespace IRaCIS.Application.Services
|
||||||
_userTrialRepository = userTrialRepository;
|
_userTrialRepository = userTrialRepository;
|
||||||
_userLogRepository = userLogRepository;
|
_userLogRepository = userLogRepository;
|
||||||
_distributedLockProvider = distributedLockProvider;
|
_distributedLockProvider = distributedLockProvider;
|
||||||
|
|
||||||
|
_systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -589,7 +593,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if (user.IsZhiZhun)
|
if (user.IsZhiZhun)
|
||||||
{
|
{
|
||||||
user.OrganizationName = AppSettings.DefaultInternalOrganizationName;
|
user.OrganizationName = _userInfo.IsEn_Us? _systemEmailConfig.OrganizationName: _systemEmailConfig.OrganizationNameCN ;
|
||||||
}
|
}
|
||||||
|
|
||||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = model.Id, OptType = UserOptType.UpdateUser }, true);
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = model.Id, OptType = UserOptType.UpdateUser }, true);
|
||||||
|
@ -664,7 +668,8 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, (UserMFAType)mfaType );
|
await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, (UserMFAType)mfaType );
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
var hiddenEmail = EmailMaskHelper.MaskEmail(userInfo.EMail);
|
||||||
|
return ResponseOutput.Ok(hiddenEmail);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -62,6 +62,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
//public string VisitPlanInfo { get; set; } = String.Empty;
|
//public string VisitPlanInfo { get; set; } = String.Empty;
|
||||||
|
|
||||||
public Guid? HandleUserId { get; set; }
|
public Guid? HandleUserId { get; set; }
|
||||||
|
|
||||||
|
public DateTime? BeginAuditTime { get; set; }
|
||||||
|
|
||||||
|
public DateTime? EndAuditTime { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetNextIQCQualityInDto
|
public class GetNextIQCQualityInDto
|
||||||
|
@ -187,6 +191,13 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public string SubmitUserName { get; set; }
|
public string SubmitUserName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public TrialQCProcess QCProcessEnum { get; set; }
|
||||||
|
|
||||||
|
public DateTime? ReviewAuditTime { get; set; }
|
||||||
|
public DateTime? PreliminaryAuditTime { get; set; }
|
||||||
|
|
||||||
|
public DateTime? AuditTime => QCProcessEnum == TrialQCProcess.SingleAudit ? PreliminaryAuditTime : (QCProcessEnum == TrialQCProcess.DoubleAudit ? ReviewAuditTime : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1105,6 +1116,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public bool IsHaveUploadFailed { get; set; }
|
public bool IsHaveUploadFailed { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1399,8 +1413,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
|
|
||||||
public string ReviewAuditUserName { get; set; } = String.Empty;
|
public string ReviewAuditUserName { get; set; } = String.Empty;
|
||||||
public DateTime? ReviewAuditTime { get; set; }
|
|
||||||
public DateTime? PreliminaryAuditTime { get; set; }
|
|
||||||
|
|
||||||
public bool IsEnrollmentConfirm { get; set; } = false;
|
public bool IsEnrollmentConfirm { get; set; } = false;
|
||||||
public DateTime? SubjectFirstGiveMedicineTime { get; set; }
|
public DateTime? SubjectFirstGiveMedicineTime { get; set; }
|
||||||
|
@ -1475,6 +1488,12 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public PackState PackState { get; set; }
|
public PackState PackState { get; set; }
|
||||||
|
|
||||||
//public Guid? ClinicalDataSignUserId { get; set; }
|
//public Guid? ClinicalDataSignUserId { get; set; }
|
||||||
|
|
||||||
|
public DateTime? ReviewAuditTime { get; set; }
|
||||||
|
public DateTime? PreliminaryAuditTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public DateTime? AuditTime => QCProcessEnum == TrialQCProcess.SingleAudit ? PreliminaryAuditTime : (QCProcessEnum == TrialQCProcess.DoubleAudit ? ReviewAuditTime : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
PageSize = 1,
|
PageSize = 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
return result.Item1.CurrentPageData.Count > 0 ? result.Item1.CurrentPageData[0] : null;
|
return result.Data.CurrentPageData.Count > 0 ? result.Data.CurrentPageData[0] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -188,7 +188,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
/// <param name="visitSearchDTO"></param>
|
/// <param name="visitSearchDTO"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(PageOutput<QCVisitViewModel>, TrialSubjectAndSVConfig)> GetQCVisitList(QCVisitSearchDTO visitSearchDTO)
|
public async Task<IResponseOutput<PageOutput<QCVisitViewModel>>> GetQCVisitList(QCVisitSearchDTO visitSearchDTO)
|
||||||
{
|
{
|
||||||
|
|
||||||
var svExpression = QCCommon.GetSubjectVisitFilter(visitSearchDTO.VisitPlanArray);
|
var svExpression = QCCommon.GetSubjectVisitFilter(visitSearchDTO.VisitPlanArray);
|
||||||
|
@ -210,6 +210,12 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|| t.QCChallengeDialogList.Any(t => t.CreateUserId == visitSearchDTO.HandleUserId))
|
|| t.QCChallengeDialogList.Any(t => t.CreateUserId == visitSearchDTO.HandleUserId))
|
||||||
.WhereIf(visitSearchDTO.IsUrgent != null, t => t.IsUrgent == visitSearchDTO.IsUrgent)
|
.WhereIf(visitSearchDTO.IsUrgent != null, t => t.IsUrgent == visitSearchDTO.IsUrgent)
|
||||||
.Where(t => t.SubmitState != SubmitStateEnum.None)
|
.Where(t => t.SubmitState != SubmitStateEnum.None)
|
||||||
|
.WhereIf(visitSearchDTO.BeginAuditTime != null, t => t.Trial.QCProcessEnum==TrialQCProcess.SingleAudit? t.PreliminaryAuditTime>= visitSearchDTO.BeginAuditTime:
|
||||||
|
(t.Trial.QCProcessEnum == TrialQCProcess.DoubleAudit?t.ReviewAuditTime>= visitSearchDTO.BeginAuditTime:true))
|
||||||
|
|
||||||
|
.WhereIf(visitSearchDTO.EndAuditTime != null, t => t.Trial.QCProcessEnum == TrialQCProcess.SingleAudit ? t.PreliminaryAuditTime <= visitSearchDTO.EndAuditTime :
|
||||||
|
(t.Trial.QCProcessEnum == TrialQCProcess.DoubleAudit ? t.ReviewAuditTime <= visitSearchDTO.EndAuditTime : true))
|
||||||
|
|
||||||
//.WhereIf(visitSearchDTO.SubmitState != null, t => t.SubmitState == visitSearchDTO.SubmitState)
|
//.WhereIf(visitSearchDTO.SubmitState != null, t => t.SubmitState == visitSearchDTO.SubmitState)
|
||||||
//.WhereIf(visitSearchDTO.ChallengeState != null, t => t.ChallengeState == visitSearchDTO.ChallengeState)
|
//.WhereIf(visitSearchDTO.ChallengeState != null, t => t.ChallengeState == visitSearchDTO.ChallengeState)
|
||||||
.ProjectTo<QCVisitViewModel>(_mapper.ConfigurationProvider);
|
.ProjectTo<QCVisitViewModel>(_mapper.ConfigurationProvider);
|
||||||
|
@ -223,7 +229,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
var config = await _repository.Where<Trial>(t => t.Id == visitSearchDTO.TrialId).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
|
var config = await _repository.Where<Trial>(t => t.Id == visitSearchDTO.TrialId).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
|
||||||
|
|
||||||
return (pageList, config);
|
return ResponseOutput.Ok (pageList, config);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -706,7 +706,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (await _subjectVisitRepository.AnyAsync(t => t.Id == updateModalityCommand.SubjectVisitId && t.SubmitState == SubmitStateEnum.Submitted))
|
if (await _subjectVisitRepository.AnyAsync(t => t.Id == updateModalityCommand.SubjectVisitId && t.SubmitState == SubmitStateEnum.Submitted && !t.QCChallengeList.Any(c=>c.ReuploadEnum==QCChanllengeReuploadEnum.QCAgreeUpload)) )
|
||||||
{
|
{
|
||||||
//---提交之后,不允许修改!
|
//---提交之后,不允许修改!
|
||||||
throw new BusinessValidationFailedException(_localizer["QCOperation_NoModifyAfterSubmit"]);
|
throw new BusinessValidationFailedException(_localizer["QCOperation_NoModifyAfterSubmit"]);
|
||||||
|
|
|
@ -22,6 +22,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
CreateMap<Trial, ExcelExportInfo>();
|
CreateMap<Trial, ExcelExportInfo>();
|
||||||
CreateMap<SubjectVisit, CRCVisitExportDTO>()
|
CreateMap<SubjectVisit, CRCVisitExportDTO>()
|
||||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
||||||
|
.ForMember(d => d.QCProcessEnum, u => u.MapFrom(s => s.Trial.QCProcessEnum))
|
||||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
|
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
|
||||||
.ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.FullName))
|
.ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.FullName))
|
||||||
|
|
||||||
|
|
|
@ -1696,6 +1696,20 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class ResetReadingTaskOutDto
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ResetReadingTaskInDto
|
||||||
|
{
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SetSkipReadingCacheInDto
|
||||||
|
{
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
}
|
||||||
public class GetNextTaskInDto
|
public class GetNextTaskInDto
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
Task<List<GetManualListOutDto>> GetManualList(GetManualListInDto inDto);
|
Task<List<GetManualListOutDto>> GetManualList(GetManualListInDto inDto);
|
||||||
|
|
||||||
Task ResetReadingRestTime(Guid? userId);
|
Task<bool> ResetReadingRestTime(Guid? userId);
|
||||||
|
|
||||||
Task<List<GetReadingPastResultListOutDto>> GetReadingPastResultList(GetReadingPastResultListInDto inDto);
|
Task<List<GetReadingPastResultListOutDto>> GetReadingPastResultList(GetReadingPastResultListInDto inDto);
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,9 @@ using IRaCIS.Core.Application.Service.ReadingCalculate.Interface;
|
||||||
using AutoMapper.QueryableExtensions;
|
using AutoMapper.QueryableExtensions;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using System.Linq;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -42,6 +45,7 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IReadingCalculateService _readingCalculateService;
|
private readonly IReadingCalculateService _readingCalculateService;
|
||||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||||
private readonly IRepository<Subject> _subjectRepository;
|
private readonly IRepository<Subject> _subjectRepository;
|
||||||
|
private readonly IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig;
|
||||||
private readonly IRepository<ReadingGlobalTaskInfo> _readingGlobalTaskInfoRepository;
|
private readonly IRepository<ReadingGlobalTaskInfo> _readingGlobalTaskInfoRepository;
|
||||||
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||||
private readonly IRepository<ReadingTaskRelation> _readingTaskRelationRepository;
|
private readonly IRepository<ReadingTaskRelation> _readingTaskRelationRepository;
|
||||||
|
@ -84,6 +88,7 @@ namespace IRaCIS.Application.Services
|
||||||
IReadingCalculateService readingCalculateService,
|
IReadingCalculateService readingCalculateService,
|
||||||
IRepository<SubjectVisit> subjectVisitRepository,
|
IRepository<SubjectVisit> subjectVisitRepository,
|
||||||
IRepository<Subject> subjectRepository,
|
IRepository<Subject> subjectRepository,
|
||||||
|
IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig,
|
||||||
IRepository<ReadingGlobalTaskInfo> readingGlobalTaskInfoRepository,
|
IRepository<ReadingGlobalTaskInfo> readingGlobalTaskInfoRepository,
|
||||||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||||
IRepository<ReadingTaskRelation> readingTaskRelationRepository,
|
IRepository<ReadingTaskRelation> readingTaskRelationRepository,
|
||||||
|
@ -125,6 +130,7 @@ namespace IRaCIS.Application.Services
|
||||||
this._readingCalculateService = readingCalculateService;
|
this._readingCalculateService = readingCalculateService;
|
||||||
this._subjectVisitRepository = subjectVisitRepository;
|
this._subjectVisitRepository = subjectVisitRepository;
|
||||||
this._subjectRepository = subjectRepository;
|
this._subjectRepository = subjectRepository;
|
||||||
|
this._verifyConfig = verifyConfig;
|
||||||
this._readingGlobalTaskInfoRepository = readingGlobalTaskInfoRepository;
|
this._readingGlobalTaskInfoRepository = readingGlobalTaskInfoRepository;
|
||||||
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
||||||
this._readingTaskRelationRepository = readingTaskRelationRepository;
|
this._readingTaskRelationRepository = readingTaskRelationRepository;
|
||||||
|
@ -2696,7 +2702,43 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清除跳过阅片的缓存
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<bool> ClearSkipReadingCache()
|
||||||
|
{
|
||||||
|
var clearSkipReadingCacheKey = _userInfo.Id.ToString() + "SkipReadingCache";
|
||||||
|
_provider.Remove(clearSkipReadingCacheKey);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置跳过阅片的缓存
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<bool> SetSkipReadingCache(SetSkipReadingCacheInDto inDto )
|
||||||
|
{
|
||||||
|
var clearSkipReadingCacheKey = _userInfo.Id.ToString() + "SkipReadingCache";
|
||||||
|
var clearSkipReadingCache = _provider.Get<string>(clearSkipReadingCacheKey).Value;
|
||||||
|
if (clearSkipReadingCache == null|| clearSkipReadingCache==string.Empty)
|
||||||
|
{
|
||||||
|
List<Guid> cacheIds = new List<Guid>();
|
||||||
|
cacheIds.Add(inDto.VisitTaskId);
|
||||||
|
|
||||||
|
_provider.Set(clearSkipReadingCacheKey, JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<Guid>? cacheIds=JsonConvert.DeserializeObject<List<Guid>>(clearSkipReadingCache);
|
||||||
|
cacheIds.Add(inDto.VisitTaskId);
|
||||||
|
_provider.Set(clearSkipReadingCacheKey, JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2724,6 +2766,19 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var trialReadingCriterion = await _readingQuestionCriterionTrialRepository.FindAsync(trialReadingCriterionId ?? Guid.Empty);
|
var trialReadingCriterion = await _readingQuestionCriterionTrialRepository.FindAsync(trialReadingCriterionId ?? Guid.Empty);
|
||||||
|
|
||||||
|
|
||||||
|
#region 跳过阅片
|
||||||
|
var clearSkipReadingCacheKey = _userInfo.Id.ToString() + "SkipReadingCache";
|
||||||
|
var clearSkipReadingCache = _provider.Get<string>(clearSkipReadingCacheKey).Value;
|
||||||
|
List<Guid> cacheSkipIds = new List<Guid>();
|
||||||
|
if (clearSkipReadingCache != null && clearSkipReadingCache != string.Empty)
|
||||||
|
{
|
||||||
|
cacheSkipIds = JsonConvert.DeserializeObject<List<Guid>>(clearSkipReadingCache);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (inDto.VisitTaskId != null)
|
if (inDto.VisitTaskId != null)
|
||||||
{
|
{
|
||||||
task = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => new GetReadingTaskDto()
|
task = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => new GetReadingTaskDto()
|
||||||
|
@ -2742,6 +2797,7 @@ namespace IRaCIS.Application.Services
|
||||||
trialReadingCriterionId = task.TrialReadingCriterionId;
|
trialReadingCriterionId = task.TrialReadingCriterionId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 有序
|
||||||
else if (inDto.SubjectId != null && trialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
else if (inDto.SubjectId != null && trialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
var subjectTaskList = (await _visitTaskService.GetSubjectReadingIQueryable(new GetReadingIQueryableInDto()
|
var subjectTaskList = (await _visitTaskService.GetSubjectReadingIQueryable(new GetReadingIQueryableInDto()
|
||||||
|
@ -2762,14 +2818,20 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var subjectIndex = subjectTaskList.Where(x => x.SubjectId == inDto.SubjectId && x.SubjectCode == inDto.SubjectCode).Select(x => x.Index).FirstOrDefault();
|
var subjectIndex = subjectTaskList.Where(x => x.SubjectId == inDto.SubjectId && x.SubjectCode == inDto.SubjectCode).Select(x => x.Index).FirstOrDefault();
|
||||||
|
|
||||||
var currentSubject = subjectTaskList.Where(x => x.Index >= subjectIndex && !x.ExistReadingApply).OrderBy(x => x.Index).FirstOrDefault();
|
|
||||||
|
var currentSubject = subjectTaskList.Where(x => x.Index >= subjectIndex && !x.ExistReadingApply)
|
||||||
|
// 排除跳过的
|
||||||
|
.Where(x=> x.UnReadCanReadTaskList.Select(y => y.Id).Intersect(cacheSkipIds).Count()==0)
|
||||||
|
.OrderBy(x => x.Index).FirstOrDefault();
|
||||||
|
|
||||||
|
|
||||||
if (currentSubject == null)
|
if (currentSubject == null)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||||
}
|
}
|
||||||
|
|
||||||
task = currentSubject.UnReadCanReadTaskList.Select(x => new GetReadingTaskDto()
|
task = currentSubject.UnReadCanReadTaskList
|
||||||
|
.Select(x => new GetReadingTaskDto()
|
||||||
{
|
{
|
||||||
ReadingCategory = x.ReadingCategory,
|
ReadingCategory = x.ReadingCategory,
|
||||||
SubjectCode = currentSubject.SubjectCode,
|
SubjectCode = currentSubject.SubjectCode,
|
||||||
|
@ -2785,8 +2847,12 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 受试者无序
|
||||||
else if (inDto.SubjectId != null && trialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.SubjectRandom)
|
else if (inDto.SubjectId != null && trialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.SubjectRandom)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var subjectTaskList = (await _visitTaskService.GetSubjectReadingIQueryable(new GetReadingIQueryableInDto()
|
var subjectTaskList = (await _visitTaskService.GetSubjectReadingIQueryable(new GetReadingIQueryableInDto()
|
||||||
{
|
{
|
||||||
TrialId = inDto.TrialId,
|
TrialId = inDto.TrialId,
|
||||||
|
@ -2798,12 +2864,25 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
})).CurrentPageData;
|
})).CurrentPageData;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (subjectTaskList.Count() == 0)
|
if (subjectTaskList.Count() == 0)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||||
}
|
}
|
||||||
|
|
||||||
var taskList = subjectTaskList.FirstOrDefault()!.UnReadCanReadTaskList;
|
var taskList = subjectTaskList.FirstOrDefault()!.UnReadCanReadTaskList;
|
||||||
|
// 排除跳过的
|
||||||
|
List<Guid> remainingItems = taskList.Select(x => x.Id).Except(cacheSkipIds).ToList();
|
||||||
|
|
||||||
|
taskList = taskList.Where(x => remainingItems.Contains(x.Id)).ToList();
|
||||||
|
if (taskList.Count() == 0)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||||
|
}
|
||||||
|
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
//返回的范围是 0- taskList.Count-1
|
//返回的范围是 0- taskList.Count-1
|
||||||
|
@ -2825,11 +2904,14 @@ namespace IRaCIS.Application.Services
|
||||||
}).FirstOrDefaultAsync();
|
}).FirstOrDefaultAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 完全随机
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var query = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.Id
|
var query = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.Id
|
||||||
&& x.TrialReadingCriterionId == trialReadingCriterionId
|
&& x.TrialReadingCriterionId == trialReadingCriterionId
|
||||||
&& x.TaskState == TaskState.Effect);
|
&& x.TaskState == TaskState.Effect)
|
||||||
|
// 排除跳过的
|
||||||
|
.Where(x => !cacheSkipIds.Contains(x.Id));
|
||||||
var count = await query.CountAsync();
|
var count = await query.CountAsync();
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
|
@ -2947,23 +3029,42 @@ namespace IRaCIS.Application.Services
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重置阅片任务
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<ResetReadingTaskOutDto> ResetReadingTask(ResetReadingTaskInDto inDto)
|
||||||
|
{
|
||||||
|
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||||
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
if (taskinfo.ReadingCategory != ReadingCategory.Visit)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ResetReadingTaskOutDto() { };
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 验证阅片休息时间
|
/// 验证阅片休息时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task VerifyReadingRestTime()
|
public async Task<bool> VerifyReadingRestTime()
|
||||||
{
|
{
|
||||||
var userTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt;
|
var userTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt;
|
||||||
if (userTypeEnum != UserTypeEnum.IndependentReviewer)
|
if (userTypeEnum != UserTypeEnum.IndependentReviewer)
|
||||||
{
|
{
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
var startReadingTimeKey = _userInfo.Id.ToString() + "StartReadingTime";
|
var startReadingTimeKey = _userInfo.Id.ToString() + "StartReadingTime";
|
||||||
var startRestTimeKey = _userInfo.Id.ToString() + "StartRestTime";
|
var startRestTimeKey = _userInfo.Id.ToString() + "StartRestTime";
|
||||||
|
|
||||||
int readingMinute = 120; // 为60整数
|
int readingMinute = _verifyConfig.CurrentValue.ContinuousReadingTimeMin; // 为60整数
|
||||||
int restMinute = 10; //
|
int restMinute = _verifyConfig.CurrentValue.ReadingRestTimeMin; //
|
||||||
var startReadingTime = _provider.Get<string>(startReadingTimeKey).Value;
|
var startReadingTime = _provider.Get<string>(startReadingTimeKey).Value;
|
||||||
var startRestTime = _provider.Get<string>(startRestTimeKey).Value;
|
var startRestTime = _provider.Get<string>(startRestTimeKey).Value;
|
||||||
if (startReadingTime == null && startRestTime == null)
|
if (startReadingTime == null && startRestTime == null)
|
||||||
|
@ -2976,7 +3077,7 @@ namespace IRaCIS.Application.Services
|
||||||
int timespanMin = (DateTime.Now - cacheStartRestTime).Minutes;
|
int timespanMin = (DateTime.Now - cacheStartRestTime).Minutes;
|
||||||
if (timespanMin <= restMinute)
|
if (timespanMin <= restMinute)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute / 60m, restMinute]);
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", 2, 10]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3002,6 +3103,8 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -3009,7 +3112,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task ResetReadingRestTime(Guid? userID)
|
public async Task<bool> ResetReadingRestTime(Guid? userID)
|
||||||
{
|
{
|
||||||
if (userID == null)
|
if (userID == null)
|
||||||
{
|
{
|
||||||
|
@ -3036,6 +3139,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
_provider.Set(startReadingTimeKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
_provider.Set(startReadingTimeKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public List<TrialSiteUserSurveyView> TrialSiteUserSurveyList { get; set; } = new List<TrialSiteUserSurveyView>();
|
public List<TrialSiteUserSurveyView> TrialSiteUserSurveyList { get; set; } = new List<TrialSiteUserSurveyView>();
|
||||||
|
|
||||||
|
|
||||||
public SiteSurveyFiledConfig SiteSurveyFiledConfig { get; set; }
|
public TrialExtraConfig SiteSurveyFiledConfig { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TrialSiteUserSurveyAllDTO : TrialSiteUserSurveyView
|
public class TrialSiteUserSurveyAllDTO : TrialSiteUserSurveyView
|
||||||
|
|
|
@ -391,9 +391,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
var result = await _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId && t.TrialId == trialId).IgnoreQueryFilters()
|
var result = await _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId && t.TrialId == trialId).IgnoreQueryFilters()
|
||||||
.ProjectTo<LoginReturnDTO>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }).FirstOrDefaultAsync().IfNullThrowException();
|
.ProjectTo<LoginReturnDTO>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }).FirstOrDefaultAsync().IfNullThrowException();
|
||||||
|
|
||||||
var siteSurveryConfig = _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId).Select(t => t.Trial.SiteSurveyConfigJsonStr).FirstOrDefault()??string.Empty;
|
var siteSurveryConfig = _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId).Select(t => t.Trial.TrialExtraConfigJsonStr).FirstOrDefault()??string.Empty;
|
||||||
|
|
||||||
result.SiteSurveyFiledConfig = JsonConvert.DeserializeObject<SiteSurveyFiledConfig>(siteSurveryConfig) ?? new SiteSurveyFiledConfig();
|
result.SiteSurveyFiledConfig = JsonConvert.DeserializeObject<TrialExtraConfig>(siteSurveryConfig) ?? new TrialExtraConfig();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -726,15 +726,15 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
t.Email,
|
t.Email,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList();
|
//var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList();
|
||||||
|
|
||||||
|
|
||||||
if (!currentUserList.Any(t => t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))
|
if (!siteUserList.Any(t => t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.UserTypeEnum == UserTypeEnum.CRA))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_MissingAccount"]);
|
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_MissingAccount"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentUserList.Where(t => t.IsGenerateAccount && t.UserTypeId != null).GroupBy(t => new { t.UserTypeId, t.Email })
|
if (siteUserList.Where(t => t.IsGenerateAccount && t.UserTypeId != null).GroupBy(t => new { t.UserTypeId, t.Email })
|
||||||
.Any(g => g.Count() > 1))
|
.Any(g => g.Count() > 1))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_DuplicateEmail"]);
|
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_DuplicateEmail"]);
|
||||||
|
|
|
@ -21,6 +21,7 @@ using DocumentFormat.OpenXml.Office.CustomUI;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using SixLabors.ImageSharp.Formats.Tiff.Compression.Decompressors;
|
using SixLabors.ImageSharp.Formats.Tiff.Compression.Decompressors;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application
|
namespace IRaCIS.Core.Application
|
||||||
{
|
{
|
||||||
|
@ -1354,5 +1355,13 @@ namespace IRaCIS.Core.Application
|
||||||
return ResponseOutput.Ok(cro.Id.ToString(), ApiResponseCodeEnum.NeedTips);
|
return ResponseOutput.Ok(cro.Id.ToString(), ApiResponseCodeEnum.NeedTips);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[AllowAnonymous]
|
||||||
|
public async Task<TrialExtraConfig> GetTrialExtralConfig(Guid trialId)
|
||||||
|
{
|
||||||
|
var extralConfig = _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
|
||||||
|
|
||||||
|
return JsonConvert.DeserializeObject<TrialExtraConfig>(extralConfig) ?? new TrialExtraConfig();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
private readonly IRepository<DicomInstance> _dicomInstanceRepository;
|
private readonly IRepository<DicomInstance> _dicomInstanceRepository;
|
||||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
||||||
|
private readonly IRepository<ReadingCustomTag> _readingCustomTagRepository;
|
||||||
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository;
|
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository;
|
||||||
private readonly IRepository<ReadingPeriodPlan> _readingPeriodPlanRepository;
|
private readonly IRepository<ReadingPeriodPlan> _readingPeriodPlanRepository;
|
||||||
private readonly IRepository<Subject> _subjectRepository;
|
private readonly IRepository<Subject> _subjectRepository;
|
||||||
|
@ -50,6 +51,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
IRepository<DicomInstance> dicomInstanceRepository,
|
IRepository<DicomInstance> dicomInstanceRepository,
|
||||||
IRepository<VisitTask> visitTaskRepository,
|
IRepository<VisitTask> visitTaskRepository,
|
||||||
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
|
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
|
||||||
|
IRepository<ReadingCustomTag> readingCustomTagRepository,
|
||||||
IRepository<NoneDicomStudyFile> noneDicomStudyFileRepository,
|
IRepository<NoneDicomStudyFile> noneDicomStudyFileRepository,
|
||||||
IRepository<ReadingPeriodPlan> readingPeriodPlanRepository,
|
IRepository<ReadingPeriodPlan> readingPeriodPlanRepository,
|
||||||
IRepository<Subject> subjectRepository,
|
IRepository<Subject> subjectRepository,
|
||||||
|
@ -70,6 +72,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
this._dicomInstanceRepository = dicomInstanceRepository;
|
this._dicomInstanceRepository = dicomInstanceRepository;
|
||||||
this._visitTaskRepository = visitTaskRepository;
|
this._visitTaskRepository = visitTaskRepository;
|
||||||
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
||||||
|
this._readingCustomTagRepository = readingCustomTagRepository;
|
||||||
this._noneDicomStudyFileRepository = noneDicomStudyFileRepository;
|
this._noneDicomStudyFileRepository = noneDicomStudyFileRepository;
|
||||||
this._readingPeriodPlanRepository = readingPeriodPlanRepository;
|
this._readingPeriodPlanRepository = readingPeriodPlanRepository;
|
||||||
_subjectRepository = subjectRepository;
|
_subjectRepository = subjectRepository;
|
||||||
|
@ -574,15 +577,28 @@ namespace IRaCIS.Core.Application.Services
|
||||||
//已经签名的任务,加关键序列
|
//已经签名的任务,加关键序列
|
||||||
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned)
|
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||||
{
|
{
|
||||||
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).OrderBy(x => x.ReadingQuestionTrial.ShowOrder).ThenBy(x => x.RowIndex).Select(x => new
|
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).OrderBy(x => x.ReadingQuestionTrial.ShowOrder).ThenBy(x => x.RowIndex).Select(x => new StudyInstanceInfo()
|
||||||
{
|
{
|
||||||
x.ReadingQuestionTrial.ShowOrder,
|
ShowOrder = x.ReadingQuestionTrial.ShowOrder,
|
||||||
x.RowIndex,
|
RowIndex = x.RowIndex,
|
||||||
x.SeriesId,
|
SeriesId = x.SeriesId,
|
||||||
x.StudyId,
|
StudyId = x.StudyId,
|
||||||
x.InstanceId,
|
InstanceId = x.InstanceId,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var customoList = await _readingCustomTagRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).Select(x => new StudyInstanceInfo()
|
||||||
|
{
|
||||||
|
ShowOrder = 0,
|
||||||
|
RowIndex = 0m,
|
||||||
|
SeriesId = x.SeriesId,
|
||||||
|
StudyId = x.StudyId,
|
||||||
|
InstanceId = x.InstanceId,
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
rowInfoList.AddRange(customoList);
|
||||||
|
|
||||||
var thisStudyIds = rowInfoList.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.StudyId).Distinct().ToList();
|
var thisStudyIds = rowInfoList.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.StudyId).Distinct().ToList();
|
||||||
var thisSeriesIdIds = rowInfoList.Where(x => x.SeriesId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.SeriesId).Distinct().ToList();
|
var thisSeriesIdIds = rowInfoList.Where(x => x.SeriesId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.SeriesId).Distinct().ToList();
|
||||||
if (rowInfoList.Count > 0)
|
if (rowInfoList.Count > 0)
|
||||||
|
@ -649,7 +665,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
studyList.Add(thisVisitTaskStudy);
|
studyList.Insert(0,thisVisitTaskStudy);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -194,13 +194,14 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId);
|
var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId);
|
||||||
|
|
||||||
|
var hasSPMOrCPM = await _repository.Where<TrialUser>(t => t.TrialId == trialId).AnyAsync(t=> t.User.UserTypeEnum == UserTypeEnum.SPM || t.User.UserTypeEnum == UserTypeEnum.CPM);
|
||||||
|
|
||||||
if (trial != null)
|
if (trial != null)
|
||||||
{
|
{
|
||||||
if (commitState == 1) //确认提交CRO
|
if (commitState == 1) //确认提交CRO
|
||||||
{
|
{
|
||||||
//更新项目状态
|
//更新项目状态
|
||||||
trial.TrialEnrollStatus = (int)TrialEnrollStatus.HasCommitCRO;
|
trial.TrialEnrollStatus = hasSPMOrCPM ? (int)TrialEnrollStatus.HasCommitCRO : (int)TrialEnrollStatus.HasConfirmedDoctorNames;
|
||||||
|
|
||||||
//添加项目详细记录
|
//添加项目详细记录
|
||||||
var trialDetail = new TrialStatusDetail()
|
var trialDetail = new TrialStatusDetail()
|
||||||
|
@ -217,9 +218,19 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
if (doctorIdArray.Contains(intoGroupItem.DoctorId))
|
if (doctorIdArray.Contains(intoGroupItem.DoctorId))
|
||||||
{
|
{
|
||||||
intoGroupItem.EnrollStatus = EnrollStatus.HasCommittedToCRO;
|
intoGroupItem.EnrollStatus = hasSPMOrCPM ? EnrollStatus.HasCommittedToCRO : EnrollStatus.InviteIntoGroup;
|
||||||
//_enrollRepository.Update(intoGroupItem);
|
|
||||||
|
|
||||||
|
await _enrollDetailRepository.AddAsync(new EnrollDetail()
|
||||||
|
{
|
||||||
|
TrialDetailId = trialDetail.Id,
|
||||||
|
DoctorId = intoGroupItem.DoctorId,
|
||||||
|
TrialId = trialId,
|
||||||
|
EnrollStatus = hasSPMOrCPM ? EnrollStatus.HasCommittedToCRO : EnrollStatus.InviteIntoGroup,
|
||||||
|
OptUserType = (int)SystemUserType.AdminUser, //后台用户
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!hasSPMOrCPM)
|
||||||
|
{
|
||||||
await _enrollDetailRepository.AddAsync(new EnrollDetail()
|
await _enrollDetailRepository.AddAsync(new EnrollDetail()
|
||||||
{
|
{
|
||||||
TrialDetailId = trialDetail.Id,
|
TrialDetailId = trialDetail.Id,
|
||||||
|
@ -229,6 +240,9 @@ namespace IRaCIS.Application.Services
|
||||||
OptUserType = (int)SystemUserType.AdminUser, //后台用户
|
OptUserType = (int)SystemUserType.AdminUser, //后台用户
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -257,7 +271,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return ResponseOutput.Result(await _enrollRepository.SaveChangesAsync());
|
return ResponseOutput.Result(await _enrollRepository.SaveChangesAsync(), new {IsHaveSPMOrCPM=hasSPMOrCPM});
|
||||||
}
|
}
|
||||||
//$"Cannot find trial {trialId}"
|
//$"Cannot find trial {trialId}"
|
||||||
return ResponseOutput.NotOk(_localizer["Enroll_NotFound", trialId]);
|
return ResponseOutput.NotOk(_localizer["Enroll_NotFound", trialId]);
|
||||||
|
|
|
@ -258,9 +258,12 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task testwwwww([FromServices] IWebHostEnvironment env)
|
public async Task<string> testEmail([FromServices] IWebHostEnvironment env ,string email)
|
||||||
{
|
{
|
||||||
await Task.CompletedTask;
|
|
||||||
|
var hiddenEmail = EmailMaskHelper.MaskEmail(email);
|
||||||
|
|
||||||
|
return hiddenEmail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,7 @@ namespace IRaCIS.Core.Application.MediatR.Handlers
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//"Problems are as follows:
|
//"Problems are as follows:
|
||||||
dialogMsg.AppendLine($"<br/><div style='color: yellow'>{_localizer["ConsistencyVerification_Prob"]}</div>");
|
dialogMsg.AppendLine($"<br/><div style='color: red'>{_localizer["ConsistencyVerification_Prob"]}</div>");
|
||||||
|
|
||||||
num = 0;
|
num = 0;
|
||||||
foreach (var item in dbExceptExcel)
|
foreach (var item in dbExceptExcel)
|
||||||
|
|
|
@ -368,7 +368,9 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
|
|
||||||
Agree = 1,
|
Agree = 1,
|
||||||
|
|
||||||
Reject = 2
|
Reject = 2,
|
||||||
|
|
||||||
|
Invalid = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ReReadingApplyState
|
public enum ReReadingApplyState
|
||||||
|
|
|
@ -41,12 +41,27 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SiteSurveyFiledConfig
|
public class TrialExtraConfig
|
||||||
{
|
{
|
||||||
|
#region MyRegion
|
||||||
|
|
||||||
|
//QC质控
|
||||||
|
public bool IsSupportQCDownloadImage { get; set; } = false;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region 中心调研
|
||||||
|
|
||||||
public List<string> NotShowFieldList { get; set; } = new List<string>();
|
public List<string> NotShowFieldList { get; set; } = new List<string>();
|
||||||
|
|
||||||
public List<SiteSurveyModifyFiled> ModifyFiledList { get; set; } = new List<SiteSurveyModifyFiled>();
|
public List<SiteSurveyModifyFiled> ModifyFiledList { get; set; } = new List<SiteSurveyModifyFiled>();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SiteSurveyModifyFiled
|
public class SiteSurveyModifyFiled
|
||||||
|
|
|
@ -182,9 +182,8 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//public List<SiteSurveyFiledConfig>
|
|
||||||
|
|
||||||
public string SiteSurveyConfigJsonStr { get; set; } = string.Empty;
|
public string TrialExtraConfigJsonStr { get; set; } = string.Empty;
|
||||||
|
|
||||||
public bool VisitPlanConfirmed { get; set; }
|
public bool VisitPlanConfirmed { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -248,6 +248,10 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public string VisitImageZipPath { get; set; } = string.Empty;
|
public string VisitImageZipPath { get; set; } = string.Empty;
|
||||||
|
|
||||||
public PackState PackState { get; set; }
|
public PackState PackState { get; set; }
|
||||||
|
|
||||||
|
public PackState NoDicomPackState { get; set; }
|
||||||
|
|
||||||
|
public string VisitNoDicomImageZipPath { get; set;} = string.Empty;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 影像下载打包状态
|
/// 影像下载打包状态
|
||||||
|
|
|
@ -24,6 +24,17 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
public int AutoLoginOutMinutes { get; set; }
|
public int AutoLoginOutMinutes { get; set; }
|
||||||
|
|
||||||
public bool OpenLoginMFA { get; set; }
|
public bool OpenLoginMFA { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 连续阅片时间 (min)
|
||||||
|
/// </summary>
|
||||||
|
public int ContinuousReadingTimeMin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 休息时间 (min)
|
||||||
|
/// </summary>
|
||||||
|
public int ReadingRestTimeMin { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SystemEmailSendConfig
|
public class SystemEmailSendConfig
|
||||||
|
@ -41,6 +52,9 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
|
|
||||||
public string SiteUrl { get; set; }
|
public string SiteUrl { get; set; }
|
||||||
|
|
||||||
|
public string OrganizationName { get; set; }
|
||||||
|
public string OrganizationNameCN { get; set; }
|
||||||
|
|
||||||
public string CompanyName { get; set; }
|
public string CompanyName { get; set; }
|
||||||
|
|
||||||
public string CompanyNameCN { get; set; }
|
public string CompanyNameCN { get; set; }
|
||||||
|
|
|
@ -1,83 +1,31 @@
|
||||||
---
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: ssh
|
||||||
name: irc-netcore-api
|
name: ssh-linux-uat-irc-build-image
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: Linux
|
||||||
|
arch: 386
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
disable: true
|
disable: true
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: 47.117.164.182
|
||||||
|
user: root
|
||||||
|
password:
|
||||||
|
from_secret: test_ssh_pwd
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone-repo
|
- name: build-uat-irc
|
||||||
image: alpine/git
|
|
||||||
pull: if-not-exists
|
|
||||||
volumes:
|
|
||||||
- name: irc-test-work
|
|
||||||
path: /work
|
|
||||||
commands:
|
commands:
|
||||||
- if [ ! -e /work/netcore-repo/.git ]; then
|
- cd /opt/1panel/xc-deploy/Uat_IRC/devops-build-publish/Uat-To-Uat
|
||||||
git clone -b Test.IRC http://192.168.3.68:2000/XCKJ/irc-netcore-api.git /work/netcore-repo;
|
- sh uat-branch-latest-build-image-publish.sh v${DRONE_BUILD_NUMBER}
|
||||||
else
|
|
||||||
cd /work/netcore-repo;
|
|
||||||
git pull;
|
|
||||||
fi
|
|
||||||
|
|
||||||
- |
|
|
||||||
if [ ! -e Dockerfile ]; then
|
|
||||||
echo 'FROM mcr.microsoft.com/dotnet/aspnet:6.0
|
|
||||||
EXPOSE 80
|
|
||||||
WORKDIR /app
|
|
||||||
COPY publish .
|
|
||||||
ENTRYPOINT ["dotnet", "IRaCIS.Core.API.dll"]' > /work/Dockerfile
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: restore-publish
|
|
||||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
|
||||||
pull: if-not-exists
|
|
||||||
depends_on:
|
|
||||||
- clone-repo
|
|
||||||
volumes:
|
|
||||||
- name: nuget-packages
|
|
||||||
path: /root/.nuget/packages
|
|
||||||
- name: irc-test-work
|
|
||||||
path: /work
|
|
||||||
commands:
|
|
||||||
- cd /work/netcore-repo/IRaCIS.Core.API
|
|
||||||
- dotnet restore ./IRaCIS.Core.API.csproj
|
|
||||||
- rm -rf /work/publish
|
|
||||||
- cd /work/netcore-repo/IRaCIS.Core.API
|
|
||||||
- dotnet publish ./IRaCIS.Core.API.csproj -c Release --no-restore -o /work/publish
|
|
||||||
|
|
||||||
- name: docker-build
|
|
||||||
image: docker
|
|
||||||
pull: if-not-exists
|
|
||||||
depends_on:
|
|
||||||
- restore-publish
|
|
||||||
commands:
|
|
||||||
- cd /work
|
|
||||||
- docker build -t test-irc:v${DRONE_BUILD_NUMBER} .
|
|
||||||
volumes:
|
|
||||||
- name: irc-test-work
|
|
||||||
path: /work
|
|
||||||
- name: dockersock
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: nuget-packages
|
|
||||||
host:
|
|
||||||
path: /opt/cicd/nuget/packages
|
|
||||||
- name: irc-test-work
|
|
||||||
host:
|
|
||||||
path: /opt/cicd/irc-test
|
|
||||||
- name: dockersock
|
|
||||||
host:
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- Uat_IRC_Net8
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: ssh
|
type: ssh
|
||||||
name: ssh-linux-test-irc-publish
|
name: ssh-linux-test-irc-publish
|
||||||
|
@ -98,45 +46,13 @@ server:
|
||||||
steps:
|
steps:
|
||||||
- name: publish-test-irc
|
- name: publish-test-irc
|
||||||
commands:
|
commands:
|
||||||
- echo start publish test-irc-api
|
- cd /opt/1panel/xc-deploy/Test_IRC/devops-build-publish;sh test-irc-update-or-create-stack.sh v${DRONE_BUILD_NUMBER}
|
||||||
- cd /opt/1panel/hang/devops/test-irc
|
|
||||||
- sh test-irc.sh v${DRONE_BUILD_NUMBER}
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- Test_IRC_Net8
|
- Test_IRC_Net8
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
kind: pipeline
|
|
||||||
type: ssh
|
|
||||||
name: test-irc-publish-image-push-aliyun
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: Linux
|
|
||||||
arch: 386
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
server:
|
|
||||||
host: 192.168.3.68
|
|
||||||
user: root
|
|
||||||
password:
|
|
||||||
from_secret: local_pwd
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build-and-push-image
|
|
||||||
commands:
|
|
||||||
- cd /opt/hang/netcore/irc-test
|
|
||||||
- sh test-irc.sh v${DRONE_BUILD_NUMBER}
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: ssh
|
type: ssh
|
||||||
name: ssh-linux-test-study-publish
|
name: ssh-linux-test-study-publish
|
||||||
|
@ -146,10 +62,10 @@ platform:
|
||||||
arch: 386
|
arch: 386
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
disable: true
|
disable: true #禁用默认克隆
|
||||||
|
|
||||||
server:
|
server:
|
||||||
host: 123.56.94.154
|
host: 106.14.89.110
|
||||||
user: root
|
user: root
|
||||||
password:
|
password:
|
||||||
from_secret: test_ssh_pwd
|
from_secret: test_ssh_pwd
|
||||||
|
@ -157,10 +73,68 @@ server:
|
||||||
steps:
|
steps:
|
||||||
- name: publish-test-study
|
- name: publish-test-study
|
||||||
commands:
|
commands:
|
||||||
- echo start publish test-study-api
|
- cd /opt/1panel/xc-deploy/Test_Study/devops-build-publish
|
||||||
- cd /opt/1panel/hang/devops/test-study
|
|
||||||
- sh test-study.sh v${DRONE_BUILD_NUMBER}
|
- sh test-study.sh v${DRONE_BUILD_NUMBER}
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- Test.Study
|
- Test.Study
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: ssh-linux-test-scp-publish
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: Linux
|
||||||
|
arch: 386
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true #禁用默认克隆
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: 106.14.89.110
|
||||||
|
user: root
|
||||||
|
password:
|
||||||
|
from_secret: test_ssh_pwd
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: publish-test-hir-scp
|
||||||
|
commands:
|
||||||
|
- cd /opt/1panel/xc-deploy/Test_HIR_SCP/devops-build-publish;sh pull-build-test-hir-scp-image.sh v${DRONE_BUILD_NUMBER}
|
||||||
|
- cd /opt/1panel/xc-deploy/Test_HIR_SCP ;sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER}
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- Test_HIR
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: ssh-linux-test-hir-publish
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: Linux
|
||||||
|
arch: 386
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true #禁用默认克隆
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: 106.14.89.110
|
||||||
|
user: root
|
||||||
|
password:
|
||||||
|
from_secret: test_ssh_pwd
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: publish-test-hir
|
||||||
|
commands:
|
||||||
|
- cd /opt/1panel/xc-deploy/Test_HIR/devops-build-publish;sh pull-build-test-hir-image.sh v${DRONE_BUILD_NUMBER}
|
||||||
|
- cd /opt/1panel/xc-deploy/Test_HIR ; sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER}
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- Test_HIR
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue