Compare commits
No commits in common. "eedfa4b84d246f25f4fabb38ccf1980259d9e672" and "12fb19c47c6f7bac137b242d7b715037afaec1eb" have entirely different histories.
eedfa4b84d
...
12fb19c47c
|
|
@ -1,10 +1,8 @@
|
||||||
using DocumentFormat.OpenXml.EMMA;
|
using DocumentFormat.OpenXml.EMMA;
|
||||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Domain.Models;
|
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using IRaCIS.Core.Infrastructure;
|
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
@ -622,7 +620,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
foreach (var item in questionInfo.TableRowInfoList)
|
foreach (var item in questionInfo.TableRowInfoList)
|
||||||
{
|
{
|
||||||
var avg = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.AverageValue).FirstOrDefault();
|
var avg = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.AverageValue).FirstOrDefault();
|
||||||
var avgAnswer = "NA";
|
var avgAnswer = string.Empty;
|
||||||
List<QuestionMark?> questionMarks = new List<QuestionMark?>()
|
List<QuestionMark?> questionMarks = new List<QuestionMark?>()
|
||||||
{
|
{
|
||||||
QuestionMark.FirstMeasurement,
|
QuestionMark.FirstMeasurement,
|
||||||
|
|
@ -668,31 +666,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
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"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue