Test_IRC_Net8
parent
0266072c6a
commit
760f75061e
|
|
@ -1149,20 +1149,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
List<QuestionMark?> needCopyMarks = new List<QuestionMark?>()
|
List<QuestionMark?> notNeedCopyMarks = new List<QuestionMark?>()
|
||||||
{
|
{
|
||||||
|
QuestionMark.MajorAxis,
|
||||||
QuestionMark.IsLymph,
|
QuestionMark.ShortAxis,
|
||||||
QuestionMark.Lesion,
|
QuestionMark.State,
|
||||||
QuestionMark.Organ,
|
};
|
||||||
QuestionMark.Location,
|
|
||||||
QuestionMark.Part,
|
|
||||||
QuestionMark.BodyPartDescription,
|
|
||||||
QuestionMark.LowPPDLDi,
|
|
||||||
QuestionMark.LowPPDSDi,
|
|
||||||
QuestionMark.NadirPPD,
|
|
||||||
QuestionMark.LowPPDVisit,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1206,30 +1198,29 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var tableAnswers = new List<ReadingTableQuestionAnswer>();
|
var mergedRowIds = tableRowAnswers.Where(x => x.SplitOrMergeType == SplitOrMergeType.Merged).Select(x => x.Id).ToHashSet();
|
||||||
// 处理状态
|
var tableAnswers = copyTableAnswers
|
||||||
|
.Select(x =>
|
||||||
var mergedRowIds = tableRowAnswers.Where(x => x.SplitOrMergeType == SplitOrMergeType.Merged).Select(x => x.Id).ToList();
|
|
||||||
copyTableAnswers.ForEach(x =>
|
|
||||||
{
|
|
||||||
var tableAnswer = new ReadingTableQuestionAnswer()
|
|
||||||
{
|
{
|
||||||
Id = NewId.NextGuid(),
|
var rowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(y => y.Id).FirstOrDefault();
|
||||||
Answer = needCopyMarks.Contains(x.QuestionMark) ? x.Answer : string.Empty,
|
var answer = notNeedCopyMarks.Contains(x.QuestionMark) ? string.Empty : x.Answer;
|
||||||
QuestionId = x.QuestionId,
|
if (mergedRowIds.Contains(rowId) && (x.QuestionMark == QuestionMark.State || x.QuestionMark == QuestionMark.ShortAxis || x.QuestionMark == QuestionMark.MajorAxis))
|
||||||
RowIndex = x.RowIndex,
|
{
|
||||||
RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(),
|
answer = x.Answer;
|
||||||
TableQuestionId = x.TableQuestionId,
|
}
|
||||||
TrialId = x.TrialId,
|
return new ReadingTableQuestionAnswer
|
||||||
VisitTaskId = visitTaskId,
|
{
|
||||||
};
|
Id = NewId.NextGuid(),
|
||||||
if (mergedRowIds.Contains(tableAnswer.RowId) && x.QuestionMark == QuestionMark.State)
|
Answer = answer,
|
||||||
{
|
QuestionId = x.QuestionId,
|
||||||
tableAnswer.Answer = TargetState.Loss.GetEnumInt();
|
RowIndex = x.RowIndex,
|
||||||
|
RowId = rowId,
|
||||||
}
|
TableQuestionId = x.TableQuestionId,
|
||||||
tableAnswers.Add(tableAnswer);
|
TrialId = x.TrialId,
|
||||||
});
|
VisitTaskId = visitTaskId,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.ToList();
|
||||||
|
|
||||||
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new ReadingTaskQuestionMark()
|
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new ReadingTaskQuestionMark()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1148,20 +1148,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
List<QuestionMark?> needCopyMarks = new List<QuestionMark?>()
|
List<QuestionMark?> notNeedCopyMarks = new List<QuestionMark?>()
|
||||||
{
|
{
|
||||||
|
QuestionMark.MajorAxis,
|
||||||
QuestionMark.IsLymph,
|
QuestionMark.ShortAxis,
|
||||||
QuestionMark.Lesion,
|
QuestionMark.State,
|
||||||
QuestionMark.Organ,
|
};
|
||||||
QuestionMark.Location,
|
|
||||||
QuestionMark.Part,
|
|
||||||
QuestionMark.BodyPartDescription,
|
|
||||||
QuestionMark.LowPPDLDi,
|
|
||||||
QuestionMark.LowPPDSDi,
|
|
||||||
QuestionMark.NadirPPD,
|
|
||||||
QuestionMark.LowPPDVisit,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1205,30 +1197,29 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var tableAnswers = new List<ReadingTableQuestionAnswer>();
|
var mergedRowIds = tableRowAnswers.Where(x => x.SplitOrMergeType == SplitOrMergeType.Merged).Select(x => x.Id).ToHashSet();
|
||||||
// 处理状态
|
var tableAnswers = copyTableAnswers
|
||||||
|
.Select(x =>
|
||||||
var mergedRowIds = tableRowAnswers.Where(x => x.SplitOrMergeType == SplitOrMergeType.Merged).Select(x => x.Id).ToList();
|
|
||||||
copyTableAnswers.ForEach(x =>
|
|
||||||
{
|
|
||||||
var tableAnswer = new ReadingTableQuestionAnswer()
|
|
||||||
{
|
{
|
||||||
Id = NewId.NextGuid(),
|
var rowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(y => y.Id).FirstOrDefault();
|
||||||
Answer = needCopyMarks.Contains(x.QuestionMark) ? x.Answer : string.Empty,
|
var answer = notNeedCopyMarks.Contains(x.QuestionMark) ? string.Empty : x.Answer;
|
||||||
QuestionId = x.QuestionId,
|
if (mergedRowIds.Contains(rowId) && (x.QuestionMark == QuestionMark.State || x.QuestionMark == QuestionMark.ShortAxis || x.QuestionMark == QuestionMark.MajorAxis))
|
||||||
RowIndex = x.RowIndex,
|
{
|
||||||
RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(),
|
answer = x.Answer;
|
||||||
TableQuestionId = x.TableQuestionId,
|
}
|
||||||
TrialId = x.TrialId,
|
return new ReadingTableQuestionAnswer
|
||||||
VisitTaskId = visitTaskId,
|
{
|
||||||
};
|
Id = NewId.NextGuid(),
|
||||||
if (mergedRowIds.Contains(tableAnswer.RowId) && x.QuestionMark == QuestionMark.State)
|
Answer = answer,
|
||||||
{
|
QuestionId = x.QuestionId,
|
||||||
tableAnswer.Answer = TargetState.Loss.GetEnumInt();
|
RowIndex = x.RowIndex,
|
||||||
|
RowId = rowId,
|
||||||
}
|
TableQuestionId = x.TableQuestionId,
|
||||||
tableAnswers.Add(tableAnswer);
|
TrialId = x.TrialId,
|
||||||
});
|
VisitTaskId = visitTaskId,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.ToList();
|
||||||
|
|
||||||
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new ReadingTaskQuestionMark()
|
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new ReadingTaskQuestionMark()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue