Compare commits

..

No commits in common. "19bf8210f6b21de2d3407ae24bb93a0bcffde139" and "432bf1ae122e1cc81eff12d9a2d93e8f92e7ac9f" have entirely different histories.

3 changed files with 16 additions and 16 deletions

View File

@ -408,7 +408,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var tableQuestionList = rowInfo.Where(x=>x.TableQuestionList.Any(x=>x.QuestionMark== QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.Yes))).SelectMany(x => x.TableQuestionList).ToList(); var tableQuestionList = rowInfo.Where(x=>x.TableQuestionList.Any(x=>x.QuestionMark== QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.Yes))).SelectMany(x => x.TableQuestionList).ToList();
if (rowInfo.Any(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.MRIPDFF && x.Answer.IsNullOrEmpty()))) if (rowInfo.Any(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.AverageValue && x.Answer.IsNullOrEmpty())))
{ {
return string.Empty; return string.Empty;
} }
@ -416,7 +416,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{ {
return "NE"; return "NE";
} }
result = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.MRIPDFF).Average(x => x.Answer.IsNullOrEmptyReturn0()); result = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.AverageValue).Average(x => x.Answer.IsNullOrEmptyReturn0());
return decimal.Round(result, inDto.DigitPlaces, MidpointRounding.AwayFromZero).ToString("F" + inDto.DigitPlaces.ToString()); ; return decimal.Round(result, inDto.DigitPlaces, MidpointRounding.AwayFromZero).ToString("F" + inDto.DigitPlaces.ToString()); ;
} }
@ -517,18 +517,18 @@ 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); //ReadingCalculateDto readingData = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
var markList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync(); //var markList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction) //var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction)
.SelectMany(x => x.TableRowInfoList).ToList(); // .SelectMany(x => x.TableRowInfoList).ToList();
var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.MRIPDFF && x.Answer.IsNotNullOrEmpty())).ToList(); //var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.AverageValue && x.Answer.IsNotNullOrEmpty())).ToList();
if (tableQuestionList.Count() != 4) //if (tableQuestionList.Count() != 4)
{ //{
throw new BusinessValidationFailedException(_localizer["MRIPDFF_AllNeedToBeMark"]); // throw new BusinessValidationFailedException(_localizer["MRIPDFF_AllNeedToBeMark"]);
} //}
var instanceCount = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.InstanceId != null).Select(x => x.InstanceId).Distinct().CountAsync(); var instanceCount = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.InstanceId != null).Select(x => x.InstanceId).Distinct().CountAsync();

View File

@ -408,7 +408,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var tableQuestionList = rowInfo.Where(x=>x.TableQuestionList.Any(x=>x.QuestionMark== QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.Yes))).SelectMany(x => x.TableQuestionList).ToList(); var tableQuestionList = rowInfo.Where(x=>x.TableQuestionList.Any(x=>x.QuestionMark== QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.Yes))).SelectMany(x => x.TableQuestionList).ToList();
if (rowInfo.Any(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.MRIPDFF && x.Answer.IsNullOrEmpty()))) if (rowInfo.Any(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.AverageValue && x.Answer.IsNullOrEmpty())))
{ {
return string.Empty; return string.Empty;
} }
@ -416,7 +416,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{ {
return "NE"; return "NE";
} }
result = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.MRIPDFF).Average(x => x.Answer.IsNullOrEmptyReturn0()); result = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.AverageValue).Average(x => x.Answer.IsNullOrEmptyReturn0());
return decimal.Round(result, inDto.DigitPlaces, MidpointRounding.AwayFromZero).ToString("F" + inDto.DigitPlaces.ToString()); ; return decimal.Round(result, inDto.DigitPlaces, MidpointRounding.AwayFromZero).ToString("F" + inDto.DigitPlaces.ToString()); ;
} }
@ -466,7 +466,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.MRIPDFF).FirstOrDefault(); var avg = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.AverageValue).FirstOrDefault();
var avgAnswer = string.Empty; var avgAnswer = string.Empty;
List<QuestionMark?> questionMarks = new List<QuestionMark?>() List<QuestionMark?> questionMarks = new List<QuestionMark?>()
{ {
@ -522,7 +522,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction) var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction)
.SelectMany(x => x.TableRowInfoList).ToList(); .SelectMany(x => x.TableRowInfoList).ToList();
var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.MRIPDFF && x.Answer.IsNotNullOrEmpty())).ToList(); var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.AverageValue && x.Answer.IsNotNullOrEmpty())).ToList();
if (tableQuestionList.Count() != 8) if (tableQuestionList.Count() != 8)
{ {

View File

@ -2514,7 +2514,7 @@ namespace IRaCIS.Core.Domain.Share
/// <summary> /// <summary>
/// 平均值 /// 平均值
/// </summary> /// </summary>
MRIPDFF = 1104, AverageValue = 1104,
/// <summary> /// <summary>
/// 是否可测量 /// 是否可测量