Compare commits

..

No commits in common. "eedfa4b84d246f25f4fabb38ccf1980259d9e672" and "12fb19c47c6f7bac137b242d7b715037afaec1eb" have entirely different histories.

1 changed files with 1 additions and 27 deletions

View File

@ -1,10 +1,8 @@
using DocumentFormat.OpenXml.EMMA;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Infrastructure;
using MassTransit;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
@ -622,7 +620,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
foreach (var item in questionInfo.TableRowInfoList)
{
var avg = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.AverageValue).FirstOrDefault();
var avgAnswer = "NA";
var avgAnswer = string.Empty;
List<QuestionMark?> questionMarks = new List<QuestionMark?>()
{
QuestionMark.FirstMeasurement,
@ -668,31 +666,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
{
ReadingCalculateDto readingData = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
var markList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction)
.SelectMany(x => x.TableRowInfoList).ToList();
var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.IsMeasurable && x.Answer.IsNotNullOrEmpty())).ToList();
if (tableQuestionList.Count() != 8)
{
throw new BusinessValidationFailedException(_localizer["MRIPDFF_AllNeedToBeMark"]);
}
var notableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.No))).ToList();
foreach (var item in notableQuestionList)
{
if (markList.Any(x => x.RowId == item.RowId))
{
throw new BusinessValidationFailedException(_localizer["MRIPDFF_NeedClearMark"]);
}
}
}
}
}