Uat_Study
hang 2022-08-02 10:26:39 +08:00
parent 5ec77b40c7
commit 98ceaa007c
4 changed files with 40 additions and 12 deletions

View File

@ -90,6 +90,13 @@
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.SetOncologyReadingInfo(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.SubmitOncologyReadingInfoInDto})">
<summary>
提交肿瘤学阅片任务
</summary>
<param name="opt"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.SubmitGlobalReadingInfo(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.SubmitGlobalReadingInfoInDto})">
<summary>
提交全局阅片任务

View File

@ -5860,7 +5860,7 @@
</member>
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SetOncologyReadingInfo(IRaCIS.Core.Application.Service.Reading.Dto.SetOncologyReadingInfoInDto)">
<summary>
修改全局阅片信息
修改肿瘤学阅片信息
</summary>
<param name="inDto"></param>
<returns></returns>
@ -5995,6 +5995,13 @@
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SubmitOncologyReadingInfo(IRaCIS.Core.Application.Service.Reading.Dto.SubmitOncologyReadingInfoInDto)">
<summary>
提交肿瘤阅片结果
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SubmitGlobalReadingInfo(IRaCIS.Core.Application.Service.Reading.Dto.SubmitGlobalReadingInfoInDto)">
<summary>
提交全局阅片结果

View File

@ -1104,16 +1104,16 @@ namespace IRaCIS.Core.Application.Service.Allocation
{
var visitGroupQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id)
.Where(x => !x.Subject.IsDeleted)
.Where(t => (t.ReadingTaskState != ReadingTaskState.HaveSigned || t.ReReadingApplyState == ReReadingApplyState.HaveApplyed) && t.TaskState == TaskState.Effect)
.Where(t => (t.ReadingTaskState != ReadingTaskState.HaveSigned || t.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed) && t.TaskState == TaskState.Effect)
.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
{
SubjectId = x.Key.SubjectId,
SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode,
UnReadTaskCount = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.HaveApplyed).Count(),
ExistReadingApply = x.Any(y => y.ReReadingApplyState == ReReadingApplyState.HaveApplyed),
UnReadTaskList = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.HaveApplyed).OrderBy(x => x.VisitTaskNum)
UnReadTaskCount = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.DocotorHaveApplyed).Count(),
ExistReadingApply = x.Any(y => y.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed),
UnReadTaskList = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.DocotorHaveApplyed).OrderBy(x => x.VisitTaskNum)
.Select(u => new IRUnreadTaskView()
{
Id = u.Id,
@ -1130,7 +1130,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
var count = visitGroupQuery.Select(x => new
{
UnReadTaskCount = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.HaveApplyed).Count(),
UnReadTaskCount = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.DocotorHaveApplyed).Count(),
}).Where(x => x.UnReadTaskCount > 0).Count();
return (count, visitTaskQuery);
}
@ -1197,7 +1197,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
throw new BusinessValidationFailedException("未阅片完成,或者未生效的任务不允许申请重阅");
}
if (task.ReReadingApplyState == ReReadingApplyState.HaveApplyed || task.ReReadingApplyState == ReReadingApplyState.Agree)
if (task.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.Agree)
{
throw new BusinessValidationFailedException("重阅已申请,或者重阅已同意状态下不允许申请重阅");
}
@ -1216,6 +1216,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
throw new BusinessValidationFailedException("PM 仅仅允许对访视类型的任务申请重阅");
}
task.ReReadingApplyState = ReReadingApplyState.TrialGroupHaveApplyed;
//// 有序
@ -1235,6 +1236,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
}
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer)
{
task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed;
// 有序
if (trialConfig.IsReadingTaskViewInOrder)
{
@ -1273,7 +1276,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
task.ReReadingApplyState = ReReadingApplyState.HaveApplyed;
var rootReReadingTaskId = _visitTaskReReadingRepository.Where(t => t.NewReReadingTaskId == task.Id).Select(u => u.RootReReadingTaskId).FirstOrDefault();
@ -1423,7 +1425,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
#region PM 申请双重阅片 同一访视 其他已申请的任务也修改为同意
await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.OriginalReReadingTask.SubjectId == visitTaskReReadingAppply.OriginalReReadingTask.SubjectId &&
t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.HaveApplyed &&
t.OriginalReReadingTask.ReReadingApplyState==ReReadingApplyState.TrialGroupHaveApplyed &&
//t.RequestReReadingResultEnum==RequestReReadingResult.Default &&
t.RequestReReadingType == RequestReReadingType.TrialGroupApply &&
t.OriginalReReadingTask.VisitTaskNum == origenalTask.VisitTaskNum &&
t.Id != item.Id, u => new VisitTaskReReading()
@ -1432,8 +1435,9 @@ namespace IRaCIS.Core.Application.Service.Allocation
RequestReReadingResultEnum = RequestReReadingResult.Agree,
});
//只更新 PM 申请 同一访视的数据
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == origenalTask.SubjectId &&
t.ReReadingApplyState == ReReadingApplyState.HaveApplyed &&
t.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed &&
t.IsAnalysisCreate == origenalTask.IsAnalysisCreate &&
t.VisitTaskNum == origenalTask.VisitTaskNum &&
t.Id != origenalTask.Id, u => new VisitTask()

View File

@ -307,11 +307,21 @@ namespace IRaCIS.Core.Domain.Share
{
Default = 0,
HaveApplyed = 1,
Agree = 2,
Reject = 3
Reject = 3,
//IR 申请
DocotorHaveApplyed = 4,
//PM 申请
TrialGroupHaveApplyed = 5
}