Test.EIImageViewer
parent
cb8b603296
commit
53043eae50
|
@ -172,7 +172,9 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
|
||||
List<GetCRCClinicalDataOutDto> cRCClinicalDataList = await _readingClinicalDataRepository.Where(x => x.ReadingId == inDto.SubjectVisitId)
|
||||
.Where(x => x.ClinicalDataTrialSet.TrialId == inDto.TrialId && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ClinicalDataTrialSet.ClinicalDataLevel != ClinicalLevel.ImageRead && x.ClinicalDataTrialSet.ClinicalDataLevel != ClinicalLevel.OncologyRead)
|
||||
.WhereIf(inDto.IsBaseline,x=>x.ClinicalDataTrialSet.ClinicalDataLevel==ClinicalLevel.Subject)
|
||||
.WhereIf(!inDto.IsBaseline, x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
|
||||
.Where(x => x.ClinicalDataTrialSet.TrialId == inDto.TrialId && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
||||
.Select(x => new GetCRCClinicalDataOutDto()
|
||||
{
|
||||
Id = x.Id,
|
||||
|
|
|
@ -139,6 +139,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public bool IsBaseline { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -280,13 +280,49 @@ namespace IRaCIS.Application.Services
|
|||
if (criterionType == CriterionType.PCWG3)
|
||||
{
|
||||
|
||||
// PCWG3 访视点肿瘤评估 采用上一次全局阅片的答案 如果没有 就采用访视的答案
|
||||
|
||||
|
||||
// 找到上一个全局阅片
|
||||
|
||||
var lastGlobalTask = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Global &&
|
||||
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
|
||||
x.SubjectId == taskInfo.SubjectId && x.IsAnalysisCreate == taskInfo.IsAnalysisCreate && x.TaskState == TaskState.Effect && x.VisitTaskNum < taskInfo.VisitTaskNum)
|
||||
.Where(x => x.DoctorUserId == taskInfo.DoctorUserId)
|
||||
.FirstOrDefaultAsync();
|
||||
List<ReadingGlobalTaskInfo>? globalAnswers = new List<ReadingGlobalTaskInfo> ();
|
||||
if (lastGlobalTask != null)
|
||||
{
|
||||
globalAnswers= await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == lastGlobalTask.Id).ToListAsync();
|
||||
}
|
||||
result.TaskList.ForEach(x =>
|
||||
{
|
||||
foreach (var item in x.AfterQuestionList.Where(x => x.QuestionType == QuestionType.SiteVisitForTumorEvaluation))
|
||||
{
|
||||
item.Answer = item.Answer.IsNullOrEmpty() ? (x.BeforeQuestionList.Where(x => x.QuestionType == QuestionType.SiteVisitForTumorEvaluation).Select(x => x.Answer).FirstOrDefault()??string.Empty) : item.Answer;
|
||||
var answer = item.Answer;
|
||||
|
||||
var globalanswer = globalAnswers.Where(y => y.TaskId == x.VisitTaskId && y.QuestionId == item.QuestionId).FirstOrDefault();
|
||||
|
||||
if (globalanswer != null)
|
||||
{
|
||||
answer = globalanswer.Answer;
|
||||
}
|
||||
else
|
||||
{
|
||||
answer = x.BeforeQuestionList.Where(x => x.QuestionType == QuestionType.SiteVisitForTumorEvaluation).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
|
||||
}
|
||||
|
||||
if (item.Answer.IsNullOrEmpty())
|
||||
{
|
||||
item.Answer = answer;
|
||||
}
|
||||
|
||||
item.VisitAnswer = answer;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 在修改前 去除这个问题
|
||||
x.BeforeQuestionList = x.BeforeQuestionList.Where(x => x.QuestionType != QuestionType.SiteVisitForTumorEvaluation).ToList();
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue