Uat_Study
he 2022-11-24 15:36:22 +08:00
parent 55388ce67f
commit 51ea01cb20
3 changed files with 17 additions and 5 deletions

View File

@ -9127,6 +9127,12 @@
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.VerifyReadingRestTime">
<summary>
验证阅片休息时间
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SubmitTaskChangeState(System.Guid)">
<summary>
签名提交任务修改状态

View File

@ -257,6 +257,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
{
public ReadingCalculateDto calculateDto { get; set; }
public bool IsAnalysisCreate { get; set; }
public Guid QuestionId { get; set; }
}

View File

@ -1079,9 +1079,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{
// 找到所有访视任务的Id
var visitTaskIds = await _visitTaskRepository.Where(x => !x.IsAnalysisCreate && x.ReadingCategory == ReadingCategory.Visit &&
var visitTaskIds = await _visitTaskRepository.Where(x => x.IsAnalysisCreate == inDto.IsAnalysisCreate &&
x.ReadingCategory == ReadingCategory.Visit &&
x.TrialReadingCriterionId == inDto.calculateDto.TrialReadingCriterionId &&
x.TaskState == TaskState.Effect && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.DoctorUserId == inDto.calculateDto.DoctorUserId).Select(x => x.Id).ToListAsync();
x.TaskState == TaskState.Effect && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ArmEnum == inDto.calculateDto.ArmEnum).Select(x => x.Id).ToListAsync();
var answer = (await GetLowSODVisit(inDto.calculateDto)).OrderBy(x => x.SOD).Select(x => x.BlindName).FirstOrDefault();
visitTaskIds = visitTaskIds.Where(x => x != inDto.calculateDto.BaseLineTaskId).ToList();
@ -1121,7 +1122,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
/// <returns></returns>
private async Task<decimal> GetBaseLineSOD(ReadingCalculateDto inDto)
{
if (await _visitTaskRepository.AnyAsync(x => x.Id == inDto.VisitTaskId && x.SourceSubjectVisit.IsBaseLine && !x.IsAnalysisCreate && x.DoctorUserId == inDto.DoctorUserId))
if (await _visitTaskRepository.AnyAsync(x => x.Id == inDto.VisitTaskId && x.SourceSubjectVisit.IsBaseLine && x.IsAnalysisCreate==inDto.IsAnalysisCreate && x.ArmEnum == inDto.ArmEnum))
{
return 0;
}
@ -1129,7 +1130,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
// 先找到基线的任务
var baseLineTaskId = await _visitTaskRepository.Where(x => x.SubjectId == inDto.SubjectId && x.ReadingCategory == ReadingCategory.Visit
&& x.TrialReadingCriterionId == inDto.TrialReadingCriterionId &&
x.SourceSubjectVisit.IsBaseLine && x.TaskState == TaskState.Effect && !x.IsAnalysisCreate && x.DoctorUserId == inDto.DoctorUserId)
x.SourceSubjectVisit.IsBaseLine && x.TaskState == TaskState.Effect &&
x.IsAnalysisCreate == inDto.IsAnalysisCreate && x.ArmEnum == inDto.ArmEnum)
.Select(x => x.Id).FirstOrDefaultAsync();
@ -1224,7 +1226,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var LastVisitTaskId = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
x.TrialReadingCriterionId == inDto.TrialReadingCriterionId &&
x.TaskState == TaskState.Effect && !x.IsAnalysisCreate && x.SourceSubjectVisitId == lastVisitId && x.DoctorUserId == inDto.DoctorUserId).Select(x => x.Id).FirstOrDefaultAsync();
x.TaskState == TaskState.Effect &&
x.IsAnalysisCreate == inDto.IsAnalysisCreate
&& x.SourceSubjectVisitId == lastVisitId && x.ArmEnum==inDto.ArmEnum).Select(x => x.Id).FirstOrDefaultAsync();
return LastVisitTaskId;
}