调整申请重阅调整
parent
5250cd524a
commit
2c5ba280e9
|
@ -995,6 +995,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1185,7 +1185,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
return ResponseOutput.Ok(result, new
|
||||
{
|
||||
IsReadingTaskViewInOrder = isReadingTaskViewInOrder==ReadingOrder.InOrder,
|
||||
IsReadingTaskViewInOrder = isReadingTaskViewInOrder == ReadingOrder.InOrder,
|
||||
RandomReadInfo = iRUnReadOut,
|
||||
ReadingTool = readingTool,
|
||||
IseCRFShowInDicomReading = criterionConfig.IseCRFShowInDicomReading,
|
||||
|
@ -1515,6 +1515,8 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> AIRReReading(AIRReReadingCommand command, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
|
||||
{
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR)
|
||||
{
|
||||
var baseLineTaskList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
|
||||
&& t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.SourceSubjectVisit.IsBaseLine == true).ToListAsync();
|
||||
|
@ -1562,6 +1564,28 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
//ConfirmReReadingList = new List<ConfirmReReadingDTO>() { new ConfirmReReadingDTO() { Id = requestRecord.Id, OriginalReReadingTaskId = task.Id } }
|
||||
ConfirmReReadingList = requestRecordList.Select(t => new ConfirmReReadingDTO() { Id = t.Id, OriginalReReadingTaskId = t.OriginalReReadingTaskId }).ToList()
|
||||
}, _visitTaskCommonService);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (command.VisitTaskId != null)
|
||||
{
|
||||
var visitTaskId = command.VisitTaskId.Value;
|
||||
var taskIdList = new List<Guid>();
|
||||
|
||||
taskIdList.Add(visitTaskId);
|
||||
|
||||
await ApplyReReading(new ApplyReReadingCommand() { IsCopyFollowForms = false, IsCopyOrigenalForms = true, TaskIdList = taskIdList, TrialId = command.TrialId, RequestReReadingReason = "阅片人自动重阅阅片任务", RequestReReadingType = RequestReReadingType.DocotorApply });
|
||||
|
||||
var requestRecord = await _visitTaskReReadingRepository.Where(t => visitTaskId == t.OriginalReReadingTaskId && t.RequestReReadingUserId == _userInfo.Id && t.RequestReReadingReason == "阅片人自动重阅阅片任务").FirstAsync();
|
||||
|
||||
await ConfirmReReading(new ConfirmReReadingCommand()
|
||||
{
|
||||
TrialId = command.TrialId,
|
||||
RequestReReadingResultEnum = RequestReReadingResult.Agree,
|
||||
ConfirmReReadingList = new List<ConfirmReReadingDTO>() { new ConfirmReReadingDTO() { Id = requestRecord.Id, OriginalReReadingTaskId = visitTaskId } }
|
||||
}, _visitTaskCommonService);
|
||||
}
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
|
@ -1599,7 +1623,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
throw new BusinessValidationFailedException(_localizer["VisitTask_BackendData"]);
|
||||
}
|
||||
|
||||
_logger.LogError("重阅申请状态"+ (int)task.ReReadingApplyState);
|
||||
_logger.LogError("重阅申请状态" + (int)task.ReReadingApplyState);
|
||||
|
||||
if (task.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.Agree)
|
||||
{
|
||||
|
@ -1743,7 +1767,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
}
|
||||
|
||||
//AIR 不加验证
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR)
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR)
|
||||
{
|
||||
task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed;
|
||||
}
|
||||
|
@ -1879,7 +1903,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
visitTaskReReadingAppply.RequestReReadingRejectReason = agreeReReadingCommand.RequestReReadingRejectReason;
|
||||
|
||||
|
||||
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) && t.TaskAllocationState == TaskAllocationState.Allocated;
|
||||
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) /*&& t.TaskAllocationState == TaskAllocationState.Allocated*/;
|
||||
|
||||
//是否是一致性分析任务 正常申请 会影响一致性分析任务
|
||||
filterExpression = filterExpression.And(t => t.IsAnalysisCreate == origenalTask.IsAnalysisCreate);
|
||||
|
@ -2045,7 +2069,10 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
}
|
||||
//IR申请 PM 审批 注意这里有一致性分析的申请同意 不会回退访视,在此要生成影响的访视任务
|
||||
else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && (IsPMOrAPm() || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR))
|
||||
else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && (IsPMOrAPm() ||
|
||||
_userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR
|
||||
|| _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR
|
||||
|| _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI))
|
||||
{
|
||||
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
.ForMember(o => o.TrialSiteId, t => t.MapFrom(u => u.Subject.TrialSiteId))
|
||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindTrialSiteCode :*/ u.Subject.TrialSite.TrialSiteCode))
|
||||
//.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindTrialSiteCode :*/ u.Subject.TrialSite.TrialSiteCode))
|
||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindSubjectCode :*/ u.Subject.Code))
|
||||
.ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.Subject.MedicalNo))
|
||||
|
||||
|
|
|
@ -3163,6 +3163,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
await VerifyTaskIsSign(visitTaskId);
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(visitTaskId, x => new VisitTask()
|
||||
{
|
||||
DoctorUserId = _userInfo.Id,
|
||||
ReadingTaskState = ReadingTaskState.HaveSigned,
|
||||
SignTime = DateTime.Now,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue