Test.EIImageViewer
parent
eb9db7d773
commit
8d02de0b25
|
@ -1165,13 +1165,32 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
|
await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
|
||||||
|
|
||||||
if ((await _readingClinicalDataService.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto()
|
var clinicalDataList = await _readingClinicalDataService.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto()
|
||||||
{
|
{
|
||||||
|
|
||||||
SubjectId = taskInfo.SubjectId,
|
SubjectId = taskInfo.SubjectId,
|
||||||
TrialId = taskInfo.TrialId,
|
TrialId = taskInfo.TrialId,
|
||||||
VisitTaskId = taskInfo.Id,
|
VisitTaskId = taskInfo.Id,
|
||||||
})).Count() > 0 && !taskInfo.IsReadClinicalData)
|
});
|
||||||
|
|
||||||
|
var isBaseLine = false;
|
||||||
|
if (taskInfo.SourceSubjectVisitId != null)
|
||||||
|
{
|
||||||
|
isBaseLine = await _subjectVisitRepository.Where(x => x.Id == taskInfo.SourceSubjectVisitId).Select(x => x.IsBaseLine).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
var isNeedReadClinicalData = false;
|
||||||
|
|
||||||
|
if (isBaseLine)
|
||||||
|
{
|
||||||
|
isNeedReadClinicalData = clinicalDataList.Count() > 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
isNeedReadClinicalData = clinicalDataList.Where(x => x.ClinicalDataLevel != ClinicalLevel.Subject).Count() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isNeedReadClinicalData && !taskInfo.IsReadClinicalData)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException($"临床数据未阅读!");
|
throw new BusinessValidationFailedException($"临床数据未阅读!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue