Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
ed94423f32
|
@ -9,7 +9,6 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static BeetleX.Redis.Commands.HSCAN;
|
||||
using static IRaCIS.Core.Application.Service.Common.SystemMonitor;
|
||||
|
||||
namespace IRaCIS.Core.Application.Helper
|
||||
|
|
|
@ -63,10 +63,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
||||
<PackageReference Include="DocX" Version="3.0.1" />
|
||||
<PackageReference Include="FreeSpire.Doc" Version="12.2.0" />
|
||||
<PackageReference Include="Hangfire.Core" Version="1.8.12" />
|
||||
<PackageReference Include="BeetleX.BNR" Version="1.0.1" />
|
||||
<PackageReference Include="Hangfire.Core" Version="1.8.14" />
|
||||
<PackageReference Include="Castle.Core.AsyncInterceptor" Version="2.1.0" />
|
||||
<PackageReference Include="EasyCaching.Redis" Version="1.9.2" />
|
||||
<PackageReference Include="EasyCaching.InMemory" Version="1.9.2" />
|
||||
|
@ -74,22 +74,22 @@
|
|||
<PackageReference Include="ExcelDataReader.DataSet" Version="3.6.0" />
|
||||
<PackageReference Include="DistributedLock.Redis" Version="1.0.3" />
|
||||
<PackageReference Include="DistributedLock.SqlServer" Version="1.0.4" />
|
||||
<PackageReference Include="fo-dicom" Version="5.1.2" />
|
||||
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.1.2" />
|
||||
<PackageReference Include="fo-dicom.Codecs" Version="5.12.0" />
|
||||
<PackageReference Include="fo-dicom" Version="5.1.3" />
|
||||
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.1.3" />
|
||||
<PackageReference Include="fo-dicom.Codecs" Version="5.14.4" />
|
||||
<PackageReference Include="IP2Region.Net" Version="2.0.2" />
|
||||
<PackageReference Include="MailKit" Version="4.2.0" />
|
||||
<PackageReference Include="MediatR" Version="12.2.0" />
|
||||
<PackageReference Include="MimeKit" Version="4.2.0" />
|
||||
<PackageReference Include="MiniExcel" Version="1.32.0" />
|
||||
<PackageReference Include="Minio" Version="6.0.2" />
|
||||
<PackageReference Include="Minio" Version="6.0.3" />
|
||||
<PackageReference Include="MiniWord" Version="0.8.0" />
|
||||
<PackageReference Include="My.Extensions.Localization.Json" Version="3.3.0">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NPOI" Version="2.7.0" />
|
||||
<PackageReference Include="NPOI" Version="2.7.1" />
|
||||
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.2" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.4" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.2" />
|
||||
<PackageReference Include="WinSCP" Version="6.3.3" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -543,9 +543,19 @@
|
|||
<returns></returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetTrialList_Export(IRaCIS.Core.Application.Contracts.TrialToBeDoneQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
<summary>
|
||||
项目列表导出---new
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<param name="_commonDocumentRepository"></param>
|
||||
<param name="_dictionaryService"></param>
|
||||
<param name="_trialRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.PMTrainingRecordList_Export(IRaCIS.Core.Application.Contracts.DocumentTrialUnionQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
<summary>
|
||||
getDocumentConfirmList 培训记录导出
|
||||
getDocumentConfirmList 培训记录导出--new
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<param name="_commonDocumentRepository"></param>
|
||||
|
|
|
@ -290,7 +290,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
{
|
||||
foreach (var command in cancelCommand.CancelList.Where(t => t.IsCancelAssign))
|
||||
{
|
||||
if (await _visitTaskRepository.AnyAsync(t => t.TrialReadingCriterionId == cancelCommand.TrialReadingCriterionId && t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState != ReadingTaskState.WaitReading))
|
||||
if (await _visitTaskRepository.AnyAsync(t => t.TaskState==TaskState.Effect && t.TrialReadingCriterionId == cancelCommand.TrialReadingCriterionId && t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState != ReadingTaskState.WaitReading))
|
||||
{
|
||||
//---当前医生已开始做该Subject 该标准的任务,不允许取消分配
|
||||
throw new BusinessValidationFailedException(_localizer["VisitTask_DoctorConfigNotFound"]);
|
||||
|
|
|
@ -104,7 +104,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
CreateMap<SubjectUser, SubjectUserDTO>().IncludeBase<SubjectUser, SubjectUserView>()
|
||||
.ForMember(o => o.IsHaveReading, t => t.MapFrom(u => u.Subject.SubjectVisitTaskList.Any(t => t.ReadingTaskState != ReadingTaskState.WaitReading && t.TrialReadingCriterionId==u.TrialReadingCriterionId && t.DoctorUserId==u.DoctorUserId)));
|
||||
.ForMember(o => o.IsHaveReading, t => t.MapFrom(u => u.Subject.SubjectVisitTaskList.Any(t => t.ReadingTaskState != ReadingTaskState.WaitReading && t.TrialReadingCriterionId==u.TrialReadingCriterionId && t.DoctorUserId==u.DoctorUserId && t.TaskState == TaskState.Effect)));
|
||||
|
||||
|
||||
CreateMap<SubjectVisit, VisitGenerataTaskDTO>();
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, dbbeforeEntity.Path);
|
||||
|
||||
if (File.Exists(filePath))
|
||||
if (File.Exists(filePath) && dbbeforeEntity.Path!=addOrEditCommonDocument.Path)
|
||||
{
|
||||
File.Delete(filePath);
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ using MiniExcelLibs;
|
|||
using MiniExcelLibs.OpenXml;
|
||||
using NPOI.HPSF;
|
||||
using NPOI.HSSF.UserModel;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -615,9 +616,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId)
|
||||
// CRC 只负责他管理site的受试者
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.ProjectTo<SubjectExportDTO>(_mapper.ConfigurationProvider)
|
||||
.WhereIf(inQuery.IsMissingImages == true, t => t.MissingSubmmitCount> 0)
|
||||
.WhereIf(inQuery.IsMissingImages == true, t => t.MissingSubmmitCount > 0)
|
||||
.WhereIf(inQuery.IsMissingImages == false, t => t.MissingSubmmitCount == 0)
|
||||
;
|
||||
|
||||
|
@ -1041,7 +1042,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
[FromServices] IRepository<Trial> _trialRepository)
|
||||
{
|
||||
var list = await _repository.Where<VisitTask>(t => t.TrialId == queryVisitTask.TrialId && t.IsAnalysisCreate == false)
|
||||
//.Where(t => t.IsAnalysisCreate == false && t.DoctorUserId != null)
|
||||
//.Where(t => t.IsAnalysisCreate == false && t.DoctorUserId != null)
|
||||
|
||||
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
||||
.WhereIf(queryVisitTask.ArmEnum != null, t => t.ArmEnum == queryVisitTask.ArmEnum)
|
||||
|
@ -1440,7 +1441,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.PCWG3Point1DetailedOfEvaluatedLesion_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion });
|
||||
}
|
||||
|
||||
var result = _repository.Where<CommonDocument>(t => list.Select(c => c.Code).Contains(t.Code)).Select(c => new ExportDocumentDes() { Code = c.Code, FileName = c.Name }).ToList();
|
||||
var result = _repository.Where<CommonDocument>(t => list.Select(c => c.Code).Contains(t.Code)).Select(c => new ExportDocumentDes() { Code = c.Code, FileName = _userInfo.IsEn_Us ? c.Name : c.NameCN }).ToList();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
|
@ -1451,63 +1452,156 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
public List<T> DealJudgeMark<T>(ArbitrationRule arbitrationRule, IEnumerable<T> list) where T : OverallTumorEvaluationExport
|
||||
{
|
||||
//处理裁判标记
|
||||
|
||||
var resultList = list.Where(t => t.ReadingCategory != ReadingCategory.Judge).ToList();
|
||||
//处理访视任务的裁判标记
|
||||
var resultExceptJudgeList = list.Where(t => t.ReadingCategory != ReadingCategory.Judge).ToList();
|
||||
|
||||
var judegeList = list.Where(t => t.ReadingCategory == ReadingCategory.Judge).ToList();
|
||||
|
||||
if (arbitrationRule == ArbitrationRule.Visit)
|
||||
{
|
||||
|
||||
foreach (var item in resultList)
|
||||
foreach (var item in resultExceptJudgeList)
|
||||
{
|
||||
item.IsGenerateJudge = list.FirstOrDefault(t => t.ReadingCategory == ReadingCategory.Judge && t.SubjectCode == item.SubjectCode
|
||||
item.IsGenerateJudge = judegeList.FirstOrDefault(t => t.SubjectCode == item.SubjectCode
|
||||
&& (t.VisitTaskNum - ReadingCommon.TaskNumDic[ReadingCategory.Judge]) == item.VisitTaskNum)?.JudgeArmEnum == item.ArmEnum ? true : false;
|
||||
}
|
||||
|
||||
//如果没有产生裁判,默认选择R1
|
||||
|
||||
//找到没有裁判的访视任务
|
||||
var notJudgeList = resultExceptJudgeList.GroupBy(t => new { t.SubjectCode, t.VisitTaskNum }).Where(g => g.All(t => t.IsGenerateJudge == false)).Select(g => new { g.Key.SubjectCode, g.Key.VisitTaskNum }).ToList();
|
||||
|
||||
foreach (var item in resultExceptJudgeList)
|
||||
{
|
||||
if (notJudgeList.Any(t => t.SubjectCode == item.SubjectCode && t.VisitTaskNum == item.VisitTaskNum) && item.ArmEnum == Arm.DoubleReadingArm1)
|
||||
{
|
||||
item.IsGenerateJudge = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (arbitrationRule == ArbitrationRule.Reading)
|
||||
{
|
||||
//先确定裁判选定的是谁
|
||||
foreach (var item in resultList)
|
||||
//处理访视裁判标记
|
||||
foreach (var visitItem in resultExceptJudgeList.Where(t => t.ReadingCategory == ReadingCategory.Visit))
|
||||
{
|
||||
//以最后一次裁判为准 找到最大的裁判的裁判选择的Arm,相同就设置裁判标记
|
||||
item.IsGenerateJudge = list.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.SubjectCode == item.SubjectCode && t.VisitTaskNum > item.VisitTaskNum
|
||||
).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault()?.JudgeArmEnum == item.ArmEnum ? true : false;
|
||||
//默认设置为false 只处理为true 和 空的情况
|
||||
visitItem.IsGenerateJudge = false;
|
||||
|
||||
}
|
||||
//全局裁判了,选择了那个全局,那么对应全局下面的访视 设置裁判标记
|
||||
foreach (var item in resultList.Where(t => t.ReadingCategory == ReadingCategory.Visit))
|
||||
{
|
||||
if (judegeList.Count > 0)
|
||||
{
|
||||
|
||||
var selectJudegeGlobalList = resultList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.IsGenerateJudge == true).ToList();
|
||||
var maxFinishedJudge = judegeList.Where(t => t.ReadingTaskState == ReadingTaskState.HaveSigned).FirstOrDefault();
|
||||
|
||||
//全局修改了答案,那么给访视上赋值全局的结果 并且取的是最后的全局
|
||||
var existGlobalAnswer = selectJudegeGlobalList.Where(t => t.SubjectCode == item.SubjectCode).SelectMany(t => t.GlobalTaskAnswerList).Where(t => t.VisitTaskId == item.Id)
|
||||
.OrderByDescending(t => t.GlobalTaskVisitNum).FirstOrDefault()?.Answer;
|
||||
var maxNotFinishedJudge = judegeList.Where(t => t.ReadingTaskState != ReadingTaskState.HaveSigned).FirstOrDefault();
|
||||
|
||||
item.OverallTumorEvaluationResult = string.IsNullOrEmpty(existGlobalAnswer) ? item.OverallTumorEvaluationResult : existGlobalAnswer;
|
||||
if (maxFinishedJudge == null && maxNotFinishedJudge != null)
|
||||
{
|
||||
//仅有一个未完成的全局裁判,那么都是null
|
||||
if (visitItem.VisitTaskNum < maxNotFinishedJudge.VisitTaskNum)
|
||||
{
|
||||
visitItem.IsGenerateJudge = null;
|
||||
}
|
||||
}
|
||||
else if (maxFinishedJudge != null && maxNotFinishedJudge == null)
|
||||
{
|
||||
//全局裁判都完成了,那么以最后一次裁判选择的为准
|
||||
|
||||
item.IsGenerateJudge = true;
|
||||
}
|
||||
if (visitItem.ArmEnum == maxFinishedJudge.JudgeArmEnum && visitItem.VisitTaskNum < maxFinishedJudge.VisitTaskNum)
|
||||
{
|
||||
visitItem.IsGenerateJudge = true;
|
||||
}
|
||||
|
||||
else if (visitItem.ArmEnum == Arm.DoubleReadingArm1)
|
||||
{
|
||||
visitItem.IsGenerateJudge = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//两个都不为null 肯定是不同的裁判
|
||||
|
||||
//在完成裁判之后的,和未完成裁判之前的
|
||||
if (visitItem.VisitTaskNum < maxNotFinishedJudge.VisitTaskNum && visitItem.VisitTaskNum > maxFinishedJudge.VisitTaskNum)
|
||||
{
|
||||
visitItem.IsGenerateJudge = null;
|
||||
}
|
||||
|
||||
else if (visitItem.ArmEnum == maxFinishedJudge.JudgeArmEnum && visitItem.VisitTaskNum < maxFinishedJudge.VisitTaskNum)
|
||||
{
|
||||
visitItem.IsGenerateJudge = true;
|
||||
}
|
||||
|
||||
else if (visitItem.ArmEnum == Arm.DoubleReadingArm1)
|
||||
{
|
||||
visitItem.IsGenerateJudge = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//不存在裁判 将R1设置
|
||||
if (visitItem.ArmEnum == Arm.DoubleReadingArm1)
|
||||
{
|
||||
visitItem.IsGenerateJudge = true;
|
||||
}
|
||||
}
|
||||
#region 全局的维度考虑
|
||||
|
||||
|
||||
}
|
||||
//// 该阅片人 subject 已完成的最大的全局(全局都是已完成的任务,裁判可能完成了,可能没完成)
|
||||
//var subjectMaxGlobal = resultExceptJudgeList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.SubjectCode == item.SubjectCode && t.ArmEnum == item.ArmEnum).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
//如果没有产生裁判,默认选择R1
|
||||
////没有全局
|
||||
//if (subjectMaxGlobal == null)
|
||||
//{
|
||||
// //这个时候肯定没有裁判 默认选择R1
|
||||
|
||||
//找到没有裁判的访视任务
|
||||
var notJudgeList = resultList.GroupBy(t => new { t.SubjectCode, t.VisitTaskNum }).Where(g => g.All(t => t.IsGenerateJudge == false)).Select(g => new { g.Key.SubjectCode, g.Key.VisitTaskNum }).ToList();
|
||||
// if (item.ArmEnum == Arm.DoubleReadingArm1)
|
||||
// {
|
||||
// item.IsGenerateJudge = true;
|
||||
// }
|
||||
|
||||
foreach (var item in resultList)
|
||||
{
|
||||
if (notJudgeList.Any(t => t.SubjectCode == item.SubjectCode && t.VisitTaskNum == item.VisitTaskNum) && item.ArmEnum == Arm.DoubleReadingArm1)
|
||||
{
|
||||
item.IsGenerateJudge = true;
|
||||
|
||||
//}
|
||||
////有全局
|
||||
//else
|
||||
//{
|
||||
// //判断当前受试者已完成的最大的全局是否有裁判
|
||||
// var existSubjectMaxGlobalJudge = judegeList.Where(t => t.SubjectCode == item.SubjectCode && t.VisitTaskNum - ReadingCommon.TaskNumDic[ReadingCategory.Judge] == subjectMaxGlobal.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
// //最大的全局没有裁判(有一个做完了,有一个没做,或者都做完了,没产生裁判)
|
||||
// if (existSubjectMaxGlobalJudge == null)
|
||||
// {
|
||||
// //找到最大的全局裁判
|
||||
// var maxJudgedGlobal= judegeList.Where(t => t.SubjectCode == item.SubjectCode ).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //将该裁判选择的全局的阅片人之前的裁判标记都设置为是
|
||||
|
||||
// //是否是裁判选择的
|
||||
// if (item.ArmEnum == existSubjectMaxGlobalJudge.JudgeArmEnum)
|
||||
// {
|
||||
// //是否是裁判选择之前的
|
||||
// if (item.VisitTaskNum < existSubjectMaxGlobalJudge.VisitTaskNum)
|
||||
// {
|
||||
// item.IsGenerateJudge = true;
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
return resultList;
|
||||
return resultExceptJudgeList;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1539,8 +1633,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
throw new Exception(_localizer["ExcelExport_UnsupportedExport"]);
|
||||
}
|
||||
|
||||
var list = await _repository.Where<VisitTask>(t => t.TrialId == queryVisitTask.TrialId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
var list = await _repository.Where<VisitTask>(t => t.TrialId == queryVisitTask.TrialId && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect)
|
||||
|
||||
//访视和全局查询已签名完成的,裁判可以是未签名,未完成的
|
||||
.Where(t => (t.ReadingTaskState == ReadingTaskState.HaveSigned && (t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global)) || (t.ReadingCategory == ReadingCategory.Judge))
|
||||
//.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
||||
//.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
||||
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
||||
|
@ -1667,10 +1763,6 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var query = _repository.Where<VisitTask>(t => t.TrialId == queryVisitTask.TrialId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
|
||||
//.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
||||
//.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
||||
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
||||
|
||||
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
||||
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||
|
||||
|
|
|
@ -322,7 +322,7 @@ namespace IRaCIS.Application.Services
|
|||
};
|
||||
|
||||
|
||||
await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UnloginUseEmailResetPassword, messageToSend, emailConfigFunc);
|
||||
await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.ReviewerLogin, messageToSend, emailConfigFunc);
|
||||
|
||||
//此时不知道用户
|
||||
var sucessHandle = GetEmailSuccessHandle(Guid.Empty, verificationCode, emailAddress);
|
||||
|
|
|
@ -16,7 +16,6 @@ using EasyCaching.Core;
|
|||
using IRaCIS.Core.Application.Contracts;
|
||||
using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
||||
using IRaCIS.Core.Application.Auth;
|
||||
using BeetleX.Redis.Commands;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
|
||||
|
|
|
@ -935,6 +935,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string SubjectCode { get; set; } = String.Empty;
|
||||
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid DoctorUserId { get; set; }
|
||||
|
||||
public string TaskName { get; set; }
|
||||
public string TaskBlindName { get; set; }
|
||||
|
||||
|
@ -947,6 +950,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Arm ArmEnum { get; set; }
|
||||
public string UserName { get; set; }
|
||||
|
||||
public ReadingTaskState ReadingTaskState { get; set; }
|
||||
|
||||
public ReadingCategory ReadingCategory { get; set; }
|
||||
|
||||
[DictionaryTranslateAttribute("ExistDisease", CriterionType.RECIST1Point1, nameof(OverallTumorEvaluationExport.IsBaseline), "true")]
|
||||
|
@ -961,15 +966,17 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public Arm? JudgeArmEnum { get; set; }
|
||||
|
||||
//public Guid? JudgeResultTaskId { get; set; }
|
||||
|
||||
|
||||
//根据裁判的任务结果 设置访视任务的这个字段 该字段表示 裁判认同该任务的结果
|
||||
[DictionaryTranslateAttribute("YesOrNo")]
|
||||
public bool IsGenerateJudge { get; set; }
|
||||
public bool? IsGenerateJudge { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
//[JsonIgnore]
|
||||
|
||||
public List<GlobalAnswerInfo> GlobalTaskAnswerList { get; set; }
|
||||
//public List<GlobalAnswerInfo> GlobalTaskAnswerList { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -192,15 +192,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
.ForMember(o => o.OverallTumorEvaluationResult, t => t.MapFrom(u =>
|
||||
criterionType == CriterionType.RECIST1Point1 ?( u.SourceSubjectVisit.IsBaseLine==true ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.ExistDisease).FirstOrDefault()!.Answer:
|
||||
u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).FirstOrDefault()!.Answer)
|
||||
u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).Select(t=>t.IsGlobalChange?t.GlobalChangeAnswer:t.Answer).FirstOrDefault())
|
||||
: criterionType == CriterionType.PCWG3 ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.SiteVisitForTumorEvaluation).FirstOrDefault()!.Answer : String.Empty
|
||||
))
|
||||
|
||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
|
||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
|
||||
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
|
||||
.ForMember(o => o.GlobalTaskAnswerList, t => t.MapFrom(u => u.GlobalVisitResultList.Where(t=>t.GlobalAnswerType== GlobalAnswerType.Question)
|
||||
.Select(c=>new GlobalAnswerInfo() { GlobalTaskVisitNum=c.VisitTask.VisitTaskNum,VisitTaskId=c.TaskId ,Answer=c.Answer})))
|
||||
//.ForMember(o => o.GlobalTaskAnswerList, t => t.MapFrom(u => u.GlobalVisitResultList.Where(t=>t.GlobalAnswerType== GlobalAnswerType.Question).Select(c=>new GlobalAnswerInfo() { GlobalTaskVisitNum=c.VisitTask.VisitTaskNum,VisitTaskId=c.TaskId ,Answer=c.Answer})))
|
||||
|
||||
|
||||
;
|
||||
|
|
|
@ -442,9 +442,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
join subjectCriteriaEvaluationVisitFilter in _subjectCriteriaEvaluationVisitFilterRepository
|
||||
.Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||
.WhereIf(inQuery.ImageDeterminationResultState != null, t => t.ImageDeterminationResultState == inQuery.ImageDeterminationResultState)
|
||||
.WhereIf(inQuery.ImageFilterState != null, t => t.ImageFilterState == inQuery.ImageFilterState)
|
||||
.WhereIf(inQuery.IsGeneratedTask != null, t => t.IsGeneratedTask == inQuery.IsGeneratedTask)
|
||||
.WhereIf(inQuery.ImageDeterminationResultState != null, t => t.ImageDeterminationResultState == inQuery.ImageDeterminationResultState)
|
||||
.WhereIf(inQuery.ImageFilterState != null, t => t.ImageFilterState == inQuery.ImageFilterState)
|
||||
.WhereIf(inQuery.IsGeneratedTask != null, t => t.IsGeneratedTask == inQuery.IsGeneratedTask)
|
||||
on subjectVisit.Id equals subjectCriteriaEvaluationVisitFilter.SubjectVisitId
|
||||
|
||||
//into d from subjectCriteriaEvaluationVisitFilter in d.DefaultIfEmpty()
|
||||
|
@ -687,7 +687,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
var subjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == command.SubjectVisitId);
|
||||
|
||||
//仅仅影响该标准自己的任务
|
||||
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == command.TrialId && t.SubjectId == command.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated
|
||||
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == command.TrialId && t.SubjectId == command.SubjectId && t.TaskState == TaskState.Effect /*&& t.TaskAllocationState == TaskAllocationState.Allocated*/
|
||||
&& t.TrialReadingCriterionId == command.TrialReadingCriterionId;
|
||||
|
||||
//有序
|
||||
|
|
|
@ -12,7 +12,6 @@ using System.Linq.Dynamic.Core;
|
|||
using Microsoft.Extensions.Logging;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Linq;
|
||||
using BeetleX.Redis.Commands;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
|
|
|
@ -145,9 +145,21 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
await client.AddRequestAsync(new DicomCEchoRequest());
|
||||
|
||||
await client.SendAsync();
|
||||
// 创建一个超时任务,设置超时时间为1秒
|
||||
var timeoutTask = Task.Delay(TimeSpan.FromSeconds(3));
|
||||
|
||||
// 发送 DICOM 请求
|
||||
var sendTask = client.SendAsync();
|
||||
|
||||
// 等待任务完成,若超时任务先完成则抛出超时异常
|
||||
if (await Task.WhenAny(sendTask, timeoutTask) == timeoutTask)
|
||||
{
|
||||
throw new TimeoutException("DICOM 请求超时。");
|
||||
}
|
||||
|
||||
|
||||
find.IsTestOK = true;
|
||||
|
||||
await _dicomAERepository.SaveChangesAsync();
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue