Compare commits
81 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cde58ace66 | |||
| 989511ad68 | |||
| 9b6e8feabf | |||
| 73862c10c5 | |||
| 63572942ea | |||
| ea6c6c8490 | |||
| 11455e6c78 | |||
| f7ed595f7c | |||
| 8b481aaae2 | |||
| a8cff18985 | |||
| 39f14c8d11 | |||
| f9a46561e8 | |||
| 5a55fea38a | |||
| 884e03fab5 | |||
| 584ad2a7c4 | |||
| 4abad486d2 | |||
| 1958dca2be | |||
| ba121827ac | |||
| b946672e9e | |||
| e21e1488e7 | |||
| 3a03eec1ab | |||
| f9277de9ef | |||
| 3b37cec42d | |||
| 514a8a2d0f | |||
| 80ad4be4cb | |||
| 6da34061da | |||
| 97d5010f0c | |||
| 18dfc3ca37 | |||
| 9f27d4ff11 | |||
| f828a7d1e2 | |||
| f19febaa6e | |||
| e344392450 | |||
| f9c61cabcc | |||
| 7ce98a8c81 | |||
| c4860cdb74 | |||
| 5b92110f43 | |||
| 431375946b | |||
| 1a6ffa5d84 | |||
| bb6744dc6f | |||
| 84973bb441 | |||
| 4e8c228b92 | |||
| 505ebd2d41 | |||
| 0fd1b52036 | |||
| df4493e5af | |||
| 38629114b6 | |||
| f43c384a27 | |||
| 5f119d6f0e | |||
| 2eecca60f0 | |||
| bca9993e68 | |||
| 466ac5e03e | |||
| 9901eb83ad | |||
| 9b73522a8e | |||
| d1b5d5fadc | |||
| 8c267ec6f4 | |||
| 46c4416434 | |||
| c0bd5c9d88 | |||
| df8d4e3afc | |||
| 32deb59df4 | |||
| fa92144439 | |||
| 04cfb2b977 | |||
| 7760d85721 | |||
| 23cbf79474 | |||
| a86c43d8d9 | |||
| 8c43bcf030 | |||
| 482a91a08c | |||
| d495d03619 | |||
| c223244f10 | |||
| 6a7971f314 | |||
| 19ebce1c98 | |||
| 1f04bdb57a | |||
| 6e1feebc11 | |||
| 43174b37cf | |||
| a0fe1db962 | |||
| 4309ee627a | |||
| 371cc24520 | |||
| ac2fbc07dd | |||
| 79133ccde8 | |||
| 1d4a2eb1b0 | |||
| 62a1200cf3 | |||
| eac6fe52a6 | |||
| bd6a11b77a |
@@ -12,6 +12,7 @@ using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Application.Auth;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
namespace IRaCIS.Core.API.Controllers.Special
|
||||
{
|
||||
@@ -22,11 +23,12 @@ namespace IRaCIS.Core.API.Controllers.Special
|
||||
{
|
||||
private readonly ITrialService _trialService;
|
||||
private readonly ICalculateService _calculateService;
|
||||
|
||||
public FinancialChangeController(ITrialService trialService, ICalculateService calculateService
|
||||
)
|
||||
private IStringLocalizer _localizer { get; set; }
|
||||
public FinancialChangeController(ITrialService trialService, ICalculateService calculateService, IStringLocalizer localizer
|
||||
)
|
||||
{
|
||||
_trialService = trialService;
|
||||
_localizer = localizer;
|
||||
_trialService = trialService;
|
||||
_calculateService = calculateService;
|
||||
}
|
||||
|
||||
@@ -124,7 +126,8 @@ namespace IRaCIS.Core.API.Controllers.Special
|
||||
|
||||
if (isLock)
|
||||
{
|
||||
return ResponseOutput.NotOk("Expenses have been settled and workload can not be reset.");
|
||||
//---Expenses have been settled and workload can not be reset.
|
||||
return ResponseOutput.NotOk(_localizer["Financial_ChargeSettled"]);
|
||||
}
|
||||
|
||||
var deleteResult = await _trialWorkloadService.DeleteWorkload(id);
|
||||
@@ -300,7 +303,8 @@ namespace IRaCIS.Core.API.Controllers.Special
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return ResponseOutput.NotOk("Invalid parameter.");
|
||||
//---Invalid parameter.
|
||||
return ResponseOutput.NotOk(_localizer["Financial_InvalidParameter"]);
|
||||
}
|
||||
return await _calculateService.CalculateMonthlyPayment(param, User.FindFirst("id").Value);
|
||||
}
|
||||
|
||||
@@ -286,7 +286,8 @@ namespace IRaCIS.Core.API.Controllers
|
||||
!MediaTypeHeaderValue.TryParse(HttpContext.Request.ContentType, out var mediaTypeHeader) ||
|
||||
string.IsNullOrEmpty(mediaTypeHeader.Boundary.Value))
|
||||
{
|
||||
return ResponseOutput.NotOk("不支持的MediaType");
|
||||
//---不支持的MediaType
|
||||
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_UnsupportedMedia"));
|
||||
}
|
||||
|
||||
var archiveStudyCommand = new ArchiveStudyCommand() { AbandonStudyId = abandonStudyId, StudyInstanceUid = studyInstanceUid, SubjectVisitId = subjectVisitId };
|
||||
@@ -297,7 +298,8 @@ namespace IRaCIS.Core.API.Controllers
|
||||
|
||||
if (_provider.Exists($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}"))
|
||||
{
|
||||
return ResponseOutput.NotOk("当前已有人正在上传和归档该检查!");
|
||||
//---当前已有人正在上传和归档该检查!
|
||||
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_ArchiveInProgress"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -370,7 +372,8 @@ namespace IRaCIS.Core.API.Controllers
|
||||
{
|
||||
_provider.Remove($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}");
|
||||
|
||||
throw new BusinessValidationFailedException("请求异常,请重试!");
|
||||
//---请求异常,请重试!
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_RequestError"));
|
||||
}
|
||||
|
||||
studyMonitor.FileSize = (decimal)HttpContext.Request.ContentLength;
|
||||
@@ -741,7 +744,8 @@ namespace IRaCIS.Core.API.Controllers
|
||||
|
||||
if (!fileName.EndsWith(".xlsx") && !fileName.EndsWith(".csv") && !fileName.EndsWith(".xls"))
|
||||
{
|
||||
throw new BusinessValidationFailedException("支持.xlsx、.xls、.csv格式的文件上传。");
|
||||
//---支持.xlsx、.xls、.csv格式的文件上传。
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_SupportedFormats"));
|
||||
}
|
||||
|
||||
(serverFilePath, relativePath) = FileStoreHelper.GetTrialCheckFilePath(_hostEnvironment, fileName, trialId);
|
||||
@@ -881,7 +885,8 @@ namespace IRaCIS.Core.API.Controllers
|
||||
|
||||
if (etcCheckList == null || etcCheckList.Count == 0)
|
||||
{
|
||||
return ResponseOutput.NotOk("请保证上传数据符合模板文件中的样式,且存在有效数据。");
|
||||
//---请保证上传数据符合模板文件中的样式,且存在有效数据。
|
||||
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_InvalidData"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -901,7 +906,8 @@ namespace IRaCIS.Core.API.Controllers
|
||||
|
||||
if (etcCheckList.Count == 0)
|
||||
{
|
||||
return ResponseOutput.NotOk("请保证上传数据符合模板文件中的样式,且存在有效数据。");
|
||||
//---请保证上传数据符合模板文件中的样式,且存在有效数据。
|
||||
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_InvalidData"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -106,30 +106,60 @@
|
||||
<Content Update="NLog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\AdminAddUser_US.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\AdminResetUser_US.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\AdminResetUser.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\EmailConfigTest_US.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\EmailConfigTest.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\SubjectEnrollConfirmOrPDProgress_US.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\TrialDoctorExistJoin_US.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\TrialDoctorFirstJoin.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\TrialSiteSurveyReject.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\TrialSiteSurveyReject_US.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\TrialDoctorExistJoin.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\TrialUserExistJoin_US.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\TrialUserExistJoin.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\AdminAddUser.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\TrialDoctorFirstJoin.html">
|
||||
<Content Update="wwwroot\EmailTemplate\TrialDoctorFirstJoin_US.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\SubjectEnrollConfirmOrPDProgress.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\TrialUserFirstJoin_US.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\UserOptCommon_US.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\UserOptCommon.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
+55
-56
@@ -9,6 +9,8 @@ using IRaCIS.Core.Application.MediatR.Handlers;
|
||||
using System.Threading.Tasks;
|
||||
using MassTransit;
|
||||
using MassTransit.NewIdProviders;
|
||||
using System.IO;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
|
||||
namespace IRaCIS.Core.API
|
||||
{
|
||||
@@ -50,23 +52,27 @@ namespace IRaCIS.Core.API
|
||||
.Build();
|
||||
|
||||
|
||||
//// Serilog
|
||||
SerilogExtension.AddSerilogSetup(enviromentName, host.Services);
|
||||
Log.Logger.Warning($"当前环境:{enviromentName}");
|
||||
|
||||
|
||||
|
||||
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
|
||||
|
||||
|
||||
|
||||
|
||||
//// Serilog
|
||||
SerilogExtension.AddSerilogSetup(enviromentName, host.Services);
|
||||
|
||||
//缓存项目的状态 匿名化数据
|
||||
await InitCache(host);
|
||||
|
||||
WatchJsonFile(Path.Combine(AppContext.BaseDirectory, StaticData.Folder.Resources, StaticData.En_US_Json) );
|
||||
|
||||
WatchJsonFile(Path.Combine(AppContext.BaseDirectory, StaticData.Folder.Resources, StaticData.Zh_CN_Json));
|
||||
|
||||
|
||||
|
||||
|
||||
host.Run();
|
||||
|
||||
Log.Logger.Warning($"当前环境:{enviromentName}");
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -75,46 +81,6 @@ namespace IRaCIS.Core.API
|
||||
Log.Logger.Error(e.InnerException is null ? e.Message + e.StackTrace : e.InnerException?.Message + e.InnerException?.StackTrace);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region Nlog 废弃
|
||||
//var logger = NLog.Web.NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger();
|
||||
//try
|
||||
//{
|
||||
// var ihostBuilder = CreateHostBuilder(args);
|
||||
|
||||
// ihostBuilder.UseEnvironment(environment);
|
||||
|
||||
// ihostBuilder.ConfigureAppConfiguration((hostContext, config) =>
|
||||
// {
|
||||
|
||||
// //Console.WriteLine(hostContext.HostingEnvironment.EnvironmentName);
|
||||
// config.AddJsonFile("appsettings.json", false, true)
|
||||
// .AddJsonFile($"appsettings.{environment}.json", false, true);
|
||||
// });
|
||||
|
||||
// var host = ihostBuilder.Build();
|
||||
|
||||
// CacheTrialStatus(host);
|
||||
|
||||
// host.Run();
|
||||
|
||||
//}
|
||||
//catch (Exception exception)
|
||||
//{
|
||||
// //NLog: catch setup errors
|
||||
// logger.Error(exception, "Stopped program because of exception");
|
||||
//}
|
||||
//finally
|
||||
//{
|
||||
// // Ensure to flush and stop internal timers/threads before application-exit (Avoid segmentation fault on Linux)
|
||||
// NLog.LogManager.Shutdown();
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
@@ -133,16 +99,7 @@ namespace IRaCIS.Core.API
|
||||
//webBuilder.UseSerilog();//在宿主机启动的时候配置serilog,与微软ILogger进行整合
|
||||
webBuilder.UseStartup<Startup>();
|
||||
}).UseSerilog()
|
||||
.UseServiceProviderFactory(new AutofacServiceProviderFactory());//使用Autofac替代本身容器
|
||||
//ConfigureLogging(logging =>
|
||||
//{
|
||||
// logging.ClearProviders();
|
||||
// logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
|
||||
//})
|
||||
//.UseNLog()
|
||||
// NLog: Setup NLog for Dependency injection;
|
||||
|
||||
|
||||
.UseServiceProviderFactory(new AutofacServiceProviderFactory());
|
||||
|
||||
|
||||
private static async Task InitCache(IHost host)
|
||||
@@ -154,5 +111,47 @@ namespace IRaCIS.Core.API
|
||||
await _mediator.Send(new TrialStateCacheRequest());
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static void LoadJsonFile(string filePath)
|
||||
{
|
||||
|
||||
IConfigurationBuilder builder = new ConfigurationBuilder()
|
||||
.AddJsonFile(filePath);
|
||||
|
||||
IConfigurationRoot enConfiguration = builder.Build();
|
||||
|
||||
|
||||
|
||||
foreach (IConfigurationSection section in enConfiguration.GetChildren())
|
||||
{
|
||||
if (filePath.Contains(StaticData.En_US_Json) )
|
||||
{
|
||||
StaticData.En_US_Dic[section.Key] = section.Value;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
StaticData.Zh_CN_Dic[section.Key] = section.Value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
public static void WatchJsonFile(string filePath)
|
||||
{
|
||||
LoadJsonFile(filePath);
|
||||
|
||||
|
||||
FileSystemWatcher watcher = new FileSystemWatcher(Path.GetDirectoryName(filePath), Path.GetFileName(filePath));
|
||||
watcher.Changed += (sender, e) => LoadJsonFile(filePath);
|
||||
watcher.EnableRaisingEvents = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@ namespace IRaCIS.Core.API.Utility
|
||||
|
||||
if (string.IsNullOrWhiteSpace(boundary))
|
||||
{
|
||||
throw new InvalidDataException("Missing content-type boundary.");
|
||||
throw new InvalidDataException(
|
||||
"Missing content-type boundary.");
|
||||
}
|
||||
|
||||
if (boundary.Length > lengthLimit)
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace IRaCIS.Core.API
|
||||
public static void UseIRacisHostStaticFileStore(this IApplicationBuilder app, IWebHostEnvironment _hostEnvironment)
|
||||
{
|
||||
|
||||
var iRaCISDataFolder = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
||||
var iRaCISDataFolder = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
||||
|
||||
if (!Directory.Exists(iRaCISDataFolder))
|
||||
{
|
||||
@@ -26,13 +26,7 @@ namespace IRaCIS.Core.API
|
||||
RequestPath = $"/{StaticData.Folder.IRaCISDataFolder}",
|
||||
ServeUnknownFileTypes = true,
|
||||
DefaultContentType = "application/octet-stream"
|
||||
|
||||
// // Set up custom content types - associating file extension to MIME type
|
||||
//var provider = new FileExtensionContentTypeProvider();
|
||||
// // Add new mappings
|
||||
// provider.Mappings[".myapp"] = "application/x-msdownload";
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+78
-23
@@ -1,10 +1,12 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
using Microsoft.Extensions.FileProviders.Physical;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Hosting.Internal;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
@@ -24,12 +26,21 @@ namespace IRaCIS.Core.API
|
||||
private readonly StaticFileOptions _options;
|
||||
private readonly ILoggerFactory _loggerFactory;
|
||||
|
||||
private string iRaCISDefaultDataFolder = string.Empty;
|
||||
|
||||
public MultiDiskStaticFilesMiddleware(RequestDelegate next, IWebHostEnvironment hostingEnv, StaticFileOptions options, ILoggerFactory loggerFactory)
|
||||
{
|
||||
_next = next;
|
||||
_hostingEnv = hostingEnv;
|
||||
_options = options;
|
||||
_loggerFactory = loggerFactory;
|
||||
|
||||
iRaCISDefaultDataFolder = FileStoreHelper.GetIRaCISRootDataFolder(_hostingEnv);
|
||||
|
||||
if (!Directory.Exists(iRaCISDefaultDataFolder))
|
||||
{
|
||||
Directory.CreateDirectory(iRaCISDefaultDataFolder);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task Invoke(HttpContext context)
|
||||
@@ -39,52 +50,96 @@ namespace IRaCIS.Core.API
|
||||
|
||||
var isDicomFile = path.Contains($"{StaticData.Folder.DicomFolder}");
|
||||
|
||||
var isFind = false;
|
||||
var defaultFileProvider = new PhysicalFileProvider(iRaCISDefaultDataFolder);
|
||||
var staticFileOptions = new StaticFileOptions
|
||||
{
|
||||
FileProvider = defaultFileProvider,
|
||||
RequestPath = $"/{StaticData.Folder.IRaCISDataFolder}",
|
||||
ServeUnknownFileTypes = true,
|
||||
DefaultContentType = "application/octet-stream"
|
||||
};
|
||||
|
||||
var defaultRoot = Path.GetPathRoot(iRaCISDefaultDataFolder);
|
||||
|
||||
//先从默认里面去找
|
||||
if (isIRacisFile)
|
||||
{
|
||||
|
||||
if (defaultFileProvider.GetFileInfo(context.Request.Path).Exists)
|
||||
{
|
||||
var staticFileMiddleware = new StaticFileMiddleware(_next, _hostingEnv, Options.Create(staticFileOptions), _loggerFactory);
|
||||
await staticFileMiddleware.Invoke(context);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//没找到
|
||||
//dicom影像,从多个文件夹尝试,因为会存在切换磁盘
|
||||
if (isDicomFile)
|
||||
{
|
||||
var disks = GetDisks().Where(t=>!t.Contains(defaultRoot));
|
||||
|
||||
|
||||
foreach (var item in disks)
|
||||
{
|
||||
var otherFileStoreFolder = Path.Combine(item, _hostingEnv.EnvironmentName);
|
||||
|
||||
var otherFileProvider= new PhysicalFileProvider(otherFileStoreFolder);
|
||||
|
||||
var otherStaticFileOptions = new StaticFileOptions
|
||||
{
|
||||
FileProvider = otherFileProvider,
|
||||
RequestPath = $"/{StaticData.Folder.IRaCISDataFolder}",
|
||||
ServeUnknownFileTypes = true,
|
||||
DefaultContentType = "application/octet-stream"
|
||||
};
|
||||
|
||||
if (otherFileProvider.GetFileInfo(context.Request.Path).Exists)
|
||||
{
|
||||
var staticFileMiddleware = new StaticFileMiddleware(_next, _hostingEnv, Options.Create(staticFileOptions), _loggerFactory);
|
||||
await staticFileMiddleware.Invoke(context);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 如果所有磁盘都不存在所请求的文件,则将请求传递给下一个中间件组件。
|
||||
await _next.Invoke(context);
|
||||
}
|
||||
|
||||
private async Task ServeFileAsync(HttpContext context, IFileInfo fileInfo)
|
||||
{
|
||||
var response = context.Response;
|
||||
response.ContentType = GetContentType(fileInfo.PhysicalPath);
|
||||
|
||||
using (var fileStream = fileInfo.CreateReadStream())
|
||||
{
|
||||
await fileStream.CopyToAsync(response.Body);
|
||||
}
|
||||
}
|
||||
|
||||
private string[] GetDisks()
|
||||
{
|
||||
// 获取系统中所有可用的磁盘
|
||||
return DriveInfo.GetDrives()
|
||||
.Where(d => d.IsReady && d.DriveType == DriveType.Fixed)
|
||||
.Where(d => d.IsReady && d.DriveType == DriveType.Fixed).Where(t => !t.Name.Contains("C") && !t.Name.Contains("c"))
|
||||
.Select(d => d.RootDirectory.FullName)
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
private static string GetContentType(string path)
|
||||
{
|
||||
var provider = new FileExtensionContentTypeProvider();
|
||||
if (!provider.TryGetContentType(path, out var contentType))
|
||||
{
|
||||
contentType = "application/octet-stream";
|
||||
}
|
||||
|
||||
return contentType;
|
||||
}
|
||||
//private static string GetContentType(string path)
|
||||
//{
|
||||
// var provider = new FileExtensionContentTypeProvider();
|
||||
// if (!provider.TryGetContentType(path, out var contentType))
|
||||
// {
|
||||
// contentType = "application/octet-stream";
|
||||
// }
|
||||
|
||||
// return contentType;
|
||||
//}
|
||||
|
||||
//private async Task ServeFileAsync(HttpContext context, IFileInfo fileInfo)
|
||||
//{
|
||||
// var response = context.Response;
|
||||
// response.ContentType = GetContentType(fileInfo.PhysicalPath);
|
||||
|
||||
// using (var fileStream = fileInfo.CreateReadStream())
|
||||
// {
|
||||
// await fileStream.CopyToAsync(response.Body);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ namespace IRaCIS.Core.API
|
||||
config.WriteTo.Email(new EmailConnectionInfo()
|
||||
{
|
||||
EmailSubject = "系统警告,请速速查看!",//邮件标题
|
||||
FromEmail = "iracis_grr@163.com",//发件人邮箱
|
||||
MailServer = "smtp.163.com",//smtp服务器地址
|
||||
NetworkCredentials = new NetworkCredential("iracis_grr@163.com", "XLWVQKZAEKLDWOAH"),//两个参数分别是发件人邮箱与客户端授权码
|
||||
Port = 25,//端口号
|
||||
FromEmail = "test@extimaging.com",//发件人邮箱
|
||||
MailServer = "smtp.qiye.aliyun.com",//smtp服务器地址
|
||||
NetworkCredentials = new NetworkCredential("test@extimaging.com", "SHzyyl2021"),//两个参数分别是发件人邮箱与客户端授权码
|
||||
Port = 465,//端口号
|
||||
ToEmail = "872297557@qq.com"//收件人
|
||||
}, restrictedToMinimumLevel: LogEventLevel.Error,
|
||||
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [ {Level} {ClientIp} {ClientAgent} {TokenUserRealName} {TokenUserType} ] || [path: {RequestPath} arguments: {RequestBody}] {SourceContext:l} || {Message} || {Exception} ||end {NewLine})");
|
||||
|
||||
@@ -57,9 +57,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"UpdateConfig": {
|
||||
"test": "123456",
|
||||
"test1": "12345678"
|
||||
"IRaCISImageStore": {
|
||||
"SwitchingMode": "RemainingDiskCapacity",
|
||||
"SwitchingRatio": 80,
|
||||
"NotificationEmail": "872297557@qq.com"
|
||||
},
|
||||
"IRaCISBasicConfig": {
|
||||
"DoctorCodePrefix": "RE",
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Dear {0} ,
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Extimaging has added an account for you. The account information is as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
<div>
|
||||
User name: {1}
|
||||
</div>
|
||||
<div>
|
||||
Role: {2}
|
||||
</div>
|
||||
<div>
|
||||
Before logging in for the first time, please modify your account information by this link:
|
||||
<a href='{3}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
Initialize the account information
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best Regards</div>
|
||||
<div style="font-size: 14px;">Shanghai Extensive Imaging Medical Technology Co., LTD</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Dear {0} ,
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Extimaging has reset your account password, and the account information is as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
<div>
|
||||
User name: {1}
|
||||
</div>
|
||||
<div>
|
||||
Role: {2}
|
||||
</div>
|
||||
<div>
|
||||
Password: {3}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best Regards</div>
|
||||
<div style="font-size: 14px;">Shanghai Extensive Imaging Medical Technology Co., LTD</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Dear:
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Thank you for using Extensive Imaging Cloud System.
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
{0}。
|
||||
</div>
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best Regards</div>
|
||||
<div style="font-size: 14px;">Shanghai Extensive Imaging Medical Technology Co., LTD</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Dear:
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Thank you for using Extensive Imaging Cloud System.
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
{0}。
|
||||
</div>
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best Regards</div>
|
||||
<div style="font-size: 14px;">Shanghai Extensive Imaging Medical Technology Co., LTD</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Dear {0},
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
This project adopts electronic workflow. The system and your account information are as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
<div>
|
||||
Trial ID: {3}
|
||||
</div>
|
||||
<div>
|
||||
Protocol ID: {2}
|
||||
</div>
|
||||
<div>
|
||||
Study name: {1}
|
||||
</div>
|
||||
<div>
|
||||
User name: {4}
|
||||
</div>
|
||||
<div>
|
||||
Role: {5}
|
||||
</div>
|
||||
<div>
|
||||
System login address:{6}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best Regards</div>
|
||||
<div style="font-size: 14px;">Shanghai Extensive Imaging Medical Technology Co., LTD</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Dear {0},
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
This project adopts electronic workflow. The system and your account information are as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
<div>
|
||||
Trial ID: {3}
|
||||
</div>
|
||||
<div>
|
||||
Protocol ID: {2}
|
||||
</div>
|
||||
<div>
|
||||
Study name: {1}
|
||||
</div>
|
||||
<div>
|
||||
User name: {4}
|
||||
</div>
|
||||
<div>
|
||||
Role: {5}
|
||||
</div>
|
||||
<div>
|
||||
Before logging in for the first time, please modify your account information by this link:
|
||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
Initialize the account information
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best Regards</div>
|
||||
<div style="font-size: 14px;">Shanghai Extensive Imaging Medical Technology Co., LTD</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Dear {0} ,
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Hello, the center survey form you filled in has been rejected. The details are as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
<div>
|
||||
Trial ID: {1}
|
||||
</div>
|
||||
<div>
|
||||
Protocol ID: {2}
|
||||
</div>
|
||||
<div>
|
||||
Study name: {3}
|
||||
</div>
|
||||
<div>
|
||||
Site ID: {4}
|
||||
</div>
|
||||
<div>
|
||||
Site name: {5}
|
||||
</div>
|
||||
<div>
|
||||
Reason for rejection: {6}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<a href='{7}' style='margin-left:60px;font-size:14px;padding: 10px;text-decoration: none;display:{8} ;height: 40px;width: 140px;background: #00D1B2;color:#fff;border-radius: 5px;line-height: 40px;text-align: center;margin-bottom: 100px;'>
|
||||
Login and view
|
||||
</a>
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best Regards</div>
|
||||
<div style="font-size: 14px;">Shanghai Extensive Imaging Medical Technology Co., LTD</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Dear {0},
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
This project adopts electronic workflow. The system and your account information are as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
<div>
|
||||
Trial ID: {3}
|
||||
</div>
|
||||
<div>
|
||||
Protocol ID: {2}
|
||||
</div>
|
||||
<div>
|
||||
Study name: {1}
|
||||
</div>
|
||||
<div>
|
||||
User name: {4}
|
||||
</div>
|
||||
<div>
|
||||
Role: {5}
|
||||
</div>
|
||||
<div>
|
||||
System login address:{6}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best Regards</div>
|
||||
<div style="font-size: 14px;">Shanghai Extensive Imaging Medical Technology Co., LTD</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Dear {0},
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
This project adopts electronic workflow. The system and your account information are as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
<div>
|
||||
Trial ID: {3}
|
||||
</div>
|
||||
<div>
|
||||
Protocol ID: {2}
|
||||
</div>
|
||||
<div>
|
||||
Study name: {1}
|
||||
</div>
|
||||
<div>
|
||||
User name: {4}
|
||||
</div>
|
||||
<div>
|
||||
Role: {5}
|
||||
</div>
|
||||
<div>
|
||||
Before logging in for the first time, please modify your account information by this link:
|
||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
Initialize the account information
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best Regards</div>
|
||||
<div style="font-size: 14px;">Shanghai Extensive Imaging Medical Technology Co., LTD</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,7 +8,7 @@
|
||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
{0}您好:
|
||||
Dear {0},
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
感谢您使用展影云平台。
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Dear {0},
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Thank you for using Extensive Imaging Cloud System.
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
{1}, the verification code is {2}. Enter the verification code within 3 minutes for subsequent operations. Please ignore this email if not by yourself.
|
||||
</div>
|
||||
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best Regards</div>
|
||||
<div style="font-size: 14px;">Shanghai Extensive Imaging Medical Technology Co., LTD</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,7 +11,7 @@ namespace IRaCIS.Core.Application.Filter;
|
||||
|
||||
|
||||
|
||||
public class LimitUserRequestAuthorization : IAsyncAuthorizationFilter
|
||||
public class LimitUserRequestAuthorization :BaseService, IAsyncAuthorizationFilter
|
||||
{
|
||||
|
||||
|
||||
@@ -50,7 +50,8 @@ public class LimitUserRequestAuthorization : IAsyncAuthorizationFilter
|
||||
{
|
||||
context.HttpContext.Response.ContentType = "application/json";
|
||||
context.HttpContext.Response.StatusCode = StatusCodes.Status200OK;
|
||||
await context.HttpContext.Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk("当前请求未从Header/Url取到用户Token,请联系开发者")));
|
||||
//---当前请求未从Header/Url取到用户Token,请联系开发者
|
||||
await context.HttpContext.Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk(_localizer["LimitUser_AuthTokenMissing"])));
|
||||
}
|
||||
|
||||
//2、在这里取缓存 进行比较 看是否有其他人进行了登陆,如果其他人登陆了,就把之前用户挤掉
|
||||
@@ -76,7 +77,8 @@ public class LimitUserRequestAuthorization : IAsyncAuthorizationFilter
|
||||
|
||||
context.HttpContext.Response.ContentType = "application/json";
|
||||
context.HttpContext.Response.StatusCode = StatusCodes.Status403Forbidden;
|
||||
await context.HttpContext.Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk("您的账户在其他地方已登陆,您被迫下线。", ApiResponseCodeEnum.LoginInOtherPlace)));
|
||||
//---您的账户在其他地方已登陆,您被迫下线。
|
||||
await context.HttpContext.Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk(_localizer["LimitUser_AccountLoggedInElsewhere"], ApiResponseCodeEnum.LoginInOtherPlace)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace IRaCIS.Core.Application.Filter
|
||||
{
|
||||
|
||||
|
||||
public class ModelActionFilter : ActionFilterAttribute, IActionFilter
|
||||
{
|
||||
public override void OnActionExecuting(ActionExecutingContext context)
|
||||
{
|
||||
public override void OnActionExecuting(ActionExecutingContext context)
|
||||
{
|
||||
if (!context.ModelState.IsValid)
|
||||
{
|
||||
|
||||
@@ -19,7 +22,8 @@ namespace IRaCIS.Core.Application.Filter
|
||||
.Select(e => e.ErrorMessage)
|
||||
.ToArray();
|
||||
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("提供给接口的参数无效。" +JsonConvert.SerializeObject( validationErrors)));
|
||||
//---提供给接口的参数无效。
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("Invalid parameters provided for the API." + JsonConvert.SerializeObject( validationErrors)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@ namespace IRaCIS.Core.Application.Filter
|
||||
{
|
||||
if (context.Exception.GetType().Name == "DbUpdateConcurrencyException")
|
||||
{
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("并发更新,当前不允许该操作" + context.Exception.Message));
|
||||
//---并发更新,当前不允许该操作
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("Concurrent update, operation not allowed at this time." + context.Exception.Message));
|
||||
}
|
||||
|
||||
if (context.Exception.GetType() == typeof(BusinessValidationFailedException))
|
||||
@@ -35,7 +36,7 @@ namespace IRaCIS.Core.Application.Filter
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(" 程序异常,请联系开发人员。 " + (context.Exception.InnerException is null ? (context.Exception.Message /*+ context.Exception.StackTrace*/)
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("程序异常,请联系开发人员。" + (context.Exception.InnerException is null ? (context.Exception.Message /*+ context.Exception.StackTrace*/)
|
||||
: (context.Exception.InnerException?.Message /*+ context.Exception.InnerException?.StackTrace*/)), ApiResponseCodeEnum.ProgramException));
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using System.Text.RegularExpressions;
|
||||
using static IRaCIS.Core.Domain.Share.StaticData;
|
||||
|
||||
@@ -16,17 +17,18 @@ namespace IRaCIS.Core.Application.Filter
|
||||
private readonly IEasyCachingProvider _provider;
|
||||
private readonly IUserInfo _userInfo;
|
||||
|
||||
|
||||
private readonly List<string> _trialOptList=new List<string>();
|
||||
public IStringLocalizer _localizer;
|
||||
private readonly List<string> _trialOptList=new List<string>();
|
||||
|
||||
|
||||
public TrialResourceFilter(IEasyCachingProvider provider, IUserInfo userInfo, string trialOpt = null, string trialOpt2 = null, string trialOpt3 = null)
|
||||
public TrialResourceFilter(IEasyCachingProvider provider, IStringLocalizer localizer , IUserInfo userInfo, string trialOpt = null, string trialOpt2 = null, string trialOpt3 = null)
|
||||
{
|
||||
_provider = provider;
|
||||
_userInfo = userInfo;
|
||||
//_trialOpt = trialOpt;
|
||||
_localizer = localizer;
|
||||
//_trialOpt = trialOpt;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(trialOpt)) _trialOptList.Add(trialOpt.Trim());
|
||||
if (!string.IsNullOrWhiteSpace(trialOpt)) _trialOptList.Add(trialOpt.Trim());
|
||||
if (!string.IsNullOrWhiteSpace(trialOpt2)) _trialOptList.Add(trialOpt2.Trim());
|
||||
if (!string.IsNullOrWhiteSpace(trialOpt3)) _trialOptList.Add(trialOpt3.Trim());
|
||||
|
||||
@@ -56,7 +58,8 @@ namespace IRaCIS.Core.Application.Filter
|
||||
// 后期列举出具体的类型,其他任何用户类型,都不允许操作
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA)
|
||||
{
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("对不起,您的账户没有操作权限。"));
|
||||
//---对不起,您的账户没有操作权限。
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_NoAccessPermission"]));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -94,7 +97,8 @@ namespace IRaCIS.Core.Application.Filter
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("正则取请求Refer 中trialId 失败,请联系开发人员核查"));
|
||||
//---正则取请求Refer 中trialId 失败,请联系开发人员核查
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -137,7 +141,8 @@ namespace IRaCIS.Core.Application.Filter
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("正则取请求Refer 中trialId 失败,请联系开发人员核查"));
|
||||
//---正则取请求Refer 中trialId 失败,请联系开发人员核查
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
|
||||
}
|
||||
|
||||
//使用字符串取 如果是swagger 可能有时取的不对 因为空格的原因
|
||||
@@ -184,7 +189,8 @@ namespace IRaCIS.Core.Application.Filter
|
||||
// 项目停止、或者完成 不允许操作
|
||||
else
|
||||
{
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("本次请求被配置规则拦截:项目状态处于进行中时,才允许操作,若此处逻辑有误,请联系开发人员修改"));
|
||||
//---本次请求被配置规则拦截:项目状态处于进行中时,才允许操作,若此处逻辑有误,请联系开发人员修改
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_InterceptedProjectStatusRule"]));
|
||||
|
||||
}
|
||||
|
||||
@@ -199,7 +205,8 @@ namespace IRaCIS.Core.Application.Filter
|
||||
{
|
||||
//如果项目相关接口没有传递trialId 会来到这里,提醒,以便修改
|
||||
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("该接口参数中,没有传递项目编号,请核对。"));
|
||||
//---该接口参数中,没有传递项目编号,请核对。
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_MissingProjectNumber"]));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
|
||||
namespace IRaCIS.Application.Services.BusinessFilter
|
||||
{
|
||||
@@ -74,7 +75,8 @@ namespace IRaCIS.Application.Services.BusinessFilter
|
||||
|
||||
else if(statusCode != 200&&!(objectResult.Value is IResponseOutput))
|
||||
{
|
||||
var apiResponse = ResponseOutput.NotOk("程序错误,请联系开发人员。");
|
||||
//---程序错误,请联系开发人员。
|
||||
var apiResponse = ResponseOutput.NotOk(StaticData.International("UnifiedAPI_ProgramError"));
|
||||
|
||||
objectResult.Value = apiResponse;
|
||||
objectResult.DeclaredType = apiResponse.GetType();
|
||||
|
||||
@@ -93,14 +93,16 @@ public static class FileStoreHelper
|
||||
|
||||
if (systemClinicalData == null || systemClinicalData.Path == string.Empty)
|
||||
{
|
||||
throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
|
||||
//---数据库没有找到对应的数据模板文件,请联系系统运维人员。
|
||||
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
|
||||
}
|
||||
|
||||
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, systemClinicalData.Path);
|
||||
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
{
|
||||
throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
|
||||
//---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
|
||||
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
|
||||
}
|
||||
|
||||
return (filePath, systemClinicalData.FileName);
|
||||
@@ -121,14 +123,16 @@ public static class FileStoreHelper
|
||||
|
||||
if (trialClinicalData == null|| trialClinicalData.Path==string.Empty)
|
||||
{
|
||||
throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
|
||||
//---数据库没有找到对应的数据模板文件,请联系系统运维人员。
|
||||
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
|
||||
}
|
||||
|
||||
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, trialClinicalData.Path);
|
||||
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
{
|
||||
throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
|
||||
//---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
|
||||
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
|
||||
}
|
||||
|
||||
return (filePath, trialClinicalData.FileName);
|
||||
@@ -143,14 +147,16 @@ public static class FileStoreHelper
|
||||
|
||||
if (doc == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
|
||||
//---数据库没有找到对应的数据模板文件,请联系系统运维人员。
|
||||
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
|
||||
}
|
||||
|
||||
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, doc.Path);
|
||||
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
{
|
||||
throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
|
||||
//---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
|
||||
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
|
||||
}
|
||||
|
||||
return (filePath, doc.Name.Trim('/'));
|
||||
|
||||
@@ -42,7 +42,8 @@ public static class SendEmailHelper
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw new Exception("邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员");
|
||||
//---邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员
|
||||
throw new Exception(StaticData.International("SendEmail_SendFail"));
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +63,8 @@ public static class SendEmailHelper
|
||||
|
||||
if (sMTPEmailConfig.ToMailAddressList.Count == 0)
|
||||
{
|
||||
throw new ArgumentException("没有收件人");
|
||||
//---没有收件人
|
||||
throw new ArgumentException(StaticData.International("SendEmail_NoRecipient"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1234,13 +1234,6 @@
|
||||
<param name="calculateType"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetReportTumor(System.Guid)">
|
||||
<summary>
|
||||
获取报告整体整体评估
|
||||
</summary>
|
||||
<param name="visitTaskId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetReportIsExistDisease(System.Guid)">
|
||||
<summary>
|
||||
获取报告是否存在疾病
|
||||
@@ -1492,7 +1485,35 @@
|
||||
<returns></returns>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetNewLesionAssessment(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)" -->
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetNewLesionIRECSITEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
获取新病灶评估
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetIRECSITTargetLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)" -->
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetConvertingTargetLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
获取转化的靶病灶评估
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetConvertingNoTargetLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
获取转化的非靶病灶评估
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetConvertingTumor(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
获取转化的整体肿瘤评估
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetTargetLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)" -->
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetNoTargetLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
@@ -1501,6 +1522,13 @@
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetNewLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
获取新病灶评估
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.PCWG3CalculateService.GetDeleteLesionStatrIndex(IRaCIS.Core.Application.Service.Reading.Dto.DeleteReadingRowAnswerInDto)">
|
||||
<summary>
|
||||
删除病灶获取起始病灶序号
|
||||
@@ -2371,6 +2399,11 @@
|
||||
名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetAddOrEdit.ClinicalDataSetEnName">
|
||||
<summary>
|
||||
英文名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetAddOrEdit.ClinicalDataLevel">
|
||||
<summary>
|
||||
临床级别
|
||||
@@ -2421,6 +2454,11 @@
|
||||
名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataSystemSetAddOrEdit.ClinicalDataSetEnName">
|
||||
<summary>
|
||||
英文名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataSystemSetAddOrEdit.ClinicalDataLevel">
|
||||
<summary>
|
||||
临床级别
|
||||
@@ -2511,11 +2549,21 @@
|
||||
名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataQuery.ClinicalDataSetEnName">
|
||||
<summary>
|
||||
英文名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSystemIndto.ClinicalDataSetName">
|
||||
<summary>
|
||||
名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSystemIndto.ClinicalDataSetEnName">
|
||||
<summary>
|
||||
英文名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSystemIndto.ClinicalDataLevel">
|
||||
<summary>
|
||||
临床级别
|
||||
@@ -2536,6 +2584,11 @@
|
||||
名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataTrialIndto.ClinicalDataSetEnName">
|
||||
<summary>
|
||||
英文名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataTrialIndto.ClinicalDataLevel">
|
||||
<summary>
|
||||
临床级别
|
||||
@@ -2886,6 +2939,11 @@
|
||||
问题标识
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateData.IsBeTransforming">
|
||||
<summary>
|
||||
是否是正在转化
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingClinicalDataDto.TrialId">
|
||||
<summary>
|
||||
项目ID
|
||||
@@ -2926,6 +2984,11 @@
|
||||
名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCClinicalDataOutDto.ClinicalDataSetEnName">
|
||||
<summary>
|
||||
英文名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCClinicalDataOutDto.ClinicalUploadType">
|
||||
<summary>
|
||||
上传方式
|
||||
@@ -3051,6 +3114,11 @@
|
||||
项目配置临床类型Name
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListOutDto.ClinicalDataSetEnName">
|
||||
<summary>
|
||||
英文名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListOutDto.ClinicalDataTrialSetId">
|
||||
<summary>
|
||||
下拉ID
|
||||
@@ -3166,6 +3234,11 @@
|
||||
名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSelectOutDto.ClinicalDataSetEnName">
|
||||
<summary>
|
||||
英文名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSelectOutDto.ClinicalDataLevel">
|
||||
<summary>
|
||||
临床级别
|
||||
@@ -4506,6 +4579,11 @@
|
||||
问题名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingMedicineQuestion.QuestionEnName">
|
||||
<summary>
|
||||
问题英文名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingMedicineQuestion.TypeValue">
|
||||
<summary>
|
||||
类型值
|
||||
@@ -4536,6 +4614,11 @@
|
||||
是否确认
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingMedicineQuestion.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TaskInfo.IsCurrentTask">
|
||||
<summary>
|
||||
是否是当前任务
|
||||
@@ -4571,6 +4654,11 @@
|
||||
肿瘤学原因
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JudgeQuestionAnswerInfo.QuestionEnName">
|
||||
<summary>
|
||||
问题英文名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JudgeQuestionAnswerInfo.ShowOrder">
|
||||
<summary>
|
||||
排序
|
||||
@@ -5192,6 +5280,11 @@
|
||||
全局阅片显示类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.ConvertShowType">
|
||||
<summary>
|
||||
转化显示类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.DefaultValue">
|
||||
<summary>
|
||||
默认值
|
||||
@@ -5447,6 +5540,11 @@
|
||||
全局阅片显示类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.ConvertShowType">
|
||||
<summary>
|
||||
转化显示类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.DefaultValue">
|
||||
<summary>
|
||||
默认值
|
||||
@@ -5767,6 +5865,11 @@
|
||||
全局阅片显示类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.ConvertShowType">
|
||||
<summary>
|
||||
转化显示类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.DefaultValue">
|
||||
<summary>
|
||||
默认值
|
||||
@@ -5912,6 +6015,11 @@
|
||||
全局阅片显示类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.ConvertShowType">
|
||||
<summary>
|
||||
转化显示类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.DefaultValue">
|
||||
<summary>
|
||||
默认值
|
||||
@@ -7722,11 +7830,21 @@
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionQuery">
|
||||
<summary>ReadingMedicineSystemQuestionQuery 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionQuery.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionQuery.ReadingCategory">
|
||||
<summary>
|
||||
任务类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.GetReadingMedicineTrialOtherQuestionOutDto.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.GetReadingMedicineTrialOtherQuestionOutDto.TypeValue">
|
||||
<summary>
|
||||
类型值
|
||||
@@ -7775,6 +7893,11 @@
|
||||
问题名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionAddOrEdit.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionAddOrEdit.IsRequired">
|
||||
<summary>
|
||||
是否是必须
|
||||
@@ -7825,6 +7948,11 @@
|
||||
问题名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.GetMedicineQuestionPreviewOutDto.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.GetMedicineQuestionPreviewOutDto.TypeValue">
|
||||
<summary>
|
||||
类型值
|
||||
@@ -7868,6 +7996,11 @@
|
||||
项目Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionQuery.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionQuery.ReadingCategory">
|
||||
<summary>
|
||||
任务类型
|
||||
@@ -7876,6 +8009,11 @@
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionAddOrEdit">
|
||||
<summary> ReadingMedicineTrialQuestionAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionAddOrEdit.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionAddOrEdit.ReadingCategory">
|
||||
<summary>
|
||||
任务类型
|
||||
@@ -8249,36 +8387,76 @@
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionView.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.QCQuestionConfigureView">
|
||||
<summary> QCQuestionConfigureView 列表视图模型 </summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionConfigureView.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.QCQuestionQuery">
|
||||
<summary>QCQuestionQuery 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionQuery.QuestionName">
|
||||
<summary> QuestionName</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionQuery.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionQuery.Type">
|
||||
<summary> TypeValue</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.QCQuestionAddOrEdit">
|
||||
<summary> QCQuestionAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionAddOrEdit.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.TrialQCQuestionConfigureView">
|
||||
<summary> TrialQCQuestionConfigureView 列表视图模型 </summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionConfigureView.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionSelect.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.TrialQCQuestionQuery">
|
||||
<summary>TrialQCQuestionQuery 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionQuery.QuestionName">
|
||||
<summary> QuestionName</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionQuery.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionQuery.Type">
|
||||
<summary> TypeValue</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.TrialQCQuestionAddOrEdit">
|
||||
<summary> TrialQCQuestionAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionConfigureBatchAdd.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.NoneDicomStudyService">
|
||||
<summary>
|
||||
NoneDicomStudyService
|
||||
|
||||
@@ -2,8 +2,23 @@
|
||||
"test{0}{1}": "英文本地化{0}{1}",
|
||||
"RequiredAttribute": "{0} is required",
|
||||
|
||||
//-------------------------------------------------------------------------------------Reading-----------------------------------------------------------------
|
||||
// ------------------------------------------------------------Controllers--------------------------------------------------------------------
|
||||
//FinancialChangeController
|
||||
"Financial_ChargeSettled": "Expenses have been settled and workload can not be reset.",
|
||||
"Financial_InvalidParameter": "Invalid parameter.",
|
||||
//UploadDownLoadController
|
||||
"UploadDownLoad_UnsupportedMedia": "Unsupported media type.",
|
||||
"UploadDownLoad_ArchiveInProgress": "Another user is uploading or archiving this inspection.",
|
||||
"UploadDownLoad_InvalidData": "Please ensure that the uploaded data conforms to the style of the template file and contains valid data.",
|
||||
"UploadDownLoad_RequestError": "Request error.",
|
||||
"UploadDownLoad_SupportedFormats": "Supports upload of .xlsx, .xls, and .csv formats.",
|
||||
|
||||
//-------------------------------------------------------------------------------------Reading-----------------------------------------------------------------
|
||||
//ClinicalDataSetService
|
||||
"ClinicalDataSet_DupTypeFail": "There are duplicate clinical data of the same type. The operation failed.",
|
||||
//ReadingClinicalDataService
|
||||
"ReadingClinicalData_DupTypeFail": "There are duplicate clinical data of the same type. The operation failed.",
|
||||
"ReadingClinicalData_Unchecked": "The current clinical data status is not verified and signing is not allowed!",
|
||||
//ReadingGlobalTaskService
|
||||
"ReadingGlobal_NotGlobal": "System call error. The current read is not a global review read.",
|
||||
//ReadingImageTaskService
|
||||
@@ -46,12 +61,44 @@
|
||||
"MedicalReview_NeedSave": "Unable to perform the current operation. Please save the medical review questions and conclusions first.",
|
||||
"MedicalReview_NotClosed": "Unable to perform the current operation. The current medical inquiry conversation has not been closed.",
|
||||
"MedicalReview_Finish": "The current medical review is the last one.",
|
||||
//ReadingMedicineQuestionService
|
||||
"ReadingMed_QNumDup": "Current problem number has duplicates",
|
||||
"ReadingMed_HasSubQ": "This problem has sub-problems, please delete them first",
|
||||
"ReadingMed_NoMedQ": "Medical review question has not been added yet. Please add it first before confirming",
|
||||
"ReadingMed_MedQNumDup": "The display number of the medical imaging review question cannot be duplicated",
|
||||
"ReadingMed_ParentNumSmall": "The display number of the parent problem should be smaller than that of the child problem, please confirm",
|
||||
"ReadingMed_GlobalQNotConfig": "The global reading is enabled in the current standard, but the global medical review question has not been configured",
|
||||
"ReadingMed_ArbitrateQNotConfig": "Arbitration reading is enabled in the current standard, but the arbitration medical review question has not been configured",
|
||||
"ReadingMed_TumorQNotConfig": "Oncology reading is enabled in the current standard, but the oncology medical review question has not been configured",
|
||||
//UserService
|
||||
"User_CheckNameOrPw": "Please check the username or password.",
|
||||
//Repository
|
||||
"Repository_UpdateError": "Updated data does not exist in the database. ",
|
||||
"Repository_DeleteError": "Deleted data does not exist in the database.",
|
||||
|
||||
//OrganInfoService
|
||||
"OrganInfo_DuplicateData": "There are duplicate data, operation failed.",
|
||||
//ReadingCriterionService
|
||||
"ReadingCriterion_Referenced": "The current standard has been referenced and cannot be deleted.",
|
||||
"ReadingCriterion_InUse": "This standard has been used in the project and cannot be deleted.",
|
||||
"ReadingCriterion_ArbitratorWithoutJudgment": "There is no referee problem but there is an arbitration object, operation failed.",
|
||||
//ReadingQuestionService
|
||||
"ReadingQuestion_IdDup": "Duplicate problem ID.",
|
||||
"ReadingQuestion_ChildrenExist": "This problem has sub-problems, please delete the sub-problems first.",
|
||||
"ReadingQuestion_GroupReferenced": "This grouping has been referenced, please delete the referenced problems first.",
|
||||
"ReadingQuestion_JudgmentSet": "The current problem already has a referee standard set, modification failed.",
|
||||
"ReadingQuestion_ExcludeWithDependency": "The displayed dependent parent problem and the required dependent problem are the same, but the answers are mutually exclusive, operation failed.",
|
||||
"ReadingQuestion_CircularDependency": "Calculation dependency has looped!",
|
||||
//ReadingPeriodSetService
|
||||
"ReadingPeriodSet_AlreadyAdded": "{0} has already added the review period, cannot set it effective.",
|
||||
"ReadingPeriodSet_TaskCompletedCannotRevoke": "The current standard review has generated tasks and the review is completed, revoke failed.",
|
||||
"ReadingPeriodSet_LastVisit": "Last visit.",
|
||||
//ReadModuleService
|
||||
"ReadModule_AlreadyAdded": "The current visit has already added a review period.",
|
||||
"ReadModule_AddGlobalFirst": "Please add global review first.",
|
||||
"ReadModule_VisitNotFound": "No visits found that meet the criteria.",
|
||||
"ReadModule_SignedDataCannotDelete": "Clinical data has been signed and cannot be deleted.",
|
||||
"ReadModule_TumorExists": "The current visit has a tumor review, please delete the tumor review first.",
|
||||
"ReadModule_TaskGenerated": "The current review has generated tasks, operation failed.",
|
||||
|
||||
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
|
||||
//TaskAllocationRuleService
|
||||
@@ -108,10 +155,6 @@
|
||||
"VisitTask_NoConsistencyReturn": "",
|
||||
"VisitTask_VisitTypeTaskAllowedForPMOnly": "Only visit task type can be returned by PM.",
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------Common--------------------------------------------------------------------
|
||||
//CommonDocumentService
|
||||
"Document_CodeDuplication": "The Code of the document cannot be repeated.",
|
||||
@@ -140,7 +183,6 @@
|
||||
"Mail_AccountPasswordResetReminder": "[from Film IRC] A reminder about resetting account passwords",
|
||||
"Mail_InvitationEmail": "[from Extensive Imaging IRC][{0}]Invitation",
|
||||
|
||||
|
||||
// ------------------------------------------------------------Doctor--------------------------------------------------------------------
|
||||
//DoctorService
|
||||
"Doctor_DupPhoneOrEmail": "current phone or email number already existed",
|
||||
@@ -149,8 +191,6 @@
|
||||
"Doctor_StandardDuplicateFileTypeError": "This type of file has already been added to the current criterion.",
|
||||
"Doctor_RequiredDocumentsError": "Resume & Consultant Agreement must be upload ",
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------Document--------------------------------------------------------------------
|
||||
//SystemDocumentService
|
||||
"SystemD_DuplicateFile": "A file of the same type and name already exists in the system.",
|
||||
@@ -196,7 +236,6 @@
|
||||
"TrialEmailN_ConfigurationCorrect": "If this email is received, the email configuration is correct.",
|
||||
"TrialEmailN_InvalidSenderEmailConfig": "The sender configuration is incorrect. Please check whether the server address or authorization code is correct or not.",
|
||||
|
||||
|
||||
// ------------------------------------------------------------Financial--------------------------------------------------------------------
|
||||
//CalculateService
|
||||
"Cal_VolDataErr": "Volume reward data error.",
|
||||
@@ -210,7 +249,6 @@
|
||||
//TrialRevenuesPriceService
|
||||
"TRP_AddMeaningful": "Please add meaningful data",
|
||||
|
||||
|
||||
// ------------------------------------------------------------ImageAndDoc--------------------------------------------------------------------
|
||||
//DicomArchiveService
|
||||
"DAS_NoAnonCacheData": "The cache data for anonymous config is not obtained, and the upload stops. Please contact the developer for verification.",
|
||||
@@ -226,8 +264,6 @@
|
||||
"Study_VisitEndedNotAllowed": "Subject visit is over, and uploading is not allowed!",
|
||||
"Study_ImgAlreadyUploaded": "Uploading is not allowed above here.The current image check has been uploaded to {1} of subject {0}",
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------Inspection--------------------------------------------------------------------
|
||||
//FrontAuditConfigService
|
||||
"FrontAudit_IdDup": "The identifier is duplicated.",
|
||||
@@ -236,7 +272,6 @@
|
||||
//InspectionService
|
||||
"Inspection_UserDisabled": "The current user has been disabled.",
|
||||
|
||||
|
||||
// ------------------------------------------------------------Institution--------------------------------------------------------------------
|
||||
//CROService
|
||||
"CRO_DupName": "CRO with the same name already exists.Please confirm",
|
||||
@@ -252,9 +287,6 @@
|
||||
"Sponsor_DupName": "Sponsor with the same name already exists.Please confirm.",
|
||||
"Sponsor_InProject": "The sponsor has been added to the project and it is not allowed to delete.",
|
||||
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------Management--------------------------------------------------------------------
|
||||
//MenuService
|
||||
"Menu_ParentDupChild": "A child node with the same name already exists under the parent node.",
|
||||
@@ -276,8 +308,6 @@
|
||||
//UserTypeService
|
||||
"UserType_InUse": "User already exists in that user type, and it cannot be deleted.",
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------QC--------------------------------------------------------------------
|
||||
//QCCommon
|
||||
"QCCommon_CannotOperate": "CRC has submitted the image and it cannot be operated.",
|
||||
@@ -306,9 +336,7 @@
|
||||
"QCOperation_UnresolvedQCQuery": "This operation is not allowed, because the inquiry of the current visitis is not closed. ",
|
||||
"QCOperation_CrcNoDelete": "The CRC has been committed and cannot be deleted.",
|
||||
"QCOperation_NoRecipient": "You are not the current recipient of the quality control task, no operation authority!",
|
||||
"QCOperation_QCImageTaskAlreadyReleased": "The image quality control task of the current visit has been released by the original recipient. You can get it by ",
|
||||
"pick",
|
||||
"up\".\"",
|
||||
"QCOperation_QCImageTaskAlreadyReleased": "The image quality control task of the current visit has been released by the original recipient. You can get it by 'pick up'.",
|
||||
"QCOperation_QCTaskNoAccess": "The image quality control task of the current visit has been claimed by other QC, so it is not allowed to pick up.",
|
||||
"QCOperation_QCConfigFirst": "Please configure the image quality control review question before receiving the image quality control task.",
|
||||
"QCOperation_NoQC": "The project configuration of image QC process was not check, and the QC Task was not picked up.",
|
||||
@@ -357,7 +385,6 @@
|
||||
"TrialQCQuestion_DeleteChildFirst": "Before deleting the parent question, delete the child question that references the parent question.",
|
||||
"TrialQCQuestion_ReferencedByQCProcess": "This review question has been cited by the image quality control process and is not allowed to be deleted.",
|
||||
|
||||
|
||||
// ------------------------------------------------------------QC--------------------------------------------------------------------
|
||||
|
||||
// ------------------------------------------------------------SiteSurvey--------------------------------------------------------------------
|
||||
@@ -388,7 +415,6 @@
|
||||
"TrialSiteUser_NoTestUserForFormal": "It is Formal and training projects that are not allowed to add test users.",
|
||||
"TrialSiteUser_NoFormalUserForTest": "It is the test project that regular users are not allowed in.",
|
||||
|
||||
|
||||
// ------------------------------------------------------------Stat--------------------------------------------------------------------
|
||||
|
||||
// ------------------------------------------------------------TrialSiteUser--------------------------------------------------------------------
|
||||
@@ -442,8 +468,6 @@
|
||||
"TrialSite_CannotDeleteAssociatedSubject": "The subjects has been added to this site, and couldn't be deleted.",
|
||||
"TrialSite_CannotDeleteUploadedData": "The site has been uploaded study, and couldn't be deleted.",
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------Visit--------------------------------------------------------------------
|
||||
//SubjectService
|
||||
"Subject_NoConfirmedPlan": "The visit plan of the project is not confirmed. Please contact the program Manager to confirm the visit plan before adding subjects.",
|
||||
@@ -474,7 +498,6 @@
|
||||
"VisitPlan_CheckExport": "Check and export _{0}.xlsx",
|
||||
"VisitPlan_Assigned": "The visit plan has been assigned to the subjects and executed.",
|
||||
|
||||
|
||||
// ------------------------------------------------------------WorkLoad--------------------------------------------------------------------
|
||||
//DoctorWorkloadService
|
||||
"DoctorWorkload_AssignType": "A task has been assigned and does not allow you to reduce the reading type.",
|
||||
@@ -485,7 +508,6 @@
|
||||
"Enroll_EmailFormat": "The {0} mailbox format is faulty.",
|
||||
"Enroll_CannotRollback": "Reviewers with workload cannot go back",
|
||||
|
||||
|
||||
// ------------------------------------------------------------Triggers--------------------------------------------------------------------
|
||||
//AddlTrialUserTrigger
|
||||
"AddlTrialUser_NoTestUser": "It is Formal and training projects that are not allowed to add test users.",
|
||||
@@ -494,5 +516,35 @@
|
||||
"SubjectState_CannotSetCurrentAsLastVisit": "The subject has already had a visit set as the last visit, and the current visit is not allowed to be set as the last visit.",
|
||||
"SubjectState_CannotSetAsLastVisitWithImage": "The image of the subject's visit after the current visit has been uploaded, and the current visit is not allowed to be set as the last visit.",
|
||||
//SubjectVisitFinalVisitTrigger
|
||||
"SubjectVisit_CannotSetAsLastVisit": "The subject's follow-up visits has uploaded images or submitted , and the current visit is not allowed to be set as the last visit."
|
||||
"SubjectVisit_CannotSetAsLastVisit": "The subject's follow-up visits has uploaded images or submitted , and the current visit is not allowed to be set as the last visit.",
|
||||
|
||||
// ------------------------------------------------------------BusinessFilter--------------------------------------------------------------------
|
||||
//LimitUserRequestAuthorization
|
||||
"LimitUser_AuthTokenMissing": "User token was not retrieved from Header/URL, please contact developer",
|
||||
"LimitUser_AccountLoggedInElsewhere": "User token was not retrieved from Header/URL, please contact developer",
|
||||
//ModelActionFilter
|
||||
"ModelAction_InvalidAPIParameter": "Invalid parameters provided for the API.",
|
||||
//ProjectExceptionFilter
|
||||
"ProjectException_ConcurrentUpdateNotAllowed": "Concurrent update, operation not allowed at this time.",
|
||||
"Project_ExceptionContactDeveloper": "Program exception, please contact developer.",
|
||||
//TrialResourceFilter
|
||||
"TrialResource_NoAccessPermission": "Sorry, your account does not have operation permissions.",
|
||||
"TrialResource_ReferTrialIdFailed": "Regular expression failed to fetch trialId from request Refer, please contact developer to check",
|
||||
"TrialResource_InterceptedProjectStatusRule": "This request was blocked by configured rules: only operations allowed when project status is in progress, please contact developer if this logic is incorrect and needs to be modified",
|
||||
"TrialResource_MissingProjectNumber": "Project number not passed in the API parameters, please verify.",
|
||||
//UnifiedApiResultFilter
|
||||
"UnifiedAPI_ProgramError": "Program error, please contact developer.",
|
||||
|
||||
// ------------------------------------------------------------Helper--------------------------------------------------------------------
|
||||
//FileStoreHelper
|
||||
"FileStore_TemplateFileNotFound": "Database did not find the corresponding data template file for FileStoreHelper, please contact system maintenance personnel.",
|
||||
"FileStore_TemplateFileStoragePathInvalid": "No corresponding file was found on the storage path for the data template file of FileStoreHelper, please contact system maintenance personnel.",
|
||||
//SendEmailHelper
|
||||
"SendEmail_SendFail": "Failed to send email in SendEmailHelper. Your operation was unsuccessful, please check your email or contact maintenance personnel.",
|
||||
"SendEmail_NoRecipient": "No recipient in SendEmailHelper.",
|
||||
|
||||
// ------------------------------------------------------------IRaCIS.Core.Domain--------------------------------------------------------------------
|
||||
//Trial
|
||||
"Trial_number": "The serial number consists of five digits. The first two digits are the center number and the last three digits are the serial number. The serial number must be the same as that recorded by the EDC"
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,23 @@
|
||||
"test{0}{1}": "中文本地化{0}{1}",
|
||||
"RequiredAttribute": "{0} 字段是必须的",
|
||||
|
||||
// ------------------------------------------------------------Controllers--------------------------------------------------------------------
|
||||
//FinancialChangeController
|
||||
"Financial_ChargeSettled": "费用已经结算,无法重置工作量",
|
||||
"Financial_InvalidParameter": "无效的参数。",
|
||||
//UploadDownLoadController
|
||||
"UploadDownLoad_UnsupportedMedia": "不支持的MediaType",
|
||||
"UploadDownLoad_ArchiveInProgress": "当前已有人正在上传和归档该检查!",
|
||||
"UploadDownLoad_InvalidData": "请保证上传数据符合模板文件中的样式,且存在有效数据。",
|
||||
"UploadDownLoad_RequestError": "请求异常,请重试!",
|
||||
"UploadDownLoad_SupportedFormats": "支持.xlsx、.xls、.csv格式的文件上传。",
|
||||
|
||||
// ------------------------------------------------------------Reading--------------------------------------------------------------------
|
||||
//ClinicalDataSetService
|
||||
"ClinicalDataSet_DupTypeFail": "存在同类型的临床数据,操作失败",
|
||||
//ReadingClinicalDataService
|
||||
"ReadingClinicalData_DupTypeFail": "存在同类型的临床数据,操作失败",
|
||||
"ReadingClinicalData_Unchecked": "当前临床数据状态不是已核查状态,不允许签名!",
|
||||
//ReadingGlobalTaskService
|
||||
"ReadingGlobal_NotGlobal": "系统调用错误,当前任务不是全局阅片任务。",
|
||||
//ReadingImageTaskService
|
||||
@@ -45,12 +61,44 @@
|
||||
"MedicalReview_NeedSave": "无法执行当前操作,请先保存医学审核问题和结论。",
|
||||
"MedicalReview_NotClosed": "无法执行当前操作,当前医学质询对话未关闭。",
|
||||
"MedicalReview_Finish": "当前医学审核任务为最后一个任务。",
|
||||
//ReadingMedicineQuestionService
|
||||
"ReadingMed_QNumDup": "当前问题序号存在重复",
|
||||
"ReadingMed_HasSubQ": "此问题存在子问题,请先删除子问题",
|
||||
"ReadingMed_NoMedQ": "当前未添加医学审核问题。请先添加医学审核问题,再进行确认。",
|
||||
"ReadingMed_MedQNumDup": "影像医学审核问题显示序号不能重复。",
|
||||
"ReadingMed_ParentNumSmall": "父问题的显示序号要比子问题的显示序号小,请确认。",
|
||||
"ReadingMed_GlobalQNotConfig": "当前标准启用了全局阅片,但未配置全局医学审核问题",
|
||||
"ReadingMed_ArbitrateQNotConfig": "当前标准启用了仲裁阅片,但未配置仲裁医学审核问题",
|
||||
"ReadingMed_TumorQNotConfig": "当前标准启用了肿瘤学阅片,但未配置肿瘤学医学审核问题",
|
||||
//UserService
|
||||
"User_CheckNameOrPw": "请检查用户名或者密码。",
|
||||
//Repository
|
||||
"Repository_UpdateError": "修改的数据在数据库不存在。",
|
||||
"Repository_DeleteError": "删除的数据在数据库不存在。",
|
||||
|
||||
//OrganInfoService
|
||||
"OrganInfo_DuplicateData": "存在相同的数据,操作失败",
|
||||
//ReadingCriterionService
|
||||
"ReadingCriterion_Referenced": "当前标准被引用过了,不可以删除",
|
||||
"ReadingCriterion_InUse": "此标准在项目里面已被使用,操作失败",
|
||||
"ReadingCriterion_ArbitratorWithoutJudgment": "无裁判问题却有仲裁对象,操作失败",
|
||||
//ReadingQuestionService
|
||||
"ReadingQuestion_IdDup": "问题编号重复",
|
||||
"ReadingQuestion_ChildrenExist": "此问题存在子问题,请先删除子问题",
|
||||
"ReadingQuestion_GroupReferenced": "此分组已被引用,请先删除被引用的问题",
|
||||
"ReadingQuestion_JudgmentSet": "当前问题已经设置了裁判标准了,修改失败",
|
||||
"ReadingQuestion_ExcludeWithDependency": "显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败",
|
||||
"ReadingQuestion_CircularDependency": "计算依赖循环了!",
|
||||
//ReadingPeriodSetService
|
||||
"ReadingPeriodSet_AlreadyAdded": "{0}已经添加过阅片期,无法设置生效",
|
||||
"ReadingPeriodSet_TaskCompletedCannotRevoke": "当前标准阅片已生成任务并且阅片完成,撤销失败。",
|
||||
"ReadingPeriodSet_LastVisit": "末次访视",
|
||||
//ReadModuleService
|
||||
"ReadModule_AlreadyAdded": "当前访视已经添加过阅片期",
|
||||
"ReadModule_AddGlobalFirst": "请先添加全局阅片",
|
||||
"ReadModule_VisitNotFound": "未找到符合要求的访视",
|
||||
"ReadModule_SignedDataCannotDelete": "临床资料已签名,不允许删除",
|
||||
"ReadModule_TumorExists": "当前访视存在肿瘤学阅片,请先删除肿瘤学阅片",
|
||||
"ReadModule_TaskGenerated": "当前阅片已生成任务,操作失败。",
|
||||
|
||||
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
|
||||
//TaskAllocationRuleService
|
||||
@@ -107,7 +155,6 @@
|
||||
"VisitTask_NoConsistencyReturn": "不允许退回一致性分析任务",
|
||||
"VisitTask_VisitTypeTaskAllowedForPMOnly": "仅仅访视类型的任务支持PM退回",
|
||||
|
||||
|
||||
// ------------------------------------------------------------Common--------------------------------------------------------------------
|
||||
//CommonDocumentService
|
||||
"Document_CodeDuplication": "文档的Code不能够重复。",
|
||||
@@ -135,14 +182,15 @@
|
||||
"Mail_AccountCreationReminder": "[来自展影IRC] 关于创建账户的提醒",
|
||||
"Mail_AccountPasswordResetReminder": "[来自展影IRC] 关于重置账户密码的提醒",
|
||||
"Mail_InvitationEmail": "[来自展影IRC] [{0}]邀请信",
|
||||
|
||||
// ------------------------------------------------------------Doctor--------------------------------------------------------------------
|
||||
//DoctorService
|
||||
"Doctor_DupPhoneOrEmail": "当前的电话或电子邮件号码已经存在",
|
||||
"Doctor_DupPhone": "当前的电话号码已经存在!",
|
||||
"Doctor_DupEmail": "当前的邮箱已经存在!",
|
||||
"Doctor_StandardDuplicateFileTypeError": "当前标准已添加过此类型文件",
|
||||
"Doctor_RequiredDocumentsError": "简历及顾问协议必须上传",
|
||||
|
||||
|
||||
// ------------------------------------------------------------Document--------------------------------------------------------------------
|
||||
//SystemDocumentService
|
||||
"SystemD_DuplicateFile": "系统中已存在同类型的同名文件。",
|
||||
@@ -201,7 +249,6 @@
|
||||
//TrialRevenuesPriceService
|
||||
"TRP_AddMeaningful": "请添加有意义的数据",
|
||||
|
||||
|
||||
// ------------------------------------------------------------ImageAndDoc--------------------------------------------------------------------
|
||||
//DicomArchiveService
|
||||
"DAS_NoAnonCacheData": "未取到缓存匿名化配置数据,上传停止,请联系开发人员核实",
|
||||
@@ -261,7 +308,6 @@
|
||||
//UserTypeService
|
||||
"UserType_InUse": "该用户类型中已存在用户,不能删除。",
|
||||
|
||||
|
||||
// ------------------------------------------------------------QC--------------------------------------------------------------------
|
||||
//QCCommon
|
||||
"QCCommon_CannotOperate": "CRC 已提交影像,不能进行操作。",
|
||||
@@ -422,7 +468,6 @@
|
||||
"TrialSite_CannotDeleteAssociatedSubject": "受试者已经添加,不能删除",
|
||||
"TrialSite_CannotDeleteUploadedData": "中心已经上传调研,无法删除",
|
||||
|
||||
|
||||
// ------------------------------------------------------------Visit--------------------------------------------------------------------
|
||||
//SubjectService
|
||||
"Subject_NoConfirmedPlan": "项目访视计划没有确认。请联系项目经理确认项目访视计划后,再添加受试者。",
|
||||
@@ -471,6 +516,35 @@
|
||||
"SubjectState_CannotSetCurrentAsLastVisit": "该受试者已经有访视被设置为末次访视,不允许将当前访视设置为末次访视。",
|
||||
"SubjectState_CannotSetAsLastVisitWithImage": "该受试者当前访视后有访视的影像已上传,当前访视不允许设置为末次访视。",
|
||||
//SubjectVisitFinalVisitTrigger
|
||||
"SubjectVisit_CannotSetAsLastVisit": "该受试者已有后续访视已上传影像或已提交,当前访视不允许设置为末次访视。"
|
||||
"SubjectVisit_CannotSetAsLastVisit": "该受试者已有后续访视已上传影像或已提交,当前访视不允许设置为末次访视。",
|
||||
|
||||
// ------------------------------------------------------------BusinessFilter--------------------------------------------------------------------
|
||||
//LimitUserRequestAuthorization
|
||||
"LimitUser_AuthTokenMissing": "当前请求未从Header/Url取到用户Token,请联系开发者",
|
||||
"LimitUser_AccountLoggedInElsewhere": "您的账户在其他地方已登陆,您被迫下线。",
|
||||
//ModelActionFilter
|
||||
"ModelAction_InvalidAPIParameter": "提供给接口的参数无效。",
|
||||
//ProjectExceptionFilter
|
||||
"ProjectException_ConcurrentUpdateNotAllowed": "并发更新,当前不允许该操作",
|
||||
"Project_ExceptionContactDeveloper": "程序异常,请联系开发人员。 ",
|
||||
//TrialResourceFilter
|
||||
"TrialResource_NoAccessPermission": "对不起,您的账户没有操作权限。",
|
||||
"TrialResource_ReferTrialIdFailed": "正则取请求Refer 中trialId 失败,请联系开发人员核查",
|
||||
"TrialResource_InterceptedProjectStatusRule": "本次请求被配置规则拦截:项目状态处于进行中时,才允许操作,若此处逻辑有误,请联系开发人员修改",
|
||||
"TrialResource_MissingProjectNumber": "该接口参数中,没有传递项目编号,请核对。",
|
||||
//UnifiedApiResultFilter
|
||||
"UnifiedAPI_ProgramError": "程序错误,请联系开发人员。",
|
||||
|
||||
// ------------------------------------------------------------Helper--------------------------------------------------------------------
|
||||
//FileStoreHelper
|
||||
"FileStore_TemplateFileNotFound": "数据库没有找到对应的数据模板文件,请联系系统运维人员。",
|
||||
"FileStore_TemplateFileStoragePathInvalid": "数据模板文件存储路径上未找对应文件,请联系系统运维人员。",
|
||||
//SendEmailHelper
|
||||
"SendEmail_SendFail": "邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员",
|
||||
"SendEmail_NoRecipient": "没有收件人",
|
||||
|
||||
// ------------------------------------------------------------IRaCIS.Core.Domain--------------------------------------------------------------------
|
||||
//Trial
|
||||
"Trial_number": "编号由5位数字组成,前2位为中心编号,后3位为顺序号,请与EDC录入的编号保持一致"
|
||||
|
||||
}
|
||||
|
||||
@@ -1287,6 +1287,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
taskUrgent = TaskUrgentType.VisitUrgent;
|
||||
}
|
||||
bool isCanEditUrgent = taskUrgent == TaskUrgentType.EnrollmentConfirm || taskUrgent == TaskUrgentType.PDProgress ? false : true;
|
||||
|
||||
//加一个去重的判断 IR 申请重阅的时候,有脏数据 (例如多个follow 2 ),但是生成时候不生成
|
||||
|
||||
var newTask = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
{
|
||||
|
||||
|
||||
@@ -1081,8 +1081,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
|
||||
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.DoctorUserId == _userInfo.Id
|
||||
&& x.TaskState == TaskState.Effect /*&& x.TrialReadingCriterionId== inDto.TrialReadingCriterionId*/)
|
||||
.WhereIf(critrion.IsAutoCreate == false, t => t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(t => t.ImageFilterState != ImageFilterState.Finished) ?
|
||||
t.VisitTaskNum <= t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Min(t => t.SubjectVisit.VisitNum) : true)
|
||||
.WhereIf(critrion.IsAutoCreate == false, t => t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(t => t.IsGeneratedTask == false) ?
|
||||
t.VisitTaskNum <= t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsGeneratedTask == false).Min(t => t.SubjectVisit.VisitNum) : true)
|
||||
|
||||
|
||||
.Where(t => t.Subject.SubjectVisitList.Any(t => t.CheckState != CheckStateEnum.CVPassed) ? t.VisitTaskNum <= t.Subject.SubjectVisitList.Where(t => t.CheckState != CheckStateEnum.CVPassed).Min(t => t.VisitNum) : true)
|
||||
@@ -1852,8 +1852,12 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
|
||||
var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).FirstOrDefault();
|
||||
|
||||
|
||||
|
||||
foreach (var influenceTask in influenceTaskList)
|
||||
{
|
||||
var beforeTaskState = influenceTask.TaskState;
|
||||
|
||||
//已签名的任务 设置转变后的标志
|
||||
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
@@ -1879,7 +1883,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
}
|
||||
|
||||
|
||||
var beforeTaskState = influenceTask.TaskState;
|
||||
|
||||
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
@@ -1895,7 +1899,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
}
|
||||
|
||||
// 影响的任务 仅仅访视类别的才生成 或者就是IR 申请的任务
|
||||
if (influenceTask.ReadingCategory == ReadingCategory.Visit || influenceTask.Id == origenalTask.Id)
|
||||
if ( influenceTask.ReadingCategory == ReadingCategory.Visit || influenceTask.Id == origenalTask.Id)
|
||||
{
|
||||
|
||||
|
||||
@@ -1907,10 +1911,21 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
}
|
||||
|
||||
|
||||
//当前任务是转变任务,并且影响列表里有转变之前的任务 那么该访视任务就不生成
|
||||
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.BeforeConvertedTaskId != null && influenceTaskList.Any(t => t.Id == influenceTask.BeforeConvertedTaskId))
|
||||
// i1.1标准 当前任务是转变任务,并且影响列表里有转变之前的任务 那么该访视任务就不生成
|
||||
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 )
|
||||
{
|
||||
continue;
|
||||
//申请的任务是冻结的任务(该任务发生转变) 影响自己 以及转变后的 以及后续任务 但是生成的时候,仅仅生成转变之前的
|
||||
//申请的是转变之后的任务 (转变生成的任务) 影响自己以及后续任务 生成转变后的任务
|
||||
if ( influenceTask.BeforeConvertedTaskId != null && influenceTaskList.Any(t => t.Id == influenceTask.BeforeConvertedTaskId))
|
||||
{
|
||||
//有转化的任务 和转化之前的任务时,转化后的任务时不生成的
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
//var canGenerateTaskIdList = influenceTaskList.GroupBy(t => new { t.VisitTaskNum, t.DoctorUserId, t.TrialReadingCriterionId, t.SubjectId })
|
||||
// .Select(g => g.First().Id);
|
||||
|
||||
}
|
||||
|
||||
#region 影响的任务生成
|
||||
|
||||
@@ -22,8 +22,10 @@ namespace IRaCIS.Application.Services
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
||||
private readonly IReadingQuestionService _readingQuestionService;
|
||||
|
||||
@@ -32,7 +34,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCodeRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystem,
|
||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial,
|
||||
IReadingQuestionService readingQuestionService
|
||||
@@ -47,7 +50,8 @@ namespace IRaCIS.Application.Services
|
||||
_trialRepository = trialRepository;
|
||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||
this._trialCriterionDictionaryCodeRepository = trialCriterionDictionaryCodeRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._readingQuestionCriterionSystem = readingQuestionCriterionSystem;
|
||||
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
||||
this._readingQuestionService = readingQuestionService;
|
||||
@@ -179,7 +183,14 @@ namespace IRaCIS.Application.Services
|
||||
//return ResponseOutput.NotOk(_localizer["Dictionary_DictionaryDeletion"]);
|
||||
}
|
||||
|
||||
if (await _dicRepository.AnyAsync(t => t.ParentId == id))
|
||||
if (await _readingTrialCriterionDictionaryRepository.AnyAsync(x => x.DictionaryId == id))
|
||||
{
|
||||
await _readingTrialCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.DictionaryId == id);
|
||||
//---当前字典在标准中被引用,不允许删除!
|
||||
//return ResponseOutput.NotOk(_localizer["Dictionary_DictionaryDeletion"]);
|
||||
}
|
||||
|
||||
if (await _dicRepository.AnyAsync(t => t.ParentId == id))
|
||||
{
|
||||
//---有子项数据,不允许直接删除!
|
||||
return ResponseOutput.NotOk(_localizer["Dictionary_SubitemDeletion"]);
|
||||
@@ -201,12 +212,6 @@ namespace IRaCIS.Application.Services
|
||||
return ResponseOutput.NotOk(_localizer["Dictionary_ProjectReference"]);
|
||||
}
|
||||
|
||||
if (await _readingCriterionDictionaryRepository.AnyAsync(x => x.DictionaryId == id))
|
||||
{
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.DictionaryId == id);
|
||||
//---当前条目已经在阅片标准中被引用。
|
||||
//return ResponseOutput.NotOk(_localizer["Dictionary_StandardReference"]);
|
||||
}
|
||||
|
||||
var success = await _dicRepository.BatchDeleteNoTrackingAsync(t => t.Id == id);
|
||||
return ResponseOutput.Result(success);
|
||||
@@ -293,7 +298,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
var criterionCodes = await _trialCriterionDictionaryCodeRepository.Where(x => x.TrialCriterionId == inDto.TrialCriterionId).ToListAsync();
|
||||
|
||||
var parentCodes = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialCriterionId).Select(x => x.ParentCode).ToListAsync();
|
||||
var parentCodes = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialCriterionId).Select(x => x.ParentCode).ToListAsync();
|
||||
|
||||
|
||||
var codes = criterionCodes.Select(x => x.Code).ToList();
|
||||
@@ -337,16 +342,49 @@ namespace IRaCIS.Application.Services
|
||||
else
|
||||
{
|
||||
List<string> selectCode = new List<string>();
|
||||
List<BasicDicSelect> criterionDictionList = new List<BasicDicSelect>();
|
||||
|
||||
var isSystemCriterion = await _readingQuestionCriterionSystem.AnyAsync(x => x.Id == inDto.ReadingCriterionId);
|
||||
var isSystemCriterion = await _readingQuestionCriterionSystem.AnyAsync(x => x.Id == inDto.ReadingCriterionId);
|
||||
if (isSystemCriterion)
|
||||
{
|
||||
selectCode = await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.ReadingCriterionId).Select(x => x.Code).ToListAsync();
|
||||
}
|
||||
|
||||
criterionDictionList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.ReadingCriterionId).Select(x => new BasicDicSelect()
|
||||
{
|
||||
ChildGroup = x.Dictionary.ChildGroup,
|
||||
Code = x.Dictionary.Code,
|
||||
DataTypeEnum = x.Dictionary.DataTypeEnum,
|
||||
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
|
||||
ShowOrder = x.Dictionary.ShowOrder,
|
||||
ParentCode = x.ParentCode,
|
||||
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
|
||||
Id = x.DictionaryId,
|
||||
ParentId = x.Dictionary.ParentId,
|
||||
Value = x.Dictionary.Value,
|
||||
ValueCN = x.Dictionary.ValueCN
|
||||
|
||||
}).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
selectCode = await _trialCriterionDictionaryCodeRepository.Where(x => x.TrialCriterionId == inDto.ReadingCriterionId).Select(x => x.Code).ToListAsync();
|
||||
}
|
||||
|
||||
criterionDictionList = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.ReadingCriterionId).Select(x => new BasicDicSelect()
|
||||
{
|
||||
ChildGroup = x.Dictionary.ChildGroup,
|
||||
Code = x.Dictionary.Code,
|
||||
DataTypeEnum = x.Dictionary.DataTypeEnum,
|
||||
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
|
||||
ShowOrder = x.Dictionary.ShowOrder,
|
||||
ParentCode = x.ParentCode,
|
||||
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
|
||||
Id = x.DictionaryId,
|
||||
ParentId = x.Dictionary.ParentId,
|
||||
Value = x.Dictionary.Value,
|
||||
ValueCN = x.Dictionary.ValueCN
|
||||
|
||||
}).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
var criterionCode = await _dicRepository.Where(x => x.ConfigDictionary.Code == "Reading_eCRF_Criterion").Select(x => x.Code).ToListAsync();
|
||||
@@ -361,21 +399,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
|
||||
|
||||
var criterionDictionList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.ReadingCriterionId).Select(x => new BasicDicSelect()
|
||||
{
|
||||
ChildGroup = x.Dictionary.ChildGroup,
|
||||
Code = x.Dictionary.Code,
|
||||
DataTypeEnum = x.Dictionary.DataTypeEnum,
|
||||
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
|
||||
ShowOrder = x.Dictionary.ShowOrder,
|
||||
ParentCode = x.ParentCode,
|
||||
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
|
||||
Id = x.DictionaryId,
|
||||
ParentId = x.Dictionary.ParentId,
|
||||
Value = x.Dictionary.Value,
|
||||
ValueCN = x.Dictionary.ValueCN
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
criterionDictionList = criterionDictionList.Where(x => selectCode.Contains(x.ParentCode)).ToList();
|
||||
|
||||
@@ -438,7 +462,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
|
||||
|
||||
var criterionDictionList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId).Select(x => new BasicDicSelect()
|
||||
var criterionDictionList = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId).Select(x => new BasicDicSelect()
|
||||
{
|
||||
ChildGroup = x.Dictionary.ChildGroup,
|
||||
Code = x.Dictionary.Code,
|
||||
|
||||
@@ -110,7 +110,8 @@ namespace IRaCIS.Application.Services
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailTemplate"
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "UserOptCommon.html";
|
||||
//+ "UserOptCommon.html";
|
||||
+(_userInfo.IsEn_Us ? "UserOptCommon_US.html" : "UserOptCommon.html");
|
||||
|
||||
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
||||
{
|
||||
@@ -176,7 +177,8 @@ namespace IRaCIS.Application.Services
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailTemplate"
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "UserOptCommon.html";
|
||||
//+ "UserOptCommon.html";
|
||||
+ (_userInfo.IsEn_Us ? "UserOptCommon_US.html" : "UserOptCommon.html");
|
||||
|
||||
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
||||
{
|
||||
@@ -244,7 +246,7 @@ namespace IRaCIS.Application.Services
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailTemplate"
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "UserOptCommon.html";
|
||||
+ (_userInfo.IsEn_Us ? "UserOptCommon_US.html": "UserOptCommon.html" );
|
||||
|
||||
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
||||
{
|
||||
@@ -310,7 +312,8 @@ namespace IRaCIS.Application.Services
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailTemplate"
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "UserOptCommon.html";
|
||||
//+ "UserOptCommon.html";
|
||||
+ (_userInfo.IsEn_Us ? "UserOptCommon_US.html" : "UserOptCommon.html");
|
||||
|
||||
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
||||
{
|
||||
@@ -388,7 +391,8 @@ namespace IRaCIS.Application.Services
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailTemplate"
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "AdminAddUser.html";
|
||||
//+ "AdminAddUser.html";
|
||||
+ (_userInfo.IsEn_Us ? "AdminAddUser_US.html" : "AdminAddUser.html");
|
||||
|
||||
var token = _tokenService.GetToken(IRaCISClaims.Create(_mapper.Map<UserBasicInfo>(sysUserInfo)));
|
||||
|
||||
@@ -443,7 +447,8 @@ namespace IRaCIS.Application.Services
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailTemplate"
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "AdminResetUser.html";
|
||||
//+ "AdminResetUser.html";
|
||||
+ (_userInfo.IsEn_Us ? "AdminResetUser_US.html" : "AdminResetUser.html");
|
||||
|
||||
|
||||
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
||||
@@ -501,7 +506,7 @@ namespace IRaCIS.Application.Services
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailTemplate"
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ (sysUserInfo.IsFirstAdd ? "TrialUserFirstJoin.html" : "TrialUserExistJoin.html");
|
||||
+ (sysUserInfo.IsFirstAdd ? (_userInfo.IsEn_Us ? "TrialUserFirstJoin_US.html" : "TrialUserFirstJoin.html") : (_userInfo.IsEn_Us ? "TrialUserExistJoin_US.html" : "TrialUserExistJoin.html"));
|
||||
|
||||
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
||||
{
|
||||
@@ -563,7 +568,7 @@ namespace IRaCIS.Application.Services
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailTemplate"
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ (sysUserInfo.IsFirstAdd ? "TrialUserFirstJoin.html" : "TrialUserExistJoin.html");
|
||||
+ (sysUserInfo.IsFirstAdd ? (_userInfo.IsEn_Us ? "TrialUserFirstJoin_US.html" : "TrialUserFirstJoin.html") : (_userInfo.IsEn_Us ? "TrialUserExistJoin_US.html" : "TrialUserExistJoin.html") );
|
||||
|
||||
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
||||
{
|
||||
@@ -683,7 +688,7 @@ namespace IRaCIS.Application.Services
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailTemplate"
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ (sysUserInfo.IsFirstAdd ? "TrialDoctorFirstJoin.html" : "TrialDoctorExistJoin.html");
|
||||
+ (sysUserInfo.IsFirstAdd ? (_userInfo.IsEn_Us ? "TrialDoctorFirstJoin_US.html" : "TrialDoctorFirstJoin.html") : (_userInfo.IsEn_Us ? "TrialDoctorExistJoin_US.html" : "TrialDoctorExistJoin.html") );
|
||||
|
||||
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ using System.Text.Json.Nodes;
|
||||
using System.Text.Encodings.Web;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Common
|
||||
{
|
||||
@@ -44,136 +45,94 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public string GetBestStoreDisk()
|
||||
{
|
||||
|
||||
var json = File.ReadAllText("appsettings.json");
|
||||
|
||||
JObject jsonObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load });
|
||||
|
||||
int switchingRatio = 80;
|
||||
|
||||
try
|
||||
{
|
||||
switchingRatio = (int)jsonObject["IRaCISImageStore"]["SwitchingRatio"];
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
throw new BusinessValidationFailedException("解析Json文件配置出现问题:"+e.Message);
|
||||
}
|
||||
|
||||
//默认存储的路径
|
||||
var defaultStoreRootFolder = Path.Combine((Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\'))).IfNullThrowException().FullName, StaticData.Folder.IRaCISDataFolder);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DriveInfo defaultDrive = new DriveInfo(Path.GetPathRoot(defaultStoreRootFolder));
|
||||
|
||||
var drives = DriveInfo.GetDrives().Where(t => !t.Name.Contains("C") && !t.Name.Contains("c"))
|
||||
.Where(d => d.DriveType == DriveType.Fixed && d.IsReady)
|
||||
//剩余空间最多的
|
||||
.OrderByDescending(d => d.AvailableFreeSpace)
|
||||
|
||||
//存储空间相同,则按照按照总空间从大到小排序
|
||||
.ThenByDescending(d => d.TotalSize - d.TotalFreeSpace);
|
||||
|
||||
var bestDrive = drives.FirstOrDefault();
|
||||
var bestStoreRootFolder = string.Empty;
|
||||
|
||||
//仅仅只有C 盘
|
||||
if (bestDrive == null)
|
||||
if (bestDrive == null || ((double)(defaultDrive.TotalSize - defaultDrive.TotalFreeSpace) / defaultDrive.TotalSize) * 100 < switchingRatio)
|
||||
{
|
||||
bestStoreRootFolder = defaultStoreRootFolder;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
bestStoreRootFolder = drives.FirstOrDefault()?.Name + _hostEnvironment.EnvironmentName;
|
||||
bestStoreRootFolder = Path.Combine(bestDrive?.RootDirectory.FullName, _hostEnvironment.EnvironmentName);
|
||||
}
|
||||
|
||||
DriveInfo drive = new DriveInfo(Path.GetPathRoot(defaultStoreRootFolder));
|
||||
|
||||
//找到最优驱动器
|
||||
DriveInfo drive = new DriveInfo(Path.GetPathRoot(bestStoreRootFolder));
|
||||
|
||||
//最优盘符使用率超过百分之80
|
||||
if (((double)(drive.TotalSize - drive.TotalFreeSpace) / drive.TotalSize) * 100 > 80)
|
||||
if (((double)(drive.TotalSize - drive.TotalFreeSpace) / drive.TotalSize) * 100 > switchingRatio)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if (!Directory.Exists(bestStoreRootFolder))
|
||||
{
|
||||
Directory.CreateDirectory(bestStoreRootFolder);
|
||||
}
|
||||
|
||||
return bestStoreRootFolder;
|
||||
|
||||
}
|
||||
public class GeneralRule
|
||||
{
|
||||
public string Endpoint { get; set; }
|
||||
public string Period { get; set; }
|
||||
public int Limit { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void UpdateAppSettings(string key, string newValue)
|
||||
{
|
||||
|
||||
#region NewtonSoftJson
|
||||
//// 读取 JSON 文件
|
||||
//string jsonFilePath = "appsettings.json";
|
||||
//string jsonString = File.ReadAllText(jsonFilePath);
|
||||
|
||||
//// 解析 JSON 文件
|
||||
//var jObject = JsonConvert.DeserializeObject<JObject>(jsonString);
|
||||
|
||||
//// 更新或添加配置项
|
||||
//jObject[key] = newValue;
|
||||
|
||||
//// 将更新后的 JSON 字符串写入文件
|
||||
//using var streamWriter = new StreamWriter(jsonFilePath);
|
||||
//using var jsonTextWriter = new JsonTextWriter(streamWriter);
|
||||
//jsonTextWriter.Formatting = Formatting.Indented;
|
||||
//jObject.WriteTo(jsonTextWriter);
|
||||
#endregion
|
||||
|
||||
#region test
|
||||
//var json = File.ReadAllText("appsettings.json");
|
||||
//var jObject = JToken.Parse(json, new JsonLoadSettings { CommentHandling = CommentHandling.Load,DuplicatePropertyNameHandling=DuplicatePropertyNameHandling.Ignore });
|
||||
|
||||
//// Update or add the property
|
||||
//jObject[key] = newValue;
|
||||
|
||||
//// Preserve comments
|
||||
//var settings = new JsonSerializerSettings
|
||||
//{
|
||||
// PreserveReferencesHandling = PreserveReferencesHandling.Objects,
|
||||
// Formatting = Formatting.Indented,
|
||||
// StringEscapeHandling = StringEscapeHandling.Default,
|
||||
|
||||
//};
|
||||
//var updatedJson = JsonConvert.SerializeObject(jObject, settings);
|
||||
//File.WriteAllText("appsettings.json", updatedJson);
|
||||
|
||||
|
||||
|
||||
//var json = File.ReadAllText("appsettings.json");
|
||||
//var jToken = JToken.Parse(json);
|
||||
|
||||
//// Update or add the property
|
||||
//jToken[key] = newValue;
|
||||
|
||||
//// Preserve comments
|
||||
//var settings = new JsonSerializerSettings
|
||||
//{
|
||||
// TypeNameHandling = TypeNameHandling.All,
|
||||
// PreserveReferencesHandling = PreserveReferencesHandling.Objects,
|
||||
// Formatting = Formatting.Indented,
|
||||
// StringEscapeHandling = StringEscapeHandling.Default
|
||||
//};
|
||||
//var updatedJson = JsonConvert.SerializeObject(jToken, settings);
|
||||
//File.WriteAllText("appsettings.json", updatedJson);
|
||||
|
||||
|
||||
//string json = @"{
|
||||
// // This is a comment
|
||||
// ""Name"": ""John Smith"",
|
||||
// ""Age"": 30,
|
||||
// ""Address"": {
|
||||
// // This is another comment
|
||||
// ""Street"": ""123 Main St"",
|
||||
// ""City"": ""Anytown"",
|
||||
// ""State"": ""CA"",
|
||||
// ""Zip"": ""12345""
|
||||
// }
|
||||
//}";
|
||||
|
||||
//// 使用 Json.NET 库解析 JSON 字符串
|
||||
//JObject jObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load });
|
||||
|
||||
//// 修改属性
|
||||
//jObject["Name"] = "Jane Smith";
|
||||
|
||||
//// 将修改后的 JObject 对象序列化为 JSON 字符串并保留注释
|
||||
//string newJson = jObject.ToString(Newtonsoft.Json.Formatting.Indented);
|
||||
|
||||
//// 打印修改后的 JSON 字符串
|
||||
//Console.WriteLine(newJson);
|
||||
|
||||
#endregion
|
||||
|
||||
List<GeneralRule> generalRules = new List<GeneralRule>()
|
||||
{
|
||||
new GeneralRule() { Endpoint = "*", Period = "1s", Limit = 3 },
|
||||
new GeneralRule() { Endpoint = "*", Period = "15m", Limit = 100 },
|
||||
new GeneralRule() { Endpoint = "*", Period = "12h", Limit = 1000 },
|
||||
new GeneralRule() { Endpoint = "*", Period = "7d", Limit = 10000 }
|
||||
};
|
||||
|
||||
// 读取 Json 文件
|
||||
string jsonFilePath = "appsettings.json";
|
||||
@@ -181,37 +140,17 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
var json = File.ReadAllText("appsettings.json");
|
||||
|
||||
JObject jsonObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load });
|
||||
// 获取 UpdateConfig 属性所在的节点
|
||||
JToken updateConfigNode = jsonObject.SelectToken("UpdateConfig");
|
||||
|
||||
JProperty updateConfigProperty = (JProperty)updateConfigNode.Parent;
|
||||
JObject updateConfigParent = (JObject)updateConfigProperty.Value;
|
||||
|
||||
// 向 updateConfigParent 添加或者属性
|
||||
updateConfigParent[key] = newValue;
|
||||
// 操作UpdateConfig对象
|
||||
jsonObject["UpdateConfig"][key] = newValue;
|
||||
|
||||
jsonObject["UpdateConfig"]["testArray"] = JArray.FromObject(generalRules);
|
||||
|
||||
// 将更改保存回 Json 文件
|
||||
File.WriteAllText(jsonFilePath, jsonObject.ToString());
|
||||
|
||||
//using (var reader = new JsonTextReader(new StringReader(json)))
|
||||
//using (var writer = new JsonTextWriter(new StreamWriter("appsettings.json")))
|
||||
//{
|
||||
// while (reader.Read())
|
||||
// {
|
||||
// if (reader.TokenType == JsonToken.PropertyName && (string)reader.Value == key)
|
||||
// {
|
||||
// // Write the updated property value
|
||||
// writer.WritePropertyName(key);
|
||||
// writer.WriteValue(newValue);
|
||||
// reader.Read();
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// // Write all other tokens
|
||||
// writer.WriteToken(reader.TokenType, reader.Value);
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace IRaCIS.Application.Services
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(selectionQuery.Name), t => t.ChineseName.Contains(selectionQuery.Name) || (t.LastName + t.FirstName).Contains(selectionQuery.Name))
|
||||
.WhereIf(evaluationCriteriaCount > 0, t => t.TrialExperienceCriteriaList.Count(t => selectionQuery.EvaluationCriteriaIdList.Contains(t.EvaluationCriteriaId)) == evaluationCriteriaCount)
|
||||
//用户类型 看到简历的范围这里需要确认
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ReviewerCoordinator, t => t.UserList.Any(u => u.UserId == _userInfo.Id))
|
||||
//.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ReviewerCoordinator, t => t.UserList.Any(u => u.UserId == _userInfo.Id))
|
||||
.WhereIf(count > 0, t => t.DoctorDicRelationList.Count(u => guidList.Contains(u.DictionaryId)) == count)
|
||||
.WhereIf(selectionQuery.EnrollStatus != null && selectionQuery.EnrollStatus == (int)ReviewerEnrollStatus.Yes, t => t.EnrollList.Any(u => u.EnrollStatus == EnrollStatus.DoctorReading))
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace IRaCIS.Application.Services
|
||||
await _doctorRepository.AddAsync(doctor);
|
||||
//_doctorRepository.Add(doctor);
|
||||
|
||||
await _repository.AddAsync(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id });
|
||||
//await _repository.AddAsync(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id });
|
||||
//_userDoctorRepository.Add(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id });
|
||||
|
||||
var success = await _repository.SaveChangesAsync();
|
||||
|
||||
@@ -431,7 +431,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailTemplate"
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "SubjectEnrollConfirmOrPDProgress.html";
|
||||
//+ "SubjectEnrollConfirmOrPDProgress.html";
|
||||
+ (_userInfo.IsEn_Us ? "SubjectEnrollConfirmOrPDProgress_US.html" : "SubjectEnrollConfirmOrPDProgress.html");
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1458,7 +1459,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailTemplate"
|
||||
+ Path.DirectorySeparatorChar.ToString()
|
||||
+ "EmailConfigTest.html";
|
||||
//+ "EmailConfigTest.html";
|
||||
|
||||
+ (_userInfo.IsEn_Us ? "EmailConfigTest_US.html" : "EmailConfigTest.html");
|
||||
|
||||
|
||||
//---项目邮件测试
|
||||
|
||||
@@ -45,11 +45,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public string ResearchProgramNo { get; set; } = string.Empty;
|
||||
public string TrialIndication { get; set; } = string.Empty;
|
||||
|
||||
public CheckStateEnum CheckState { get; set; }
|
||||
|
||||
|
||||
public decimal VisitNum { get; set; }
|
||||
public string SVUPDES { get; set; } = string.Empty;
|
||||
public string VisitName { get; set; } = string.Empty;
|
||||
public string Sponsor { get; set; } = string.Empty;
|
||||
public Guid TrialId { get; set; }
|
||||
@@ -57,10 +55,15 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public Guid SubjectId { get; set; }
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public SubmitStateEnum SubmitState { get; set; }
|
||||
|
||||
public AuditStateEnum AuditState { get; set; }
|
||||
public ForwardStateEnum ForwardState { get; set; }
|
||||
//public string SVUPDES { get; set; } = string.Empty;
|
||||
|
||||
//public CheckStateEnum CheckState { get; set; }
|
||||
|
||||
//public SubmitStateEnum SubmitState { get; set; }
|
||||
|
||||
//public AuditStateEnum AuditState { get; set; }
|
||||
//public ForwardStateEnum ForwardState { get; set; }
|
||||
|
||||
//public string SubjectName => LastName + " / " + FirstName;
|
||||
//public string FirstName { get; set; } = string.Empty;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public DateTime UploadTime { get; set; }
|
||||
|
||||
public string StudyCode { get; set; }
|
||||
public string StudyCode { get; set; }
|
||||
|
||||
|
||||
//[JsonIgnore]
|
||||
@@ -137,7 +137,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
}
|
||||
|
||||
|
||||
public class UnionStudyViewModel:UnionStudyBaseModel
|
||||
public class UnionStudyViewModel : UnionStudyBaseModel
|
||||
{
|
||||
|
||||
public Guid Id { get; set; }
|
||||
@@ -158,7 +158,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
|
||||
|
||||
public class StudyQuery:PageInput
|
||||
public class StudyQuery : PageInput
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
@@ -174,4 +174,139 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public string[]? VisitPlanArray { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class PreArchiveDicomStudyCommand
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid SiteId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
|
||||
public decimal FileSize { get; set; }
|
||||
|
||||
public bool IsDicomReUpload { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public int FileCount { get; set; }
|
||||
}
|
||||
|
||||
public class NewArchiveStudyCommand
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid SiteId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid StudyMonitorId { get; set; }
|
||||
|
||||
public int FailedFileCount { get; set; }
|
||||
|
||||
public AddOrUpdateStudyDto Study { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class AddOrUpdateStudyDto
|
||||
{
|
||||
|
||||
|
||||
public string StudyId { get; set; } = string.Empty;
|
||||
|
||||
//public int Code { get; set; } = 0;
|
||||
|
||||
//public string StudyCode { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string StudyInstanceUid { get; set; } = string.Empty;
|
||||
public DateTime? StudyTime { get; set; }
|
||||
public string Modalities { get; set; } = string.Empty;
|
||||
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public int SeriesCount { get; set; } = 0;
|
||||
public int InstanceCount { get; set; } = 0;
|
||||
|
||||
public string InstitutionName { get; set; } = string.Empty;
|
||||
public string PatientId { get; set; } = string.Empty;
|
||||
public string PatientName { get; set; } = string.Empty;
|
||||
public string PatientAge { get; set; } = string.Empty;
|
||||
public string PatientSex { get; set; } = string.Empty;
|
||||
|
||||
public string AccessionNumber { get; set; } = string.Empty;
|
||||
public string PatientBirthDate { get; set; } = string.Empty;
|
||||
public string AcquisitionTime { get; set; } = string.Empty;
|
||||
public string AcquisitionNumber { get; set; } = string.Empty;
|
||||
public string TriggerTime { get; set; } = string.Empty;
|
||||
|
||||
public string BodyPartExamined { get; set; } = string.Empty;
|
||||
|
||||
public List<AddOrUpdateSeriesDto> SeriesList { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class AddOrUpdateSeriesDto
|
||||
{
|
||||
public string StudyInstanceUid { get; set; }
|
||||
public string SeriesInstanceUid { get; set; }
|
||||
public int SeriesNumber { get; set; }
|
||||
public DateTime? SeriesTime { get; set; }
|
||||
public string Modality { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int InstanceCount { get; set; }
|
||||
public string SliceThickness { get; set; }
|
||||
|
||||
public string ImagePositionPatient { get; set; }
|
||||
public string ImageOrientationPatient { get; set; }
|
||||
public string BodyPartExamined { get; set; }
|
||||
public string SequenceName { get; set; }
|
||||
public string ProtocolName { get; set; }
|
||||
public string ImagerPixelSpacing { get; set; }
|
||||
|
||||
public string AcquisitionTime { get; set; } = string.Empty;
|
||||
public string AcquisitionNumber { get; set; } = string.Empty;
|
||||
public string TriggerTime { get; set; } = string.Empty;
|
||||
|
||||
public List<AddInstanceDto> InstanceList { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class AddInstanceDto
|
||||
{
|
||||
public string StudyInstanceUid { get; set; }
|
||||
public string SeriesInstanceUid { get; set; }
|
||||
public string SopInstanceUid { get; set; }
|
||||
public int InstanceNumber { get; set; }
|
||||
public DateTime? InstanceTime { get; set; }
|
||||
public bool CPIStatus { get; set; }
|
||||
public int ImageRows { get; set; }
|
||||
public int ImageColumns { get; set; }
|
||||
public int SliceLocation { get; set; }
|
||||
|
||||
|
||||
public string SliceThickness { get; set; }
|
||||
public int NumberOfFrames { get; set; }
|
||||
public string PixelSpacing { get; set; }
|
||||
|
||||
public string ImagerPixelSpacing { get; set; }
|
||||
public string FrameOfReferenceUID { get; set; }
|
||||
public string WindowCenter { get; set; }
|
||||
public string WindowWidth { get; set; }
|
||||
|
||||
public bool Anonymize { get; set; }
|
||||
public string Path { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,9 +393,9 @@ namespace IRaCIS.Core.Application.Services
|
||||
ProtocolName = dataset.GetSingleValueOrDefault(DicomTag.ProtocolName, string.Empty),
|
||||
ImagerPixelSpacing = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
|
||||
|
||||
AcquisitionTime = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
|
||||
AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
|
||||
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
|
||||
AcquisitionTime = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionTime, string.Empty),
|
||||
AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionNumber, string.Empty),
|
||||
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.TriggerTime, string.Empty),
|
||||
|
||||
SiteId = dicomStudy.SiteId,
|
||||
TrialId = dicomStudy.TrialId,
|
||||
|
||||
@@ -12,6 +12,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
DicomTrialSiteSubjectInfo GetSaveToDicomInfo(Guid subjectVisitId);
|
||||
IResponseOutput<DicomStudyDTO> Item(Guid studyId);
|
||||
Task<FileContentResult> Preview(Guid studyId);
|
||||
IResponseOutput<List<VerifyStudyUploadResult>> VerifyStudyAllowUpload(VerifyUploadOrReupload verifyInfo);
|
||||
//IResponseOutput<List<VerifyStudyUploadResult>> VerifyStudyAllowUpload(VerifyUploadOrReupload verifyInfo);
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,23 @@ using EasyCaching.Core;
|
||||
using System.Linq.Expressions;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using DocumentFormat.OpenXml.Presentation;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.MediatR.Handlers;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Newtonsoft.Json;
|
||||
using System.Threading;
|
||||
using Nito.AsyncEx;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
{
|
||||
[ApiExplorerSettings(GroupName = "Image")]
|
||||
public class StudyService : BaseService, IStudyService
|
||||
{
|
||||
private static object lockCodeGenerate = new object();
|
||||
private static readonly AsyncLock _mutex = new AsyncLock();
|
||||
private static readonly AsyncLock _mutex2 = new AsyncLock();
|
||||
|
||||
private readonly IEasyCachingProvider _provider;
|
||||
|
||||
@@ -20,19 +31,271 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<DicomInstance> _dicomInstanceRepository;
|
||||
private readonly IRepository<DicomSeries> _dicomSeriesRepository;
|
||||
private readonly IRepository<DicomStudy> _dicomstudyRepository;
|
||||
private readonly IRepository<Dictionary> _dictionaryRepository;
|
||||
|
||||
public StudyService( IEasyCachingProvider provider
|
||||
private readonly IRepository<StudyMonitor> _studyMonitorRepository;
|
||||
|
||||
|
||||
public StudyService(IEasyCachingProvider provider
|
||||
, IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<DicomInstance> dicomInstanceRepository,
|
||||
IRepository<DicomSeries> dicomSeriesRepository)
|
||||
IRepository<DicomSeries> dicomSeriesRepository, IRepository<DicomStudy> dicomstudyRepository, IRepository<Dictionary> dictionaryRepository, IRepository<StudyMonitor> studyMonitorRepository)
|
||||
{
|
||||
_provider = provider;
|
||||
_subjectVisitRepository = subjectVisitRepository;
|
||||
_dicomInstanceRepository = dicomInstanceRepository;
|
||||
_dicomSeriesRepository = dicomSeriesRepository;
|
||||
_dicomstudyRepository = dicomstudyRepository;
|
||||
_dictionaryRepository = dictionaryRepository;
|
||||
_studyMonitorRepository = studyMonitorRepository;
|
||||
}
|
||||
|
||||
|
||||
private void SpecialArchiveStudyDeal(DicomStudy study)
|
||||
{
|
||||
#region 特殊逻辑
|
||||
|
||||
|
||||
if (study.PatientBirthDate.Length == 8)
|
||||
{
|
||||
study.PatientBirthDate = $"{study.PatientBirthDate[0]}{study.PatientBirthDate[1]}{study.PatientBirthDate[2]}{study.PatientBirthDate[3]}-{study.PatientBirthDate[4]}{study.PatientBirthDate[5]}-{study.PatientBirthDate[6]}{study.PatientBirthDate[7]}";
|
||||
}
|
||||
|
||||
var dicModalityList = _dictionaryRepository.Where(t => t.Code == "Modality").SelectMany(t => t.ChildList.Select(c => c.Value)).ToList();
|
||||
|
||||
|
||||
var modality = study.Modalities;
|
||||
|
||||
var modalityForEdit = dicModalityList.Contains(modality) ? modality : String.Empty;
|
||||
|
||||
if (modality == "MR")
|
||||
{
|
||||
modalityForEdit = "MRI";
|
||||
}
|
||||
|
||||
if (modality == "PT")
|
||||
{
|
||||
modalityForEdit = "PET";
|
||||
}
|
||||
if (modality == "PT、CT")
|
||||
{
|
||||
modalityForEdit = "PET-CT";
|
||||
}
|
||||
|
||||
study.ModalityForEdit = modalityForEdit;
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
public async Task<IResponseOutput> PreArchiveDicomStudy(PreArchiveDicomStudyCommand preArchiveStudyCommand)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
var studyMonitor = new StudyMonitor()
|
||||
{
|
||||
TrialId = preArchiveStudyCommand.TrialId,
|
||||
SiteId = preArchiveStudyCommand.SiteId,
|
||||
SubjectId = preArchiveStudyCommand.SubjectId,
|
||||
SubjectVisitId = preArchiveStudyCommand.SubjectVisitId,
|
||||
|
||||
IsSuccess = false,
|
||||
UploadStartTime = DateTime.Now,
|
||||
IsDicom = true,
|
||||
IP = _userInfo.IP,
|
||||
|
||||
IsDicomReUpload = preArchiveStudyCommand.IsDicomReUpload,
|
||||
FileSize = preArchiveStudyCommand.FileSize,
|
||||
FileCount = preArchiveStudyCommand.FileCount,
|
||||
//FailedFileCount = preArchiveStudyCommand.FailedFileCount,
|
||||
|
||||
};
|
||||
|
||||
|
||||
var addEntity = await _studyMonitorRepository.AddAsync(studyMonitor, true);
|
||||
|
||||
return ResponseOutput.Ok(addEntity.Id);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> AddOrUpdateArchiveStudy(NewArchiveStudyCommand incommand)
|
||||
{
|
||||
var trialId = incommand.TrialId;
|
||||
|
||||
var studyMonitor = await _studyMonitorRepository.FirstOrDefaultAsync(t => t.Id == incommand.StudyMonitorId);
|
||||
studyMonitor.UploadFinishedTime = DateTime.Now;
|
||||
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
||||
studyMonitor.FailedFileCount = incommand.FailedFileCount;
|
||||
studyMonitor.IsSuccess = true;
|
||||
|
||||
//上传
|
||||
if (studyMonitor.IsDicomReUpload == false)
|
||||
{
|
||||
var study = _mapper.Map<DicomStudy>(incommand.Study);
|
||||
|
||||
using (await _mutex.LockAsync())
|
||||
{
|
||||
//查询数据库获取最大的Code 没有记录则为0
|
||||
var dbStudyCodeIntMax = _dicomstudyRepository.Where(s => s.TrialId == trialId).Select(t => t.Code).DefaultIfEmpty().Max();
|
||||
|
||||
//获取缓存中的值 并发的时候,需要记录,已被占用的值 这样其他线程在此占用的最大的值上递增
|
||||
var cacheMaxCodeInt = _provider.Get<int>($"{trialId}_{StaticData.CacheKey.StudyMaxCode}").Value;
|
||||
|
||||
int currentNextCodeInt = cacheMaxCodeInt > dbStudyCodeIntMax ? cacheMaxCodeInt + 1 : dbStudyCodeIntMax + 1;
|
||||
|
||||
study.Code = currentNextCodeInt;
|
||||
|
||||
study.StudyCode = AppSettings.GetCodeStr(currentNextCodeInt, nameof(DicomStudy));
|
||||
|
||||
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.StudyMaxCode}", study.Code, TimeSpan.FromMinutes(30));
|
||||
|
||||
}
|
||||
|
||||
|
||||
study.Id = IdentifierHelper.CreateGuid(incommand.Study.StudyInstanceUid, incommand.TrialId.ToString());
|
||||
study.TrialId = incommand.TrialId;
|
||||
study.SiteId = incommand.SiteId;
|
||||
study.SubjectId = incommand.SubjectId;
|
||||
study.SubjectVisitId = incommand.SubjectVisitId;
|
||||
|
||||
|
||||
//特殊处理逻辑
|
||||
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Distinct());
|
||||
SpecialArchiveStudyDeal(study);
|
||||
|
||||
await _dicomstudyRepository.AddAsync(study);
|
||||
|
||||
|
||||
studyMonitor.StudyId = study.Id;
|
||||
studyMonitor.StudyCode = study.StudyCode;
|
||||
|
||||
|
||||
foreach (var seriesItem in incommand.Study.SeriesList)
|
||||
{
|
||||
var series = _mapper.Map<DicomSeries>(seriesItem);
|
||||
|
||||
series.Id = IdentifierHelper.CreateGuid(seriesItem.SeriesInstanceUid, incommand.TrialId.ToString());
|
||||
series.StudyId = study.Id;
|
||||
|
||||
series.TrialId = incommand.TrialId;
|
||||
series.SiteId = incommand.SiteId;
|
||||
series.SubjectId = incommand.SubjectId;
|
||||
series.SubjectVisitId = incommand.SubjectVisitId;
|
||||
|
||||
await _dicomSeriesRepository.AddAsync(series);
|
||||
|
||||
foreach (var instanceItem in seriesItem.InstanceList)
|
||||
{
|
||||
var isntance = _mapper.Map<DicomInstance>(instanceItem);
|
||||
isntance.StudyId = study.Id;
|
||||
isntance.SeriesId = series.Id;
|
||||
|
||||
isntance.TrialId = incommand.TrialId;
|
||||
isntance.SiteId = incommand.SiteId;
|
||||
isntance.SubjectId = incommand.SubjectId;
|
||||
isntance.SubjectVisitId = incommand.SubjectVisitId;
|
||||
|
||||
await _dicomInstanceRepository.AddAsync(isntance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var studyId = IdentifierHelper.CreateGuid(incommand.Study.StudyInstanceUid, incommand.TrialId.ToString()); ;
|
||||
|
||||
var study = await _dicomstudyRepository.FirstOrDefaultAsync(t => t.Id == studyId);
|
||||
|
||||
//_mapper.Map(incommand.Study, study);
|
||||
|
||||
//特殊处理逻辑
|
||||
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Union(study.Modalities.Split("、", StringSplitOptions.RemoveEmptyEntries)).Distinct());
|
||||
SpecialArchiveStudyDeal(study);
|
||||
|
||||
|
||||
|
||||
// 少了整个序列
|
||||
|
||||
//某个序列下少了instance
|
||||
foreach (var seriesItem in incommand.Study.SeriesList)
|
||||
{
|
||||
var seriesId = IdentifierHelper.CreateGuid(seriesItem.StudyInstanceUid, seriesItem.SeriesInstanceUid, trialId.ToString());
|
||||
|
||||
DicomSeries dicomSeries = await _dicomSeriesRepository.FirstOrDefaultAsync(t => t.Id == seriesId);
|
||||
|
||||
//判断重复
|
||||
if (dicomSeries == null)
|
||||
{
|
||||
var series = _mapper.Map<DicomSeries>(seriesItem);
|
||||
|
||||
series.Id = seriesId;
|
||||
series.StudyId = study.Id;
|
||||
|
||||
series.TrialId = incommand.TrialId;
|
||||
series.SiteId = incommand.SiteId;
|
||||
series.SubjectId = incommand.SubjectId;
|
||||
series.SubjectVisitId = incommand.SubjectVisitId;
|
||||
|
||||
|
||||
dicomSeries = await _dicomSeriesRepository.AddAsync(series);
|
||||
|
||||
//新的序列 那么 检查的序列数量+1
|
||||
study.SeriesCount += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
//该序列掉了instance
|
||||
dicomSeries.InstanceCount += seriesItem.InstanceCount;
|
||||
}
|
||||
|
||||
|
||||
foreach (var instanceItem in seriesItem.InstanceList)
|
||||
{
|
||||
var insntance = _mapper.Map<DicomInstance>(instanceItem);
|
||||
insntance.Id = IdentifierHelper.CreateGuid(insntance.StudyInstanceUid, insntance.SeriesInstanceUid, insntance.SopInstanceUid, trialId.ToString());
|
||||
insntance.StudyId = study.Id;
|
||||
insntance.SeriesId = dicomSeries.Id;
|
||||
|
||||
insntance.TrialId = incommand.TrialId;
|
||||
insntance.SiteId = incommand.SiteId;
|
||||
insntance.SubjectId = incommand.SubjectId;
|
||||
insntance.SubjectVisitId = incommand.SubjectVisitId;
|
||||
|
||||
await _dicomInstanceRepository.AddAsync(insntance);
|
||||
}
|
||||
|
||||
|
||||
// 不管是新的序列 还是 该序列 掉了Instance 重传的时候 检查的instance 数量都会增加
|
||||
study.InstanceCount += seriesItem.InstanceCount;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
using (await _mutex2.LockAsync())
|
||||
{
|
||||
await _dicomInstanceRepository.SaveChangesAsync();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -151,7 +414,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
public async Task<PageOutput<UnionStudyMonitorModel>> GetDicomAndNoneDicomStudyMonitorList(StudyQuery studyQuery)
|
||||
{
|
||||
var svExpression = QCCommon.GetStudyMonitorSubjectVisitFilter(studyQuery.VisitPlanArray);
|
||||
var StudyMonitorQuery = _repository.Where<StudyMonitor>(t => t.TrialId == studyQuery.TrialId,ignoreQueryFilters:true)
|
||||
var StudyMonitorQuery = _repository.Where<StudyMonitor>(t => t.TrialId == studyQuery.TrialId, ignoreQueryFilters: true)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
//.WhereIf(!string.IsNullOrEmpty(studyQuery.VisitPlanInfo), studyQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.VisitNum.ToString().Contains(".") : t => t.SubjectVisit.VisitNum == decimal.Parse(studyQuery.VisitPlanInfo))
|
||||
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||
@@ -181,14 +444,14 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
|
||||
UploadTime = t.CreateTime,
|
||||
|
||||
IsSuccess=t.IsSuccess,
|
||||
Note=t.Note,
|
||||
IsSuccess = t.IsSuccess,
|
||||
Note = t.Note,
|
||||
IP = t.IP,
|
||||
FileCount = t.FileCount,
|
||||
FileSize = t.FileSize,
|
||||
UploadFinishedTime = t.UploadFinishedTime,
|
||||
UploadStartTime = t.UploadStartTime,
|
||||
ArchiveFinishedTime=t.ArchiveFinishedTime,
|
||||
ArchiveFinishedTime = t.ArchiveFinishedTime,
|
||||
|
||||
|
||||
|
||||
@@ -445,7 +708,18 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
result.Add(temp);
|
||||
});
|
||||
|
||||
return ResponseOutput.Ok(result);
|
||||
|
||||
// 写入dicom 固定的信息,以及组织路径的信息 以及匿名化的信息
|
||||
var otherData = GetSaveToDicomInfo(verifyInfo.SubjectVisitId);
|
||||
|
||||
var systemAnonymizationList = _repository.Where<SystemAnonymization>(t => t.IsEnable).ToList();
|
||||
|
||||
return ResponseOutput.Ok<List<VerifyStudyUploadResult>>(result, new
|
||||
{
|
||||
DicomStoreInfo = otherData,
|
||||
AnonymizeFixedList = systemAnonymizationList.Where(t => t.IsFixed).ToList(),
|
||||
AnonymizeNotFixedList = systemAnonymizationList.Where(t => t.IsFixed == false).ToList()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -498,6 +772,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
if (verifyStudyInfo.SubjectId == SubjectId && verifyStudyInfo.SubjectVisitId == currentSubjectVisitId)
|
||||
{
|
||||
result.AllowReUpload = true;
|
||||
|
||||
result.UploadedSeriesList = _repository.Where<DicomSeries>(t => t.StudyId == verifyStudyInfo.Id).Select(t => new UploadedSeries()
|
||||
{ SeriesId = t.Id, SeriesInstanceUid = t.SeriesInstanceUid, SOPInstanceUIDList = t.DicomInstanceList.Select(c => c.SopInstanceUid).ToList() }).ToList();
|
||||
}
|
||||
//不是同一个受试者
|
||||
else
|
||||
|
||||
@@ -12,6 +12,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
public ImageAndDocConfig()
|
||||
{
|
||||
CreateMap<AddOrUpdateStudyDto, DicomStudy>();
|
||||
CreateMap<AddOrUpdateSeriesDto, DicomSeries>();
|
||||
CreateMap<AddInstanceDto, DicomInstance>();
|
||||
|
||||
CreateMap<Report, ReportDTO>();
|
||||
CreateMap<ImageLabel, ImageLabelDTO>();
|
||||
CreateMap<DicomSeries, DicomSeriesWithLabelDTO>();
|
||||
@@ -31,7 +35,6 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Site.SiteName))
|
||||
.ForMember(d => d.UploaderFirstName, u => u.MapFrom(s => s.Uploader.FirstName))
|
||||
.ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.Uploader.LastName))
|
||||
.ForMember(d => d.StudyStatus, u => u.MapFrom(s => s.Status))
|
||||
.ForMember(d => d.UploadedTime, u => u.MapFrom(s => s.CreateTime))
|
||||
|
||||
.ForMember(d => d.DTFCount, u => u.MapFrom(s => s.StudyDTFList.Count()));
|
||||
|
||||
@@ -8,6 +8,9 @@ using Panda.DynamicWebApi.Attributes;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using IRaCIS.Core.Infra.Common.Cache;
|
||||
using Microsoft.Identity.Client;
|
||||
using static IRaCIS.Core.Domain.Share.StaticData;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
@@ -82,7 +85,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (oldPwd != null && oldPwd == newPwd)
|
||||
{
|
||||
//---新密码与旧密码相同。
|
||||
//---新密码与旧密码相同。
|
||||
throw new BusinessValidationFailedException(_localizer["User_NewOldPwdSame"]);
|
||||
}
|
||||
|
||||
@@ -91,13 +94,13 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (oldPwd != null && dbUser.Password != oldPwd)
|
||||
{
|
||||
//---旧密码验证失败。
|
||||
//---旧密码验证失败。
|
||||
throw new BusinessValidationFailedException(_localizer["User_OldPwdInvalid"]);
|
||||
}
|
||||
|
||||
if (dbUser.Password == newPwd)
|
||||
{
|
||||
//---新密码与旧密码相同。
|
||||
//---新密码与旧密码相同。
|
||||
throw new BusinessValidationFailedException(_localizer["User_NewOldPwdSame"]);
|
||||
}
|
||||
|
||||
@@ -156,7 +159,7 @@ namespace IRaCIS.Application.Services
|
||||
//检查验证码是否失效
|
||||
if (verificationRecord.ExpirationTime < DateTime.Now)
|
||||
{
|
||||
//---验证码已经过期。
|
||||
//---验证码已经过期。
|
||||
return ResponseOutput.NotOk(_localizer["User_VerificationCodeExpired"]);
|
||||
|
||||
}
|
||||
@@ -358,7 +361,7 @@ namespace IRaCIS.Application.Services
|
||||
if (verificationRecord.ExpirationTime < DateTime.Now)
|
||||
{
|
||||
|
||||
//---验证码已经过期。
|
||||
//---验证码已经过期。
|
||||
throw new BusinessValidationFailedException(_localizer["User_VerificationCodeExpired"]);
|
||||
}
|
||||
else //验证码正确 并且 没有超时
|
||||
@@ -462,7 +465,7 @@ namespace IRaCIS.Application.Services
|
||||
public async Task<PageOutput<UserListDTO>> GetUserList(UserListQueryDTO param)
|
||||
{
|
||||
var userQueryable = _userRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.UserName.Contains(param.UserName) )
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.UserName.Contains(param.UserName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.RealName), t => t.FullName.Contains(param.RealName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.Phone), t => t.Phone.Contains(param.Phone))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.OrganizationName), t => t.OrganizationName.Contains(param.OrganizationName))
|
||||
@@ -613,6 +616,31 @@ namespace IRaCIS.Application.Services
|
||||
[NonDynamicMethod]
|
||||
public async Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password)
|
||||
{
|
||||
|
||||
const string cachePrefix = "login-failures:";
|
||||
const int maxFailures = 3;
|
||||
const int lockoutMinutes = 1;
|
||||
|
||||
// 生成缓存键
|
||||
string cacheKey = $"{cachePrefix}{userName}";
|
||||
|
||||
// 从缓存中获取登录失败次数
|
||||
int? failCount = _cache.Get<int?>(cacheKey);
|
||||
|
||||
if (failCount == null)
|
||||
{
|
||||
failCount = 0;
|
||||
}
|
||||
|
||||
//每次登录 都重置缓存时间
|
||||
_cache.Set(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
|
||||
|
||||
|
||||
if (failCount >= maxFailures)
|
||||
{
|
||||
throw new BusinessValidationFailedException($"密码连续错误3次,当前账号已被限制登录,请等待 {lockoutMinutes} 分钟后再试。");
|
||||
}
|
||||
|
||||
var userLoginReturnModel = new LoginReturnDTO();
|
||||
|
||||
|
||||
@@ -620,21 +648,32 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (loginUser == null)
|
||||
{
|
||||
//此处下面 代码 为了支持医生也能登录 而且前端不加选择到底是管理用户 还是医生用户 奇怪的需求 无法理解
|
||||
|
||||
var loginDoctor = await _doctorRepository.Where(u => u.Phone == userName && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
#region 屏蔽代码,现在没用到
|
||||
////此处下面 代码 为了支持医生也能登录 而且前端不加选择到底是管理用户 还是医生用户 奇怪的需求 无法理解
|
||||
|
||||
if (loginDoctor == null)
|
||||
{
|
||||
return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
|
||||
//var loginDoctor = await _doctorRepository.Where(u => u.Phone == userName && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
}
|
||||
//if (loginDoctor == null)
|
||||
//{
|
||||
// return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
|
||||
//}
|
||||
//userLoginReturnModel.BasicInfo = loginDoctor;
|
||||
|
||||
//登录 清除缓存
|
||||
//_cache.Remove(userLoginReturnModel.BasicInfo.Id.ToString());
|
||||
//return ResponseOutput.Ok(userLoginReturnModel);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
//错误次数累加
|
||||
failCount++;
|
||||
_cache.Set(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
|
||||
|
||||
return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
|
||||
|
||||
userLoginReturnModel.BasicInfo = loginDoctor;
|
||||
|
||||
// 登录 清除缓存
|
||||
_cache.Remove(userLoginReturnModel.BasicInfo.Id.ToString());
|
||||
return ResponseOutput.Ok(userLoginReturnModel);
|
||||
|
||||
}
|
||||
|
||||
@@ -644,6 +683,12 @@ namespace IRaCIS.Application.Services
|
||||
return ResponseOutput.NotOk(_localizer["User_Disabled"], new LoginReturnDTO());
|
||||
}
|
||||
|
||||
|
||||
//登录成功 清除缓存
|
||||
_cache.Set(cacheKey, 0, TimeSpan.FromMinutes(lockoutMinutes));
|
||||
|
||||
|
||||
|
||||
userLoginReturnModel.BasicInfo = loginUser;
|
||||
|
||||
// 登录 清除缓存
|
||||
@@ -652,5 +697,35 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//private bool loginIsLocked(string userName)
|
||||
//{
|
||||
|
||||
// //if (failCount == null)
|
||||
// //{
|
||||
// // failCount = 0;
|
||||
// //}
|
||||
// //else
|
||||
// //{
|
||||
// // failCount++;
|
||||
// //}
|
||||
|
||||
// //// 更新缓存中的登录失败次数
|
||||
// //_cache.Set(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
|
||||
|
||||
// //if (failCount >= maxFailures)
|
||||
// //{
|
||||
// // // 如果登录失败次数达到了 3 次,则锁定用户
|
||||
// // _cache.Set(cacheKey + ":locked", true, TimeSpan.FromMinutes(lockoutMinutes));
|
||||
// //}
|
||||
|
||||
|
||||
|
||||
|
||||
// //return isLocked;
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// 生成时间 2021-11-11 11:48:52
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
@@ -20,7 +21,12 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string QuestionName { get; set; } = String.Empty;
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
public bool IsRequired { get; set; }
|
||||
public bool IsEnable { get; set; }
|
||||
public string Type { get; set; } = String.Empty;
|
||||
public string ParentTriggerValue { get; set; }
|
||||
@@ -43,7 +49,12 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string QuestionName { get; set; } = String.Empty;
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
public bool IsRequired { get; set; }
|
||||
public bool IsEnable { get; set; }
|
||||
public string Type { get; set; } = String.Empty;
|
||||
public string ParentTriggerValue { get; set; }
|
||||
@@ -62,13 +73,18 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
}
|
||||
|
||||
///<summary>QCQuestionQuery 列表查询参数模型</summary>
|
||||
public class QCQuestionQuery
|
||||
public class QCQuestionQuery:PageInput
|
||||
{
|
||||
///<summary> QuestionName</summary>
|
||||
public string QuestionName { get; set; } = String.Empty;
|
||||
|
||||
///<summary> TypeValue</summary>
|
||||
public string Type { get; set; } = String.Empty;
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType? LanguageType { get; set; }
|
||||
|
||||
///<summary> TypeValue</summary>
|
||||
public string Type { get; set; } = String.Empty;
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
||||
@@ -84,7 +100,12 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public string QuestionName { get; set; } = String.Empty;
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
public bool IsRequired { get; set; }
|
||||
public bool IsEnable { get; set; }
|
||||
public string Type { get; set; } = String.Empty;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// 生成时间 2021-11-11 11:48:52
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
@@ -13,7 +14,12 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public Guid Id { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
public bool IsRequired { get; set; }
|
||||
public bool IsEnable { get; set; }
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
@@ -54,7 +60,12 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public Guid Id { get; set; }
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
public Guid? ParentId { get; set; }
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
public Guid? ParentId { get; set; }
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
public string TypeValue { get; set; }
|
||||
@@ -68,8 +79,13 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
///<summary> QuestionName</summary>
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
///<summary> TypeValue</summary>
|
||||
public string Type { get; set; }=String.Empty;
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType? LanguageType { get; set; }
|
||||
|
||||
///<summary> TypeValue</summary>
|
||||
public string Type { get; set; }=String.Empty;
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
||||
@@ -90,7 +106,12 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public Guid? Id { get; set; }
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
public bool IsRequired { get; set; }
|
||||
public bool IsEnable { get; set; }
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public Guid? ParentId { get; set; }
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
Task<IResponseOutput> AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure);
|
||||
Task<IResponseOutput> DeleteQCQuestionConfigure(Guid qCQuestionConfigureId);
|
||||
Task<List<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure);
|
||||
Task<PageOutput<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -791,23 +791,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
await _dicomStudyRepository.DeleteAsync(study);
|
||||
|
||||
|
||||
//var DicomSeriess = await _repository.GetQueryable<DicomSeries>().Where(t => t.StudyId == id).Select(x => new
|
||||
//{
|
||||
// x.StudyId,
|
||||
// x.SubjectId,
|
||||
// x.SiteId,
|
||||
// x.TrialId,
|
||||
// x.Id,
|
||||
// x.SubjectVisitId,
|
||||
// x.SeriesTime,
|
||||
// x.IsReading,
|
||||
// x.InstanceCount,
|
||||
// x.SeriesNumber,
|
||||
// StudyCode = x.DicomStudy.StudyCode,
|
||||
// Modalities = x.DicomStudy.Modalities,
|
||||
|
||||
//}).ToListAsync();
|
||||
|
||||
var succeess2 = await _repository.BatchDeleteAsync<DicomInstance>(t => t.StudyId == id);
|
||||
var success3 = await _dicomSeriesrepository.BatchDeleteNoTrackingAsync(t => t.StudyId == id);
|
||||
|
||||
@@ -830,21 +813,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
}
|
||||
});
|
||||
|
||||
//var instanceIdList = await _repository.Where<DicomInstance>(t => t.StudyId == id)
|
||||
// .Select(t => new { InstanceId = t.Id, t.SeriesId, t.StudyId, t.SubjectId, t.SiteId }).ToListAsync();
|
||||
|
||||
//instanceIdList.ForEach(t =>
|
||||
//{
|
||||
// var dicomStudy = new DicomStudy() { Id = t.StudyId, SubjectId = t.SubjectId, TrialId = trialId, SiteId = t.SiteId, SubjectVisitId = subjectVisitId };
|
||||
// var (physicalPath, relativePath) =
|
||||
// FileStoreHelper.GetDicomInstanceFilePath(_hostEnvironment, dicomStudy.TrialId, dicomStudy.SiteId, dicomStudy.SubjectId, dicomStudy.SubjectVisitId, dicomStudy.Id, t.InstanceId);
|
||||
|
||||
// if (System.IO.File.Exists(physicalPath))
|
||||
// {
|
||||
// File.Delete(physicalPath);
|
||||
// }
|
||||
|
||||
//});
|
||||
}
|
||||
|
||||
await _subjectVisitRepository.SaveChangesAsync();
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@@ -47,6 +49,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
Id = x.Id,
|
||||
ParentId = x.ParentId,
|
||||
QuestionName = x.QuestionName,
|
||||
LanguageType=x.LanguageType,
|
||||
TypeValue = x.TypeValue,
|
||||
|
||||
}).ToListAsync();
|
||||
@@ -88,18 +91,19 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<List<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure)
|
||||
public async Task<PageOutput<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure)
|
||||
{
|
||||
|
||||
var QCQuestionQueryable = _qcQuestionRepository
|
||||
.WhereIf(queryQCQuestionConfigure.IsEnable != null,x=>x.IsEnable== queryQCQuestionConfigure.IsEnable)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(queryQCQuestionConfigure.QuestionName), t => t.QuestionName.Contains(queryQCQuestionConfigure.QuestionName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(queryQCQuestionConfigure.Type), t => t.Type.Contains(queryQCQuestionConfigure.Type))
|
||||
.WhereIf(queryQCQuestionConfigure.IsDefeaultViewParent==true,t=>t.ParentId==null)
|
||||
.WhereIf(queryQCQuestionConfigure.LanguageType!=null, t =>t.LanguageType== queryQCQuestionConfigure.LanguageType)
|
||||
.WhereIf(queryQCQuestionConfigure.IsDefeaultViewParent==true,t=>t.ParentId==null)
|
||||
.OrderBy(t=>t.ShowOrder)
|
||||
.ProjectTo<QCQuestionConfigureView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await QCQuestionQueryable.ToListAsync();
|
||||
return await QCQuestionQueryable.ToPagedListAsync(queryQCQuestionConfigure.PageIndex, queryQCQuestionConfigure.PageSize, queryQCQuestionConfigure.SortField.IsNullOrEmpty()?nameof(queryQCQuestionConfigure.QuestionName): queryQCQuestionConfigure.SortField, queryQCQuestionConfigure.Asc);
|
||||
}
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure)
|
||||
@@ -145,11 +149,20 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
var question = new List<QCQuestionView>();
|
||||
if (inDto.TrialId!= null)
|
||||
{
|
||||
question = await _trialQCQuestionRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsEnable).OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
question = await _trialQCQuestionRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsEnable).OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>
|
||||
(_mapper.ConfigurationProvider, new
|
||||
{
|
||||
isEn_Us = _userInfo.IsEn_Us
|
||||
|
||||
}).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
question=await _qcQuestionRepository.Where(x=>x.IsEnable).OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
question=await _qcQuestionRepository.Where(x=>x.IsEnable).OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>(_mapper.ConfigurationProvider, new
|
||||
{
|
||||
isEn_Us = _userInfo.IsEn_Us
|
||||
|
||||
}).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,9 +43,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(queryTrialQCQuestionConfigure.Type), t => t.Type.Contains(queryTrialQCQuestionConfigure.Type))
|
||||
.WhereIf(queryTrialQCQuestionConfigure.IsEnable != null, t => t.IsEnable == queryTrialQCQuestionConfigure.IsEnable)
|
||||
.WhereIf(queryTrialQCQuestionConfigure.IsRequired != null, t => t.IsRequired == queryTrialQCQuestionConfigure.IsRequired)
|
||||
.WhereIf(queryTrialQCQuestionConfigure.LanguageType != null, t => t.LanguageType == queryTrialQCQuestionConfigure.LanguageType)
|
||||
|
||||
|
||||
.ProjectTo<TrialQCQuestionConfigureView>(_mapper.ConfigurationProvider);
|
||||
.ProjectTo<TrialQCQuestionConfigureView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var list = await trialQCQuestionQueryable.OrderBy(t => t.ShowOrder).ToListAsync();
|
||||
|
||||
@@ -81,7 +82,11 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
var initList = await _trialQcQuestionRepository.Where(t => t.TrialId == trialQCQuestionFilterSelect.TrialId)
|
||||
.WhereIf(trialQCQuestionFilterSelect.TypeArray.Count() > 0, t => trialQCQuestionFilterSelect.TypeArray.Contains(t.Type))
|
||||
.WhereIf(trialQCQuestionFilterSelect.Id != null, t => t.Id != trialQCQuestionFilterSelect.Id && t.ParentId != trialQCQuestionFilterSelect.Id)
|
||||
.OrderBy(t => t.ShowOrder).ProjectTo<TrialQCQuestionSelect>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
.OrderBy(t => t.ShowOrder).ProjectTo<TrialQCQuestionSelect>(_mapper.ConfigurationProvider, new
|
||||
{
|
||||
isEn_Us = _userInfo.IsEn_Us
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
//父亲的序号肯定要比自己小
|
||||
if (trialQCQuestionFilterSelect.Id != null)
|
||||
|
||||
@@ -252,7 +252,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
|
||||
string token = string.Empty;
|
||||
|
||||
string token = string.Empty;
|
||||
//一致性核查
|
||||
CreateMap<CheckDBModel, CheckViewModel>();
|
||||
|
||||
|
||||
+2
-1
@@ -125,7 +125,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
Id = subjectCriteriaEvaluation.Id,
|
||||
TrialReadingCriterionId = inQuery.TrialReadingCriterionId,
|
||||
|
||||
IsImageFiltering = subjectCriteriaEvaluation.SubjectCriteriaEvaluationVisitFilterList.Any(t => t.ImageFilterState == ImageFilterState.None),
|
||||
IsImageFiltering = subject.SubjectCriteriaEvaluationVisitFilterList.Any(t => t.TrialReadingCriterionId== inQuery.TrialReadingCriterionId
|
||||
&& t.ImageFilterState == ImageFilterState.None),
|
||||
|
||||
IsJoinEvaluation = subjectCriteriaEvaluation.IsJoinEvaluation,
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ namespace IRaCIS.Application.Services
|
||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||
private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
|
||||
private readonly IRepository<PreviousPDF> _previousPDFRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<Dictionary> _dictionaryRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
|
||||
|
||||
public ClinicalDataSetService(IRepository<SubjectVisit> subjectVisitRepository,
|
||||
@@ -25,7 +26,8 @@ namespace IRaCIS.Application.Services
|
||||
IRepository<ClinicalDataTrialSet> ClinicalDataTrialSetRepository,
|
||||
IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
|
||||
IRepository<PreviousPDF> previousPDFRepository,
|
||||
IRepository<Trial> trialRepository
|
||||
IRepository<Dictionary> dictionaryRepository,
|
||||
IRepository<Trial> trialRepository
|
||||
|
||||
|
||||
)
|
||||
@@ -36,7 +38,8 @@ namespace IRaCIS.Application.Services
|
||||
_clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository;
|
||||
_clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository;
|
||||
this._previousPDFRepository = previousPDFRepository;
|
||||
this._trialRepository = trialRepository;
|
||||
this._dictionaryRepository = dictionaryRepository;
|
||||
this._trialRepository = trialRepository;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,13 +54,17 @@ namespace IRaCIS.Application.Services
|
||||
public async Task<IResponseOutput> AddOrUpdateClinicalDataSystemSet(ClinicalDataSystemSetAddOrEdit indto)
|
||||
{
|
||||
|
||||
var existsQuery = _clinicalDataSystemSetRepository
|
||||
var dictionary = await _dictionaryRepository.Where(x => x.Parent.Code == "ClinicalDataType" && x.Code == indto.ClinicalDataSetEnum.ToString()).FirstNotNullAsync();
|
||||
indto.ClinicalDataSetName = dictionary.ValueCN;
|
||||
indto.ClinicalDataSetEnName = dictionary.Value;
|
||||
var existsQuery = _clinicalDataSystemSetRepository
|
||||
.WhereIf(indto.Id != null, x => x.Id != indto.Id)
|
||||
.Where(x => x.ClinicalDataSetName == indto.ClinicalDataSetName);
|
||||
.Where(x => x.ClinicalDataSetName == indto.ClinicalDataSetName||x.ClinicalDataSetEnName==indto.ClinicalDataSetEnName);
|
||||
|
||||
if (await existsQuery.AnyAsync())
|
||||
{
|
||||
return ResponseOutput.NotOk("存在同类型的临床数据,操作失败");
|
||||
//---存在同类型的临床数据,操作失败
|
||||
return ResponseOutput.NotOk(_localizer["ClinicalDataSet_DupTypeFail"]);
|
||||
}
|
||||
|
||||
indto.CriterionEnumListStr= $"|{String.Join('|', indto.CriterionEnumList)}|";
|
||||
@@ -124,11 +131,12 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
var existsQuery = _clinicalDataTrialSetRepository
|
||||
.WhereIf(indto.Id != null, x => x.Id != indto.Id)
|
||||
.Where(x => x.ClinicalDataSetName == indto.ClinicalDataSetName && x.TrialId == indto.TrialId);
|
||||
.Where(x => (x.ClinicalDataSetName == indto.ClinicalDataSetName||x.ClinicalDataSetEnName==indto.ClinicalDataSetEnName) && x.TrialId == indto.TrialId);
|
||||
|
||||
if (await existsQuery.AnyAsync())
|
||||
{
|
||||
return ResponseOutput.NotOk("存在同类型的临床数据,操作失败");
|
||||
//---存在同类型的临床数据,操作失败
|
||||
return ResponseOutput.NotOk(_localizer["ClinicalDataSet_DupTypeFail"]);
|
||||
}
|
||||
|
||||
//indto.CriterionEnumListStr = $"|{String.Join('|', indto.CriterionEnumList)}|";
|
||||
@@ -272,6 +280,7 @@ namespace IRaCIS.Application.Services
|
||||
ClinicalDataSetName = x.ClinicalDataSetName,
|
||||
ClinicalDataLevel = x.ClinicalDataLevel,
|
||||
ClinicalUploadType = x.ClinicalUploadType,
|
||||
ClinicalDataSetEnName=x.ClinicalDataSetEnName,
|
||||
UploadRole = x.UploadRole,
|
||||
FileName = x.FileName,
|
||||
Path = x.Path,
|
||||
|
||||
@@ -83,7 +83,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (await existsQuery.AnyAsync())
|
||||
{
|
||||
return ResponseOutput.NotOk("存在同类型的临床数据");
|
||||
//---存在同类型的临床数据,操作失败
|
||||
return ResponseOutput.NotOk(_localizer["ReadingClinicalData_DupTypeFail"]);
|
||||
}
|
||||
var clinicalDataTrialSet = (await _clinicalDataTrialSetRepository.Where(x => x.Id == indto.ClinicalDataTrialSetId).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
@@ -191,8 +192,9 @@ namespace IRaCIS.Application.Services
|
||||
.Select(x => new GetCRCClinicalDataOutDto()
|
||||
{
|
||||
Id = x.Id,
|
||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName.LanguageName(x.ClinicalDataTrialSet.ClinicalDataSetEnName, _userInfo.IsEn_Us) ,
|
||||
ClinicalUploadType = x.ClinicalDataTrialSet.ClinicalUploadType,
|
||||
ClinicalDataSetEnName=x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSet.Id,
|
||||
FileName = x.ClinicalDataTrialSet.FileName,
|
||||
UploadRole = x.ClinicalDataTrialSet.UploadRole,
|
||||
@@ -280,7 +282,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (data.ReadingClinicalDataState != ReadingClinicalDataStatus.HaveChecked)
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前临床数据状态不是已核查状态,不允许签名!");
|
||||
//---当前临床数据状态不是已核查状态,不允许签名!
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingClinicalData_Unchecked"]);
|
||||
}
|
||||
data.IsSign = true;
|
||||
data.ReadingClinicalDataState = ReadingClinicalDataStatus.HaveSigned;
|
||||
@@ -482,7 +485,8 @@ namespace IRaCIS.Application.Services
|
||||
.Select(x => new GetTrialClinicalDataSelectOutDto()
|
||||
{
|
||||
ClinicalDataLevel = x.ClinicalDataLevel,
|
||||
ClinicalDataSetName = x.ClinicalDataSetName,
|
||||
ClinicalDataSetName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||
ClinicalDataSetEnName=x.ClinicalDataSetEnName,
|
||||
ClinicalUploadType = x.ClinicalUploadType,
|
||||
FileName = x.FileName,
|
||||
Path = x.Path,
|
||||
@@ -625,7 +629,8 @@ namespace IRaCIS.Application.Services
|
||||
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||
SubjectId = x.SubjectId,
|
||||
ReadingId = x.ReadingId,
|
||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||
ClinicalDataSetEnName=x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName.LanguageName(x.ClinicalDataTrialSet.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSetId,
|
||||
IsSign = x.IsSign,
|
||||
ClinicalUploadType = x.ClinicalDataTrialSet.ClinicalUploadType,
|
||||
@@ -694,7 +699,8 @@ namespace IRaCIS.Application.Services
|
||||
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||
SubjectId = x.SubjectId,
|
||||
ReadingId = x.ReadingId,
|
||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName.LanguageName(x.ClinicalDataTrialSet.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||
ClinicalDataSetEnName =x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSetId,
|
||||
IsSign = x.IsSign,
|
||||
ClinicalUploadType = x.ClinicalDataTrialSet.ClinicalUploadType,
|
||||
|
||||
@@ -19,10 +19,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -83,10 +88,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
@@ -216,7 +226,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
public class GetTrialClinicalDataSystemIndto
|
||||
{
|
||||
/// <summary>
|
||||
@@ -224,10 +239,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel? ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel? ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -259,10 +279,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel? ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel? ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -67,8 +67,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public class GetCriterionLesionTypeInDto
|
||||
{
|
||||
public Guid CriterionId { get; set; }
|
||||
}
|
||||
public Guid? SystemCriterionId { get; set; }
|
||||
|
||||
public Guid? TrialCriterionId { get; set; }
|
||||
}
|
||||
|
||||
///<summary>CriterionNidusQuery 列表查询参数模型</summary>
|
||||
public class CriterionNidusQuery
|
||||
@@ -197,8 +199,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
}
|
||||
|
||||
public class CriterionNidusData : CriterionNidus
|
||||
{
|
||||
public class CriterionNidusData : CriterionNidusSystem
|
||||
{
|
||||
public Guid OriginalId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public bool IsConvertedTask { get; set; }
|
||||
|
||||
public bool IsAnalysisCreate { get; set; }
|
||||
public Guid? BeforeConvertedTaskId { get; set; }
|
||||
|
||||
public bool IsAnalysisCreate { get; set; }
|
||||
|
||||
public bool? IsSelfAnalysis { get; set; }
|
||||
|
||||
@@ -294,8 +296,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public Func<ChangeAllTaskDto,Task> ChangeAllTaskFun { get; set; }
|
||||
|
||||
public bool IsConvertedTask { get; set; } = false;
|
||||
}
|
||||
public bool? IsConvertedTask { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是正在转化
|
||||
/// </summary>
|
||||
public bool IsBeTransforming { get; set; } = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -76,6 +76,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传方式
|
||||
@@ -311,6 +316,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 下拉ID
|
||||
/// </summary>
|
||||
@@ -472,6 +482,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
|
||||
@@ -182,7 +182,19 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public List<VisitTaskInfo> VisitTaskList { get; set; }
|
||||
|
||||
public List<ReadingReportDto> TaskQuestions { get; set; }
|
||||
}
|
||||
|
||||
public List<LesionDto> LesionCountList { get; set; } = new List<LesionDto>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class LesionDto
|
||||
{
|
||||
public LesionType? LesionType { get; set; }
|
||||
|
||||
public int Count { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class VisitTaskGroupAnswerDto
|
||||
{
|
||||
@@ -1224,6 +1236,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public GlobalReadingShowType GlobalReadingShowType { get; set; } = GlobalReadingShowType.NotShow;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 问题类型
|
||||
/// </summary>
|
||||
@@ -1247,10 +1261,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public JudgeTypeEnum JudgeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数值类型
|
||||
@@ -1640,7 +1656,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public class GetReportVerifyInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public bool IsConvertTask { get; set; }
|
||||
|
||||
public Guid? BeforeConvertedTaskId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -540,10 +540,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
@@ -570,8 +575,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public bool? IsConfirm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
public List<ReadingMedicineQuestion> Childrens { get; set; }
|
||||
|
||||
public List<ReadingMedicineQuestion> Childrens { get; set; }
|
||||
}
|
||||
|
||||
public class TaskInfo
|
||||
@@ -658,7 +668,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
public string Answer { get; set; }
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
|
||||
public string Answer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
|
||||
@@ -22,7 +22,13 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string ParentTriggerValue { get; set; } = string.Empty;
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType? LanguageType { get; set; }
|
||||
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public CriterionType? CurrentCriterionType { get; set; }
|
||||
@@ -50,10 +56,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
@@ -163,10 +174,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是必须
|
||||
/// </summary>
|
||||
public bool IsRequired { get; set; }
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是必须
|
||||
/// </summary>
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
@@ -248,12 +264,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -309,7 +328,12 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType? LanguageType { get; set; }
|
||||
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
@@ -329,7 +353,12 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public string Type { get; set; }
|
||||
public string? ParentTriggerValue { get; set; } = string.Empty;
|
||||
public string QuestionName { get; set; }
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
public string TypeValue { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
@@ -156,8 +156,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public class GetAssessTypeInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid CriterionId { get; set; }
|
||||
|
||||
public Guid? SystemCriterionId { get; set; }
|
||||
|
||||
public Guid? TrialCriterionId { get; set; }
|
||||
|
||||
public string ParentCode { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -807,6 +809,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public GlobalReadingShowType GlobalReadingShowType { get; set; } = GlobalReadingShowType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 转化显示类型
|
||||
/// </summary>
|
||||
public ConvertShowType ConvertShowType { get; set; } = ConvertShowType.All;
|
||||
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
/// </summary>
|
||||
@@ -1090,6 +1097,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public GlobalReadingShowType GlobalReadingShowType { get; set; } = GlobalReadingShowType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 转化显示类型
|
||||
/// </summary>
|
||||
public ConvertShowType ConvertShowType { get; set; } = ConvertShowType.All;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
@@ -1574,6 +1586,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public GlobalReadingShowType GlobalReadingShowType { get; set; } = GlobalReadingShowType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 转化显示类型
|
||||
/// </summary>
|
||||
public ConvertShowType ConvertShowType { get; set; } = ConvertShowType.All;
|
||||
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
/// </summary>
|
||||
@@ -1737,7 +1754,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public GlobalReadingShowType GlobalReadingShowType { get; set; } = GlobalReadingShowType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// 转化显示类型
|
||||
/// </summary>
|
||||
public ConvertShowType ConvertShowType { get; set; } = ConvertShowType.All;
|
||||
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
/// </summary>
|
||||
public string DefaultValue { get; set; } =string.Empty;
|
||||
|
||||
+15
-14
@@ -28,7 +28,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository;
|
||||
private readonly IRepository<ReadingGlobalTaskInfo> _readingGlobalTaskInfoRepository;
|
||||
private readonly IRepository<ReadingOncologyTaskInfo> _readingOncologyTaskInfoRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
|
||||
private readonly IReadingImageTaskService _iReadingImageTaskService;
|
||||
private readonly IRepository<User> _userTaskRepository;
|
||||
@@ -49,7 +49,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
||||
IRepository<ReadingGlobalTaskInfo> readingGlobalTaskInfoRepository,
|
||||
IRepository<ReadingOncologyTaskInfo> readingOncologyTaskInfoRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<User> userTaskRepository,
|
||||
IVisitTaskService visitTaskService,
|
||||
IRepository<TaskMedicalReview> taskMedicalReviewRepository,
|
||||
@@ -355,18 +355,19 @@ namespace IRaCIS.Core.Application.Service
|
||||
from leftquestionAnswer in questionAnswerTemp.DefaultIfEmpty()
|
||||
select new ReadingMedicineQuestion()
|
||||
{
|
||||
Id = data.Id,
|
||||
Type = data.Type,
|
||||
ParentTriggerValue = data.ParentTriggerValue,
|
||||
IsEnable = data.IsEnable,
|
||||
IsConfirm = data.IsConfirm,
|
||||
QuestionName = data.QuestionName,
|
||||
IsRequired = data.IsRequired,
|
||||
ShowOrder = data.ShowOrder,
|
||||
ParentId = data.ParentId,
|
||||
TypeValue = data.TypeValue,
|
||||
Answer = leftquestionAnswer.Answer
|
||||
};
|
||||
Id = data.Id,
|
||||
Type = data.Type,
|
||||
ParentTriggerValue = data.ParentTriggerValue,
|
||||
LanguageType = data.LanguageType,
|
||||
IsEnable = data.IsEnable,
|
||||
IsConfirm = data.IsConfirm,
|
||||
QuestionName = data.QuestionName,
|
||||
IsRequired = data.IsRequired,
|
||||
ShowOrder = data.ShowOrder,
|
||||
ParentId = data.ParentId,
|
||||
TypeValue = data.TypeValue,
|
||||
Answer = leftquestionAnswer.Answer
|
||||
};
|
||||
|
||||
var questionList = await questionQuery.OrderBy(x=>x.ShowOrder).ToListAsync();
|
||||
|
||||
|
||||
+46
-19
@@ -1,4 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MassTransit;
|
||||
@@ -52,13 +52,14 @@ namespace IRaCIS.Core.Application.Service
|
||||
var query = _readingMedicineSystemQuestionRepository.AsQueryable()
|
||||
.WhereIf(!inDto.TypeValue.IsNullOrEmpty(), x => x.TypeValue.Contains(inDto.TypeValue))
|
||||
.WhereIf(!inDto.ParentTriggerValue.IsNullOrEmpty(), x => x.ParentTriggerValue.Contains(inDto.ParentTriggerValue))
|
||||
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName))
|
||||
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName) )
|
||||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
|
||||
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
|
||||
.WhereIf(inDto.CurrentCriterionType!=null,x=>x.CriterionTypeEnum==null||x.CriterionTypeEnum==inDto.CurrentCriterionType)
|
||||
.WhereIf(inDto.CriterionTypeEnum != null, x => x.CriterionTypeEnum==inDto.CriterionTypeEnum)
|
||||
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.CriterionTypeEnum== criterionEnum || x.IsGeneral==true)
|
||||
.WhereIf(inDto.IsGeneral != null, x => x.IsGeneral == inDto.IsGeneral)
|
||||
.WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType.Value)
|
||||
.ProjectTo<ReadingMedicineSystemQuestionView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
|
||||
|
||||
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize,inDto.SortField,inDto.Asc);
|
||||
@@ -86,6 +87,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
Id = x.Id,
|
||||
QuestionName = x.QuestionName,
|
||||
LanguageType =x.LanguageType,
|
||||
TypeValue = x.TypeValue,
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
}).ToListAsync();
|
||||
@@ -107,7 +109,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
if (await existsQuery.AnyAsync())
|
||||
{
|
||||
return ResponseOutput.NotOk("当前问题序号存在重复");
|
||||
//---当前问题序号存在重复
|
||||
return ResponseOutput.NotOk(_localizer["ReadingMed_QNumDup"]);
|
||||
}
|
||||
|
||||
//inDto.CriterionEnumStr = $"|{String.Join('|', inDto.CriterionEnumList)}|";
|
||||
@@ -127,7 +130,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
if (await _readingMedicineSystemQuestionRepository.AnyAsync(x => x.ParentId == id))
|
||||
{
|
||||
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
|
||||
//---此问题存在子问题,请先删除子问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingMed_HasSubQ"]);
|
||||
}
|
||||
var success = await _readingMedicineSystemQuestionRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
var result = await _readingMedicineSystemQuestionRepository.SaveChangesAsync();
|
||||
@@ -153,6 +157,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName))
|
||||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
|
||||
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
|
||||
.WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType)
|
||||
.ProjectTo<ReadingMedicineTrialQuestionView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
|
||||
|
||||
|
||||
@@ -189,6 +194,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
Id = x.Id,
|
||||
QuestionName = x.QuestionName,
|
||||
LanguageType=x.LanguageType,
|
||||
TypeValue = x.TypeValue,
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
}).ToListAsync();
|
||||
@@ -207,7 +213,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
var trialQuestionList = await _readingMedicineTrialQuestionRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == inDto.TrialReadingCriterionId)
|
||||
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
|
||||
.ProjectTo<GetMedicineQuestionPreviewOutDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
.ProjectTo<GetMedicineQuestionPreviewOutDto>(_mapper.ConfigurationProvider, new
|
||||
{
|
||||
isEn_Us = _userInfo.IsEn_Us
|
||||
|
||||
})
|
||||
.OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
List<GetMedicineQuestionPreviewOutDto> readingQuestionList = trialQuestionList.Where(x => x.ParentId == null).ToList();
|
||||
readingQuestionList.ForEach(x =>
|
||||
@@ -234,7 +246,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
if (await existsQuery.AnyAsync())
|
||||
{
|
||||
return ResponseOutput.NotOk("当前问题序号存在重复");
|
||||
//---当前问题序号存在重复
|
||||
return ResponseOutput.NotOk(_localizer["ReadingMed_QNumDup"]);
|
||||
}
|
||||
var entity = await _readingMedicineTrialQuestionRepository.InsertOrUpdateAsync(inDto);
|
||||
await _readingMedicineTrialQuestionRepository.SaveChangesAsync();
|
||||
@@ -253,7 +266,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
if (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.ParentId == inDto.Id))
|
||||
{
|
||||
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
|
||||
//---此问题存在子问题,请先删除子问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingMed_HasSubQ"]);
|
||||
}
|
||||
var success = await _readingMedicineTrialQuestionRepository.DeleteFromQueryAsync(t => t.Id == inDto.Id);
|
||||
var result = await _readingMedicineTrialQuestionRepository.SaveChangesAsync();
|
||||
@@ -289,18 +303,21 @@ namespace IRaCIS.Core.Application.Service
|
||||
}).ToListAsync();
|
||||
if (readingMedicineQuestionList.Count == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前未添加医学审核问题。请先添加医学审核问题,再进行确认。");
|
||||
//---当前未添加医学审核问题。请先添加医学审核问题,再进行确认。
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_NoMedQ"]);
|
||||
}
|
||||
|
||||
if (readingMedicineQuestionList.Count() != readingMedicineQuestionList.Select(t => t.ShowOrder).Distinct().Count())
|
||||
{
|
||||
throw new BusinessValidationFailedException("影像医学审核问题显示序号不能重复。");
|
||||
//---影像医学审核问题显示序号不能重复。
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_MedQNumDup"]);
|
||||
}
|
||||
|
||||
|
||||
if (readingMedicineQuestionList.Where(t => t.ParentShowOrder != null).Any(t => t.ParentShowOrder > t.ShowOrder))
|
||||
{
|
||||
throw new BusinessValidationFailedException("父问题的显示序号要比子问题的显示序号小,请确认。");
|
||||
//---父问题的显示序号要比子问题的显示序号小,请确认。
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_ParentNumSmall"]);
|
||||
}
|
||||
|
||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => new
|
||||
@@ -316,17 +333,20 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
if (criterionInfo.IsGlobalReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Global))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前标准启用了全局阅片,但未配置全局医学审核问题");
|
||||
//---当前标准启用了全局阅片,但未配置全局医学审核问题
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_GlobalQNotConfig"]);
|
||||
}
|
||||
|
||||
if (criterionInfo.IsArbitrationReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Judge))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前标准启用了仲裁阅片,但未配置仲裁医学审核问题");
|
||||
//---当前标准启用了仲裁阅片,但未配置仲裁医学审核问题
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_ArbitrateQNotConfig"]);
|
||||
}
|
||||
|
||||
if (criterionInfo.IsOncologyReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Oncology))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前标准启用了肿瘤学阅片,但未配置肿瘤学医学审核问题");
|
||||
//---当前标准启用了肿瘤学阅片,但未配置肿瘤学医学审核问题
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_TumorQNotConfig"]);
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
@@ -356,18 +376,21 @@ namespace IRaCIS.Core.Application.Service
|
||||
}).ToListAsync();
|
||||
if (readingMedicineQuestionList.Count == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前未添加医学审核问题。请先添加医学审核问题,再进行确认。");
|
||||
//---当前未添加医学审核问题。请先添加医学审核问题,再进行确认。
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_NoMedQ"]);
|
||||
}
|
||||
|
||||
if (readingMedicineQuestionList.Count() != readingMedicineQuestionList.Select(t => t.ShowOrder).Distinct().Count())
|
||||
{
|
||||
throw new BusinessValidationFailedException("影像医学审核问题显示序号不能重复。");
|
||||
//---影像医学审核问题显示序号不能重复。
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_MedQNumDup"]);
|
||||
}
|
||||
|
||||
|
||||
if (readingMedicineQuestionList.Where(t => t.ParentShowOrder != null).Any(t => t.ParentShowOrder > t.ShowOrder))
|
||||
{
|
||||
throw new BusinessValidationFailedException("父问题的显示序号要比子问题的显示序号小,请确认。");
|
||||
//---父问题的显示序号要比子问题的显示序号小,请确认。
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_ParentNumSmall"]);
|
||||
}
|
||||
|
||||
|
||||
@@ -375,17 +398,20 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
if (criterionInfo.IsGlobalReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Global))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前项目启用了全局阅片,但未配置全局医学审核问题");
|
||||
//---当前标准启用了全局阅片,但未配置全局医学审核问题
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_GlobalQNotConfig"]);
|
||||
}
|
||||
|
||||
if (criterionInfo.IsArbitrationReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Judge))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前项目启用了仲裁阅片,但未配置仲裁医学审核问题");
|
||||
//---当前标准启用了仲裁阅片,但未配置仲裁医学审核问题
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_ArbitrateQNotConfig"]);
|
||||
}
|
||||
|
||||
if (criterionInfo.IsOncologyReading && !readingMedicineQuestionList.Any(x => x.ReadingCategory == ReadingCategory.Oncology))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前项目启用了肿瘤学阅片,但未配置肿瘤学医学审核问题");
|
||||
//---当前标准启用了肿瘤学阅片,但未配置肿瘤学医学审核问题
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_TumorQNotConfig"]);
|
||||
}
|
||||
|
||||
|
||||
@@ -442,6 +468,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
Id = NewId.NextGuid(),
|
||||
ShowOrder = x.ShowOrder,
|
||||
IsEnable = x.IsEnable,
|
||||
LanguageType = x.LanguageType,
|
||||
IsRequired = x.IsRequired,
|
||||
QuestionName = x.QuestionName,
|
||||
TrialReadingCriterionId=inDto.TrialReadingCriterionId,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//--------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2022-08-12 14:07:20
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
@@ -27,15 +27,19 @@ namespace IRaCIS.Core.Application.Service
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly IRepository<OrganTrialInfo> _organTrialInfoRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
||||
private readonly IRepository<CriterionNidus> _criterionNidusRepository;
|
||||
private readonly IRepository<CriterionNidusSystem> _criterionNidusRepository;
|
||||
private readonly IRepository<CriterionNidusTrial> _criterionNidusTrialRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository;
|
||||
|
||||
public OrganInfoService(
|
||||
public OrganInfoService(
|
||||
IRepository<OrganInfo> organInfoRepository,
|
||||
IRepository<Dictionary> dictionaryRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<OrganTrialInfo> organTrialInfoRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial,
|
||||
IRepository<CriterionNidus> criterionNidusRepository
|
||||
IRepository<CriterionNidusTrial> criterionNidusTrialRepository,
|
||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
||||
IRepository<CriterionNidusSystem> criterionNidusRepository
|
||||
)
|
||||
{
|
||||
_organInfoRepository = organInfoRepository;
|
||||
@@ -44,7 +48,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
this._organTrialInfoRepository = organTrialInfoRepository;
|
||||
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
||||
this._criterionNidusRepository = criterionNidusRepository;
|
||||
}
|
||||
this._criterionNidusTrialRepository = criterionNidusTrialRepository;
|
||||
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
||||
}
|
||||
|
||||
|
||||
#region 系统器官
|
||||
@@ -146,7 +152,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
join trialData in _organTrialInfoRepository.AsQueryable().Where( x => x.IsEnable&&x.TrialCriterionId== trialReadingCriterionId)
|
||||
on data.Id equals trialData.OrganInfoId
|
||||
join criterionNidus in _criterionNidusRepository.AsQueryable().Where(x=>x.CriterionId== trialReadingCriterionId)
|
||||
join criterionNidus in _criterionNidusTrialRepository.AsQueryable().Where(x=>x.CriterionId== trialReadingCriterionId)
|
||||
on data.OrganType equals criterionNidus.OrganType
|
||||
select new ReadingOrganDto()
|
||||
{
|
||||
@@ -203,7 +209,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
if (inDto.LesionType != null)
|
||||
{
|
||||
var criterion = await _readingQuestionCriterionTrial.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||
organs = await _criterionNidusRepository.Where(x => x.CriterionId == (criterion == null ? default(Guid) : criterion.Id) && x.LesionType == inDto.LesionType)
|
||||
organs = await _criterionNidusTrialRepository.Where(x => x.CriterionId == (criterion == null ? default(Guid) : criterion.Id) && x.LesionType == inDto.LesionType)
|
||||
.Select(x => x.OrganType).ToListAsync();
|
||||
}
|
||||
|
||||
@@ -315,7 +321,15 @@ namespace IRaCIS.Core.Application.Service
|
||||
public async Task<List<OrganDictionary>> GetCriterionLesionType(GetCriterionLesionTypeInDto inDto)
|
||||
{
|
||||
var dicNums = new List<string>();
|
||||
dicNums = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.CriterionId).Select(x => ((int)x.LesionType).ToString()).Distinct().ToListAsync();
|
||||
if (inDto.TrialCriterionId != null)
|
||||
{
|
||||
dicNums = await _criterionNidusTrialRepository.Where(x => x.CriterionId == inDto.TrialCriterionId).Select(x => ((int)x.LesionType).ToString()).Distinct().ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
dicNums = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => ((int)x.LesionType).ToString()).Distinct().ToListAsync();
|
||||
}
|
||||
|
||||
var dictionaryId = await _dictionaryRepository.Where(x => x.Code == "LesionType").Select(x => x.Id).FirstOrDefaultAsync();
|
||||
|
||||
var result = await _dictionaryRepository.Where(x => x.ParentId == dictionaryId && dicNums.Contains(x.Code)).ProjectTo<OrganDictionary>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
@@ -332,11 +346,19 @@ namespace IRaCIS.Core.Application.Service
|
||||
public async Task<List<CriterionNidusView>> GetCriterionNidusList(CriterionNidusQuery inQuery)
|
||||
{
|
||||
|
||||
var criterionNidusQueryable = _criterionNidusRepository
|
||||
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider);
|
||||
if (await _readingQuestionCriterionSystemRepository.AnyAsync(x => x.Id == inQuery.CriterionId))
|
||||
{
|
||||
return await _criterionNidusRepository
|
||||
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
return await _criterionNidusTrialRepository
|
||||
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
return await criterionNidusQueryable.ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -350,7 +372,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
if (await _criterionNidusRepository.AnyAsync(x => x.OrganType == inDto.OrganType && x.LesionType == inDto.LesionType && x.CriterionId == inDto.CriterionId && x.Id != inDto.Id))
|
||||
{
|
||||
throw new BusinessValidationFailedException("存在相同的数据,操作失败");
|
||||
//---存在相同的数据,操作失败
|
||||
throw new BusinessValidationFailedException(_localizer["OrganInfo_DuplicateData"]);
|
||||
}
|
||||
var entity = await _criterionNidusRepository.InsertOrUpdateAsync(inDto, true);
|
||||
|
||||
@@ -418,20 +441,22 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
inDto.SystemCriterionId = readingQuestionCriterionTrial.ReadingQuestionCriterionSystemId;
|
||||
}
|
||||
await _criterionNidusRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterionId);
|
||||
List<CriterionNidusData> criterionNidusList = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => new CriterionNidusData()
|
||||
await _criterionNidusTrialRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterionId);
|
||||
|
||||
|
||||
List<CriterionNidusTrial> criterionNidusList = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => new CriterionNidusTrial()
|
||||
{
|
||||
Id = x.Id,
|
||||
CriterionId = trialCriterionId,
|
||||
LesionType = x.LesionType,
|
||||
OriginalId = x.Id,
|
||||
|
||||
OrganType=x.OrganType,
|
||||
IsSystemCriterion=false,
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
criterionNidusList.ForEach(x => x.Id = NewId.NextGuid());
|
||||
|
||||
await _criterionNidusRepository.AddRangeAsync(criterionNidusList);
|
||||
await _criterionNidusTrialRepository.AddRangeAsync(criterionNidusList);
|
||||
await _organTrialInfoRepository.BatchDeleteNoTrackingAsync(x => x.TrialCriterionId == readingQuestionCriterionTrial.Id);
|
||||
List<OrganTrialInfo> organTrialInfoList = await _organInfoRepository.Where(x =>x.SystemCriterionId== inDto.SystemCriterionId).Select(x => new OrganTrialInfo()
|
||||
{
|
||||
|
||||
+38
-20
@@ -19,8 +19,9 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
||||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
||||
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
||||
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
||||
@@ -31,8 +32,9 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||
IRepository<ReadingTableQuestionAnswer> readingTableQuestionAnswerRepository,
|
||||
@@ -46,7 +48,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
||||
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._visitTaskRepository = visitTaskRepository;
|
||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||
this._visitTaskRepository = visitTaskRepository;
|
||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||
this._readingTableQuestionAnswerRepository = readingTableQuestionAnswerRepository;
|
||||
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
||||
@@ -132,8 +135,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.SystemCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess);
|
||||
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryList.Select(x => new ReadingCriterionDictionary
|
||||
{
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryList.Select(x => new ReadingSystemCriterionDictionary
|
||||
{
|
||||
CriterionId = inDto.SystemCriterionId,
|
||||
DictionaryId = x.DictionaryId,
|
||||
IsSystemCriterion = true,
|
||||
@@ -203,8 +206,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.SystemCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess);
|
||||
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryIds.Select(x => new ReadingCriterionDictionary
|
||||
{
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryIds.Select(x => new ReadingSystemCriterionDictionary
|
||||
{
|
||||
CriterionId = inDto.SystemCriterionId,
|
||||
DictionaryId = x,
|
||||
IsSystemCriterion = true,
|
||||
@@ -310,7 +313,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
|
||||
if (await _readingQuestionCriterionTrialRepository.AnyAsync(x => x.IsConfirm && x.ReadingQuestionCriterionSystemId == id))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前标准被引用过了,不可以删除");
|
||||
//---当前标准被引用过了,不可以删除
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingCriterion_Referenced"]);
|
||||
}
|
||||
|
||||
await _readingQuestionCriterionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
@@ -333,7 +337,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
var trialCriterionIds = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.Id).Select(x => x.Id).ToListAsync();
|
||||
if (await _readingTaskQuestionAnswer.AnyAsync(x => trialCriterionIds.Contains(x.ReadingQuestionCriterionTrialId)))
|
||||
{
|
||||
return ResponseOutput.NotOk("此标准在项目里面已被使用,操作失败");
|
||||
//---此标准在项目里面已被使用,操作失败
|
||||
return ResponseOutput.NotOk(_localizer["ReadingCriterion_InUse"]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -473,7 +478,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
|
||||
if (judgeCount == 0 && (inDto.ArbitrationRule == ArbitrationRule.Visit || inDto.ArbitrationRule == ArbitrationRule.Reading))
|
||||
{
|
||||
throw new BusinessValidationFailedException("无裁判问题却有仲裁对象,操作失败");
|
||||
//---无裁判问题却有仲裁对象,操作失败
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingCriterion_ArbitratorWithoutJudgment"]);
|
||||
}
|
||||
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
||||
{
|
||||
@@ -531,7 +537,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetDictionaryFollowVisitUse(SetDictionaryFollowVisitUseInDto inDto)
|
||||
{
|
||||
await _readingCriterionDictionaryRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingCriterionDictionary()
|
||||
await _readingCriterionDictionaryRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingSystemCriterionDictionary()
|
||||
{
|
||||
IsFollowVisitUse = inDto.IsFollowVisitUse
|
||||
});
|
||||
@@ -550,7 +556,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetDictionaryBaseLineUse(SetDictionaryBaseLineUseInDto inDto)
|
||||
{
|
||||
await _readingCriterionDictionaryRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingCriterionDictionary()
|
||||
await _readingCriterionDictionaryRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingSystemCriterionDictionary()
|
||||
{
|
||||
IsBaseLineUse = inDto.IsBaseLineUse
|
||||
});
|
||||
@@ -568,11 +574,23 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
[HttpPost]
|
||||
public async Task<List<CriterionDictionaryInfo>> GetAssessType(GetAssessTypeInDto inDto)
|
||||
{
|
||||
List<CriterionDictionaryInfo> result = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.CriterionId
|
||||
|
||||
if (inDto.SystemCriterionId != null)
|
||||
{
|
||||
return await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.SystemCriterionId
|
||||
)
|
||||
.WhereIf(!inDto.ParentCode.IsNullOrEmpty(), x => x.ParentCode ==inDto.ParentCode)
|
||||
.WhereIf(!inDto.ParentCode.IsNullOrEmpty(), x => x.ParentCode == inDto.ParentCode)
|
||||
.ProjectTo<CriterionDictionaryInfo>(_mapper.ConfigurationProvider).OrderBy(x => x.ParentCode).ThenBy(x => x.ShowOrder).ToListAsync();
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
return await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.SystemCriterionId
|
||||
)
|
||||
.WhereIf(!inDto.ParentCode.IsNullOrEmpty(), x => x.ParentCode == inDto.ParentCode)
|
||||
.ProjectTo<CriterionDictionaryInfo>(_mapper.ConfigurationProvider).OrderBy(x => x.ParentCode).ThenBy(x => x.ShowOrder).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -584,7 +602,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
[HttpPost]
|
||||
public async Task<bool> EditCriterionDictionary(EditCriterionDictionaryInDto inDto)
|
||||
{
|
||||
await _readingCriterionDictionaryRepository.UpdatePartialFromQueryAsync(inDto.Id,x=>new ReadingCriterionDictionary() {
|
||||
await _readingCriterionDictionaryRepository.UpdatePartialFromQueryAsync(inDto.Id,x=>new ReadingSystemCriterionDictionary() {
|
||||
CrterionDictionaryGroup=inDto.CrterionDictionaryGroup
|
||||
});
|
||||
|
||||
@@ -602,7 +620,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.CriterionId && x.ParentCode == inDto.ParentCode);
|
||||
|
||||
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryIds.Select(x => new ReadingCriterionDictionary()
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryIds.Select(x => new ReadingSystemCriterionDictionary()
|
||||
{
|
||||
CriterionId = inDto.CriterionId,
|
||||
DictionaryId = x,
|
||||
@@ -626,7 +644,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
{
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.CriterionId && x.ParentCode == inDto.ParentCode);
|
||||
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryList.Select(x => new ReadingCriterionDictionary()
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryList.Select(x => new ReadingSystemCriterionDictionary()
|
||||
{
|
||||
CriterionId = inDto.CriterionId,
|
||||
DictionaryId = x.DictionaryId,
|
||||
|
||||
+38
-15
@@ -26,7 +26,7 @@ namespace IRaCIS.Application.Services
|
||||
private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
|
||||
private readonly IRepository<Dictionary> _dictionaryRepository;
|
||||
private readonly IReadingImageTaskService _iReadingImageTaskService;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
||||
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
@@ -46,7 +46,7 @@ namespace IRaCIS.Application.Services
|
||||
IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
|
||||
IRepository<Dictionary> dictionaryRepository,
|
||||
IReadingImageTaskService iReadingImageTaskService,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||
IRepository<Trial> trialRepository,
|
||||
@@ -285,7 +285,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionCriterionSystemId == indto.ReadingQuestionCriterionSystemId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("问题编号重复");
|
||||
//---问题编号重复
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
|
||||
}
|
||||
var entity = await _readingQuestionSystemRepository.InsertOrUpdateAsync(indto, true);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
@@ -302,9 +303,16 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.ParentId == id))
|
||||
{
|
||||
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
|
||||
//---此问题存在子问题,请先删除子问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||
}
|
||||
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
|
||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.GroupId == id))
|
||||
{
|
||||
//---此分组已被引用,请先删除被引用的问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
|
||||
}
|
||||
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
var success = await _readingQuestionSystemRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
@@ -382,7 +390,8 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _readingTableQuestionSystemRepository.AnyAsync(x => x.ParentId == Id || x.RelevanceId == Id))
|
||||
{
|
||||
return ResponseOutput.NotOk("当前问题存在子问题 删除失败");
|
||||
//---此问题存在子问题,请先删除子问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||
}
|
||||
|
||||
await _readingTableQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
||||
@@ -406,19 +415,22 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前问题已经设置了裁判标准了,修改失败");
|
||||
//---当前问题已经设置了裁判标准了,修改失败
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_JudgmentSet"]);
|
||||
}
|
||||
}
|
||||
|
||||
if (indto.ParentId == indto.RelevanceId && indto.ParentId != null && indto.ParentTriggerValue != indto.RelevanceValue)
|
||||
{
|
||||
throw new BusinessValidationFailedException("显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败");
|
||||
//---显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_ExcludeWithDependency"]);
|
||||
}
|
||||
|
||||
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.TrialId == indto.TrialId && x.ReadingQuestionCriterionTrialId == indto.ReadingQuestionCriterionTrialId && x.ReadingCriterionPageId == indto.ReadingCriterionPageId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("问题编号重复");
|
||||
//---问题编号重复
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
|
||||
}
|
||||
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
|
||||
@@ -480,14 +492,16 @@ namespace IRaCIS.Application.Services
|
||||
// 防止有脏数据 循环验证 最多10000次
|
||||
if (count >= 10000)
|
||||
{
|
||||
throw new BusinessValidationFailedException("计算依赖循环了!");
|
||||
//---计算依赖循环了!
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CircularDependency"]);
|
||||
}
|
||||
|
||||
var relation = relationList.Where(x=>x.CalculateQuestionList.Any(y=>y.QuestionId== QuestionId||y.TableQuestionId==QuestionId)).ToList();
|
||||
|
||||
if (relation.Select(x => x.QuestionId).ToList().Contains(originalId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("计算依赖循环了!");
|
||||
//---计算依赖循环了!
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CircularDependency"]);
|
||||
}
|
||||
|
||||
else
|
||||
@@ -585,9 +599,16 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.ParentId == id))
|
||||
{
|
||||
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
|
||||
//---此问题存在子问题,请先删除子问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||
}
|
||||
await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.GroupId == id))
|
||||
{
|
||||
//---此分组已被引用,请先删除被引用的问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
|
||||
}
|
||||
await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
var success = await _readingQuestionTrialRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
@@ -676,7 +697,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionId==indto.ReadingQuestionId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("问题编号重复");
|
||||
//---问题编号重复
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
|
||||
}
|
||||
|
||||
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||
@@ -727,7 +749,8 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.ParentId == Id || x.RelevanceId == Id))
|
||||
{
|
||||
return ResponseOutput.NotOk("当前问题存在子问题 删除失败");
|
||||
//---此问题存在子问题,请先删除子问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||
}
|
||||
|
||||
await _readingTableQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
||||
|
||||
+50
-4
@@ -248,18 +248,63 @@ namespace IRaCIS.Application.Services
|
||||
GlobalReadingShowType=y.ReadingQuestionTrial.GlobalReadingShowType,
|
||||
AnswerCombination = y.ReadingQuestionTrial.AnswerCombination,
|
||||
JudgeType = y.ReadingQuestionTrial.JudgeType,
|
||||
Type = y.ReadingQuestionTrial.Type,
|
||||
ShowOrder= y.ReadingQuestionTrial.ShowOrder,
|
||||
Type = y.ReadingQuestionTrial.Type,
|
||||
TypeValue = y.ReadingQuestionTrial.TypeValue,
|
||||
ValueType = y.ReadingQuestionTrial.ValueType,
|
||||
IsJudgeQuestion =y.ReadingQuestionTrial.IsJudgeQuestion,
|
||||
Answer =y.Answer,
|
||||
}).ToList()
|
||||
}).ToListAsync();
|
||||
var globalQuestionList = await _readingQuestionTrialRepository.Where(x => x.GlobalReadingShowType != GlobalReadingShowType.NotShow && x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId).IgnoreAutoIncludes().ToListAsync();
|
||||
|
||||
|
||||
|
||||
|
||||
result.TaskList.ForEach(x =>
|
||||
{
|
||||
x.CrterionDictionaryGroup = ReadingCommon.GetCrterionDictionaryGroup(x.IsConvertedTask);
|
||||
});
|
||||
if (x.BeforeQuestionList.Count() != globalQuestionList.Count())
|
||||
{
|
||||
var beforeQuestionIds = x.BeforeQuestionList.Select(x => x.QuestionId).ToList();
|
||||
|
||||
globalQuestionList.ForEach(y =>
|
||||
{
|
||||
if (!beforeQuestionIds.Contains(y.Id))
|
||||
{
|
||||
x.BeforeQuestionList.Add(new GlobalQuestionInfo()
|
||||
{
|
||||
QuestionId = y.Id,
|
||||
QuestionName = y.QuestionName.LanguageName(y.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionEnName = y.QuestionEnName,
|
||||
AnswerGroup = y.AnswerGroup,
|
||||
QuestionType = y.QuestionType,
|
||||
LimitEdit = y.LimitEdit,
|
||||
MaxAnswerLength = y.MaxAnswerLength,
|
||||
FileType = y.FileType,
|
||||
QuestionGenre = y.QuestionGenre,
|
||||
ShowOrder=y.ShowOrder,
|
||||
DictionaryCode = y.DictionaryCode,
|
||||
GlobalReadingShowType = y.GlobalReadingShowType,
|
||||
AnswerCombination = y.AnswerCombination,
|
||||
JudgeType = y.JudgeType,
|
||||
Type = y.Type,
|
||||
TypeValue = y.TypeValue,
|
||||
ValueType = y.ValueType,
|
||||
IsJudgeQuestion = y.IsJudgeQuestion,
|
||||
Answer = string.Empty,
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
x.BeforeQuestionList = x.BeforeQuestionList.OrderBy(y => y.ShowOrder).ToList();
|
||||
|
||||
});
|
||||
|
||||
var globalReadingQuestion = await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == inDto.VisitTaskId).ToListAsync();
|
||||
var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
|
||||
@@ -300,7 +345,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
result.TaskList.ForEach(x =>
|
||||
{
|
||||
x.AfterQuestionList = x.BeforeQuestionList.Where(x=>x.IsJudgeQuestion).GroupJoin(
|
||||
x.AfterQuestionList = x.BeforeQuestionList.Where(x => x.IsJudgeQuestion)
|
||||
.GroupJoin(
|
||||
globalReadingQuestion
|
||||
, l => new { a = l.QuestionId, b = x.VisitTaskId }
|
||||
, r => new { a = r.QuestionId, b = r.TaskId }
|
||||
@@ -435,7 +481,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
var subjectVisitId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
|
||||
var isBaseLine = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Select(x => x.IsBaseLine).FirstOrDefaultAsync();
|
||||
List<CriterionDictionaryInfo> assessTypeList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == taskInfo.TrialReadingCriterionId
|
||||
List<CriterionDictionaryInfo> assessTypeList = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == taskInfo.TrialReadingCriterionId
|
||||
&& x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess
|
||||
)
|
||||
//.WhereIf(isBaseLine,x=>x.IsBaseLineUse)
|
||||
|
||||
+20
-9
@@ -42,8 +42,9 @@ namespace IRaCIS.Application.Services
|
||||
private readonly IRepository<ReadModule> _readModuleRepository;
|
||||
private readonly IRepository<DicomInstance> _dicomInstanceRepository;
|
||||
private readonly IRepository<OrganInfo> _organInfoRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository;
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository;
|
||||
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
||||
private readonly IRepository<ReadingTableQuestionSystem> _readingTableQuestionSystemRepository;
|
||||
private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
||||
@@ -79,8 +80,9 @@ namespace IRaCIS.Application.Services
|
||||
IRepository<DicomInstance> dicomInstanceRepository,
|
||||
IRepository<OrganInfo> organInfoRepository,
|
||||
IMemoryCache cache,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<TumorAssessment_RECIST1Point1> tumorAssessmentRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IRepository<TumorAssessment_RECIST1Point1> tumorAssessmentRepository,
|
||||
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
|
||||
IRepository<ReadingTableQuestionSystem> readingTableQuestionSystemRepository,
|
||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||
@@ -120,7 +122,9 @@ namespace IRaCIS.Application.Services
|
||||
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
||||
this._readingQuestionSystem = ReadingQuestionSystem;
|
||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||
|
||||
this._readingQuestionSystem = ReadingQuestionSystem;
|
||||
this._noneDicomStudyFileSystem = noneDicomStudyFileSystem;
|
||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||
this._cache = cache;
|
||||
@@ -844,7 +848,6 @@ namespace IRaCIS.Application.Services
|
||||
var organIds = tableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
var organList = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync();
|
||||
return (await this.GetReadingTableQuestion(
|
||||
|
||||
new GetReadingTableQuestionOrAnswerInDto()
|
||||
{
|
||||
TrialReadingCriterionId = taskInfo.TrialReadingCriterionId,
|
||||
@@ -917,9 +920,17 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
|
||||
|
||||
if (inDto.TaskId != null && !taskInfo.IsConvertedTask)
|
||||
if (inDto.TaskId != null )
|
||||
{
|
||||
qusetionList = qusetionList.Where(x => x.QuestionType != QuestionType.IsConverted).OrderBy(x => x.ShowOrder).ToList();
|
||||
if (taskInfo.IsConvertedTask)
|
||||
{
|
||||
qusetionList = qusetionList.Where(x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.AfterShow).OrderBy(x => x.ShowOrder).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
qusetionList = qusetionList.Where(x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.BeforeShow).OrderBy(x => x.ShowOrder).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var usedGuropIds = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupId).ToList();
|
||||
@@ -1174,7 +1185,7 @@ namespace IRaCIS.Application.Services
|
||||
});
|
||||
|
||||
|
||||
answers.Add("LesionType", rowInfo.LesionType.ToString());
|
||||
answers.Add("LesionType", rowInfo.LesionType.GetEnumNullInt());
|
||||
answers.Add("BlindName", rowInfo.BlindName);
|
||||
answers.Add("IsFirstChangeTask", isFirstChangeTask.ToString());
|
||||
answers.Add("FromMark", rowInfo.FromMark);
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
result.OncologyVisits = oncologyVisits;
|
||||
|
||||
List<CriterionDictionaryInfo> assessTypeList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == taskInfo.TrialReadingCriterionId
|
||||
List<CriterionDictionaryInfo> assessTypeList = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == taskInfo.TrialReadingCriterionId
|
||||
&& x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess
|
||||
)
|
||||
.Select(x => new CriterionDictionaryInfo()
|
||||
|
||||
@@ -272,7 +272,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (await _readModuleRepository.AnyAsync(x => x.SubjectVisitId == visit.Id&&x.ModuleType== moduleType && x.TrialReadingCriterionId == dto.TrialReadingCriterionId))
|
||||
{
|
||||
throw new BusinessValidationFailedException($"当前访视已经添加过阅片期");
|
||||
//---当前访视已经添加过阅片期
|
||||
throw new BusinessValidationFailedException(_localizer["ReadModule_AlreadyAdded"]);
|
||||
}
|
||||
var readModuleData = new ReadModule()
|
||||
{
|
||||
@@ -383,7 +384,8 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
return ResponseOutput.NotOk("请先添加全局阅片");
|
||||
//---请先添加全局阅片
|
||||
return ResponseOutput.NotOk(_localizer["ReadModule_AddGlobalFirst"]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -392,7 +394,8 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
return ResponseOutput.NotOk("未找到符合要求的访视");
|
||||
//---未找到符合要求的访视
|
||||
return ResponseOutput.NotOk(_localizer["ReadModule_VisitNotFound"]);
|
||||
}
|
||||
|
||||
|
||||
@@ -416,18 +419,21 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if(await _repository.Where<ReadingClinicalData>(t => t.ReadingId == readModuleId).AnyAsync(t => t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned))
|
||||
{
|
||||
return ResponseOutput.NotOk("临床资料已签名,不允许删除");
|
||||
//---临床资料已签名,不允许删除
|
||||
return ResponseOutput.NotOk(_localizer["ReadModule_SignedDataCannotDelete"]);
|
||||
}
|
||||
|
||||
//增加标准
|
||||
if (readModule.ModuleType==ModuleTypeEnum.Global&&(await _readModuleRepository.AnyAsync(x=>x.ModuleType==ModuleTypeEnum.Oncology&&x.SubjectVisitId== readModule.SubjectVisitId && x.TrialReadingCriterionId==readModule.TrialReadingCriterionId)))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前访视存在肿瘤学阅片,请先删除肿瘤学阅片");
|
||||
//---当前访视存在肿瘤学阅片,请先删除肿瘤学阅片
|
||||
throw new BusinessValidationFailedException(_localizer["ReadModule_TumorExists"]);
|
||||
}
|
||||
|
||||
if (await _visitTaskRepository.AnyAsync(x => readModuleId==x.SouceReadModuleId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前阅片已生成任务,操作失败。");
|
||||
//---当前阅片已生成任务,操作失败。
|
||||
throw new BusinessValidationFailedException(_localizer["ReadModule_TaskGenerated"]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace IRaCIS.Application.Services
|
||||
var repeatVisitNames = _readModuleRepository.Where(x => x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId && x.ReadingSetType == readingPeriodSet.ReadingSetType && needAddVisitIds.Contains(x.SubjectVisitId)).Select(x => x.Subject.Code + "的" + x.SubjectVisit.VisitName).ToList();
|
||||
if (repeatVisitNames.Count != 0)
|
||||
{
|
||||
return ResponseOutput.NotOk($"{string.Join(",", repeatVisitNames)}已经添加过阅片期,无法设置生效");
|
||||
return ResponseOutput.NotOk(_localizer["ReadingPeriodSet_AlreadyAdded", string.Join(",", repeatVisitNames)]);
|
||||
}
|
||||
List<ReadModule> readModules = new List<ReadModule>();
|
||||
foreach (var item in plans)
|
||||
@@ -307,7 +307,8 @@ namespace IRaCIS.Application.Services
|
||||
&& x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && x.TaskState == TaskState.Effect))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前标准阅片已生成任务并且阅片完成,撤销失败。");
|
||||
//---当前标准阅片已生成任务并且阅片完成,撤销失败。
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingPeriodSet_TaskCompletedCannotRevoke"]);
|
||||
}
|
||||
|
||||
|
||||
@@ -422,7 +423,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
pageList.CurrentPageData.ForEach(x =>
|
||||
{
|
||||
x.SubjectVisitName = x.IsGlobal ? "末次访视" : x.SubjectVisitName;
|
||||
//---末次访视
|
||||
x.SubjectVisitName = x.IsGlobal ? _localizer["ReadingPeriodSet_LastVisit"] : x.SubjectVisitName;
|
||||
});
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.SiteCodes, u => u.MapFrom(s => s.ReadingPeriodSites.Select(x => x.TrialSite.TrialSiteCode)))
|
||||
.ForMember(d => d.PlanCount, u => u.MapFrom(s => s.ReadingPeriodPlanList.Count));
|
||||
|
||||
CreateMap<ReadingCriterionDictionary, CriterionDictionaryInfo>()
|
||||
CreateMap<ReadingSystemCriterionDictionary, CriterionDictionaryInfo>()
|
||||
.ForMember(d => d.ChildGroup, u => u.MapFrom(s => s.Dictionary.ChildGroup))
|
||||
.ForMember(d => d.Code, u => u.MapFrom(s => s.Dictionary.Code))
|
||||
.ForMember(d => d.Description, u => u.MapFrom(s => s.Dictionary.Description))
|
||||
@@ -39,16 +39,25 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.Value, u => u.MapFrom(s => s.Dictionary.Value))
|
||||
.ForMember(d => d.ValueCN, u => u.MapFrom(s => s.Dictionary.ValueCN));
|
||||
|
||||
CreateMap<ReadingTrialCriterionDictionary, CriterionDictionaryInfo>()
|
||||
.ForMember(d => d.ChildGroup, u => u.MapFrom(s => s.Dictionary.ChildGroup))
|
||||
.ForMember(d => d.Code, u => u.MapFrom(s => s.Dictionary.Code))
|
||||
.ForMember(d => d.Description, u => u.MapFrom(s => s.Dictionary.Description))
|
||||
.ForMember(d => d.ShowOrder, u => u.MapFrom(s => s.Dictionary.ShowOrder))
|
||||
.ForMember(d => d.ParentCode, u => u.MapFrom(s => s.Dictionary.Parent.Code))
|
||||
.ForMember(d => d.Value, u => u.MapFrom(s => s.Dictionary.Value))
|
||||
.ForMember(d => d.ValueCN, u => u.MapFrom(s => s.Dictionary.ValueCN));
|
||||
|
||||
|
||||
//CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
|
||||
// CreateMap<ReadingClinicalData, GetReadingClinicalDataListOutDto>()
|
||||
//.ForMember(d => d.ClinicalDataLevel, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataLevel))
|
||||
//.ForMember(d => d.ClinicalDataLevelName, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataSetName))
|
||||
//.ForMember(d => d.ClinicalUploadType, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalUploadType));
|
||||
//.ForMember(d => d.FileCount, u => u.MapFrom(s => s.ReadingClinicalDataPDFList.Count()));
|
||||
|
||||
CreateMap<ReadingClinicalDataPDF, GetReadingClinicalDataPDFListOutDto>();
|
||||
//CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
|
||||
// CreateMap<ReadingClinicalData, GetReadingClinicalDataListOutDto>()
|
||||
//.ForMember(d => d.ClinicalDataLevel, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataLevel))
|
||||
//.ForMember(d => d.ClinicalDataLevelName, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataSetName))
|
||||
//.ForMember(d => d.ClinicalUploadType, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalUploadType));
|
||||
//.ForMember(d => d.FileCount, u => u.MapFrom(s => s.ReadingClinicalDataPDFList.Count()));
|
||||
|
||||
CreateMap<ReadingClinicalDataPDF, GetReadingClinicalDataPDFListOutDto>();
|
||||
|
||||
//.ForMember(d => d.SiteNames, u => u.MapFrom(s => s.ReadingPeriodSites.SelectMany(x => x.Site.SiteName).ToList()));
|
||||
|
||||
@@ -238,13 +247,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
//.ForMember(x => x.FileList, y => y.MapFrom(n => n.FileList))
|
||||
.ForMember(x => x.CreateUserName, y => y.MapFrom(n => n.CreateUser.UserName));
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 阅片部位
|
||||
#region 阅片部位
|
||||
|
||||
|
||||
CreateMap<CriterionNidus, CriterionNidusView>();
|
||||
CreateMap<CriterionNidus, CriterionNidusAddOrEdit>().ReverseMap();
|
||||
CreateMap<CriterionNidusTrial, CriterionNidusView>();
|
||||
CreateMap<CriterionNidusSystem, CriterionNidusView>();
|
||||
CreateMap<CriterionNidusSystem, CriterionNidusAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<OrganInfoAddOrEdit, OrganInfo>();
|
||||
CreateMap<OrganInfo, OrganInfoView>();
|
||||
|
||||
+14
-13
@@ -117,19 +117,20 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
}
|
||||
|
||||
ReadingCalculateDto readingData = new ReadingCalculateDto()
|
||||
{
|
||||
SubjectId = visitTask.SubjectId,
|
||||
TaskBlindName = visitTask.TaskBlindName,
|
||||
IsConvertedTask = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Select(x => x.IsConvertedTask).FirstOrDefaultAsync(),
|
||||
VisitTaskId = visitTaskId,
|
||||
SubjectVisitId = visitTask.SourceSubjectVisitId!.Value,
|
||||
QuestionInfo = questionInfos,
|
||||
CriterionId = visitTask.TrialReadingCriterionId,
|
||||
TrialId = visitTask.TrialId,
|
||||
IsAnalysisCreate = visitTask.IsAnalysisCreate,
|
||||
IsSelfAnalysis = visitTask.IsSelfAnalysis,
|
||||
IsBaseLine = subjectVisit!.IsBaseLine,
|
||||
ReadingCalculateDto readingData = new ReadingCalculateDto()
|
||||
{
|
||||
SubjectId = visitTask.SubjectId,
|
||||
TaskBlindName = visitTask.TaskBlindName,
|
||||
IsConvertedTask = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Select(x => x.IsConvertedTask).FirstOrDefaultAsync(),
|
||||
BeforeConvertedTaskId = visitTask.BeforeConvertedTaskId,
|
||||
VisitTaskId = visitTaskId,
|
||||
SubjectVisitId = visitTask.SourceSubjectVisitId!.Value,
|
||||
QuestionInfo = questionInfos,
|
||||
CriterionId = visitTask.TrialReadingCriterionId,
|
||||
TrialId = visitTask.TrialId,
|
||||
IsAnalysisCreate = visitTask.IsAnalysisCreate,
|
||||
IsSelfAnalysis = visitTask.IsSelfAnalysis,
|
||||
IsBaseLine = subjectVisit!.IsBaseLine,
|
||||
DoctorUserId = visitTask.DoctorUserId,
|
||||
TrialReadingCriterionId = visitTask.TrialReadingCriterionId,
|
||||
BaseLineTaskId = baseLinetaskId,
|
||||
|
||||
+447
-207
@@ -100,16 +100,23 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
public async Task<GetReadingReportEvaluationOutDto> GetReadingReportEvaluation(GetReadingReportEvaluationInDto indto)
|
||||
{
|
||||
GetReadingReportEvaluationOutDto result = new GetReadingReportEvaluationOutDto();
|
||||
|
||||
result.CalculateResult = await this.GetReportVerify(new GetReportVerifyInDto()
|
||||
var isConvertTask = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).Select(x => x.IsConvertedTask).FirstNotNullAsync();
|
||||
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).FirstNotNullAsync();
|
||||
result.CalculateResult = await this.GetReportVerify(new GetReportVerifyInDto()
|
||||
{
|
||||
VisitTaskId = indto.VisitTaskId
|
||||
});
|
||||
VisitTaskId = indto.VisitTaskId,
|
||||
IsConvertTask= isConvertTask,
|
||||
BeforeConvertedTaskId =visitTaskInfo.BeforeConvertedTaskId,
|
||||
});
|
||||
|
||||
|
||||
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).FirstNotNullAsync();
|
||||
|
||||
result.ReadingTaskState = visitTaskInfo.ReadingTaskState;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
result.ReadingTaskState = visitTaskInfo.ReadingTaskState;
|
||||
var taskInfoList = await _generalCalculateService.GetReadingReportTaskList(indto.VisitTaskId);
|
||||
|
||||
result.VisitTaskList = taskInfoList;
|
||||
@@ -117,11 +124,20 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId&&x.ShowQuestion!= ShowQuestion.Hide)
|
||||
.WhereIf(isConvertTask,x=>x.ConvertShowType==ConvertShowType.All||x.ConvertShowType==ConvertShowType.AfterShow)
|
||||
.WhereIf(!isConvertTask, x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.BeforeShow)
|
||||
.ToListAsync();
|
||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
var lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto()
|
||||
result.LesionCountList = tableAnsweRowInfos.GroupBy(x => x.LesionType).Select(x => new LesionDto
|
||||
{
|
||||
LesionType = x.Key.Value,
|
||||
Count = x.ToList().Count()
|
||||
}).ToList();
|
||||
|
||||
var lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto()
|
||||
{
|
||||
QuestionId = x.Key.QuestionId,
|
||||
Rowindexs = x.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList()
|
||||
@@ -394,9 +410,26 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
{
|
||||
return new
|
||||
var tumorEvaluate = string.Empty;
|
||||
var readingCalculateDto= await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
|
||||
|
||||
if (!inDto.IsConvertTask)
|
||||
{
|
||||
TumorEvaluate = await this.GetReportTumor(inDto.VisitTaskId),
|
||||
tumorEvaluate = await GetTumor(readingCalculateDto);
|
||||
|
||||
}
|
||||
else if (inDto.BeforeConvertedTaskId != null)
|
||||
{
|
||||
tumorEvaluate = await GetConvertingTumor(readingCalculateDto);
|
||||
}
|
||||
else
|
||||
{
|
||||
tumorEvaluate = await GetIRECSITTargetLesionEvaluate(readingCalculateDto);
|
||||
}
|
||||
|
||||
return new
|
||||
{
|
||||
TumorEvaluate = tumorEvaluate,
|
||||
IsExistDisease = await this.GetReportIsExistDisease(inDto.VisitTaskId),
|
||||
|
||||
};
|
||||
@@ -458,17 +491,23 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.LastVisitiSODChange,GetDecimalNullFun=GetISODChange},
|
||||
|
||||
// 靶病灶评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.TargetLesion,GetStringFun=GetTargetLesionEvaluate},
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.TargetLesion,GetStringFun=GetTargetLesionEvaluate,IsConvertedTask=false},
|
||||
|
||||
// IRECIST靶病灶评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.TargetLesion,GetStringFun=GetIRECISTTargetLesionEvaluate,IsConvertedTask=true},
|
||||
|
||||
// 转化时靶病灶评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.TargetLesion,GetStringFun=GetConvertingTargetLesionEvaluate,IsConvertedTask=true,IsBeTransforming=true},
|
||||
|
||||
//非靶病灶评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.NoTargetLesion,GetStringFun=GetNoTargetLesionEvaluate},
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.NoTargetLesion,GetStringFun=GetNoTargetLesionEvaluate,IsConvertedTask=false},
|
||||
|
||||
//IRECIST非靶病灶评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.NoTargetLesion,GetStringFun=GetIRECISTNoTargetLesionEvaluate,IsConvertedTask=true},
|
||||
|
||||
// 转化时非靶病灶评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.NoTargetLesion,GetStringFun=GetConvertingNoTargetLesionEvaluate,IsConvertedTask=true ,IsBeTransforming=true},
|
||||
|
||||
// IRECIST新靶病灶评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.NewTargetLesion,GetStringFun=GetNewTargetLesionEvaluate,IsConvertedTask=true},
|
||||
|
||||
@@ -484,20 +523,52 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
//IRECIST新病灶评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.NewLesionEvaluation,GetStringFun=GetNewLesionAssessment,IsConvertedTask=true},
|
||||
|
||||
//是否存在新病灶
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.NewLesions,GetStringFun=GetNewLesionEvaluate,IsConvertedTask=false},
|
||||
|
||||
// IRECIST是否存在新病灶 IRECIST
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.NewLesions,GetStringFun=GetNewLesionIRECSITEvaluate,IsConvertedTask=true},
|
||||
|
||||
//是否存在疾病
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.ExistDisease,GetStringFun=GetIsExistDisease},
|
||||
|
||||
//整体肿瘤评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetTumor},
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetTumor,IsConvertedTask=false},
|
||||
|
||||
|
||||
// 转化时整体肿瘤评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetConvertingTumor,IsConvertedTask=true,IsBeTransforming=true},
|
||||
|
||||
|
||||
//IRECIST整体肿瘤评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetIRECSITTargetLesionEvaluate,IsConvertedTask=true},
|
||||
|
||||
//是否存在疾病
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.ExistDisease,GetStringFun=GetIsExistDisease},
|
||||
|
||||
|
||||
};
|
||||
|
||||
// 过滤转化的
|
||||
|
||||
calculateList = calculateList.Where(x => x.IsConvertedTask == inDto.IsConvertedTask).ToList();
|
||||
calculateList = calculateList.Where(x => x.IsConvertedTask == inDto.IsConvertedTask||x.IsConvertedTask==null).ToList();
|
||||
if (inDto.IsConvertedTask)
|
||||
{
|
||||
|
||||
|
||||
if (inDto.BeforeConvertedTaskId != null)
|
||||
{
|
||||
List<QuestionType> questionTypes = calculateList.Where(x => x.IsBeTransforming).Select(x => x.QuestionType).ToList();
|
||||
|
||||
// 排除这几个 且不为正在转化的
|
||||
calculateList = calculateList.Where(x => !(questionTypes.Contains(x.QuestionType)&& x.IsBeTransforming == false)).ToList();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
calculateList = calculateList.Where(x => x.IsBeTransforming == false).ToList();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 没有靶病灶只计算最后几个
|
||||
if (inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).Sum(x => x.TableRowInfoList.Count()) == 0)
|
||||
@@ -660,15 +731,15 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取报告整体整体评估
|
||||
/// </summary>
|
||||
/// <param name="visitTaskId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetReportTumor(Guid visitTaskId)
|
||||
{
|
||||
return await GetTumor(await _generalCalculateService.GetReadingCalculateDto(visitTaskId));
|
||||
}
|
||||
///// <summary>
|
||||
///// 获取报告整体整体评估
|
||||
///// </summary>
|
||||
///// <param name="visitTaskId"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<string> GetReportTumor(Guid visitTaskId)
|
||||
//{
|
||||
// return await GetTumor(await _generalCalculateService.GetReadingCalculateDto(visitTaskId));
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 获取报告是否存在疾病
|
||||
@@ -1575,7 +1646,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
/// {
|
||||
/// 靶病灶疗效为 ICPD
|
||||
/// }
|
||||
/// else if (上一访视评估为iUPD||本次访视SOD增加不小于5mm)
|
||||
/// else if (上一访视评估为iUPD&&本次访视SOD增加不小于5mm)
|
||||
/// {
|
||||
/// 靶病灶疗效为 ICPD
|
||||
/// }
|
||||
@@ -1605,7 +1676,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
var tableQuestion = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).SelectMany(x => x.TableRowInfoList).ToList();
|
||||
var lastVisitTaskId = await GetLastVisitTaskId(inDto);
|
||||
var tumorQuestionId = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.Tumor).Select(x => x.QuestionId).FirstOrDefault();
|
||||
var targetLesionQuestionId = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.TargetLesion).Select(x => x.QuestionId).FirstOrDefault();
|
||||
|
||||
var sodQuestionId = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SOD).Select(x => x.QuestionId).FirstOrDefault();
|
||||
IRECISTTargetLesionDto resultData = new IRECISTTargetLesionDto()
|
||||
@@ -1614,7 +1685,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
NotExistsTargetLesion = tableQuestion.Count() == 0,
|
||||
|
||||
// 上一访视评估
|
||||
LastTaskTarget = (await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == lastVisitTaskId && x.ReadingQuestionTrialId == tumorQuestionId)
|
||||
LastTaskTarget = (await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == lastVisitTaskId && x.ReadingQuestionTrialId == targetLesionQuestionId)
|
||||
.Select(x => x.Answer).FirstOrDefaultAsync()) ?? string.Empty,
|
||||
|
||||
// 满足RECISTPD
|
||||
@@ -1671,19 +1742,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
result = TargetAssessment.ND;
|
||||
}
|
||||
// else if (上一访视评估为iCPD && 本次访视满足RECIST1.1的PD条件&&比整体访视期间最低点SOD增加≥20%&&比整体访视期间最低点SOD绝对增加值≥5 mm)
|
||||
else if (resultData.LastTaskTarget.EqEnum(OverallAssessment.iCPD) && resultData.MeetRECISTPD && resultData.LowSodAddGreaterThan20Percent && resultData.LowSodAddGreaterThan5)
|
||||
else if (resultData.LastTaskTarget.EqEnum(TargetAssessment.iCPD) && resultData.MeetRECISTPD && resultData.LowSodAddGreaterThan20Percent && resultData.LowSodAddGreaterThan5)
|
||||
{
|
||||
// 靶病灶疗效为 ICPD
|
||||
result = TargetAssessment.iCPD;
|
||||
}
|
||||
// else if (上一访视评估为iUPD||本次访视SOD增加不小于5mm)
|
||||
else if (resultData.LastTaskTarget.EqEnum(OverallAssessment.iUPD) || resultData.SODAddGreaterThan5)
|
||||
// else if (上一访视评估为iUPD&&本次访视SOD增加不小于5mm)
|
||||
else if (resultData.LastTaskTarget.EqEnum(TargetAssessment.iUPD) && resultData.SODAddGreaterThan5)
|
||||
{
|
||||
// 靶病灶疗效为 ICPD
|
||||
result = TargetAssessment.iCPD;
|
||||
}
|
||||
// } else if (本次访视满足RECIST1.1的PD条件 && (比整体访视期间最低点SOD增加≥20 % && 比整体访视期间最低点SOD绝对增加值≥5 mm)|| (前一访视评估为iCR && 当前访视至少有一个“存在”状态的靶病灶))
|
||||
else if (resultData.MeetRECISTPD && (resultData.LowSodAddGreaterThan20Percent && resultData.LowSodAddGreaterThan5) || (resultData.LastTaskTarget.EqEnum(OverallAssessment.iCR) && resultData.HaveExistLesion))
|
||||
else if (resultData.MeetRECISTPD && (resultData.LowSodAddGreaterThan20Percent && resultData.LowSodAddGreaterThan5) || (resultData.LastTaskTarget.EqEnum(TargetAssessment.iCR) && resultData.HaveExistLesion))
|
||||
{
|
||||
// 靶病灶疗效为 iUPD
|
||||
result = TargetAssessment.iUPD;
|
||||
@@ -2360,75 +2431,140 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
return result == null ? string.Empty : ((NewLesionAssessment)result).GetEnumInt();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region iRECSIT整体肿瘤评估
|
||||
#region 获取新病灶评估
|
||||
/// <summary>
|
||||
/// 获取新病灶评估
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetNewLesionIRECSITEvaluate(ReadingCalculateDto inDto)
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// if(上一访视评估为iUPD或iCPD&&靶病灶评估、非靶病灶评估或新病灶评估任一项为iCPD)
|
||||
/// {
|
||||
/// 疗效为 iCPD
|
||||
/// }
|
||||
/// else if (上一访视评估为iUPD或iCPD&&靶病灶评估、非靶病灶评估或新病灶评估任一项从前一访视非iUPD结果评估为当前访视iUPD)
|
||||
/// {
|
||||
/// 疗效为 iCPD
|
||||
/// }
|
||||
/// else if (靶病灶评估为iUPD || 非靶病灶评估为iUPD || 新病灶评估为iUPD)
|
||||
/// {
|
||||
/// 疗效为 iUPD
|
||||
/// }
|
||||
/// else if ((靶病灶评估为iCR || 非靶病灶评估为iCR) && 新病灶评估为ND)
|
||||
/// {
|
||||
/// 疗效为 iCR
|
||||
/// }
|
||||
/// else if (靶病灶评估为iPR && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iPR
|
||||
/// }
|
||||
/// else if (靶病灶评估为iPR && 非靶病灶评估为iNN或NE && 新病灶评估为否或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iPR
|
||||
/// }
|
||||
/// else if (靶病灶评估为iPR && 非靶病灶评估为iCR或ND && 新病灶评估为疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iPR
|
||||
/// }
|
||||
/// else if (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iPR
|
||||
/// }
|
||||
/// else if (靶病灶评估为iSD && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iSD
|
||||
/// }
|
||||
/// else if (靶病灶评估为ND && 非靶病灶评估为iNN && 新病灶评估为ND或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iNN
|
||||
/// }
|
||||
/// else if (靶病灶评估为ND && 非靶病灶评估为ND && 新病灶评估为ND或疑似)
|
||||
/// {
|
||||
/// 疗效为 ND
|
||||
/// }
|
||||
/// else if (靶病灶评估为NE && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 NE
|
||||
/// }
|
||||
/// else if (靶病灶评估为ND && 非靶病灶评估为NE && 新病灶评估为否或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 NE
|
||||
/// }
|
||||
/// else if (靶病灶评估为ND && 非靶病灶评估为ND && 新病灶评估为NE)
|
||||
/// {
|
||||
/// 疗效为 NE
|
||||
/// }
|
||||
/// </remarks>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetIRECSITTargetLesionEvaluate(ReadingCalculateDto inDto)
|
||||
// 逻辑改了 现在转变后全部都是NA;
|
||||
return NewLesionAssessment.NA.GetEnumInt();
|
||||
|
||||
NewLesionAssessment result = NewLesionAssessment.No;
|
||||
if (inDto.IsBaseLine)
|
||||
{
|
||||
return NewLesionAssessment.NA.GetEnumInt();
|
||||
}
|
||||
|
||||
var newTargetQuestions = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.NewTargetLesion).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList).ToList();
|
||||
|
||||
var newNonTargetQuestions = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.NewNonTargetLesion).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList).ToList();
|
||||
|
||||
var OtherPreviousNewLesionQuestions = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.OtherPreviousNewLesion).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList).ToList();
|
||||
|
||||
var triggeringQuestions = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TriggeringIRECSIT).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList).ToList();
|
||||
|
||||
// 当前访视存在至少一个明确新病灶
|
||||
if (newTargetQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewTargetLesionState.Exist))
|
||||
|| newNonTargetQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewNoTargetLesionState.Exist))
|
||||
|| OtherPreviousNewLesionQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(OtherPreviousNewLesionState.Exists))
|
||||
|| triggeringQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITState.Exist))
|
||||
|
||||
)
|
||||
{
|
||||
result = NewLesionAssessment.Yes;
|
||||
}
|
||||
//只要有任何一个新病灶状态为“无法评估”
|
||||
else if (newTargetQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewTargetLesionState.NotEvaluable))
|
||||
|| newNonTargetQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewNoTargetLesionState.NotEvaluable))
|
||||
|| OtherPreviousNewLesionQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(OtherPreviousNewLesionState.NotEvaluable))
|
||||
|| triggeringQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITState.NotEvaluable))
|
||||
|
||||
)
|
||||
{
|
||||
result = NewLesionAssessment.NE;
|
||||
}
|
||||
//当前访视不存在明确新病灶且存在至少一个疑似新病灶
|
||||
else if ( (!OtherPreviousNewLesionQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(OtherPreviousNewLesionState.Exists)) && OtherPreviousNewLesionQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(OtherPreviousNewLesionState.Equivocal)))
|
||||
|| (!triggeringQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITState.Exist)) && triggeringQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITState.Equivocal)))
|
||||
|
||||
)
|
||||
{
|
||||
result = NewLesionAssessment.Suspected;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
result = NewLesionAssessment.No;
|
||||
}
|
||||
return result.GetEnumInt();
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region iRECSIT整体肿瘤评估
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// if(上一访视评估为iUPD或iCPD&&靶病灶评估、非靶病灶评估或新病灶评估任一项为iCPD)
|
||||
/// {
|
||||
/// 疗效为 iCPD
|
||||
/// }
|
||||
/// else if (上一访视评估为iUPD或iCPD&&靶病灶评估、非靶病灶评估或新病灶评估任一项从前一访视非iUPD结果评估为当前访视iUPD)
|
||||
/// {
|
||||
/// 疗效为 iCPD
|
||||
/// }
|
||||
/// else if (靶病灶评估为iUPD || 非靶病灶评估为iUPD || 新病灶评估为iUPD)
|
||||
/// {
|
||||
/// 疗效为 iUPD
|
||||
/// }
|
||||
/// else if ((靶病灶评估为iCR || 非靶病灶评估为iCR) && 新病灶评估为ND)
|
||||
/// {
|
||||
/// 疗效为 iCR
|
||||
/// }
|
||||
/// else if (靶病灶评估为iPR && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iPR
|
||||
/// }
|
||||
/// else if (靶病灶评估为iPR && 非靶病灶评估为iNN或NE && 新病灶评估为否或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iPR
|
||||
/// }
|
||||
/// else if (靶病灶评估为iPR && 非靶病灶评估为iCR或ND && 新病灶评估为疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iPR
|
||||
/// }
|
||||
/// else if (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iPR
|
||||
/// }
|
||||
/// else if (靶病灶评估为iSD && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iSD
|
||||
/// }
|
||||
/// else if (靶病灶评估为ND && 非靶病灶评估为iNN && 新病灶评估为ND或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 iNN
|
||||
/// }
|
||||
/// else if (靶病灶评估为ND && 非靶病灶评估为ND && 新病灶评估为ND或疑似)
|
||||
/// {
|
||||
/// 疗效为 ND
|
||||
/// }
|
||||
/// else if (靶病灶评估为NE && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 NE
|
||||
/// }
|
||||
/// else if (靶病灶评估为ND && 非靶病灶评估为NE && 新病灶评估为否或疑似或NE)
|
||||
/// {
|
||||
/// 疗效为 NE
|
||||
/// }
|
||||
/// else if (靶病灶评估为ND && 非靶病灶评估为ND && 新病灶评估为NE)
|
||||
/// {
|
||||
/// 疗效为 NE
|
||||
/// }
|
||||
/// </remarks>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetIRECSITTargetLesionEvaluate(ReadingCalculateDto inDto)
|
||||
{
|
||||
|
||||
var lastVisitTaskId = await GetLastVisitTaskId(inDto);
|
||||
@@ -2601,78 +2737,182 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
return result == null ? string.Empty : ((OverallAssessment)result).GetEnumInt();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 转化时计算
|
||||
|
||||
#region 获取转化的靶病灶评估
|
||||
/// <summary>
|
||||
/// 获取转化的靶病灶评估
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetConvertingTargetLesionEvaluate(ReadingCalculateDto inDto)
|
||||
{
|
||||
var beforeConvertedAnswer = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.BeforeConvertedTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.TargetLesion).Select(x => x.Answer).FirstOrDefaultAsync();
|
||||
|
||||
Dictionary<string, string> answerConverDic = new Dictionary<string, string>()
|
||||
{
|
||||
{TargetAssessment.SD.GetEnumInt(),TargetAssessment.iSD.GetEnumInt() },
|
||||
{TargetAssessment.PR.GetEnumInt(),TargetAssessment.iPR.GetEnumInt() },
|
||||
{TargetAssessment.PD.GetEnumInt(),TargetAssessment.iUPD.GetEnumInt() },
|
||||
{TargetAssessment.CR.GetEnumInt(), TargetAssessment.iCR.GetEnumInt() },
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
return answerConverDic[beforeConvertedAnswer];
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return beforeConvertedAnswer;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 获取靶病灶评估
|
||||
/// <summary>
|
||||
/// 获取靶病灶评估
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <remarks>
|
||||
/// 靶病灶疗效评估算法-20230306确认版本:
|
||||
///if(基线没有靶病灶)
|
||||
///{
|
||||
/// 靶病灶疗效为 ND
|
||||
///}else
|
||||
///{
|
||||
/// 初始化靶病灶疗效为 SD
|
||||
///
|
||||
/// if (与基线期SOD相比减小≥30 %)
|
||||
/// {
|
||||
/// 靶病灶疗效为 PR
|
||||
///
|
||||
/// }
|
||||
///
|
||||
///if (非淋巴结靶病灶长径之和 == 0 并且所有淋巴结靶病灶的短径 < 10且淋巴结非靶病灶全部消失)
|
||||
/// {
|
||||
/// 靶病灶疗效为 CR
|
||||
///
|
||||
/// }
|
||||
///
|
||||
///if (有被评估为NE的单个靶病灶)
|
||||
/// {
|
||||
/// 靶病灶疗效为 NE
|
||||
///
|
||||
/// }
|
||||
///
|
||||
///if (最低点SOD > 0)
|
||||
///{
|
||||
/// if(比整体访视期间最低点SOD增加≥20 % 且与整个访视期间最低点相比增加的值≥5 mm)
|
||||
/// {
|
||||
/// 靶病灶疗效为 PD
|
||||
///
|
||||
/// }
|
||||
///}
|
||||
///else
|
||||
///{
|
||||
/// //进入该分支最低点SOD=0
|
||||
/// if (当前访视SOD > 0 且与整个访视期间最低点相比增加的值≥5 mm)
|
||||
/// {
|
||||
/// 靶病灶疗效为PD
|
||||
///
|
||||
/// }
|
||||
///}
|
||||
///
|
||||
///if(上次访视点评估是CR)
|
||||
/// {
|
||||
/// if (当前访视点淋巴结病灶,至少一个淋巴结靶病灶短径≥10 mm 并且该淋巴结靶病灶短径绝对增加值≥5 mm)
|
||||
/// {
|
||||
/// 靶病灶疗效为 PD
|
||||
///
|
||||
/// }
|
||||
/// if (当前访视点非淋巴结病灶至少一个非淋巴结靶病灶的长径>0 mm。)
|
||||
/// {
|
||||
/// 靶病灶疗效为 PD
|
||||
///
|
||||
/// }
|
||||
///}
|
||||
///}
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetTargetLesionEvaluate(ReadingCalculateDto inDto)
|
||||
#region 获取转化的非靶病灶评估
|
||||
|
||||
/// <summary>
|
||||
/// 获取转化的非靶病灶评估
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetConvertingNoTargetLesionEvaluate(ReadingCalculateDto inDto)
|
||||
{
|
||||
var beforeConvertedAnswer = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.BeforeConvertedTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.NoTargetLesion).Select(x => x.Answer).FirstOrDefaultAsync();
|
||||
|
||||
Dictionary<string, string> answerConverDic = new Dictionary<string, string>()
|
||||
{
|
||||
{NoTargetAssessment.NN.GetEnumInt(),NoTargetAssessment.iNN.GetEnumInt() },
|
||||
{NoTargetAssessment.PD.GetEnumInt(),NoTargetAssessment.iUPD.GetEnumInt() },
|
||||
{NoTargetAssessment.CR.GetEnumInt(), NoTargetAssessment.iCR.GetEnumInt() },
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
return answerConverDic[beforeConvertedAnswer];
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return beforeConvertedAnswer;
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取转化的整体肿瘤评估
|
||||
|
||||
/// <summary>
|
||||
/// 获取转化的整体肿瘤评估
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetConvertingTumor(ReadingCalculateDto inDto)
|
||||
{
|
||||
var beforeConvertedAnswer = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.BeforeConvertedTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).Select(x => x.Answer).FirstOrDefaultAsync();
|
||||
|
||||
Dictionary<string, string> answerConverDic = new Dictionary<string, string>()
|
||||
{
|
||||
{OverallAssessment.NN.GetEnumInt(),OverallAssessment.iNN.GetEnumInt() },
|
||||
{OverallAssessment.PD.GetEnumInt(),OverallAssessment.iUPD.GetEnumInt() },
|
||||
{OverallAssessment.CR.GetEnumInt(), OverallAssessment.iCR.GetEnumInt() },
|
||||
{OverallAssessment.SD.GetEnumInt(), OverallAssessment.iSD.GetEnumInt() },
|
||||
{OverallAssessment.PR.GetEnumInt(), OverallAssessment.iPR.GetEnumInt() },
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
return answerConverDic[beforeConvertedAnswer];
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return beforeConvertedAnswer;
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 获取靶病灶评估
|
||||
/// <summary>
|
||||
/// 获取靶病灶评估
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <remarks>
|
||||
/// 靶病灶疗效评估算法-20230306确认版本:
|
||||
///if(基线没有靶病灶)
|
||||
///{
|
||||
/// 靶病灶疗效为 ND
|
||||
///}else
|
||||
///{
|
||||
/// 初始化靶病灶疗效为 SD
|
||||
///
|
||||
/// if (与基线期SOD相比减小≥30 %)
|
||||
/// {
|
||||
/// 靶病灶疗效为 PR
|
||||
///
|
||||
/// }
|
||||
///
|
||||
///if (非淋巴结靶病灶长径之和 == 0 并且所有淋巴结靶病灶的短径 < 10且淋巴结非靶病灶全部消失)
|
||||
/// {
|
||||
/// 靶病灶疗效为 CR
|
||||
///
|
||||
/// }
|
||||
///
|
||||
///if (有被评估为NE的单个靶病灶)
|
||||
/// {
|
||||
/// 靶病灶疗效为 NE
|
||||
///
|
||||
/// }
|
||||
///
|
||||
///if (最低点SOD > 0)
|
||||
///{
|
||||
/// if(比整体访视期间最低点SOD增加≥20 % 且与整个访视期间最低点相比增加的值≥5 mm)
|
||||
/// {
|
||||
/// 靶病灶疗效为 PD
|
||||
///
|
||||
/// }
|
||||
///}
|
||||
///else
|
||||
///{
|
||||
/// //进入该分支最低点SOD=0
|
||||
/// if (当前访视SOD > 0 且与整个访视期间最低点相比增加的值≥5 mm)
|
||||
/// {
|
||||
/// 靶病灶疗效为PD
|
||||
///
|
||||
/// }
|
||||
///}
|
||||
///
|
||||
///if(上次访视点评估是CR)
|
||||
/// {
|
||||
/// if (当前访视点淋巴结病灶,至少一个淋巴结靶病灶短径≥10 mm 并且该淋巴结靶病灶短径绝对增加值≥5 mm)
|
||||
/// {
|
||||
/// 靶病灶疗效为 PD
|
||||
///
|
||||
/// }
|
||||
/// if (当前访视点非淋巴结病灶至少一个非淋巴结靶病灶的长径>0 mm。)
|
||||
/// {
|
||||
/// 靶病灶疗效为 PD
|
||||
///
|
||||
/// }
|
||||
///}
|
||||
///}
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetTargetLesionEvaluate(ReadingCalculateDto inDto)
|
||||
{
|
||||
var tableQuestion = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).SelectMany(x => x.TableRowInfoList).ToList();
|
||||
if (inDto.IsBaseLine)
|
||||
@@ -2980,54 +3220,54 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
#endregion
|
||||
|
||||
//#region 获取新病灶评估
|
||||
///// <summary>
|
||||
///// 获取新病灶评估
|
||||
///// </summary>
|
||||
///// <param name="inDto"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<string> GetNewLesionEvaluate(ReadingCalculateDto inDto)
|
||||
//{
|
||||
#region 获取新病灶评估
|
||||
/// <summary>
|
||||
/// 获取新病灶评估
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetNewLesionEvaluate(ReadingCalculateDto inDto)
|
||||
{
|
||||
|
||||
// NewLesionAssessment result = NewLesionAssessment.No;
|
||||
// if (inDto.IsBaseLine)
|
||||
// {
|
||||
// return NewLesionAssessment.NA.GetEnumInt();
|
||||
// }
|
||||
NewLesionAssessment result = NewLesionAssessment.No;
|
||||
if (inDto.IsBaseLine)
|
||||
{
|
||||
return NewLesionAssessment.NA.GetEnumInt();
|
||||
}
|
||||
|
||||
// var tableRows = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.NewLesions).SelectMany(x => x.TableRowInfoList).ToList();
|
||||
var tableRows = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.NewLesions).SelectMany(x => x.TableRowInfoList).ToList();
|
||||
|
||||
// var tableQuestions = tableRows.SelectMany(x => x.TableQuestionList).ToList();
|
||||
var tableQuestions = tableRows.SelectMany(x => x.TableQuestionList).ToList();
|
||||
|
||||
|
||||
|
||||
// // 当前访视存在至少一个明确新病灶
|
||||
// if (tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Exist)))
|
||||
// {
|
||||
// result = NewLesionAssessment.Yes;
|
||||
// }
|
||||
// //只要有任何一个新病灶状态为“无法评估”
|
||||
// else if (tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.UnableEvaluate)))
|
||||
// {
|
||||
// result = NewLesionAssessment.NE;
|
||||
// }
|
||||
// //当前访视不存在明确新病灶且存在至少一个疑似新病灶
|
||||
// else if (!tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Exist)) &&
|
||||
// tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Suspected))
|
||||
// )
|
||||
// {
|
||||
// result = NewLesionAssessment.Suspected;
|
||||
// }
|
||||
// 当前访视存在至少一个明确新病灶
|
||||
if (tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Exist)))
|
||||
{
|
||||
result = NewLesionAssessment.Yes;
|
||||
}
|
||||
//只要有任何一个新病灶状态为“无法评估”
|
||||
else if (tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.UnableEvaluate)))
|
||||
{
|
||||
result = NewLesionAssessment.NE;
|
||||
}
|
||||
//当前访视不存在明确新病灶且存在至少一个疑似新病灶
|
||||
else if (!tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Exist)) &&
|
||||
tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Suspected))
|
||||
)
|
||||
{
|
||||
result = NewLesionAssessment.Suspected;
|
||||
}
|
||||
|
||||
|
||||
// else
|
||||
// {
|
||||
// result = NewLesionAssessment.No;
|
||||
// }
|
||||
// return result.GetEnumInt();
|
||||
else
|
||||
{
|
||||
result = NewLesionAssessment.No;
|
||||
}
|
||||
return result.GetEnumInt();
|
||||
|
||||
//}
|
||||
//#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId)
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide)
|
||||
//.Where(x => x.LesionType != LesionType.BaselineLesions)
|
||||
.Where(x=>x.QuestionType!=QuestionType.TherapeuticEffectEvaluationGroup)
|
||||
.ToListAsync();
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync();
|
||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync();
|
||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync();
|
||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
var lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto()
|
||||
|
||||
@@ -872,16 +872,16 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
//判断TrialUser中是否存在 不存在就插入
|
||||
if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == userId, true))
|
||||
{
|
||||
|
||||
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now });
|
||||
|
||||
await _repository.AddAsync(new TrialSiteUser() { TrialId = trialId, SiteId = siteId, UserId = userId });
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||
|
||||
await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == userInfo.Id, u => new TrialSiteUserSurvey() { IsJoin = true });
|
||||
|
||||
}
|
||||
if (!await _repository.AnyAsync<TrialSiteUser>(t => t.TrialId == trialId && t.UserId == userId && t.SiteId==siteId, true))
|
||||
{
|
||||
await _repository.AddAsync(new TrialSiteUser() { TrialId = trialId, SiteId = siteId, UserId = userId });
|
||||
}
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||
|
||||
await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == userInfo.Id, u => new TrialSiteUserSurvey() { IsJoin = true });
|
||||
|
||||
await _mailVerificationService.SiteSurveyUserJoinEmail(trialId, userId, joinCommand.BaseUrl, joinCommand.RouteUrl);
|
||||
|
||||
|
||||
@@ -132,8 +132,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
|
||||
|
||||
// ////读片任务显示是否顺序
|
||||
//// public bool IsReadingTaskViewInOrder { get; set; } = false;
|
||||
// ////读片任务显示是否顺序
|
||||
//// public bool IsReadingTaskViewInOrder { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -425,8 +425,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
/// </summary>
|
||||
public DateTime? ReadingInfoSignTime { get; set; }
|
||||
|
||||
public bool IsSign {
|
||||
get {
|
||||
public bool IsSign
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ReadingInfoSignTime != null;
|
||||
}
|
||||
}
|
||||
@@ -479,6 +481,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public bool IsAutoCreate { get; set; }
|
||||
|
||||
|
||||
public List<TrialCriterionAdditionalAssessmentType> TrialCriterionAdditionalAssessmentTypeList { get; set; } = new List<TrialCriterionAdditionalAssessmentType>();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -524,7 +529,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public Guid CreateUserId { get; set; }
|
||||
}
|
||||
|
||||
public class TrialReadQuestion :ReadingQuestionTrial
|
||||
public class TrialReadQuestion : ReadingQuestionTrial
|
||||
{
|
||||
/// <summary>
|
||||
/// 分页名称
|
||||
@@ -556,7 +561,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
}
|
||||
|
||||
public class TrialAdditionaQuestion: TrialReadQuestion
|
||||
public class TrialAdditionaQuestion : TrialReadQuestion
|
||||
{
|
||||
public List<TrialAdditionaQuestion> Childrens { get; set; } = new List<TrialAdditionaQuestion>();
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
@@ -935,6 +940,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
/// </summary>
|
||||
public bool IsOncologyReading { get; set; }
|
||||
|
||||
public List<AddOrUpdateTrialCriterionAdditional> TrialCriterionAdditionalAssessmentTypeList { get; set; }=new List<AddOrUpdateTrialCriterionAdditional>();
|
||||
|
||||
}
|
||||
|
||||
public class SignConfirmDTO
|
||||
|
||||
@@ -19,6 +19,7 @@ using static IRaCIS.Core.Domain.Share.StaticData;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using DocumentFormat.OpenXml.Office.CustomUI;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
|
||||
namespace IRaCIS.Core.Application
|
||||
{
|
||||
@@ -37,8 +38,9 @@ namespace IRaCIS.Core.Application
|
||||
private readonly IEasyCachingProvider _provider;
|
||||
private readonly IOrganInfoService _iOrganInfoService;
|
||||
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IReadingQuestionService iReadingQuestionService;
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
private readonly IReadingQuestionService iReadingQuestionService;
|
||||
private readonly IRepository<TrialCriterionAdditionalAssessmentType> _trialCriterionAdditionalAssessmentTypeRepository;
|
||||
|
||||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
||||
@@ -59,8 +61,9 @@ namespace IRaCIS.Core.Application
|
||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
|
||||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IReadingQuestionService iReadingQuestionService,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IReadingQuestionService iReadingQuestionService,
|
||||
IEasyCachingProvider provider,
|
||||
IOrganInfoService iOrganInfoService,
|
||||
IRepository<TrialCriterionAdditionalAssessmentType> trialCriterionAdditionalAssessmentTypeRepository,
|
||||
@@ -76,7 +79,8 @@ namespace IRaCIS.Core.Application
|
||||
_trialRepository = trialRepository;
|
||||
_taskAllocationRuleRepository = taskAllocationRuleRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this.iReadingQuestionService = iReadingQuestionService;
|
||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||
this.iReadingQuestionService = iReadingQuestionService;
|
||||
this._trialQCQuestionRepository = trialQCQuestionRepository;
|
||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||
@@ -178,8 +182,6 @@ namespace IRaCIS.Core.Application
|
||||
public async Task<GetTrialReadingInfoOutDto> GetCriterionReadingInfo(GetTrialReadingInfoInDto inDto)
|
||||
{
|
||||
|
||||
|
||||
|
||||
GetTrialReadingInfoOutDto trialInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).ProjectTo<GetTrialReadingInfoOutDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||
|
||||
if (trialInfo.ReadingTool == null)
|
||||
@@ -187,6 +189,9 @@ namespace IRaCIS.Core.Application
|
||||
trialInfo.ReadingTool = ReadingTool.Dicom;
|
||||
}
|
||||
|
||||
trialInfo.TrialCriterionAdditionalAssessmentTypeList = await _trialCriterionAdditionalAssessmentTypeRepository.Where(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId).ToListAsync();
|
||||
|
||||
|
||||
return trialInfo;
|
||||
}
|
||||
|
||||
@@ -206,6 +211,28 @@ namespace IRaCIS.Core.Application
|
||||
|
||||
if (trialCriterion.SynchronizeOriginalTime == null)
|
||||
{
|
||||
|
||||
//同步附加评估类型
|
||||
|
||||
if (!await _trialCriterionAdditionalAssessmentTypeRepository.AnyAsync(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
||||
{
|
||||
AdditionalAssessment additional = new AdditionalAssessment();
|
||||
var addList = additional.GetSystemDefeaultAdditionalAssessmentList(trialCriterion.CriterionType);
|
||||
|
||||
foreach (var addItem in addList)
|
||||
{
|
||||
await _trialCriterionAdditionalAssessmentTypeRepository.AddAsync(new TrialCriterionAdditionalAssessmentType()
|
||||
{
|
||||
CriterionType = trialCriterion.CriterionType,
|
||||
TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
||||
AdditionalAssessmentType = addItem.AdditionalAssessmentType
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 同步器官
|
||||
await _iOrganInfoService.SynchronizeSystemOrganToTrial(new SynchronizeSystemOrganToTrialInDto()
|
||||
{
|
||||
@@ -226,7 +253,7 @@ namespace IRaCIS.Core.Application
|
||||
|
||||
|
||||
await _trialCriterionDictionaryCode.BatchDeleteNoTrackingAsync(x => x.TrialCriterionId == trialCriterion.Id);
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterion.Id);
|
||||
await _readingTrialCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterion.Id);
|
||||
|
||||
var criterionDictionaryCodeList = await _systemCriterionDictionaryCode.Where(x => x.SystemCriterionId == trialCriterion.ReadingQuestionCriterionSystemId.Value)
|
||||
.Select(x => new TrialCriterionDictionaryCode()
|
||||
@@ -242,15 +269,25 @@ namespace IRaCIS.Core.Application
|
||||
|
||||
|
||||
var criterionDictionaryList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == trialCriterion.ReadingQuestionCriterionSystemId.Value)
|
||||
.Select(x=>new ReadingTrialCriterionDictionary() {
|
||||
|
||||
CriterionId = inDto.TrialReadingCriterionId,
|
||||
CrterionDictionaryGroup=x.CrterionDictionaryGroup,
|
||||
IsBaseLineUse=x.IsBaseLineUse,
|
||||
IsFollowVisitUse=x.IsFollowVisitUse,
|
||||
DictionaryId=x.DictionaryId,
|
||||
ParentCode=x.ParentCode,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
criterionDictionaryList.ForEach(x =>
|
||||
{
|
||||
|
||||
x.Id = NewId.NextGuid();
|
||||
x.Dictionary = null;
|
||||
x.IsSystemCriterion = false;
|
||||
x.CriterionId = inDto.TrialReadingCriterionId;
|
||||
|
||||
});
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(criterionDictionaryList);
|
||||
|
||||
await _readingTrialCriterionDictionaryRepository.AddRangeAsync(criterionDictionaryList);
|
||||
|
||||
await _trialCriterionDictionaryCode.AddRangeAsync(criterionDictionaryCodeList);
|
||||
#endregion
|
||||
@@ -309,14 +346,13 @@ namespace IRaCIS.Core.Application
|
||||
// IsGlobalReading = inDto.IsGlobalReading
|
||||
|
||||
//});
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess);
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.GlobalAssessList.Select(x => new ReadingCriterionDictionary
|
||||
await _readingTrialCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess);
|
||||
await _readingTrialCriterionDictionaryRepository.AddRangeAsync(inDto.GlobalAssessList.Select(x => new ReadingTrialCriterionDictionary
|
||||
{
|
||||
CriterionId = inDto.TrialReadingCriterionId,
|
||||
DictionaryId = x.DictionaryId,
|
||||
IsBaseLineUse = x.IsBaseLineUse,
|
||||
IsFollowVisitUse = x.IsFollowVisitUse,
|
||||
IsSystemCriterion = false,
|
||||
ParentCode = ReadingCommon.CriterionDictionary.GlobalAssess
|
||||
}));
|
||||
|
||||
@@ -340,7 +376,7 @@ namespace IRaCIS.Core.Application
|
||||
IsGlobalReading = trialCriterion.IsGlobalReading,
|
||||
IsSystemCriterion = trialCriterion.ReadingQuestionCriterionSystemId != null,
|
||||
IsSign = trialCriterion.IsSigned,
|
||||
GlobalAssessTypes = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId
|
||||
GlobalAssessTypes = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId
|
||||
&& x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess
|
||||
)
|
||||
.Select(x => new CriterionDictionaryInfo()
|
||||
@@ -374,7 +410,7 @@ namespace IRaCIS.Core.Application
|
||||
return new GetOncologySetOutDto
|
||||
{
|
||||
EvaluationReason = trialCriterion.EvaluationReason.IsNullOrEmpty() ? ReadingCommon.EvaluationReason : trialCriterion.EvaluationReason,
|
||||
OncologyAssessIds = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess).Select(x => x.DictionaryId).ToListAsync(),
|
||||
OncologyAssessIds = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess).Select(x => x.DictionaryId).ToListAsync(),
|
||||
IsSystemCriterion = trialCriterion.ReadingQuestionCriterionSystemId != null,
|
||||
IsSign = trialCriterion.IsSigned,
|
||||
};
|
||||
@@ -399,13 +435,12 @@ namespace IRaCIS.Core.Application
|
||||
|
||||
});
|
||||
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess);
|
||||
await _readingTrialCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess);
|
||||
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.OncologyAssessIds.Select(x => new ReadingCriterionDictionary
|
||||
await _readingTrialCriterionDictionaryRepository.AddRangeAsync(inDto.OncologyAssessIds.Select(x => new ReadingTrialCriterionDictionary
|
||||
{
|
||||
CriterionId = inDto.TrialReadingCriterionId,
|
||||
DictionaryId = x,
|
||||
IsSystemCriterion = false,
|
||||
ParentCode = ReadingCommon.CriterionDictionary.OncologyAssess
|
||||
}));
|
||||
|
||||
@@ -506,7 +541,7 @@ namespace IRaCIS.Core.Application
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
//---当前标准下未配置问题
|
||||
//---当前标准下未配置问题
|
||||
throw new BusinessValidationFailedException(_localizer["TrialConfig_StdConfigMissing"]);
|
||||
}
|
||||
}
|
||||
@@ -565,24 +600,65 @@ namespace IRaCIS.Core.Application
|
||||
|
||||
});
|
||||
|
||||
//判断是否存在附加评估,存在,就将标准对应的附加评估选项加进去
|
||||
//判断是否存在附加评估
|
||||
if (inDto.IsAdditionalAssessment)
|
||||
{
|
||||
if (!await _trialCriterionAdditionalAssessmentTypeRepository.AnyAsync(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
||||
{
|
||||
AdditionalAssessment additional = new AdditionalAssessment();
|
||||
var addList = additional.GetSystemDefeaultAdditionalAssessmentList(inDto.CriterionType);
|
||||
#region 存在,就将标准对应的附加评估选项加进去--废弃 修改到同步标准的地方去了,不管存在附加评估与否,都增加附加评估类型
|
||||
//if (!await _trialCriterionAdditionalAssessmentTypeRepository.AnyAsync(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
||||
//{
|
||||
// AdditionalAssessment additional = new AdditionalAssessment();
|
||||
// var addList = additional.GetSystemDefeaultAdditionalAssessmentList(inDto.CriterionType);
|
||||
|
||||
foreach (var addItem in addList)
|
||||
// foreach (var addItem in addList)
|
||||
// {
|
||||
// await _trialCriterionAdditionalAssessmentTypeRepository.AddAsync(new TrialCriterionAdditionalAssessmentType()
|
||||
// {
|
||||
// CriterionType = inDto.CriterionType,
|
||||
// TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
||||
// AdditionalAssessmentType = addItem.AdditionalAssessmentType
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
|
||||
|
||||
if (inDto.TrialCriterionAdditionalAssessmentTypeList.All(t => t.IsSelected != true))
|
||||
{
|
||||
throw new BusinessValidationFailedException("选择了附加评估,必须勾选附加评估类型");
|
||||
}
|
||||
|
||||
var trialId = _readingQuestionTrialRepository.Where(t => t.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Select(t => t.TrialId).FirstOrDefault();
|
||||
|
||||
|
||||
if (inDto.TrialCriterionAdditionalAssessmentTypeList.Count != 0)
|
||||
{
|
||||
foreach (var updateItem in inDto.TrialCriterionAdditionalAssessmentTypeList)
|
||||
{
|
||||
await _trialCriterionAdditionalAssessmentTypeRepository.AddAsync(new TrialCriterionAdditionalAssessmentType()
|
||||
if (updateItem.IsSelected == true)
|
||||
{
|
||||
CriterionType = inDto.CriterionType,
|
||||
TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
||||
AdditionalAssessmentType = addItem.AdditionalAssessmentType
|
||||
});
|
||||
//添加默认问题
|
||||
AdditionalAssessment additional = new AdditionalAssessment();
|
||||
var addTypeList = additional.GetSystemDefeaultAdditionalAssessmentList(updateItem.CriterionType, updateItem.AdditionalAssessmentType);
|
||||
|
||||
if(!await _readingQuestionTrialRepository.AsQueryable().IgnoreQueryFilters().AnyAsync(t => t.ReadingQuestionCriterionTrialId == updateItem.TrialReadingCriterionId && t.IsAdditional==true))
|
||||
{
|
||||
foreach (var addType in addTypeList)
|
||||
{
|
||||
foreach (var question in addType.AdditionalQuestionList)
|
||||
{
|
||||
question.ReadingQuestionCriterionTrialId = updateItem.TrialReadingCriterionId;
|
||||
question.TrialId = trialId;
|
||||
|
||||
await _readingQuestionTrialRepository.AddAsync(question);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await _trialCriterionAdditionalAssessmentTypeRepository.UpdatePartialFromQueryAsync(updateItem.Id, t => new TrialCriterionAdditionalAssessmentType() { IsSelected = updateItem.IsSelected });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -601,6 +677,7 @@ namespace IRaCIS.Core.Application
|
||||
/// </summary>
|
||||
/// <param name="trialReadingCriterionId"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete]
|
||||
public async Task<List<TrialCriterionAdditionalAssessmentType>> GetTrialCriterionAdditionalAssessmentOptionList(Guid trialReadingCriterionId)
|
||||
{
|
||||
return await _trialCriterionAdditionalAssessmentTypeRepository.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).ToListAsync();
|
||||
@@ -612,6 +689,7 @@ namespace IRaCIS.Core.Application
|
||||
/// </summary>
|
||||
/// <param name="updateList"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete]
|
||||
public async Task<IResponseOutput> SetTrialCriterionAdditionalAssessment(List<AddOrUpdateTrialCriterionAdditional> updateList)
|
||||
{
|
||||
|
||||
@@ -620,7 +698,8 @@ namespace IRaCIS.Core.Application
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
var trialId= _readingQuestionTrialRepository.Where(t=>t.ReadingQuestionCriterionTrialId==updateList.First().TrialReadingCriterionId).Select(t=>t.TrialId).FirstOrDefault();
|
||||
var trialId = _readingQuestionTrialRepository.Where(t => t.ReadingQuestionCriterionTrialId == updateList.First().TrialReadingCriterionId).Select(t => t.TrialId).FirstOrDefault();
|
||||
|
||||
foreach (var updateItem in updateList)
|
||||
{
|
||||
if (updateItem.IsSelected == true)
|
||||
@@ -716,7 +795,7 @@ namespace IRaCIS.Core.Application
|
||||
{
|
||||
if (showOrderList.Count == 0)
|
||||
{
|
||||
//---当前未添加影像质控审核问题。请先添加影像质控审核问题,再进行确认。
|
||||
//---当前未添加影像质控审核问题。请先添加影像质控审核问题,再进行确认。
|
||||
throw new BusinessValidationFailedException(_localizer["TrialConfig_NoImageAuditQuestion"]);
|
||||
}
|
||||
}
|
||||
@@ -786,26 +865,26 @@ namespace IRaCIS.Core.Application
|
||||
{
|
||||
if (showOrderList.Count == 0)
|
||||
{
|
||||
//---当前未添加影像质控审核问题。请先添加影像质控审核问题,再进行确认。
|
||||
//---当前未添加影像质控审核问题。请先添加影像质控审核问题,再进行确认。
|
||||
throw new BusinessValidationFailedException(_localizer["TrialConfig_NoImageAuditQuestion"]);
|
||||
}
|
||||
}
|
||||
|
||||
if (showOrderList.Count() != showOrderList.Select(t => t.ShowOrder).Distinct().Count())
|
||||
{
|
||||
//---影像质控审核问题显示序号不能重复。
|
||||
//---影像质控审核问题显示序号不能重复。
|
||||
throw new BusinessValidationFailedException(_localizer["TrialConfig_DuplicateAuditQuestionId"]);
|
||||
}
|
||||
|
||||
if (showOrderList.Where(t => t.ParentShowOrder != null).Any(t => t.ParentShowOrder > t.ShowOrder))
|
||||
{
|
||||
//---父问题的显示序号要比子问题的显示序号小,请确认。
|
||||
//---父问题的显示序号要比子问题的显示序号小,请确认。
|
||||
throw new BusinessValidationFailedException(_localizer["TrialConfig_InvalidParentQuestionId"]);
|
||||
}
|
||||
|
||||
if (await _trialRepository.AnyAsync(t => t.Id == signConfirmDTO.TrialId && t.QCQuestionConfirmedUserId != null && t.QCQuestionConfirmedUserId != _userInfo.Id))
|
||||
{
|
||||
//---影像质控审核问题已被其他人员确认,不允许再次确认。
|
||||
//---影像质控审核问题已被其他人员确认,不允许再次确认。
|
||||
throw new BusinessValidationFailedException(_localizer["TrialConfig_AuditQuestionConfirmed"]);
|
||||
}
|
||||
|
||||
@@ -965,7 +1044,7 @@ namespace IRaCIS.Core.Application
|
||||
var canOPt = await _trialRepository.AnyAsync(trial =>
|
||||
trial.Id == trialId && trial.IsTrialBasicLogicConfirmed && trial.IsTrialProcessConfirmed &&
|
||||
trial.IsTrialUrgentConfirmed && trial.VisitPlanConfirmed);
|
||||
//---该项目的项目配置(基础配置、流程配置、加急配置) 、访视管理,有配置未确认,不能设置项目状态为启动。
|
||||
//---该项目的项目配置(基础配置、流程配置、加急配置) 、访视管理,有配置未确认,不能设置项目状态为启动。
|
||||
return ResponseOutput.Ok(canOPt, msg: canOPt ? "" : _localizer["TrialConfig_UnconfirmedConfiguration"]);
|
||||
}
|
||||
|
||||
@@ -993,7 +1072,7 @@ namespace IRaCIS.Core.Application
|
||||
}
|
||||
else
|
||||
{
|
||||
//---无法变更项目状态。该项目的项目配置、访视管理中,有未确认项
|
||||
//---无法变更项目状态。该项目的项目配置、访视管理中,有未确认项
|
||||
return ResponseOutput.NotOk(_localizer["TrialConfig_UnconfirmedUNACKD"]);
|
||||
}
|
||||
}
|
||||
@@ -1078,8 +1157,12 @@ namespace IRaCIS.Core.Application
|
||||
[HttpGet("{trialId:guid}")]
|
||||
public async Task<TrialConfigDTO> GetTrialConfigInfo(Guid trialId)
|
||||
{
|
||||
return await _trialRepository.Where(t => t.Id == trialId).ProjectTo<TrialConfigDTO>(_mapper.ConfigurationProvider)
|
||||
.FirstOrDefaultAsync().IfNullThrowException();
|
||||
return await _trialRepository.Where(t => t.Id == trialId).ProjectTo<TrialConfigDTO>(_mapper.ConfigurationProvider, new
|
||||
{
|
||||
isEn_Us = _userInfo.IsEn_Us
|
||||
|
||||
})
|
||||
.FirstOrDefaultAsync().IfNullThrowException();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,8 @@ namespace IRaCIS.Application.Services
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialDetailDTO>> GetTrialList(TrialQueryDTO searchParam)
|
||||
{
|
||||
var multiModalityIdSelectCount = searchParam.ModalityIds.Count;
|
||||
|
||||
var multiModalityIdSelectCount = searchParam.ModalityIds.Count;
|
||||
var multiCriteriaSelectCount = searchParam.CriterionIds.Count;
|
||||
var multiReviewTypeSelectCount = searchParam.ReviewTypeIds.Count;
|
||||
|
||||
@@ -66,7 +67,7 @@ namespace IRaCIS.Application.Services
|
||||
.WhereIf(multiModalityIdSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Modality) == multiModalityIdSelectCount)
|
||||
.WhereIf(multiCriteriaSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Criterion) == multiCriteriaSelectCount)
|
||||
.WhereIf(multiReviewTypeSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.ReviewType) == multiReviewTypeSelectCount)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.IsDeleted == false)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted==false) && t.IsDeleted == false)
|
||||
.ProjectTo<TrialDetailDTO>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id });
|
||||
|
||||
return await query.ToPagedListAsync(searchParam.PageIndex, searchParam.PageSize, string.IsNullOrWhiteSpace(searchParam.SortField) ? "CreateTime" : searchParam.SortField, searchParam.Asc);
|
||||
@@ -408,8 +409,8 @@ namespace IRaCIS.Application.Services
|
||||
await _repository.BatchDeleteAsync<ConsistencyCheckFile>(o => o.TrialId == trialId) ||
|
||||
|
||||
|
||||
await _repository.BatchDeleteAsync<CriterionNidus>(o => o.TrialReadingCriterion.TrialId == trialId) ||
|
||||
await _repository.BatchDeleteAsync<ReadingCriterionDictionary>(o => o.TrialReadingCriterion.TrialId == trialId) ||
|
||||
await _repository.BatchDeleteAsync<CriterionNidusSystem>(o => o.TrialReadingCriterion.TrialId == trialId) ||
|
||||
|
||||
|
||||
|
||||
await _repository.BatchDeleteAsync<DataInspection>(o => o.TrialId == trialId) ||
|
||||
|
||||
@@ -161,11 +161,14 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
CreateMap<AssginSiteCRCCommand, TrialSiteUser>();
|
||||
|
||||
var isEn_Us = false;
|
||||
|
||||
CreateMap<Domain.Models.Trial, TrialConfigDTO>().ForMember(t => t.TrialId, u => u.MapFrom(c => c.Id))
|
||||
.ForMember(t => t.TrialCriterionIds, u => u.MapFrom(c => c.ReadingQuestionCriterionTrialList.Where(v =>v.IsConfirm).OrderBy(x=>x.ShowOrder).Select(r => r.Id)))
|
||||
.ForMember(t => t.TrialCriterionNames, u => u.MapFrom(c => c.ReadingQuestionCriterionTrialList.Where(v => v.IsConfirm).OrderBy(x => x.ShowOrder).Select(r => r.CriterionName)))
|
||||
.ForMember(t => t.ClinicalDataTrialSetIds, u => u.MapFrom(c => c.clinicalDataTrialSets.Where(v => v.IsConfirm).Select(r => r.Id)))
|
||||
.ForMember(t => t.ClinicalDataSetNames, u => u.MapFrom(c => c.clinicalDataTrialSets.Where(v => v.IsConfirm).Select(r => r.ClinicalDataSetName)))
|
||||
.ForMember(t => t.ClinicalDataSetNames, u => u.MapFrom(c => c.clinicalDataTrialSets.Where(v => v.IsConfirm).Select(r => isEn_Us ? r.ClinicalDataSetEnName:r.ClinicalDataSetName)))
|
||||
//.ForMember(t => t.CriterionIds, u => u.MapFrom(c => c.TrialDicList.Where(v => v.KeyName == StaticData.Criterion).Select(r => r.DictionaryId)))
|
||||
;
|
||||
CreateMap<Domain.Models.Trial, TrialSubjectConfig>();
|
||||
|
||||
@@ -317,6 +317,15 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
|
||||
|
||||
public class UploadedSeries
|
||||
{
|
||||
public Guid SeriesId { get; set; }
|
||||
|
||||
public string SeriesInstanceUid { get; set; }
|
||||
|
||||
public List<string> SOPInstanceUIDList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class VerifyStudyUploadResult
|
||||
{
|
||||
@@ -330,6 +339,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public string ErrorMesseage { get; set; } = String.Empty;
|
||||
|
||||
public List<UploadedSeries> UploadedSeriesList { get; set;} = new List<UploadedSeries>();
|
||||
|
||||
}
|
||||
|
||||
public class VerifyUploadOrReupload
|
||||
|
||||
@@ -8,6 +8,8 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Caching.Distributed;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Linq.Expressions;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
|
||||
@@ -45,14 +47,14 @@ namespace IRaCIS.Application.Services
|
||||
public async Task<string> Get()
|
||||
{
|
||||
|
||||
Expression<Func<VisitTask, bool>> visitTaskLambda = x => x.TrialId == Guid.Empty && x.SubjectId == Guid.Empty && x.TrialReadingCriterionId == Guid.Empty;
|
||||
//Expression<Func<VisitTask, bool>> visitTaskLambda = x => x.TrialId == Guid.Empty && x.SubjectId == Guid.Empty && x.TrialReadingCriterionId == Guid.Empty;
|
||||
|
||||
var visitTaskIdQueryable = _visitTaskRepositoryy.Where(visitTaskLambda).Where(t => t.Subject.SubjectVisitTaskList.AsQueryable().Where(visitTaskLambda).Any(c => c.IsNeedClinicalDataSign == true && c.IsClinicalDataSign == false && c.VisitTaskNum < t.VisitTaskNum)).Select(t => t.Id);
|
||||
//var visitTaskIdQueryable = _visitTaskRepositoryy.Where(visitTaskLambda).Where(t => t.Subject.SubjectVisitTaskList.AsQueryable().Where(visitTaskLambda).Any(c => c.IsNeedClinicalDataSign == true && c.IsClinicalDataSign == false && c.VisitTaskNum < t.VisitTaskNum)).Select(t => t.Id);
|
||||
|
||||
await _visitTaskRepositoryy.BatchUpdateNoTrackingAsync(t => visitTaskIdQueryable.Contains(t.Id), u => new VisitTask()
|
||||
{
|
||||
IsFrontTaskNeedSignButNotSign = true
|
||||
});
|
||||
//await _visitTaskRepositoryy.BatchUpdateNoTrackingAsync(t => visitTaskIdQueryable.Contains(t.Id), u => new VisitTask()
|
||||
//{
|
||||
// IsFrontTaskNeedSignButNotSign = true
|
||||
//});
|
||||
|
||||
|
||||
//var a = ((Decimal)1.00).ToString().TrimEnd(new char[] { '.', '0' });
|
||||
@@ -117,10 +119,10 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
//await _visitTaskRepositoryy.UpdatePartialFromQueryAsync( Guid.Parse("78360000-3E2C-0016-9B53-08DA6A002040"), c => new VisitTask() { UpdateTime = DateTime.Now.AddMinutes(1) });
|
||||
|
||||
var a = _userInfo.IsTestUser;
|
||||
//var a = _userInfo.IsTestUser;
|
||||
|
||||
var list1 = await _repository.Where<Dictionary>().Select(t => t.TranslateValue(t.Value, t.ValueCN, true)).ToListAsync();
|
||||
var list2 = await _repository.Where<Dictionary>().Select(t => t.TranslateValue(t.Value, t.ValueCN, false)).ToListAsync();
|
||||
//var list1 = await _repository.Where<Dictionary>().Select(t => t.TranslateValue(t.Value, t.ValueCN, true)).ToListAsync();
|
||||
//var list2 = await _repository.Where<Dictionary>().Select(t => t.TranslateValue(t.Value, t.ValueCN, false)).ToListAsync();
|
||||
|
||||
await _repository.SaveChangesAsync();
|
||||
return _userInfo.LocalIp;
|
||||
@@ -156,7 +158,11 @@ namespace IRaCIS.Application.Services
|
||||
[AllowAnonymous]
|
||||
public async Task<object> GetEnvironmentName([FromServices] IWebHostEnvironment env)
|
||||
{
|
||||
var a = IdentifierHelper.CreateGuid("123456");
|
||||
|
||||
var k = MD5.Create().ComputeHash(Encoding.UTF8.GetBytes("123456"));
|
||||
|
||||
var c = MD5Helper.Md5("123456");
|
||||
|
||||
//update DicomInstance set Path = '/IRaCISData/TrialData/' + cast(DicomInstance.TrialId as varchar) + '/' + DicomInstance.SiteId + '/' + DicomInstance.SubjectId + '/' + DicomInstance.SubjectVisitId + '/Dicom/' + DicomInstance.StudyId + '/' + DicomInstance.Id + '.dcm'
|
||||
|
||||
|
||||
@@ -16,10 +16,28 @@ namespace IRaCIS.Core.Domain.Share
|
||||
public static readonly string Group = "group";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 标准字典分类
|
||||
/// </summary>
|
||||
public enum CrterionDictionaryGroup
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public enum LanguageType
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 中文
|
||||
/// </summary>
|
||||
Chinese = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 英文
|
||||
/// </summary>
|
||||
English = 1
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 标准字典分类
|
||||
/// </summary>
|
||||
public enum CrterionDictionaryGroup
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -905,7 +923,29 @@ namespace IRaCIS.Core.Domain.Share
|
||||
|
||||
}
|
||||
|
||||
public enum ReadingSetType
|
||||
/// <summary>
|
||||
/// 转化显示类型
|
||||
/// </summary>
|
||||
public enum ConvertShowType
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 全都显示
|
||||
/// </summary>
|
||||
All = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 转化前显示
|
||||
/// </summary>
|
||||
BeforeShow = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 转化后显示
|
||||
/// </summary>
|
||||
AfterShow = 2
|
||||
}
|
||||
|
||||
public enum ReadingSetType
|
||||
{
|
||||
/// <summary>
|
||||
/// 影像阅片
|
||||
@@ -1450,10 +1490,7 @@ namespace IRaCIS.Core.Domain.Share
|
||||
/// </summary>
|
||||
IsBrainMetastasis =43,
|
||||
|
||||
/// <summary>
|
||||
/// 是否转变之后表格问题
|
||||
/// </summary>
|
||||
IsConverted = 44,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -121,10 +121,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||
public Subject Subject { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
|
||||
public SubjectCriteriaEvaluationVisitFilter SubjectCriteriaEvaluationVisitFilter { get; set;}
|
||||
|
||||
[JsonIgnore]
|
||||
public List<TaskMedicalReview> TaskMedicalReviewList { get; set; }
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace IRaCIS.Core.Domain.Models
|
||||
public List<TrialExperienceCriteria> TrialExperienceCriteriaList { get; set; }
|
||||
|
||||
|
||||
// UserDoctor表关联 一个医生 可被多个用户管理
|
||||
[JsonIgnore]
|
||||
public List<UserDoctor> UserList { get; set; }
|
||||
//// UserDoctor表关联 一个医生 可被多个用户管理
|
||||
//[JsonIgnore]
|
||||
//public List<UserDoctor> UserList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<Enroll> EnrollList { get; set; }
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||
public Guid SubjectId { get; set; }
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
public bool Anonymize { get; set; }
|
||||
public string Path { get; set; }
|
||||
|
||||
public Guid CreateUserId { get; set; }
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
@@ -49,6 +50,5 @@ namespace IRaCIS.Core.Domain.Models
|
||||
public DateTime UpdateTime { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
public string Path { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||
public int InstanceCount { get; set; }
|
||||
public string SliceThickness { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public string ImagePositionPatient { get; set; }
|
||||
public string ImageOrientationPatient { get; set; }
|
||||
public string BodyPartExamined { get; set; }
|
||||
@@ -41,19 +38,18 @@ namespace IRaCIS.Core.Domain.Models
|
||||
public string ProtocolName { get; set; }
|
||||
public string ImagerPixelSpacing { get; set; }
|
||||
|
||||
|
||||
public string AcquisitionTime { get; set; } = string.Empty;
|
||||
public string AcquisitionNumber { get; set; } = string.Empty;
|
||||
public string TriggerTime { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid SiteId { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
|
||||
public string BodyPartForEdit { get; set; } = string.Empty;
|
||||
|
||||
public Guid CreateUserId { get; set; }
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
public Guid UpdateUserId { get; set; }
|
||||
@@ -65,6 +61,5 @@ namespace IRaCIS.Core.Domain.Models
|
||||
public bool IsDeleted {get;set;}
|
||||
public bool IsReading { get; set; } = true;
|
||||
|
||||
public string BodyPartForEdit { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||
|
||||
public string StudyCode { get; set; } = string.Empty;
|
||||
|
||||
public int Status { get; set; } = 1;
|
||||
|
||||
public string StudyInstanceUid { get; set; } = string.Empty;
|
||||
public DateTime? StudyTime { get; set; }
|
||||
public string Modalities { get; set; } = string.Empty;
|
||||
@@ -47,7 +45,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||
public int SeriesCount { get; set; } = 0;
|
||||
public int InstanceCount { get; set; } = 0;
|
||||
|
||||
//public bool SoftDelete { get; set; } = false;
|
||||
|
||||
public string InstitutionName { get; set; } = string.Empty;
|
||||
public string PatientId { get; set; } = string.Empty;
|
||||
@@ -62,13 +59,25 @@ namespace IRaCIS.Core.Domain.Models
|
||||
public string AcquisitionNumber { get; set; } = string.Empty;
|
||||
public string TriggerTime { get; set; } = string.Empty;
|
||||
|
||||
public string BodyPartExamined { get; set; } = string.Empty;
|
||||
|
||||
public string BodyPartForEdit { get; set; } = string.Empty;
|
||||
|
||||
public string ModalityForEdit { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
//0 未知 1 单重 2 双重
|
||||
public bool IsDoubleReview { get; set; }
|
||||
|
||||
public string Comment { get; set; } = string.Empty;//上传的时候的
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SubjectId")]
|
||||
public Subject Subject { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SubjectVisitId")]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
|
||||
public string BodyPartExamined { get; set; } = string.Empty;
|
||||
public Guid UpdateUserId { get; set; }
|
||||
public DateTime UpdateTime { get; set; } = DateTime.Now;
|
||||
public Guid CreateUserId { get; set; }
|
||||
@@ -78,34 +87,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||
[ForeignKey("CreateUserId")]
|
||||
public User Uploader { get; set; }
|
||||
|
||||
//public DateTime? UploadedTime { get; set; }
|
||||
|
||||
//public string Uploader { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
||||
public DateTime? DeadlineTime { get; set; }
|
||||
|
||||
public string QAComment { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string BodyPartForEdit { get; set; } = string.Empty;
|
||||
|
||||
public string ModalityForEdit { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public bool CheckPassed { get; set; }
|
||||
|
||||
public string CheckResult { get; set; }=string.Empty;
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SubjectId")]
|
||||
public Subject Subject { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SubjectVisitId")]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
|
||||
//软删除
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2021-11-11 11:19:10
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -19,6 +20,12 @@ namespace IRaCIS.Core.Domain.Models
|
||||
[Required]
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// IsRequired
|
||||
/// </summary>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2021-11-11 11:19:10
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -29,6 +30,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||
[Required]
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// IsRequired
|
||||
/// </summary>
|
||||
|
||||
@@ -24,6 +24,9 @@ namespace IRaCIS.Core.Domain.Models
|
||||
[ForeignKey("TrialReadingCriterionId")]
|
||||
public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<SubjectCriteriaEvaluationVisitFilter> SubjectCriteriaEvaluationVisitFilterList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// SubjectId
|
||||
/// </summary>
|
||||
@@ -67,8 +70,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public List<SubjectCriteriaEvaluationVisitFilter> SubjectCriteriaEvaluationVisitFilterList { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+4
-2
@@ -18,12 +18,14 @@ namespace IRaCIS.Core.Domain.Models
|
||||
public class SubjectCriteriaEvaluationVisitFilter : Entity, IAuditUpdate, IAuditAdd
|
||||
{
|
||||
|
||||
[JsonIgnore]
|
||||
//[JsonIgnore]
|
||||
|
||||
public List<VisitTask> SubjectCriterionTaskList { get; set; }
|
||||
//public List<VisitTask> SubjectCriterionTaskList { get; set; }
|
||||
[JsonIgnore]
|
||||
[ForeignKey("TrialReadingCriterionId")]
|
||||
public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public SubjectCriteriaEvaluation SubjectCriteriaEvaluation { get; set; }
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
|
||||
@@ -26,10 +26,15 @@ namespace IRaCIS.Core.Domain.Models
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -34,6 +34,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是必须
|
||||
/// </summary>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user