Uat_Study
parent
98e2bc75b1
commit
d0148a27cc
|
@ -125,7 +125,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
TableQuestionId = x.TableQuestionId,
|
TableQuestionId = x.TableQuestionId,
|
||||||
TrialId = x.TrialId,
|
TrialId = x.TrialId,
|
||||||
VisitTaskId = visitTaskId,
|
VisitTaskId = visitTaskId,
|
||||||
});
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -148,18 +148,20 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
var maxNewLesionsRowIndex = tableRowAnswers.Where(x => x.QuestionId == newLesionQuestion.Id).OrderByDescending(x => x.RowIndex).Select(x => x.RowIndex).FirstOrDefault();
|
var maxNewLesionsRowIndex = tableRowAnswers.Where(x => x.QuestionId == newLesionQuestion.Id).OrderByDescending(x => x.RowIndex).Select(x => x.RowIndex).FirstOrDefault();
|
||||||
maxNewLesionsRowIndex = Math.Floor(maxNewLesionsRowIndex);
|
maxNewLesionsRowIndex = Math.Floor(maxNewLesionsRowIndex);
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in tableRowAnswers.Where(x => x.QuestionId == newLesionQuestion.Id).OrderBy(x=>x.RowIndex))
|
foreach (var item in tableRowAnswers.Where(x => x.QuestionId == newLesionQuestion.Id).OrderBy(x=>x.RowIndex))
|
||||||
{
|
{
|
||||||
maxNewLesionsRowIndex++;
|
maxNewLesionsRowIndex++;
|
||||||
item.QuestionId = alwaysNewLesionsQuestion.Id;
|
item.QuestionId = alwaysNewLesionsQuestion.Id;
|
||||||
item.RowIndex = maxNewLesionsRowIndex;
|
item.RowIndex = maxNewLesionsRowIndex;
|
||||||
|
|
||||||
foreach (var tableAnswer in tableAnswers.Where(y=>y.RowId== item.Id))
|
foreach (var tableAnswer in tableAnswers.Where(y => y.RowId == item.Id))
|
||||||
{
|
{
|
||||||
tableAnswer.QuestionId= alwaysNewLesionsQuestion.Id;
|
tableAnswer.QuestionId = alwaysNewLesionsQuestion.Id;
|
||||||
tableAnswer.TableQuestionId = alwaysTableQuestionIdDic[tableAnswer.TableQuestionId];
|
tableAnswer.TableQuestionId = alwaysTableQuestionIdDic[tableAnswer.TableQuestionId];
|
||||||
|
tableAnswer.RowIndex = maxNewLesionsRowIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue