设置医学审核失效
parent
710e2fa2f4
commit
bfb905d130
|
@ -104,6 +104,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class SetMedicalReviewInvalidCommand
|
||||||
|
{
|
||||||
|
[NotDefault]
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public List<Guid> MedicalReviewIdList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class GenerateMedicalReviewTaskQuery : TaskMedicalReviewQuery
|
public class GenerateMedicalReviewTaskQuery : TaskMedicalReviewQuery
|
||||||
{
|
{
|
||||||
public bool? IsGeneratedJudge { get; set; }
|
public bool? IsGeneratedJudge { get; set; }
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.VisitTask.TaskName.Contains(inQuery.TaskName) || t.VisitTask.TaskBlindName.Contains(inQuery.TaskName))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.VisitTask.TaskName.Contains(inQuery.TaskName) || t.VisitTask.TaskBlindName.Contains(inQuery.TaskName))
|
||||||
.WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent)
|
.WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent)
|
||||||
.WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId)
|
.WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialSiteCode), t => (t.VisitTask.BlindTrialSiteCode.Contains(inQuery.TrialSiteCode) && t.VisitTask.IsAnalysisCreate) || (t.VisitTask.Subject.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)&& t.VisitTask.IsAnalysisCreate==false))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialSiteCode), t => (t.VisitTask.BlindTrialSiteCode.Contains(inQuery.TrialSiteCode) && t.VisitTask.IsAnalysisCreate) || (t.VisitTask.Subject.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode) && t.VisitTask.IsAnalysisCreate == false))
|
||||||
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
||||||
.WhereIf(inQuery.ReadingTaskState != null, t => t.VisitTask.ReadingTaskState == inQuery.ReadingTaskState)
|
.WhereIf(inQuery.ReadingTaskState != null, t => t.VisitTask.ReadingTaskState == inQuery.ReadingTaskState)
|
||||||
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
||||||
|
@ -149,6 +149,25 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置医学审核失效
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> SetMedicalReviewInvalid(SetMedicalReviewInvalidCommand command)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (await _taskMedicalReviewRepository.Where(t => command.MedicalReviewIdList.Contains(t.Id)).AnyAsync(t => t.AuditState == MedicalReviewAuditState.HaveSigned))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("已签名的不允许设置为失效");
|
||||||
|
}
|
||||||
|
|
||||||
|
await _taskMedicalReviewRepository.BatchUpdateNoTrackingAsync(t => command.MedicalReviewIdList.Contains(t.Id), c => new TaskMedicalReview() { IsInvalid = true });
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1316,12 +1316,16 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
origenalTask.TaskState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? TaskState.HaveReturned : origenalTask.TaskState;
|
origenalTask.TaskState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? TaskState.HaveReturned : origenalTask.TaskState;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task SetMedicalReviewInvalidAsync(List<VisitTask> influenceTaskList, bool isPM = true)
|
private async Task SetMedicalReviewInvalidAsync(List<VisitTask> influenceTaskList, bool isPMApply = true)
|
||||||
{
|
{
|
||||||
//将医学审核设置为失效
|
//将医学审核设置为失效
|
||||||
var taskIdList = influenceTaskList.Select(t => t.Id).ToList();
|
var taskIdList = influenceTaskList.Select(t => t.Id).ToList();
|
||||||
|
|
||||||
if (isPM)
|
//PM 申请 医学审核任务状态为待审核、审核中的,设置为失效。
|
||||||
|
|
||||||
|
//IR 申请 当前任务进入医学审核,医学审核任务未签名且结论中是否有问题项,答案为否的,设置为失效
|
||||||
|
|
||||||
|
if (isPMApply)
|
||||||
{
|
{
|
||||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(t => taskIdList.Contains(t.VisitTaskId) && t.AuditState != MedicalReviewAuditState.HaveSigned, u => new TaskMedicalReview() { IsInvalid = true });
|
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(t => taskIdList.Contains(t.VisitTaskId) && t.AuditState != MedicalReviewAuditState.HaveSigned, u => new TaskMedicalReview() { IsInvalid = true });
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue