Compare commits
No commits in common. "bcfa22a818771eb175ca8aaa1e716f6db9865bc3" and "deb7e77263b6db6a54c8e75b8d616b659ce6e4fd" have entirely different histories.
bcfa22a818
...
deb7e77263
|
|
@ -1953,15 +1953,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
var baseLineSpleenLength = await GetBaseLineSpleenLength(inDto);
|
var baseLineSpleenLength = await GetBaseLineSpleenLength(inDto);
|
||||||
|
|
||||||
var presentSpleenLength = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturnNull();
|
var presentSpleenLength = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||||
|
|
||||||
if (presentSpleenLength == null)
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
|
||||||
if (baseLineSpleenLength - 130 > 0 && presentSpleenLength > 130)
|
if (baseLineSpleenLength - 130 > 0 && presentSpleenLength > 130)
|
||||||
{
|
{
|
||||||
return ReserveDecimal((presentSpleenLength.Value - 130 - (baseLineSpleenLength - 130)) * 100 / (baseLineSpleenLength - 130), inDto.DigitPlaces);
|
return ReserveDecimal((presentSpleenLength - 130 - (baseLineSpleenLength - 130)) * 100 / (baseLineSpleenLength - 130), inDto.DigitPlaces);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1986,15 +1981,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
}
|
}
|
||||||
if (TaskAnswer.Count() == 0)
|
if (TaskAnswer.Count() == 0)
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "0";
|
||||||
}
|
|
||||||
var presentSpd = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturnNull();
|
|
||||||
if (presentSpd == null)
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
}
|
||||||
|
var presentSpd = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||||
var lowSplenoncus = TaskAnswer.OrderBy(x => x.SpleenLength).Select(x => x.SpleenLength).FirstOrDefault();
|
var lowSplenoncus = TaskAnswer.OrderBy(x => x.SpleenLength).Select(x => x.SpleenLength).FirstOrDefault();
|
||||||
return (presentSpd.Value - lowSplenoncus).ToString();
|
return (presentSpd - lowSplenoncus).ToString();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -2020,16 +2011,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
return "NA";
|
return "NA";
|
||||||
}
|
}
|
||||||
|
|
||||||
var lowSplenoncus = taskAnswer.Where(x=>x.SpleenLength!=0).OrderBy(x => x.SpleenLength).FirstOrDefault();
|
var lowSplenoncus = taskAnswer.OrderBy(x => x.SpleenLength).FirstOrDefault();
|
||||||
if (lowSplenoncus != null)
|
|
||||||
{
|
|
||||||
return lowSplenoncus.BlindName;
|
return lowSplenoncus.BlindName;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -3032,14 +3015,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
}
|
}
|
||||||
|
|
||||||
var baseLineTaskId = await GetBaseLineTaskId(inDto);
|
var baseLineTaskId = await GetBaseLineTaskId(inDto);
|
||||||
var presentSpleenLength = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturnNull();
|
var presentSpleenLength = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||||
if(presentSpleenLength==null)
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
|
||||||
var baseLineSpleenLength = (await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == baseLineTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0();
|
var baseLineSpleenLength = (await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == baseLineTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0();
|
||||||
|
|
||||||
return (presentSpleenLength.Value - baseLineSpleenLength).ToString();
|
return (presentSpleenLength - baseLineSpleenLength).ToString();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1953,15 +1953,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
var baseLineSpleenLength = await GetBaseLineSpleenLength(inDto);
|
var baseLineSpleenLength = await GetBaseLineSpleenLength(inDto);
|
||||||
|
|
||||||
var presentSpleenLength = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturnNull();
|
var presentSpleenLength = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||||
|
|
||||||
if (presentSpleenLength == null)
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
|
||||||
if (baseLineSpleenLength - 130 > 0 && presentSpleenLength > 130)
|
if (baseLineSpleenLength - 130 > 0 && presentSpleenLength > 130)
|
||||||
{
|
{
|
||||||
return ReserveDecimal((presentSpleenLength.Value - 130 - (baseLineSpleenLength - 130)) * 100 / (baseLineSpleenLength - 130), inDto.DigitPlaces);
|
return ReserveDecimal((presentSpleenLength - 130 - (baseLineSpleenLength - 130)) * 100 / (baseLineSpleenLength - 130), inDto.DigitPlaces);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1986,15 +1981,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
}
|
}
|
||||||
if (TaskAnswer.Count() == 0)
|
if (TaskAnswer.Count() == 0)
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "0";
|
||||||
}
|
|
||||||
var presentSpd = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturnNull();
|
|
||||||
if (presentSpd == null)
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
}
|
||||||
|
var presentSpd = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||||
var lowSplenoncus = TaskAnswer.OrderBy(x => x.SpleenLength).Select(x => x.SpleenLength).FirstOrDefault();
|
var lowSplenoncus = TaskAnswer.OrderBy(x => x.SpleenLength).Select(x => x.SpleenLength).FirstOrDefault();
|
||||||
return (presentSpd.Value - lowSplenoncus).ToString();
|
return (presentSpd - lowSplenoncus).ToString();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -2020,16 +2011,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
return "NA";
|
return "NA";
|
||||||
}
|
}
|
||||||
|
|
||||||
var lowSplenoncus = taskAnswer.Where(x => x.SpleenLength != 0).OrderBy(x => x.SpleenLength).FirstOrDefault();
|
var lowSplenoncus = taskAnswer.OrderBy(x => x.SpleenLength).FirstOrDefault();
|
||||||
if (lowSplenoncus != null)
|
|
||||||
{
|
|
||||||
return lowSplenoncus.BlindName;
|
return lowSplenoncus.BlindName;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -3032,14 +3015,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
}
|
}
|
||||||
|
|
||||||
var baseLineTaskId = await GetBaseLineTaskId(inDto);
|
var baseLineTaskId = await GetBaseLineTaskId(inDto);
|
||||||
var presentSpleenLength = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturnNull();
|
var presentSpleenLength = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
|
||||||
if (presentSpleenLength == null)
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
|
||||||
var baseLineSpleenLength = (await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == baseLineTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0();
|
var baseLineSpleenLength = (await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == baseLineTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0();
|
||||||
|
|
||||||
return (presentSpleenLength.Value - baseLineSpleenLength).ToString();
|
return (presentSpleenLength - baseLineSpleenLength).ToString();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -593,15 +593,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
TableQuestionId = x.TableQuestionId,
|
TableQuestionId = x.TableQuestionId,
|
||||||
TrialId = x.TrialId,
|
TrialId = x.TrialId,
|
||||||
VisitTaskId = visitTaskId,
|
VisitTaskId = visitTaskId,
|
||||||
}).ToList();
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
|
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
|
||||||
|
|
||||||
|
|
||||||
await _generalCalculateService.CopyHistoryAnswer(taskinfo, addList, tableAnswers);
|
|
||||||
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
|
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
|
||||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
|
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue