Uat_Study
he 2022-10-08 17:16:03 +08:00
parent 475a43f6c9
commit 691b205ff9
3 changed files with 41 additions and 5 deletions

View File

@ -101,6 +101,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string VisitName { get; set; }
public string BlindName { get; set; }
public Guid VisitTaskId { get; set; }
public Guid BaseLineTaskId { get; set; }
@ -204,6 +206,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string VisitName { get; set; }
public string BlindName { get; set; }
public decimal SOD { get; set; }
}

View File

@ -370,6 +370,7 @@ namespace IRaCIS.Core.Application.Service
BaseLineTaskId= baseLinetaskId,
ArmEnum=visitTask.ArmEnum,
VisitName= subjectVisit.VisitName,
BlindName= subjectVisit.BlindName,
};
return readingData;
@ -577,7 +578,7 @@ namespace IRaCIS.Core.Application.Service
}
var decimalAnswerList = await GetVisitTaskAnswerList(inDto);
return decimalAnswerList.OrderBy(x => x.SOD).Select(x => x.VisitName).FirstOrDefault() ?? string.Empty;
return decimalAnswerList.OrderBy(x => x.SOD).Select(x => x.BlindName).FirstOrDefault() ?? string.Empty;
}
#endregion
@ -853,7 +854,9 @@ namespace IRaCIS.Core.Application.Service
VisitTaskId = x.VisitTaskId,
QuestionId = x.ReadingQuestionTrialId,
VisitName = x.VisitTask.SourceSubjectVisit.VisitName,
SOD = x.Answer.IsNullOrEmptyReturn0(),
BlindName=x.VisitTask.SourceSubjectVisit.BlindName,
SOD = x.Answer.IsNullOrEmptyReturn0(),
}).ToListAsync();
// 这里是需要加上自己的 基线不用管

View File

@ -2130,17 +2130,46 @@ namespace IRaCIS.Application.Services
public async Task<IResponseOutput> VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
{
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId)
var tableAnswerList = (await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId)
.Select(x => new
{
x.ReadingQuestionTrial.OrderMark,
x.RowIndex,
QuestionMark = x.ReadingTableQuestionTrial.QuestionMark,
Answer = x.Answer,
}).ToListAsync()).Where(x=> x.QuestionMark == QuestionMark.State && x.Answer.IsNullOrEmpty()).ToList();
string errorMassage = string.Empty;
var rowAnswerList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.MeasureData.IsNullOrEmpty())
.Select(x => new
{
x.ReadingQuestionTrial.OrderMark,
x.RowIndex,
}).ToListAsync();
if (tableAnswerList.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.IsNullOrEmpty()))
IEnumerable<string> measureDataList = rowAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList();
if (rowAnswerList.Count > 0)
{
throw new BusinessValidationFailedException($"存在病灶信息状态为空!");
errorMassage += $" 病灶{ string.Join(',', measureDataList)}不存在标记,";
}
if (tableAnswerList.Count > 0)
{
errorMassage += $" 病灶{ string.Join(',', tableAnswerList)}状态为空,";
}
if (errorMassage!=string.Empty)
{
throw new BusinessValidationFailedException(errorMassage);
}
//await _readingCalculateService.VerifyVisitTaskQuestions(inDto);