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": {
|
"JwtSetting": {
|
||||||
"SecurityKey": "3e6dbfa227234a03977a2f421bdb7f4f", // 密钥
|
"SecurityKey": "3e6dbfa227234a03977a2f421bdb7f4f",
|
||||||
"Issuer": "IRaCIS", // 颁发者
|
"Issuer": "IRaCIS",
|
||||||
"Audience": "ZhiZhun", // 接收者
|
"Audience": "ZhiZhun",
|
||||||
"TokenExpireDays": "7" // 过期时间(7day)
|
"TokenExpireDays": "7"
|
||||||
},
|
},
|
||||||
"IpRateLimiting": {
|
"IpRateLimiting": {
|
||||||
"EnableEndpointRateLimiting": true, //False: globally executed, true: executed for each
|
"EnableEndpointRateLimiting": true,
|
||||||
"StackBlockedRequests": false, // set to false, rejected calls are not added to the throttle counter
|
"StackBlockedRequests": false,
|
||||||
"RealIpHeader": "X-Real-IP",
|
"RealIpHeader": "X-Real-IP",
|
||||||
"ClientIdHeader": "X-ClientId",
|
"ClientIdHeader": "X-ClientId",
|
||||||
"QuotaExceededResponse": {
|
"QuotaExceededResponse": {
|
||||||
|
@ -19,12 +16,10 @@
|
||||||
"StatusCode": 429
|
"StatusCode": 429
|
||||||
},
|
},
|
||||||
"HttpStatusCode": 429,
|
"HttpStatusCode": 429,
|
||||||
//"IpWhitelist": [ "127.0.0.1", "::1/10", "192.168.0.0/24" ],
|
"EndpointWhitelist": [
|
||||||
"EndpointWhitelist": [ "post:/study/archivestudy/*" ],
|
"post:/study/archivestudy/*"
|
||||||
//"EndpointWhitelist": [ ],
|
],
|
||||||
//"EndpointWhitelist": ["post:/trial/getTrialList"], //demo
|
|
||||||
"IpWhitelist": [],
|
"IpWhitelist": [],
|
||||||
//"ClientWhitelist": [ "dev-id-1", "dev-id-2" ],
|
|
||||||
"GeneralRules": [
|
"GeneralRules": [
|
||||||
{
|
{
|
||||||
"Endpoint": "*",
|
"Endpoint": "*",
|
||||||
|
@ -48,7 +43,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"easycaching": {
|
"easycaching": {
|
||||||
"inmemory": {
|
"inmemory": {
|
||||||
"MaxRdSecond": 120,
|
"MaxRdSecond": 120,
|
||||||
|
@ -63,30 +57,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"UpdateConfig": {
|
||||||
|
"test": "123456",
|
||||||
|
"test1": "12345678"
|
||||||
|
},
|
||||||
"IRaCISBasicConfig": {
|
"IRaCISBasicConfig": {
|
||||||
|
|
||||||
"DoctorCodePrefix": "RE",
|
"DoctorCodePrefix": "RE",
|
||||||
|
|
||||||
"UserCodePrefix": "U",
|
"UserCodePrefix": "U",
|
||||||
|
|
||||||
"QCChallengeCodePrefix": "Q",
|
"QCChallengeCodePrefix": "Q",
|
||||||
|
|
||||||
"NoneDicomStudyCodePrefix": "NST",
|
"NoneDicomStudyCodePrefix": "NST",
|
||||||
|
|
||||||
"DicomStudyCodePrefix": "ST",
|
"DicomStudyCodePrefix": "ST",
|
||||||
|
|
||||||
"SystemSiteCodePrefix": "S",
|
"SystemSiteCodePrefix": "S",
|
||||||
|
|
||||||
"DefaultPassword": "123456",
|
"DefaultPassword": "123456",
|
||||||
|
|
||||||
"DefaultInternalOrganizationName": "ExtImaging",
|
"DefaultInternalOrganizationName": "ExtImaging",
|
||||||
|
|
||||||
"ImageShareExpireDays": 10
|
"ImageShareExpireDays": 10
|
||||||
}
|
}
|
||||||
|
|
||||||
//网站根地址,为了访问文件 dicom 和上传的文档... 实测发现不用将域名拼接返回,浏览器会自动加上当前ip,避免了多环境读取环境配置文件
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -1443,6 +1443,13 @@
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</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)" -->
|
<!-- 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)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetNoTargetLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||||
<summary>
|
<summary>
|
||||||
|
|
|
@ -1607,13 +1607,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
{
|
{
|
||||||
ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand);
|
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 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);
|
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)
|
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||||
{
|
{
|
||||||
influenceTask.TaskState = TaskState.HaveReturned;
|
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 });
|
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
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -1690,12 +1703,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
{
|
{
|
||||||
ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand);
|
ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand);
|
||||||
|
|
||||||
//influenceTaskList.ForEach(t =>
|
|
||||||
//{
|
|
||||||
// //记录实际影像的任务
|
|
||||||
|
|
||||||
// influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id });
|
|
||||||
//});
|
|
||||||
|
|
||||||
await SetReReadingOrBackInfluenceAnalysisAsync(origenalTask.SubjectId);
|
await SetReReadingOrBackInfluenceAnalysisAsync(origenalTask.SubjectId);
|
||||||
|
|
||||||
|
@ -1741,77 +1748,12 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
RequestReReadingResultEnum = RequestReReadingResult.Agree,
|
RequestReReadingResultEnum = RequestReReadingResult.Agree,
|
||||||
});
|
});
|
||||||
|
|
||||||
//await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == origenalTask.Id, u => new VisitTask()
|
|
||||||
//{
|
|
||||||
// ReReadingApplyState = ReReadingApplyState.Agree
|
|
||||||
//});
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#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)
|
if (criterionConfig.IsReadingTaskViewInOrder)
|
||||||
|
@ -1846,7 +1788,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
filterExpression = filterExpression.And(t => (t.VisitTaskNum > origenalTask.VisitTaskNum &&
|
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.Judge
|
||||||
|| t.ReadingCategory == ReadingCategory.Oncology
|
|| t.ReadingCategory == ReadingCategory.Oncology
|
||||||
|
@ -1857,7 +1799,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
{
|
{
|
||||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum &&
|
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.Judge
|
||||||
|| t.ReadingCategory == ReadingCategory.Oncology
|
|| t.ReadingCategory == ReadingCategory.Oncology
|
||||||
|
@ -1912,6 +1854,17 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
foreach (var influenceTask in influenceTaskList)
|
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)
|
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);
|
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;
|
var beforeTaskState = influenceTask.TaskState;
|
||||||
|
|
||||||
|
@ -1963,6 +1913,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 影响的任务生成
|
||||||
|
|
||||||
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
||||||
{
|
{
|
||||||
|
@ -1984,6 +1935,37 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
newTask.AllocateTime = DateTime.Now;
|
newTask.AllocateTime = DateTime.Now;
|
||||||
newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
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)
|
if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum)
|
||||||
{
|
{
|
||||||
|
@ -2018,11 +2000,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#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 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)
|
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;
|
//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);
|
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 方式二
|
#region 方式二
|
||||||
|
|
||||||
var origenalTask = influenceTaskList.Where(t => t.Id == task.Id).FirstOrDefault();
|
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)
|
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)
|
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());
|
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;
|
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)
|
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||||
{
|
{
|
||||||
influenceTask.TaskState = TaskState.HaveReturned;
|
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 });
|
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
|
#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();
|
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 });
|
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 &&
|
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.Judge
|
||||||
|| t.ReadingCategory == ReadingCategory.Oncology
|
|| t.ReadingCategory == ReadingCategory.Oncology
|
||||||
|
@ -2672,7 +2617,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
{
|
{
|
||||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
|
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.Judge
|
||||||
|| t.ReadingCategory == ReadingCategory.Oncology
|
|| t.ReadingCategory == ReadingCategory.Oncology
|
||||||
|
@ -2844,137 +2789,148 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
foreach (var influenceTask in list)
|
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))
|
#region 变更前 注释
|
||||||
{
|
|
||||||
//有序
|
//if (isReReading)
|
||||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
//{
|
||||||
{
|
|
||||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
// if ((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId != null) || (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null))
|
||||||
{
|
// {
|
||||||
influenceTask.OptType = ReReadingOrBackOptType.Return;
|
// //有序
|
||||||
}
|
// if (criterionConfig.IsReadingTaskViewInOrder)
|
||||||
else
|
// {
|
||||||
{
|
// if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||||
influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
// {
|
||||||
}
|
// 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)
|
// else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
|
||||||
// {
|
// {
|
||||||
// influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
// influenceTask.OptType = ReReadingOrBackOptType.Abandon;
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// throw new BusinessValidationFailedException("IR 申请重阅,不会影响到后续未读的任务,当前影响列表有未读的任务,请核查");
|
// 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;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
|
||||||
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退回
|
////PM退回
|
||||||
else
|
//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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
// //有序
|
||||||
|
// 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
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -109,9 +109,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
//jObject.WriteTo(jsonTextWriter);
|
//jObject.WriteTo(jsonTextWriter);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region test
|
||||||
|
|
||||||
|
|
||||||
//var json = File.ReadAllText("appsettings.json");
|
//var json = File.ReadAllText("appsettings.json");
|
||||||
//var jObject = JToken.Parse(json, new JsonLoadSettings { CommentHandling = CommentHandling.Load,DuplicatePropertyNameHandling=DuplicatePropertyNameHandling.Ignore });
|
//var jObject = JToken.Parse(json, new JsonLoadSettings { CommentHandling = CommentHandling.Load,DuplicatePropertyNameHandling=DuplicatePropertyNameHandling.Ignore });
|
||||||
|
|
||||||
|
@ -169,14 +167,12 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
//jObject["Name"] = "Jane Smith";
|
//jObject["Name"] = "Jane Smith";
|
||||||
|
|
||||||
//// 将修改后的 JObject 对象序列化为 JSON 字符串并保留注释
|
//// 将修改后的 JObject 对象序列化为 JSON 字符串并保留注释
|
||||||
// string newJson = jObject.ToString(Formatting.Indented);
|
//string newJson = jObject.ToString(Newtonsoft.Json.Formatting.Indented);
|
||||||
|
|
||||||
|
|
||||||
//// 打印修改后的 JSON 字符串
|
//// 打印修改后的 JSON 字符串
|
||||||
//Console.WriteLine(newJson);
|
//Console.WriteLine(newJson);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 读取 Json 文件
|
// 读取 Json 文件
|
||||||
|
@ -191,33 +187,31 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
JProperty updateConfigProperty = (JProperty)updateConfigNode.Parent;
|
JProperty updateConfigProperty = (JProperty)updateConfigNode.Parent;
|
||||||
JObject updateConfigParent = (JObject)updateConfigProperty.Value;
|
JObject updateConfigParent = (JObject)updateConfigProperty.Value;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 向 updateConfigParent 添加或者属性
|
// 向 updateConfigParent 添加或者属性
|
||||||
updateConfigParent[key] = newValue;
|
updateConfigParent[key] = newValue;
|
||||||
|
|
||||||
|
|
||||||
// 将更改保存回 Json 文件
|
// 将更改保存回 Json 文件
|
||||||
//File.WriteAllText(jsonFilePath, jsonObject.ToString());
|
File.WriteAllText(jsonFilePath, jsonObject.ToString());
|
||||||
|
|
||||||
using (var reader = new JsonTextReader(new StringReader(json)))
|
//using (var reader = new JsonTextReader(new StringReader(json)))
|
||||||
using (var writer = new JsonTextWriter(new StreamWriter("appsettings.json")))
|
//using (var writer = new JsonTextWriter(new StreamWriter("appsettings.json")))
|
||||||
{
|
//{
|
||||||
while (reader.Read())
|
// while (reader.Read())
|
||||||
{
|
// {
|
||||||
if (reader.TokenType == JsonToken.PropertyName && (string)reader.Value == key)
|
// if (reader.TokenType == JsonToken.PropertyName && (string)reader.Value == key)
|
||||||
{
|
// {
|
||||||
// Write the updated property value
|
// // Write the updated property value
|
||||||
writer.WritePropertyName(key);
|
// writer.WritePropertyName(key);
|
||||||
writer.WriteValue(newValue);
|
// 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; }
|
public bool IsAnalysisCreate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// 是否是转变的任务(转为IRECIST)
|
|
||||||
///// </summary>
|
|
||||||
//public bool IsConvertedTask { get; set; } = false;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 转换之前的任务Id(转化的任务才有该值)
|
/// 转换之前的任务Id(转化的任务才有该值)
|
||||||
|
@ -345,6 +341,10 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重阅重置任务的 标注是转化之前的 还是转化之后的
|
||||||
|
/// </summary>
|
||||||
|
public bool IsHistoryConvertedTask { get; set; } = false;
|
||||||
|
|
||||||
public bool? IsSelfAnalysis { get; set; }
|
public bool? IsSelfAnalysis { get; set; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue