Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
f33e3fa623
|
@ -1,16 +1,13 @@
|
|||
{
|
||||
"ConnectionStrings": {
|
||||
"hang": "Server=ZHOU;Database=IRaCIS;User ID=sa;Password=sa123456;"
|
||||
},
|
||||
"JwtSetting": {
|
||||
"SecurityKey": "3e6dbfa227234a03977a2f421bdb7f4f", // 密钥
|
||||
"Issuer": "IRaCIS", // 颁发者
|
||||
"Audience": "ZhiZhun", // 接收者
|
||||
"TokenExpireDays": "7" // 过期时间(7day)
|
||||
"SecurityKey": "3e6dbfa227234a03977a2f421bdb7f4f",
|
||||
"Issuer": "IRaCIS",
|
||||
"Audience": "ZhiZhun",
|
||||
"TokenExpireDays": "7"
|
||||
},
|
||||
"IpRateLimiting": {
|
||||
"EnableEndpointRateLimiting": true, //False: globally executed, true: executed for each
|
||||
"StackBlockedRequests": false, // set to false, rejected calls are not added to the throttle counter
|
||||
"EnableEndpointRateLimiting": true,
|
||||
"StackBlockedRequests": false,
|
||||
"RealIpHeader": "X-Real-IP",
|
||||
"ClientIdHeader": "X-ClientId",
|
||||
"QuotaExceededResponse": {
|
||||
|
@ -19,12 +16,10 @@
|
|||
"StatusCode": 429
|
||||
},
|
||||
"HttpStatusCode": 429,
|
||||
//"IpWhitelist": [ "127.0.0.1", "::1/10", "192.168.0.0/24" ],
|
||||
"EndpointWhitelist": [ "post:/study/archivestudy/*" ],
|
||||
//"EndpointWhitelist": [ ],
|
||||
//"EndpointWhitelist": ["post:/trial/getTrialList"], //demo
|
||||
"EndpointWhitelist": [
|
||||
"post:/study/archivestudy/*"
|
||||
],
|
||||
"IpWhitelist": [],
|
||||
//"ClientWhitelist": [ "dev-id-1", "dev-id-2" ],
|
||||
"GeneralRules": [
|
||||
{
|
||||
"Endpoint": "*",
|
||||
|
@ -48,7 +43,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
|
||||
"easycaching": {
|
||||
"inmemory": {
|
||||
"MaxRdSecond": 120,
|
||||
|
@ -63,30 +57,19 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
"UpdateConfig": {
|
||||
"test": "123456",
|
||||
"test1": "12345678"
|
||||
},
|
||||
"IRaCISBasicConfig": {
|
||||
|
||||
"DoctorCodePrefix": "RE",
|
||||
|
||||
"UserCodePrefix": "U",
|
||||
|
||||
"QCChallengeCodePrefix": "Q",
|
||||
|
||||
"NoneDicomStudyCodePrefix": "NST",
|
||||
|
||||
"DicomStudyCodePrefix": "ST",
|
||||
|
||||
"SystemSiteCodePrefix": "S",
|
||||
|
||||
"DefaultPassword": "123456",
|
||||
|
||||
"DefaultInternalOrganizationName": "ExtImaging",
|
||||
|
||||
"ImageShareExpireDays": 10
|
||||
}
|
||||
|
||||
//网站根地址,为了访问文件 dicom 和上传的文档... 实测发现不用将域名拼接返回,浏览器会自动加上当前ip,避免了多环境读取环境配置文件
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1443,6 +1443,13 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetNewTargetLesionEvaluate(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>
|
||||
|
|
|
@ -1515,7 +1515,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
var origenalTask = (await _visitTaskRepository.Where(t => item.OriginalReReadingTaskId == t.Id).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
|
||||
if ( (origenalTask.TaskState != TaskState.Effect && origenalTask.TaskState != TaskState.Freeze))
|
||||
if ((origenalTask.TaskState != TaskState.Effect && origenalTask.TaskState != TaskState.Freeze))
|
||||
{
|
||||
//---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作
|
||||
return ResponseOutput.NotOk(_localizer["VisitTask_ReapplyStatusConflict"]);
|
||||
|
@ -1607,13 +1607,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
{
|
||||
ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand);
|
||||
|
||||
//influenceTaskList.ForEach(t =>
|
||||
//{
|
||||
// //记录实际影像的任务
|
||||
|
||||
// influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id });
|
||||
//});
|
||||
|
||||
await InfluenceAddtioncalEvaluationCritrionAsync(origenalTask, influenceTaskList.Where(t => t.Id != origenalTask.Id).Where(t => t.SourceSubjectVisitId != null).Select(t => (Guid)t.SourceSubjectVisitId).Distinct().ToList());
|
||||
|
||||
await SetReReadingOrBackInfluenceAnalysisAsync(origenalTask.SubjectId);
|
||||
|
@ -1622,33 +1615,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
}
|
||||
|
||||
//申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配
|
||||
if (influenceTask.ReadingCategory == ReadingCategory.Visit && influenceTask.VisitTaskNum != origenalTask.VisitTaskNum)
|
||||
{
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.TaskState = TaskState.HaveReturned;
|
||||
|
||||
trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
|
||||
}
|
||||
else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||
{
|
||||
influenceTask.TaskState = TaskState.Adbandon;
|
||||
trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
|
||||
}
|
||||
else
|
||||
{
|
||||
influenceTask.DoctorUserId = null;
|
||||
influenceTask.AllocateTime = null;
|
||||
influenceTask.SuggesteFinishedTime = null;
|
||||
influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate;
|
||||
|
||||
trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.CancelAssign });
|
||||
}
|
||||
}
|
||||
//当前访视
|
||||
else
|
||||
{
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.TaskState = TaskState.HaveReturned;
|
||||
|
@ -1662,7 +1629,53 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
|
||||
}
|
||||
|
||||
}
|
||||
#region 废弃 分配 留存
|
||||
|
||||
////申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配
|
||||
//if (influenceTask.ReadingCategory == ReadingCategory.Visit && influenceTask.VisitTaskNum != origenalTask.VisitTaskNum)
|
||||
//{
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.HaveReturned;
|
||||
|
||||
// trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
|
||||
// }
|
||||
// else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.Adbandon;
|
||||
// trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.DoctorUserId = null;
|
||||
// influenceTask.AllocateTime = null;
|
||||
// influenceTask.SuggesteFinishedTime = null;
|
||||
// influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate;
|
||||
|
||||
// trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.CancelAssign });
|
||||
// }
|
||||
//}
|
||||
////当前访视
|
||||
//else
|
||||
//{
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.HaveReturned;
|
||||
|
||||
// trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.Adbandon;
|
||||
|
||||
// trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
@ -1690,12 +1703,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
{
|
||||
ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand);
|
||||
|
||||
//influenceTaskList.ForEach(t =>
|
||||
//{
|
||||
// //记录实际影像的任务
|
||||
|
||||
// influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id });
|
||||
//});
|
||||
|
||||
await SetReReadingOrBackInfluenceAnalysisAsync(origenalTask.SubjectId);
|
||||
|
||||
|
@ -1741,77 +1748,12 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
RequestReReadingResultEnum = RequestReReadingResult.Agree,
|
||||
});
|
||||
|
||||
//await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == origenalTask.Id, u => new VisitTask()
|
||||
//{
|
||||
// ReReadingApplyState = ReReadingApplyState.Agree
|
||||
//});
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 申请任务 重新生成 拷贝表单 必须放在影响的访视生成任务之前,因为会影响 IsConvertedTask 标志
|
||||
|
||||
|
||||
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
||||
{
|
||||
TrialId = trialId,
|
||||
|
||||
ReadingCategory = GenerateTaskCategory.ReReading,
|
||||
|
||||
ReReadingTask = origenalTask,
|
||||
|
||||
//同步才可以
|
||||
Action = (newTask) =>
|
||||
{
|
||||
//申请表 设置新任务Id
|
||||
visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id;
|
||||
|
||||
////生成的任务分配给原始医生
|
||||
newTask.DoctorUserId = origenalTask.DoctorUserId;
|
||||
newTask.TaskAllocationState = TaskAllocationState.Allocated;
|
||||
newTask.AllocateTime = DateTime.Now;
|
||||
newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||
|
||||
|
||||
//裁判任务 需要进行特殊处理 在重阅逻辑里面处理
|
||||
|
||||
|
||||
//拷贝表单
|
||||
if (visitTaskReReadingAppply.IsCopyOrigenalForms)
|
||||
{
|
||||
if (origenalTask.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
var list = _readingTaskQuestionAnswerRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.Id = Guid.Empty;
|
||||
item.VisitTaskId = newTask.Id;
|
||||
}
|
||||
|
||||
_ = _readingTaskQuestionAnswerRepository.AddRangeAsync(list).Result;
|
||||
}
|
||||
//else if (origenalTask.ReadingCategory == ReadingCategory.Global)
|
||||
//{
|
||||
// var list = _repository.Where<ReadingGlobalTaskInfo>(t => t.GlobalTaskId == origenalTask.Id).ToList();
|
||||
|
||||
// foreach (var item in list)
|
||||
// {
|
||||
// item.Id = Guid.Empty;
|
||||
// item.GlobalTaskId = newTask.Id;
|
||||
// }
|
||||
|
||||
// _ = _repository.AddRangeAsync(list).Result;
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
//有序阅片
|
||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
||||
|
@ -1846,7 +1788,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
filterExpression = filterExpression.And(t => (t.VisitTaskNum > origenalTask.VisitTaskNum &&
|
||||
(
|
||||
(((t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState != ReadingTaskState.WaitReading) || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId)
|
||||
((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId)
|
||||
// 裁判 肿瘤学是另外的医生做
|
||||
|| t.ReadingCategory == ReadingCategory.Judge
|
||||
|| t.ReadingCategory == ReadingCategory.Oncology
|
||||
|
@ -1857,7 +1799,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
{
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum &&
|
||||
(
|
||||
(((t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState != ReadingTaskState.WaitReading) || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId)
|
||||
((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId)
|
||||
// 裁判 肿瘤学是另外的医生做
|
||||
|| t.ReadingCategory == ReadingCategory.Judge
|
||||
|| t.ReadingCategory == ReadingCategory.Oncology
|
||||
|
@ -1912,6 +1854,17 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
foreach (var influenceTask in influenceTaskList)
|
||||
{
|
||||
//已签名的任务 设置转变后的标志
|
||||
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
var isConvertedTask = _visitTaskRepository.Where(t => t.Id == influenceTask.Id).Select(t => t.IsConvertedTask).FirstOrDefault();
|
||||
|
||||
if (isConvertedTask)
|
||||
{
|
||||
influenceTask.IsHistoryConvertedTask = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//处理申请的任务
|
||||
if (influenceTask.Id == origenalTask.Id)
|
||||
|
@ -1923,11 +1876,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
await InfluenceAddtioncalEvaluationCritrionAsync(origenalTask, influenceTaskList.Where(t => t.Id != origenalTask.Id).Where(t => t.SourceSubjectVisitId != null).Select(t => (Guid)t.SourceSubjectVisitId).Distinct().ToList(), false);
|
||||
|
||||
trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
|
||||
}
|
||||
//处理其他任务
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
var beforeTaskState = influenceTask.TaskState;
|
||||
|
||||
|
@ -1963,6 +1913,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
continue;
|
||||
}
|
||||
|
||||
#region 影响的任务生成
|
||||
|
||||
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
||||
{
|
||||
|
@ -1984,6 +1935,37 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
newTask.AllocateTime = DateTime.Now;
|
||||
newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||
|
||||
|
||||
if (visitTaskReReadingAppply.IsCopyOrigenalForms && influenceTask.Id==origenalTask.Id)
|
||||
{
|
||||
if (origenalTask.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
var list = _readingTaskQuestionAnswerRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.Id = Guid.Empty;
|
||||
item.VisitTaskId = newTask.Id;
|
||||
}
|
||||
|
||||
_ = _readingTaskQuestionAnswerRepository.AddRangeAsync(list).Result;
|
||||
}
|
||||
//else if (origenalTask.ReadingCategory == ReadingCategory.Global)
|
||||
//{
|
||||
// var list = _repository.Where<ReadingGlobalTaskInfo>(t => t.GlobalTaskId == origenalTask.Id).ToList();
|
||||
|
||||
// foreach (var item in list)
|
||||
// {
|
||||
// item.Id = Guid.Empty;
|
||||
// item.GlobalTaskId = newTask.Id;
|
||||
// }
|
||||
|
||||
// _ = _repository.AddRangeAsync(list).Result;
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//拷贝后续表单
|
||||
if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum)
|
||||
{
|
||||
|
@ -2018,11 +2000,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -2072,6 +2057,73 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (influenceTask.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
||||
{
|
||||
TrialId = trialId,
|
||||
|
||||
ReadingCategory = GenerateTaskCategory.ReReading,
|
||||
|
||||
ReReadingTask = origenalTask,
|
||||
|
||||
//同步才可以
|
||||
Action = (newTask) =>
|
||||
{
|
||||
//申请表 设置新任务Id
|
||||
visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id;
|
||||
|
||||
////生成的任务分配给原始医生
|
||||
newTask.DoctorUserId = origenalTask.DoctorUserId;
|
||||
newTask.TaskAllocationState = TaskAllocationState.Allocated;
|
||||
newTask.AllocateTime = DateTime.Now;
|
||||
newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||
|
||||
|
||||
//裁判任务 需要进行特殊处理 在重阅逻辑里面处理
|
||||
|
||||
|
||||
if (visitTaskReReadingAppply.IsCopyOrigenalForms && influenceTask.Id == origenalTask.Id)
|
||||
{
|
||||
if (origenalTask.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
var list = _readingTaskQuestionAnswerRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.Id = Guid.Empty;
|
||||
item.VisitTaskId = newTask.Id;
|
||||
}
|
||||
|
||||
_ = _readingTaskQuestionAnswerRepository.AddRangeAsync(list).Result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//拷贝后续表单
|
||||
if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum)
|
||||
{
|
||||
if (origenalTask.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
var list = _readingTaskQuestionAnswerRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.Id = Guid.Empty;
|
||||
item.VisitTaskId = newTask.Id;
|
||||
}
|
||||
|
||||
_ = _readingTaskQuestionAnswerRepository.AddRangeAsync(list).Result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2138,7 +2190,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
var task = (await _visitTaskRepository.Where(t => t.Id == taskId).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == task.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsAutoCreate, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == task.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.CriterionType, x.IsAutoCreate, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
if (criterionConfig.IsAutoCreate == false)
|
||||
{
|
||||
|
@ -2186,6 +2238,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
{
|
||||
|
||||
//Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == task.SubjectId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.TaskAllocationState == TaskAllocationState.Allocated;
|
||||
|
||||
filterExpression = filterExpression.And(t => t.IsAnalysisCreate == false);
|
||||
|
||||
|
||||
|
@ -2198,107 +2251,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
|
||||
|
||||
|
||||
#region 方式一
|
||||
//foreach (var influenceTask in influenceTaskList)
|
||||
//{
|
||||
// //申请任务的阅片人 后续任务肯定没做, 只有访视任务,没有其他任务 取消分配
|
||||
// if (influenceTask.DoctorUserId == task.DoctorUserId)
|
||||
// {
|
||||
|
||||
// switch (influenceTask.ReadingCategory)
|
||||
// {
|
||||
// case ReadingCategory.Visit:
|
||||
|
||||
// influenceTask.DoctorUserId = null;
|
||||
// influenceTask.AllocateTime = null;
|
||||
// influenceTask.SuggesteFinishedTime = null;
|
||||
// influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate;
|
||||
// break;
|
||||
|
||||
// case ReadingCategory.Global:
|
||||
// case ReadingCategory.Judge:
|
||||
// case ReadingCategory.Oncology:
|
||||
|
||||
// throw new BusinessValidationFailedException("不支持回退任务类型");
|
||||
// }
|
||||
// }
|
||||
// //另外一个阅片人
|
||||
// else
|
||||
// {
|
||||
// //另外一个阅片人 有序PM 申请重阅流程
|
||||
// if (otherReviewerTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// switch (influenceTask.ReadingCategory)
|
||||
// {
|
||||
// case ReadingCategory.Visit:
|
||||
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.HaveReturned;
|
||||
// }
|
||||
// else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.Adbandon;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.DoctorUserId = null;
|
||||
// influenceTask.AllocateTime = null;
|
||||
// influenceTask.SuggesteFinishedTime = null;
|
||||
// influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate;
|
||||
// }
|
||||
// break;
|
||||
// case ReadingCategory.Global:
|
||||
// case ReadingCategory.Oncology:
|
||||
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.HaveReturned;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.Adbandon;
|
||||
// }
|
||||
|
||||
// break;
|
||||
|
||||
// case ReadingCategory.Judge:
|
||||
// default:
|
||||
|
||||
// throw new BusinessValidationFailedException("不支持回退任务类型");
|
||||
// }
|
||||
// }
|
||||
// //另外一个阅片人 有序 PM 回退流程
|
||||
// else
|
||||
// {
|
||||
// switch (influenceTask.ReadingCategory)
|
||||
// {
|
||||
// case ReadingCategory.Visit:
|
||||
|
||||
// influenceTask.DoctorUserId = null;
|
||||
// influenceTask.AllocateTime = null;
|
||||
// influenceTask.SuggesteFinishedTime = null;
|
||||
// influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate;
|
||||
// break;
|
||||
|
||||
// case ReadingCategory.Global:
|
||||
// case ReadingCategory.Judge:
|
||||
// case ReadingCategory.Oncology:
|
||||
|
||||
// throw new BusinessValidationFailedException("不支持回退任务类型");
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 方式二
|
||||
|
||||
var origenalTask = influenceTaskList.Where(t => t.Id == task.Id).FirstOrDefault();
|
||||
|
@ -2306,15 +2258,20 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
foreach (var influenceTask in influenceTaskList)
|
||||
{
|
||||
|
||||
//已签名的任务 设置转变后的标志
|
||||
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
var isConvertedTask = _visitTaskRepository.Where(t => t.Id == influenceTask.Id).Select(t => t.IsConvertedTask).FirstOrDefault();
|
||||
|
||||
if (isConvertedTask)
|
||||
{
|
||||
influenceTask.IsHistoryConvertedTask = true;
|
||||
}
|
||||
}
|
||||
|
||||
//同意的访视 因为要记录具体的操作,所以废弃
|
||||
if (influenceTask.Id == task.Id)
|
||||
{
|
||||
//influenceTaskList.ForEach(t =>
|
||||
//{
|
||||
// //记录实际影像的任务
|
||||
|
||||
// influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id });
|
||||
//});
|
||||
|
||||
await InfluenceAddtioncalEvaluationCritrionAsync(task, influenceTaskList.Where(t => t.Id != task.Id).Where(t => t.SourceSubjectVisitId != null).Select(t => (Guid)t.SourceSubjectVisitId).Distinct().ToList());
|
||||
|
||||
|
@ -2326,35 +2283,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
influenceTask.IsPMSetBack = true;
|
||||
}
|
||||
|
||||
//申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配
|
||||
if (influenceTask.ReadingCategory == ReadingCategory.Visit && influenceTask.VisitTaskNum != task.VisitTaskNum)
|
||||
{
|
||||
//后续访视处理访视
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.TaskState = TaskState.HaveReturned;
|
||||
|
||||
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
|
||||
}
|
||||
else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||
{
|
||||
influenceTask.TaskState = TaskState.Adbandon;
|
||||
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
|
||||
}
|
||||
else
|
||||
{
|
||||
influenceTask.DoctorUserId = null;
|
||||
influenceTask.AllocateTime = null;
|
||||
influenceTask.SuggesteFinishedTime = null;
|
||||
influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate;
|
||||
|
||||
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.CancelAssign });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//申请的访视 全局肿瘤学
|
||||
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.TaskState = TaskState.HaveReturned;
|
||||
|
@ -2366,7 +2294,53 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
|
||||
}
|
||||
|
||||
}
|
||||
#region 废弃取消分配留存
|
||||
|
||||
////申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配
|
||||
//if (influenceTask.ReadingCategory == ReadingCategory.Visit && influenceTask.VisitTaskNum != task.VisitTaskNum)
|
||||
//{
|
||||
// //后续访视处理访视
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.HaveReturned;
|
||||
|
||||
// origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
|
||||
// }
|
||||
// else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.Adbandon;
|
||||
// origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.DoctorUserId = null;
|
||||
// influenceTask.AllocateTime = null;
|
||||
// influenceTask.SuggesteFinishedTime = null;
|
||||
// influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate;
|
||||
|
||||
// origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.CancelAssign });
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// //申请的访视 全局肿瘤学
|
||||
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.HaveReturned;
|
||||
// origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.TaskState = TaskState.Adbandon;
|
||||
// origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
|
||||
// }
|
||||
|
||||
//}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -2379,25 +2353,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
{
|
||||
//无序 无序阅片没有 全局 肿瘤学
|
||||
|
||||
|
||||
//// 当前任务标为失效
|
||||
//task.TaskState = TaskState.Adbandon;
|
||||
|
||||
////考虑该访视 另外一个阅片人的任务
|
||||
//var otherReviewerTask = await _visitTaskRepository.FirstOrDefaultAsync(t => t.SourceSubjectVisitId == task.SourceSubjectVisitId && t.Id != task.Id && t.TaskState == TaskState.Effect);
|
||||
|
||||
|
||||
//if (otherReviewerTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
//{
|
||||
// //另外阅片人完成阅片了 就设置为重阅重置
|
||||
// otherReviewerTask.TaskState = TaskState.HaveReturned;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// otherReviewerTask.TaskState = TaskState.Adbandon;
|
||||
//}
|
||||
|
||||
|
||||
// 申请该访视的任务 申请人失效 另外一个人重阅重置或者失效
|
||||
|
||||
var currentVisitList = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == task.SourceSubjectVisitId && t.ReadingCategory == ReadingCategory.Visit && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) && t.VisitTaskNum == task.VisitTaskNum, true).ToListAsync();
|
||||
|
@ -2422,16 +2377,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
|
||||
}
|
||||
|
||||
////同意的访视
|
||||
//if (influenceTask.Id == task.Id)
|
||||
//{
|
||||
// currentVisitList.ForEach(t =>
|
||||
// {
|
||||
// //记录实际影像的任务
|
||||
|
||||
// influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id });
|
||||
// });
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2661,7 +2606,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
filterExpression = filterExpression.And(t => (t.VisitTaskNum > filterObj.VisitTaskNum &&
|
||||
(
|
||||
(((t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState != ReadingTaskState.WaitReading) || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == filterObj.DoctorUserId)
|
||||
((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == filterObj.DoctorUserId)
|
||||
// 裁判 肿瘤学是另外的医生做
|
||||
|| t.ReadingCategory == ReadingCategory.Judge
|
||||
|| t.ReadingCategory == ReadingCategory.Oncology
|
||||
|
@ -2672,7 +2617,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
{
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
|
||||
(
|
||||
(((t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState != ReadingTaskState.WaitReading) || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == filterObj.DoctorUserId)
|
||||
((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == filterObj.DoctorUserId)
|
||||
// 裁判 肿瘤学是另外的医生做
|
||||
|| t.ReadingCategory == ReadingCategory.Judge
|
||||
|| t.ReadingCategory == ReadingCategory.Oncology
|
||||
|
@ -2844,136 +2789,147 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
foreach (var influenceTask in list)
|
||||
{
|
||||
influenceTask.OptType = influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned ? ReReadingOrBackOptType.Return : ReReadingOrBackOptType.Abandon;
|
||||
|
||||
if (isReReading)
|
||||
{
|
||||
|
||||
if ((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId != null) || (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null))
|
||||
{
|
||||
//有序
|
||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
||||
{
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
}
|
||||
else
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
}
|
||||
//else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||
#region 变更前 注释
|
||||
|
||||
//if (isReReading)
|
||||
//{
|
||||
|
||||
// if ((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId != null) || (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null))
|
||||
// {
|
||||
// //有序
|
||||
// if (criterionConfig.IsReadingTaskViewInOrder)
|
||||
// {
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
// }
|
||||
// //else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||
// //{
|
||||
// // influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
// //}
|
||||
// //else
|
||||
// //{
|
||||
// // throw new BusinessValidationFailedException("IR 申请重阅,不会影响到后续未读的任务,当前影响列表有未读的任务,请核查");
|
||||
// //}
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) && applyId != null) || (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId == null))
|
||||
// {
|
||||
// //有序
|
||||
// if (criterionConfig.IsReadingTaskViewInOrder)
|
||||
// {
|
||||
// //申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配
|
||||
// if (influenceTask.ReadingCategory == ReadingCategory.Visit && influenceTask.VisitTaskNum != filterObj.VisitTaskNum)
|
||||
// {
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
// }
|
||||
// else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.CancelAssign;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//}
|
||||
////PM退回
|
||||
//else
|
||||
//{
|
||||
// throw new BusinessValidationFailedException("IR 申请重阅,不会影响到后续未读的任务,当前影响列表有未读的任务,请核查");
|
||||
|
||||
|
||||
|
||||
// //有序
|
||||
// if (criterionConfig.IsReadingTaskViewInOrder)
|
||||
// {
|
||||
// //申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配
|
||||
// if (influenceTask.ReadingCategory == ReadingCategory.Visit && influenceTask.VisitTaskNum != filterObj.VisitTaskNum)
|
||||
// {
|
||||
// //后续访视处理访视
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
// }
|
||||
// else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.CancelAssign;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //申请的访视 全局肿瘤学
|
||||
|
||||
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// //无序
|
||||
// else
|
||||
// {
|
||||
// //重阅重置或者失效
|
||||
// influenceTask.OptType = influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned ? ReReadingOrBackOptType.Return : ReReadingOrBackOptType.Abandon;
|
||||
// }
|
||||
|
||||
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
}
|
||||
else
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) && applyId != null) || (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId == null))
|
||||
{
|
||||
//有序
|
||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
||||
{
|
||||
//申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配
|
||||
if (influenceTask.ReadingCategory == ReadingCategory.Visit && influenceTask.VisitTaskNum != filterObj.VisitTaskNum)
|
||||
{
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
}
|
||||
else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
}
|
||||
else
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.CancelAssign;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
}
|
||||
else
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
}
|
||||
else
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//PM退回
|
||||
else
|
||||
{
|
||||
//有序
|
||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
||||
{
|
||||
//申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配
|
||||
if (influenceTask.ReadingCategory == ReadingCategory.Visit && influenceTask.VisitTaskNum != filterObj.VisitTaskNum)
|
||||
{
|
||||
//后续访视处理访视
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
}
|
||||
else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
}
|
||||
else
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.CancelAssign;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//申请的访视 全局肿瘤学
|
||||
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Return;
|
||||
}
|
||||
else
|
||||
{
|
||||
influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||
}
|
||||
}
|
||||
}
|
||||
//无序
|
||||
else
|
||||
{
|
||||
//重阅重置或者失效
|
||||
influenceTask.OptType = influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned ? ReReadingOrBackOptType.Return : ReReadingOrBackOptType.Abandon;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -109,9 +109,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
//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 });
|
||||
|
||||
|
@ -149,7 +147,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
//File.WriteAllText("appsettings.json", updatedJson);
|
||||
|
||||
|
||||
// string json = @"{
|
||||
//string json = @"{
|
||||
// // This is a comment
|
||||
// ""Name"": ""John Smith"",
|
||||
// ""Age"": 30,
|
||||
|
@ -162,21 +160,19 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
// }
|
||||
//}";
|
||||
|
||||
// // 使用 Json.NET 库解析 JSON 字符串
|
||||
// JObject jObject = JObject.Parse(json,new JsonLoadSettings() { CommentHandling=CommentHandling.Load});
|
||||
//// 使用 Json.NET 库解析 JSON 字符串
|
||||
//JObject jObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load });
|
||||
|
||||
// // 修改属性
|
||||
// jObject["Name"] = "Jane Smith";
|
||||
|
||||
// // 将修改后的 JObject 对象序列化为 JSON 字符串并保留注释
|
||||
// string newJson = jObject.ToString(Formatting.Indented);
|
||||
|
||||
|
||||
// // 打印修改后的 JSON 字符串
|
||||
// Console.WriteLine(newJson);
|
||||
//// 修改属性
|
||||
//jObject["Name"] = "Jane Smith";
|
||||
|
||||
//// 将修改后的 JObject 对象序列化为 JSON 字符串并保留注释
|
||||
//string newJson = jObject.ToString(Newtonsoft.Json.Formatting.Indented);
|
||||
|
||||
//// 打印修改后的 JSON 字符串
|
||||
//Console.WriteLine(newJson);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
// 读取 Json 文件
|
||||
|
@ -184,40 +180,38 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var json = File.ReadAllText("appsettings.json");
|
||||
|
||||
JObject jsonObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling=CommentHandling.Load});
|
||||
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;
|
||||
|
||||
|
||||
// 将更改保存回 Json 文件
|
||||
//File.WriteAllText(jsonFilePath, jsonObject.ToString());
|
||||
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);
|
||||
//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;
|
||||
// }
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Write all other tokens
|
||||
writer.WriteToken(reader.TokenType, reader.Value);
|
||||
}
|
||||
}
|
||||
// // Write all other tokens
|
||||
// writer.WriteToken(reader.TokenType, reader.Value);
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -321,10 +321,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public bool IsAnalysisCreate { get; set; }
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 是否是转变的任务(转为IRECIST)
|
||||
///// </summary>
|
||||
//public bool IsConvertedTask { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 转换之前的任务Id(转化的任务才有该值)
|
||||
|
@ -345,6 +341,10 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重阅重置任务的 标注是转化之前的 还是转化之后的
|
||||
/// </summary>
|
||||
public bool IsHistoryConvertedTask { get; set; } = false;
|
||||
|
||||
public bool? IsSelfAnalysis { get; set; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue