Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
This commit is contained in:
@@ -31,7 +31,7 @@ public static class ExcelExportHelper
|
||||
//一个值 对应不同的字典翻译
|
||||
var needTranslatePropertyList = translateType.GetProperties().Where(t => t.IsDefined(typeof(DictionaryTranslateAttribute), true))
|
||||
.SelectMany(c =>
|
||||
c.GetCustomAttributes(typeof(DictionaryTranslateAttribute), false).Select(f => (DictionaryTranslateAttribute?)f).Where(t => t.CriterionType == criterionType || t.CriterionType == null)
|
||||
c.GetCustomAttributes(typeof(DictionaryTranslateAttribute), false).Select(f => (DictionaryTranslateAttribute?)f).Where(t => t?.CriterionType == criterionType || t?.CriterionType == null)
|
||||
.Select(k => new { c.Name, k.DicParentCode ,k.IsTranslateDenpendOtherProperty, k.DependPropertyName,k.DependPropertyValueStr})
|
||||
).ToList();
|
||||
|
||||
|
||||
@@ -458,6 +458,9 @@
|
||||
质疑列表
|
||||
</summary>
|
||||
<param name="challengeQuery"></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.GetSubjectList_Export(IRaCIS.Application.Contracts.SubjectQueryParam,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
@@ -465,6 +468,9 @@
|
||||
受试者信息导出表
|
||||
</summary>
|
||||
<param name="param"></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.GetSubjectProgress_Export(IRaCIS.Core.Application.Contracts.SubjectProgressQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
@@ -492,6 +498,9 @@
|
||||
阅片期信息表
|
||||
</summary>
|
||||
<param name="param"></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.GetDicomAndNoneDicomStudyList_Export(IRaCIS.Core.Application.Contracts.StudyQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
@@ -499,6 +508,9 @@
|
||||
一致性核查 检查信息表
|
||||
</summary>
|
||||
<param name="studyQuery"></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.GetConsistencyVerificationList_Export(IRaCIS.Core.Application.Contracts.CheckQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit})">
|
||||
@@ -506,6 +518,10 @@
|
||||
一致性核查记录表
|
||||
</summary>
|
||||
<param name="checkQuery"></param>
|
||||
<param name="_commonDocumentRepository"></param>
|
||||
<param name="_dictionaryService"></param>
|
||||
<param name="_trialRepository"></param>
|
||||
<param name="_subjectVisitRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetReadingTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
@@ -513,6 +529,9 @@
|
||||
PM阅片跟踪
|
||||
</summary>
|
||||
<param name="queryVisitTask"></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.GetReReadingTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
@@ -520,6 +539,9 @@
|
||||
PM 重阅追踪
|
||||
</summary>
|
||||
<param name="queryVisitTask"></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.GetMedicalReviewTaskList_Export(IRaCIS.Core.Application.ViewModel.TaskMedicalReviewQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
@@ -527,6 +549,9 @@
|
||||
PM 医学审核(挑选任务生成后的列表)
|
||||
</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.GetSelfAnalysisTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
@@ -534,12 +559,19 @@
|
||||
自身一致性分析(仅做了resist1.1)
|
||||
</summary>
|
||||
<param name="queryVisitTask"></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.GetGroupAnalysisTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,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>
|
||||
组件一致性分析(仅做了resist1.1)
|
||||
</summary>
|
||||
<param name="queryVisitTask"></param>
|
||||
<param name="_commonDocumentRepository"></param>
|
||||
<param name="_dictionaryService"></param>
|
||||
<param name="_trialRepository"></param>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
@@ -555,6 +587,9 @@
|
||||
整体肿瘤评估 (目前仅仅 RECIST1.1 多个标准一个接口 Excel 列是一样的 )
|
||||
</summary>
|
||||
<param name="queryVisitTask"></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.GetEvaluationOfTumorEfficacy_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
@@ -573,6 +608,9 @@
|
||||
评估病灶明细表 (目前仅仅 RECIST1.1 RECIST1.1 PGW3 表都是不同的)
|
||||
</summary>
|
||||
<param name="queryVisitTask"></param>
|
||||
<param name="_commonDocumentRepository"></param>
|
||||
<param name="_dictionaryService"></param>
|
||||
<param name="_trialRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.TrialEmailNoticeConfigService">
|
||||
|
||||
@@ -86,6 +86,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// 质疑列表
|
||||
/// </summary>
|
||||
/// <param name="challengeQuery"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
@@ -128,6 +131,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// 受试者信息导出表
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetSubjectList_Export(SubjectQueryParam param,
|
||||
@@ -379,7 +385,8 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
|
||||
UploadFinishedTime = t.UploadFinishedTime,
|
||||
|
||||
TotalMillisecondsInterval = t.TotalMillisecondsInterval,
|
||||
ArchiveFinishedTime=t.ArchiveFinishedTime,
|
||||
|
||||
|
||||
UploadTime = t.CreateTime,
|
||||
|
||||
@@ -409,6 +416,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// 阅片期信息表
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetReadingPeriodList_Export(ReadPeriodQuery param,
|
||||
@@ -435,6 +445,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// 一致性核查 检查信息表
|
||||
/// </summary>
|
||||
/// <param name="studyQuery"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost]
|
||||
@@ -519,6 +532,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// 一致性核查记录表
|
||||
/// </summary>
|
||||
/// <param name="checkQuery"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <param name="_subjectVisitRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetConsistencyVerificationList_Export(CheckQuery checkQuery,
|
||||
@@ -555,6 +572,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// PM阅片跟踪
|
||||
/// </summary>
|
||||
/// <param name="queryVisitTask"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetReadingTaskList_Export(VisitTaskQuery queryVisitTask,
|
||||
@@ -602,6 +622,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// PM 重阅追踪
|
||||
/// </summary>
|
||||
/// <param name="queryVisitTask"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetReReadingTaskList_Export(VisitTaskQuery queryVisitTask,
|
||||
@@ -648,6 +671,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// PM 医学审核(挑选任务生成后的列表)
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetMedicalReviewTaskList_Export(TaskMedicalReviewQuery inQuery,
|
||||
@@ -686,6 +712,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// 自身一致性分析(仅做了resist1.1)
|
||||
/// </summary>
|
||||
/// <param name="queryVisitTask"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetSelfAnalysisTaskList_Export(VisitTaskQuery queryVisitTask,
|
||||
@@ -763,6 +792,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// <summary>
|
||||
/// 组件一致性分析(仅做了resist1.1)
|
||||
/// </summary>
|
||||
/// <param name="queryVisitTask"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
@@ -923,6 +956,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// 整体肿瘤评估 (目前仅仅 RECIST1.1 多个标准一个接口 Excel 列是一样的 )
|
||||
/// </summary>
|
||||
/// <param name="queryVisitTask"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetOverallTumorEvaluationList_Export(VisitTaskQuery queryVisitTask,
|
||||
@@ -935,7 +971,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
|
||||
|
||||
//每次查询必须是单标准的
|
||||
var criterion = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == queryVisitTask.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName }).FirstOrDefaultAsync();
|
||||
var criterion = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == queryVisitTask.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName }).FirstNotNullAsync();
|
||||
|
||||
if (criterion.CriterionType != CriterionType.RECIST1Pointt1 && criterion.CriterionType != CriterionType.PCWG3)
|
||||
{
|
||||
@@ -1040,6 +1076,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
/// 评估病灶明细表 (目前仅仅 RECIST1.1 RECIST1.1 PGW3 表都是不同的)
|
||||
/// </summary>
|
||||
/// <param name="queryVisitTask"></param>
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetDetailedOfEvaluatedLesion_Export(VisitTaskQuery queryVisitTask,
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
var isNeedSend = true;
|
||||
|
||||
//手动发送的时候,也有可能答案是是 此时是 这里不发送,发送已经生成的文件
|
||||
if (pdAnswer == "是" && isHandSend==null)
|
||||
if (pdAnswer == "是" && isHandSend == null)
|
||||
{
|
||||
isNeedSend = true;
|
||||
|
||||
@@ -196,9 +196,16 @@ namespace IRaCIS.Core.Application.Service
|
||||
//生成任务
|
||||
foreach (var taskId in taskIdList)
|
||||
{
|
||||
await _taskMedicalReviewRepository.AddAsync(new TaskMedicalReview() { TrialId = trialId, VisitTaskId = taskId, MedicalManagerUserId = minUserIdList.FirstOrDefault(), AllocateTime = DateTime.Now
|
||||
,IsAutoGenerate=true,PDRelationTaskIdListStr=string.Join('|', taskIdList)
|
||||
},true);
|
||||
await _taskMedicalReviewRepository.AddAsync(new TaskMedicalReview()
|
||||
{
|
||||
TrialId = trialId,
|
||||
VisitTaskId = taskId,
|
||||
MedicalManagerUserId = minUserIdList.FirstOrDefault(),
|
||||
AllocateTime = DateTime.Now
|
||||
,
|
||||
IsAutoGenerate = true,
|
||||
PDRelationTaskIdListStr = string.Join('|', taskIdList.Distinct())
|
||||
}, true);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -470,7 +477,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
if (await _repository.Where<ReadingTableQuestionAnswer>().AnyAsync(x => x.VisitTaskId == visitTaskId && x.Answer == TargetState.Exist.GetEnumInt() &&
|
||||
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && x.ReadingQuestionTrial.LesionType == LesionType.TargetLesion))
|
||||
{
|
||||
answer = "是";
|
||||
answer = "是";
|
||||
}
|
||||
|
||||
|
||||
@@ -478,13 +485,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
//入组确认一直交给第一个人,如果第一个人重阅 还未做完,第二个人先做完了,此时不发
|
||||
|
||||
var existFirstEnrollTask= await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.IsAnalysisCreate == false
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId).OrderBy(t=>t.SignTime).FirstOrDefaultAsync();
|
||||
var existFirstEnrollTask = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.IsAnalysisCreate == false
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId).OrderBy(t => t.SignTime).FirstOrDefaultAsync();
|
||||
|
||||
//入组确认的医生已确定
|
||||
if( (existFirstEnrollTask != null) &&(taskInfo.DoctorUserId != existFirstEnrollTask.DoctorUserId) )
|
||||
{
|
||||
isNeedSend = false;
|
||||
if ((existFirstEnrollTask != null) && (taskInfo.DoctorUserId != existFirstEnrollTask.DoctorUserId))
|
||||
{
|
||||
isNeedSend = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -506,7 +513,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -520,48 +527,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
|
||||
//单重
|
||||
|
||||
if (taskInfo.ReadingType == ReadingMethod.Single)
|
||||
{
|
||||
//仲裁在访视上 或者在阅片期
|
||||
if (taskInfo.ArbitrationRule != ArbitrationRule.None)
|
||||
{
|
||||
|
||||
throw new BusinessValidationFailedException("单重有序阅片配置有误(不应该有仲裁对象配置),请核查!");
|
||||
}
|
||||
|
||||
|
||||
//要求PD 确认的访视 是截止访视 还是非截止访视(根据该访视有没有配置阅片期来判断)
|
||||
|
||||
if (taskInfo.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
//存在阅片期 那么就是截止访视
|
||||
if (await _repository.Where<ReadModule>(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.SubjectVisitId == taskInfo.SourceSubjectVisitId && t.ReadingSetType == ReadingSetType.ImageReading).AnyAsync())
|
||||
{
|
||||
isNeedSend = false;
|
||||
}
|
||||
else//非截止访视 在访视读完后,发送
|
||||
{
|
||||
answer = await TranslatePdStateAsync(visitTaskId, ReadingCategory.Visit, taskInfo.CriterionType);
|
||||
}
|
||||
}
|
||||
//截止访视 在访视读完,并完成全局阅片后发送全局的结果
|
||||
else if (taskInfo.ReadingCategory == ReadingCategory.Global)
|
||||
{
|
||||
answer = await TranslatePdStateAsync(visitTaskId, ReadingCategory.Global, taskInfo.CriterionType);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("单重有序阅片 该类型的任务不应进入此处逻辑,请联系后台开发核查!");
|
||||
}
|
||||
|
||||
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, new List<Guid>() { visitTaskId }, minUserIdList);
|
||||
|
||||
|
||||
}
|
||||
//双重
|
||||
else if (taskInfo.ReadingType == ReadingMethod.Double)
|
||||
if (taskInfo.ReadingType == ReadingMethod.Double)
|
||||
{
|
||||
|
||||
|
||||
@@ -590,7 +558,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
var judgeResultId = taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().JudgeResultTaskId.Value;
|
||||
answer = await TranslatePdStateAsync(judgeResultId, ReadingCategory.Visit, taskInfo.CriterionType);
|
||||
|
||||
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Where(t=>t.ReadingCategory==ReadingCategory.Judge).Select(t => t.Id).ToList(), minUserIdList);
|
||||
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Select(t => t.Id).ToList(), minUserIdList);
|
||||
|
||||
}
|
||||
else
|
||||
@@ -657,100 +625,128 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
throw new BusinessValidationFailedException("双重有序阅片 没有定义该仲裁规则处理逻辑,请联系业务和后台开发核查!");
|
||||
|
||||
////只发第一个人
|
||||
//if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false &&
|
||||
//t.Id != visitTaskId && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId))
|
||||
//{
|
||||
// isNeedSend = false;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
||||
// answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//屏蔽单重阅片添加
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("有序阅片配置有误(应为单重或者双重阅片),请核查!");
|
||||
isNeedSend = false;
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
#region 发邮件屏蔽单重的
|
||||
////单重
|
||||
//else if (taskInfo.ReadingType == ReadingMethod.Single)
|
||||
//{
|
||||
// //仲裁在访视上 或者在阅片期
|
||||
// if (taskInfo.ArbitrationRule != ArbitrationRule.None)
|
||||
// {
|
||||
|
||||
// throw new BusinessValidationFailedException("单重有序阅片配置有误(不应该有仲裁对象配置),请核查!");
|
||||
// }
|
||||
|
||||
|
||||
// //要求PD 确认的访视 是截止访视 还是非截止访视(根据该访视有没有配置阅片期来判断)
|
||||
|
||||
// if (taskInfo.ReadingCategory == ReadingCategory.Visit)
|
||||
// {
|
||||
// //存在阅片期 那么就是截止访视
|
||||
// if (await _repository.Where<ReadModule>(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.SubjectVisitId == taskInfo.SourceSubjectVisitId && t.ReadingSetType == ReadingSetType.ImageReading).AnyAsync())
|
||||
// {
|
||||
// isNeedSend = false;
|
||||
// }
|
||||
// else//非截止访视 在访视读完后,发送
|
||||
// {
|
||||
// answer = await TranslatePdStateAsync(visitTaskId, ReadingCategory.Visit, taskInfo.CriterionType);
|
||||
// }
|
||||
// }
|
||||
// //截止访视 在访视读完,并完成全局阅片后发送全局的结果
|
||||
// else if (taskInfo.ReadingCategory == ReadingCategory.Global)
|
||||
// {
|
||||
// answer = await TranslatePdStateAsync(visitTaskId, ReadingCategory.Global, taskInfo.CriterionType);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// throw new BusinessValidationFailedException("单重有序阅片 该类型的任务不应进入此处逻辑,请联系后台开发核查!");
|
||||
// }
|
||||
|
||||
// isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, new List<Guid>() { visitTaskId }, minUserIdList);
|
||||
|
||||
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// throw new BusinessValidationFailedException("有序阅片配置有误(应为单重或者双重阅片),请核查!");
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
//无序
|
||||
//屏蔽无序阅片添加
|
||||
else
|
||||
{
|
||||
//单重
|
||||
|
||||
|
||||
if (taskInfo.ReadingType == ReadingMethod.Single && taskInfo.ArbitrationRule == ArbitrationRule.None)
|
||||
{
|
||||
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||
|
||||
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, new List<Guid>() { visitTaskId }, minUserIdList);
|
||||
}
|
||||
//双重 截止访视只在阅片期的时候存在 要求PD确认的访视 肯定是非截止访视
|
||||
else if (taskInfo.ReadingType == ReadingMethod.Double && taskInfo.ArbitrationRule == ArbitrationRule.Visit)
|
||||
{
|
||||
//在两位阅片人读完访视后,如果有裁判者等裁判读完,如果无裁判则等第二个人的读完
|
||||
|
||||
var taskList = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect
|
||||
&& (t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Judge)).ToListAsync();
|
||||
|
||||
//这里要求 到这里已经如果有裁判 已经生成裁判了保存数据库
|
||||
if (taskList.Count == 2 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit) == 2)
|
||||
{
|
||||
|
||||
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||
|
||||
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Select(t => t.Id).ToList(), minUserIdList);
|
||||
}
|
||||
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
|
||||
{
|
||||
var judgeResultId = taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().JudgeResultTaskId.Value;
|
||||
answer = await TranslatePdStateAsync(judgeResultId, ReadingCategory.Visit, taskInfo.CriterionType);
|
||||
|
||||
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Select(t => t.Id).ToList(), minUserIdList);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
isNeedSend = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("无序阅片配置有误(应为单重无仲裁对象,双重针对访视仲裁),请核查!");
|
||||
|
||||
|
||||
////只发第一个人
|
||||
//if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false &&
|
||||
//t.Id != visitTaskId && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId))
|
||||
//{
|
||||
// isNeedSend = false;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
||||
// answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
isNeedSend = false;
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
#region 发送邮件屏蔽无序的
|
||||
// //无序
|
||||
//else
|
||||
//{
|
||||
// //单重
|
||||
|
||||
|
||||
// if (taskInfo.ReadingType == ReadingMethod.Single && taskInfo.ArbitrationRule == ArbitrationRule.None)
|
||||
// {
|
||||
// answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||
|
||||
// isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, new List<Guid>() { visitTaskId }, minUserIdList);
|
||||
// }
|
||||
// //双重 截止访视只在阅片期的时候存在 要求PD确认的访视 肯定是非截止访视
|
||||
// else if (taskInfo.ReadingType == ReadingMethod.Double && taskInfo.ArbitrationRule == ArbitrationRule.Visit)
|
||||
// {
|
||||
// //在两位阅片人读完访视后,如果有裁判者等裁判读完,如果无裁判则等第二个人的读完
|
||||
|
||||
// var taskList = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect
|
||||
// && (t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Judge)).ToListAsync();
|
||||
|
||||
// //这里要求 到这里已经如果有裁判 已经生成裁判了保存数据库
|
||||
// if (taskList.Count == 2 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit) == 2)
|
||||
// {
|
||||
|
||||
// answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||
|
||||
// isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Select(t => t.Id).ToList(), minUserIdList);
|
||||
// }
|
||||
// else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
|
||||
// {
|
||||
// var judgeResultId = taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().JudgeResultTaskId.Value;
|
||||
// answer = await TranslatePdStateAsync(judgeResultId, ReadingCategory.Visit, taskInfo.CriterionType);
|
||||
|
||||
// isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Select(t => t.Id).ToList(), minUserIdList);
|
||||
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// isNeedSend = false;
|
||||
// }
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// throw new BusinessValidationFailedException("无序阅片配置有误(应为单重无仲裁对象,双重针对访视仲裁),请核查!");
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
#endregion
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -824,7 +820,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
sendEmailConfig.EmailAttachMentConfigList.Add(new EmailAttachMentConfig()
|
||||
{
|
||||
FileName =$"{taskInfo.SubjectCode}_{emailConfig.FileName}" ,
|
||||
FileName = $"{taskInfo.SubjectCode}_{emailConfig.FileName}",
|
||||
|
||||
FileStream = memoryStream
|
||||
});
|
||||
@@ -887,12 +883,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
//找到最早签名的
|
||||
var firstSignTask = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == exisitBaseline.Id /*&& t.TaskState == TaskState.Effect*/ && t.IsAnalysisCreate == false
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == trialReadingCriterionId).OrderBy(t=>t.SignTime).FirstOrDefaultAsync();
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == trialReadingCriterionId).OrderBy(t => t.SignTime).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
if (firstSignTask != null)
|
||||
{
|
||||
var task = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == exisitBaseline.Id && t.TaskState == TaskState.Effect && t.DoctorUserId== firstSignTask.DoctorUserId && t.IsAnalysisCreate == false
|
||||
var task = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == exisitBaseline.Id && t.TaskState == TaskState.Effect && t.DoctorUserId == firstSignTask.DoctorUserId && t.IsAnalysisCreate == false
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == trialReadingCriterionId).OrderBy(t => t.SignTime).FirstOrDefaultAsync();
|
||||
|
||||
//如果存在做完的该任务
|
||||
@@ -914,10 +910,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
return ResponseOutput.NotOk("当前未有阅片人读完基线任务!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -946,7 +942,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
{ TrialReadingCriterionId = t.Id, t.ReadingType, t.IsReadingTaskViewInOrder, t.CriterionType, t.ArbitrationRule }).FirstNotNullAsync();
|
||||
|
||||
// 项目双重
|
||||
if (trialReadingCriterionConfig.ReadingType == ReadingMethod.Double)
|
||||
if (trialReadingCriterionConfig.ReadingType == ReadingMethod.Double && trialReadingCriterionConfig.IsReadingTaskViewInOrder)
|
||||
{
|
||||
//仲裁在访视上面
|
||||
if (trialReadingCriterionConfig.ArbitrationRule == ArbitrationRule.Visit)
|
||||
@@ -1037,58 +1033,62 @@ namespace IRaCIS.Core.Application.Service
|
||||
return ResponseOutput.NotOk("未定义该仲裁规则发送业务逻辑!");
|
||||
}
|
||||
}
|
||||
// 项目单重 判断最新的Pd 访视是否完成 是否有阅片期即可
|
||||
else if (trialReadingCriterionConfig.ReadingType == ReadingMethod.Single)
|
||||
{
|
||||
|
||||
#region 发送邮件屏蔽单重阅片情况
|
||||
//// 项目单重 判断最新的Pd 访视是否完成 是否有阅片期即可
|
||||
//else if (trialReadingCriterionConfig.ReadingType == ReadingMethod.Single)
|
||||
//{
|
||||
|
||||
|
||||
|
||||
var task = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == currentLatestPdVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == trialReadingCriterionId).FirstOrDefaultAsync();
|
||||
// var task = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == currentLatestPdVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false
|
||||
// && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == trialReadingCriterionId).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
if (task == null)
|
||||
{
|
||||
return ResponseOutput.NotOk("当前受试者最新PD访视任务未阅片完成");
|
||||
}
|
||||
else
|
||||
{
|
||||
//存在阅片期 那么就是截止访视
|
||||
// if (task == null)
|
||||
// {
|
||||
// return ResponseOutput.NotOk("当前受试者最新PD访视任务未阅片完成");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //存在阅片期 那么就是截止访视
|
||||
|
||||
var existReadModule = await _repository.Where<ReadModule>(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.SubjectVisitId == currentLatestPdVisitId && t.ReadingSetType == ReadingSetType.ImageReading)
|
||||
.FirstOrDefaultAsync();
|
||||
if (existReadModule != null)
|
||||
{
|
||||
// var existReadModule = await _repository.Where<ReadModule>(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.SubjectVisitId == currentLatestPdVisitId && t.ReadingSetType == ReadingSetType.ImageReading)
|
||||
// .FirstOrDefaultAsync();
|
||||
// if (existReadModule != null)
|
||||
// {
|
||||
|
||||
var global = await _visitTaskRepository.Where(t => t.SouceReadModuleId == currentLatestPdVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == trialReadingCriterionId).FirstOrDefaultAsync();
|
||||
// var global = await _visitTaskRepository.Where(t => t.SouceReadModuleId == currentLatestPdVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false
|
||||
// && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == trialReadingCriterionId).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
if (global != null)
|
||||
{
|
||||
var filePath = await BaseBusinessScenarioSendEmailAsync(global.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
// if (global != null)
|
||||
// {
|
||||
// var filePath = await BaseBusinessScenarioSendEmailAsync(global.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
|
||||
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
|
||||
}
|
||||
else
|
||||
{
|
||||
return ResponseOutput.NotOk("当前受试者阅片期任务未阅片完成");
|
||||
}
|
||||
// return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return ResponseOutput.NotOk("当前受试者阅片期任务未阅片完成");
|
||||
// }
|
||||
|
||||
}
|
||||
else//非截止访视 在访视读完后,发送
|
||||
{
|
||||
var filePath = await BaseBusinessScenarioSendEmailAsync(task.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
// }
|
||||
// else//非截止访视 在访视读完后,发送
|
||||
// {
|
||||
// var filePath = await BaseBusinessScenarioSendEmailAsync(task.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
|
||||
|
||||
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
|
||||
}
|
||||
}
|
||||
// return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
//}
|
||||
#endregion
|
||||
|
||||
else
|
||||
{
|
||||
return ResponseOutput.NotOk("当前项目配置,未定义单双重外发送业务逻辑!");
|
||||
return ResponseOutput.NotOk("当前项目配置,不满足双重有序阅片,不满足发送条件!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1127,7 +1127,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
/// <param name="IsGlobalGenerate"> 是否是全局产生(区分裁判任务)</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||
private async Task<string> TranslatePdStateAsync(Guid visitTaskId, ReadingCategory readingCategory, CriterionType criterionType, bool? IsGlobalGenerate=null)
|
||||
private async Task<string> TranslatePdStateAsync(Guid visitTaskId, ReadingCategory readingCategory, CriterionType criterionType, bool? IsGlobalGenerate = null)
|
||||
{
|
||||
|
||||
var answer = string.Empty;
|
||||
|
||||
@@ -54,10 +54,31 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
|
||||
public string UploadStartTimeStr => UploadStartTime.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
public string UploadFinishedTimeStr => UploadFinishedTime.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
public string UploadFinishedTimeStr => UploadFinishedTime?.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
|
||||
public string ArchiveFinishedTimeStr => ArchiveFinishedTime?.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
|
||||
|
||||
public double TotalMillisecondsInterval { get; set; }
|
||||
public string UploadIntervalStr
|
||||
{
|
||||
get
|
||||
{
|
||||
var uploadTimeSpan = UploadFinishedTime - UploadStartTime;
|
||||
|
||||
return $" {uploadTimeSpan?.Hours}:{uploadTimeSpan?.Minutes}:{uploadTimeSpan?.Seconds}.{uploadTimeSpan?.Milliseconds}";
|
||||
}
|
||||
}
|
||||
|
||||
public string ArchiveIntervalStr
|
||||
{
|
||||
get
|
||||
{
|
||||
var uploadTimeSpan = ArchiveFinishedTime - UploadFinishedTime;
|
||||
|
||||
return $" {uploadTimeSpan?.Hours}:{uploadTimeSpan?.Minutes}:{uploadTimeSpan?.Seconds}.{uploadTimeSpan?.Milliseconds}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string TimeInterval
|
||||
@@ -65,9 +86,11 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
get
|
||||
{
|
||||
|
||||
var uploadTimeSpan = UploadFinishedTime - UploadStartTime;
|
||||
var uploadTimeSpan = ArchiveFinishedTime - UploadStartTime;
|
||||
|
||||
return $" {uploadTimeSpan.Hours}:{uploadTimeSpan.Minutes}:{uploadTimeSpan.Seconds}.{uploadTimeSpan.Milliseconds}";
|
||||
return $" {uploadTimeSpan?.Hours}:{uploadTimeSpan?.Minutes}:{uploadTimeSpan?.Seconds}.{uploadTimeSpan?.Milliseconds}";
|
||||
|
||||
#region 废弃
|
||||
//if (uploadTimeSpan.Seconds == 0 && uploadTimeSpan.Minutes==0 && uploadTimeSpan.Hours == 0)
|
||||
//{
|
||||
// return $"{uploadTimeSpan.Milliseconds}毫秒";
|
||||
@@ -84,13 +107,17 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
//{
|
||||
// return $" {uploadTimeSpan.Hours} 小时 {uploadTimeSpan.Minutes} 分钟 {uploadTimeSpan.Seconds} 秒 {uploadTimeSpan.Milliseconds}毫秒";
|
||||
//}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime UploadStartTime { get; set; }
|
||||
|
||||
|
||||
public DateTime UploadFinishedTime { get; set; }
|
||||
public DateTime? UploadFinishedTime { get; set; }
|
||||
|
||||
public DateTime? ArchiveFinishedTime { get; set; }
|
||||
|
||||
|
||||
public decimal FileSize { get; set; }
|
||||
@@ -103,7 +130,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public int FileCount { get; set; }
|
||||
|
||||
public bool IsSuccess = true;
|
||||
public bool IsSuccess { get; set; }
|
||||
|
||||
public string Note = string.Empty;
|
||||
|
||||
|
||||
@@ -50,6 +50,9 @@ namespace IRaCIS.Core.Application.Services
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public async Task<(Guid StudyId, string StudyCode)> ArchiveDicomStreamAsync(Stream dicomStream,
|
||||
DicomTrialSiteSubjectInfo addtionalInfo, List<string> seriesInstanceUidList, List<string> instanceUidList)
|
||||
{
|
||||
|
||||
@@ -188,8 +188,10 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
FileSize = t.FileSize,
|
||||
UploadFinishedTime = t.UploadFinishedTime,
|
||||
UploadStartTime = t.UploadStartTime,
|
||||
ArchiveFinishedTime=t.ArchiveFinishedTime,
|
||||
|
||||
|
||||
|
||||
TotalMillisecondsInterval = t.TotalMillisecondsInterval,
|
||||
|
||||
IsDicomReUpload = t.IsDicomReUpload,
|
||||
StudyId = t.Id,
|
||||
|
||||
@@ -473,10 +473,29 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public string IsDicomStr => IsDicom ? "DICOM" : "Non-DICOM";
|
||||
|
||||
public string UploadStartTimeStr => UploadStartTime.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
public string UploadFinishedTimeStr => UploadFinishedTime.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
public string UploadFinishedTimeStr => UploadFinishedTime?.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
|
||||
public string ArchiveFinishedTimeStr => ArchiveFinishedTime?.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
|
||||
public double TotalMillisecondsInterval { get; set; }
|
||||
public string UploadIntervalStr
|
||||
{
|
||||
get
|
||||
{
|
||||
var uploadTimeSpan = UploadFinishedTime - UploadStartTime;
|
||||
|
||||
return $" {uploadTimeSpan?.Hours}:{uploadTimeSpan?.Minutes}:{uploadTimeSpan?.Seconds}.{uploadTimeSpan?.Milliseconds}";
|
||||
}
|
||||
}
|
||||
|
||||
public string ArchiveIntervalStr
|
||||
{
|
||||
get
|
||||
{
|
||||
var uploadTimeSpan = ArchiveFinishedTime - UploadFinishedTime;
|
||||
|
||||
return $" {uploadTimeSpan?.Hours}:{uploadTimeSpan?.Minutes}:{uploadTimeSpan?.Seconds}.{uploadTimeSpan?.Milliseconds}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string TimeInterval
|
||||
@@ -484,16 +503,16 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
get
|
||||
{
|
||||
|
||||
var uploadTimeSpan = UploadFinishedTime - UploadStartTime;
|
||||
var uploadTimeSpan = ArchiveFinishedTime - UploadStartTime;
|
||||
|
||||
return $" {uploadTimeSpan.Hours}:{uploadTimeSpan.Minutes}:{uploadTimeSpan.Seconds}.{uploadTimeSpan.Milliseconds}";
|
||||
return $" {uploadTimeSpan?.Hours}:{uploadTimeSpan?.Minutes}:{uploadTimeSpan?.Seconds}.{uploadTimeSpan?.Milliseconds}";
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime UploadStartTime { get; set; }
|
||||
|
||||
|
||||
public DateTime UploadFinishedTime { get; set; }
|
||||
public DateTime? ArchiveFinishedTime { get; set; }
|
||||
public DateTime? UploadFinishedTime { get; set; }
|
||||
|
||||
|
||||
public decimal FileSize { get; set; }
|
||||
@@ -509,7 +528,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public int FileCount { get; set; }
|
||||
|
||||
[DictionaryTranslateAttribute("YesOrNo")]
|
||||
public bool IsSuccess { get; set; } = true;
|
||||
public bool IsSuccess { get; set; }
|
||||
|
||||
public string Note = string.Empty;
|
||||
|
||||
|
||||
@@ -1589,7 +1589,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
}
|
||||
|
||||
await _qcChallengeRepository.BatchUpdateNoTrackingAsync(t => t.IsClosed == false, u => new QCChallenge() { IsClosed = true, CloseResonEnum = QCChallengeCloseEnum.Unresolvable });
|
||||
await _qcChallengeRepository.UpdatePartialFromQueryAsync(t => t.IsClosed == false&& t.SubjectVisitId==dbSubjectVisit.Id, u => new QCChallenge() { IsClosed = true, ClosedTime=DateTime.Now, CloseResonEnum = QCChallengeCloseEnum.Unresolvable });
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -219,10 +219,19 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public List<DicomSeriesDTO> SeriesList { get; set; } = new List<DicomSeriesDTO>();
|
||||
}
|
||||
|
||||
public class PreArchiveStudyCommand
|
||||
{
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public bool IsDicom { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class ArchiveStudyCommand
|
||||
{
|
||||
|
||||
|
||||
//[NotDefault]
|
||||
//public Guid StudyMonitorId { get; set; }
|
||||
public Guid? AbandonStudyId { get; set; }
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user