修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
2ba9e6e2d4
commit
d72b28afc2
Binary file not shown.
|
|
@ -530,7 +530,25 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
if (item2.Value.ToString() == string.Empty || item.Value == null)
|
||||
{
|
||||
column[item2.Key] = "-";
|
||||
bool isOrgan = false;
|
||||
try
|
||||
{
|
||||
if (item2.Key == "Organ" && column["RowMark"] == string.Empty || column["RowMark"] == "-")
|
||||
{
|
||||
column[item2.Key] = string.Empty;
|
||||
isOrgan = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
if (!isOrgan)
|
||||
{
|
||||
column[item2.Key] = "-";
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -411,6 +411,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
taskIds.Add(relatedVisitTask.Item1[count - 1].VisitTaskId);
|
||||
|
||||
}
|
||||
|
||||
var isConvertedTaskList = await _visitTaskRepository.Where(x => taskIds.Contains(x.Id)).Select(x => new { x.Id, x.IsConvertedTask }).ToListAsync();
|
||||
|
||||
relatedVisitTask.Item1 = relatedVisitTask.Item1.Where(x => taskIds.Contains(x.VisitTaskId)).ToList();
|
||||
// 所有访视问题的答案
|
||||
var answerList = await _readingTaskQuestionAnswerRepository.Where(x => taskIds.Contains(x.VisitTaskId)).Include(x => x.ReadingQuestionTrial).ToListAsync();
|
||||
|
|
@ -455,11 +458,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
Dictionary<string, object> target = new Dictionary<string, object>()
|
||||
{
|
||||
{ "RowMark","-"},
|
||||
{ "Organ","-"},
|
||||
{ "FirstVisit","-" },
|
||||
{ "SecondVisit", "-" },
|
||||
{ "ThirdlyVisit", "-" },
|
||||
{ "RowMark",string.Empty},
|
||||
{ "Organ",string.Empty},
|
||||
{ "FirstVisit",string.Empty },
|
||||
{ "SecondVisit", string.Empty },
|
||||
{ "ThirdlyVisit", string.Empty },
|
||||
};
|
||||
targetInfo.Add(target);
|
||||
}
|
||||
|
|
@ -509,18 +512,53 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
foreach (var item in exports)
|
||||
{
|
||||
item.QuestionName = _generalCalculateService.GetTrialQuestionName(trialQuestion, item.QuestionType);
|
||||
|
||||
Dictionary<string, object> questionAnswer = new Dictionary<string, object>()
|
||||
{
|
||||
{"Name", item.QuestionName},
|
||||
{"FirstVisit", _generalCalculateService.GetTaskanswer(answerList,dictionList,unitDictionary,taskIds[0],item.QuestionType)},
|
||||
{"SecondVisit", relatedCount>=2? _generalCalculateService.GetTaskanswer(answerList,dictionList,unitDictionary,taskIds[1],item.QuestionType):string.Empty },
|
||||
{"ThirdlyVisit", relatedCount>=3? _generalCalculateService.GetTaskanswer(answerList,dictionList,unitDictionary,taskIds[2],item.QuestionType):string.Empty },
|
||||
{"FirstVisit", GetAnswerWithFallback(taskIds[0],item) },
|
||||
{"SecondVisit", relatedCount>=2? GetAnswerWithFallback(taskIds[1],item):string.Empty },
|
||||
{"ThirdlyVisit", relatedCount>=3? GetAnswerWithFallback(taskIds[2],item):string.Empty },
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
questionAnswerList.Add(questionAnswer);
|
||||
}
|
||||
return questionAnswerList;
|
||||
}
|
||||
|
||||
string GetAnswerWithFallback(Guid taskId, ExportReportQuestion item)
|
||||
{
|
||||
|
||||
var answer=string.Empty;
|
||||
|
||||
List<QuestionType> questionTypes = new List<QuestionType>() {
|
||||
QuestionType.ComparedTriggeringSODChange,
|
||||
QuestionType.ISOD,
|
||||
QuestionType.ComparedTriggeringiSODChange,
|
||||
QuestionType.NewTargetLesion,
|
||||
QuestionType.NewNoTargetLesion,
|
||||
QuestionType.OtherNewTargetLesion,
|
||||
QuestionType.IRECISTNewTargetLesion,
|
||||
QuestionType.NewLesionEvaluation,
|
||||
|
||||
};
|
||||
|
||||
if (questionTypes.Contains(item.QuestionType) && !isConvertedTaskList.Any(x => x.IsConvertedTask && x.Id == taskId))
|
||||
{
|
||||
answer= "NA";
|
||||
}
|
||||
else
|
||||
{
|
||||
answer = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, taskId, item.QuestionType);
|
||||
}
|
||||
|
||||
return answer;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
var studyInfo = (await _dicomStudyRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId).Select(x => new
|
||||
|
|
|
|||
|
|
@ -376,11 +376,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
Dictionary<string, object> target = new Dictionary<string, object>()
|
||||
{
|
||||
{ "RowMark","-"},
|
||||
{ "Organ","-"},
|
||||
{ "FirstVisit","-" },
|
||||
{ "SecondVisit", "-" },
|
||||
{ "ThirdlyVisit", "-" },
|
||||
{ "RowMark",string.Empty},
|
||||
{ "Organ",string.Empty},
|
||||
{ "FirstVisit",string.Empty },
|
||||
{ "SecondVisit", string.Empty },
|
||||
{ "ThirdlyVisit", string.Empty },
|
||||
};
|
||||
targetInfo.Add(target);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,11 +170,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
Dictionary<string, object> target = new Dictionary<string, object>()
|
||||
{
|
||||
{ "RowMark","-"},
|
||||
{ "Organ","-"},
|
||||
{ "FirstVisit","-" },
|
||||
{ "SecondVisit", "-" },
|
||||
{ "ThirdlyVisit", "-" },
|
||||
{ "RowMark",string.Empty},
|
||||
{ "Organ",string.Empty},
|
||||
{ "FirstVisit",string.Empty },
|
||||
{ "SecondVisit", string.Empty },
|
||||
{ "ThirdlyVisit", string.Empty },
|
||||
};
|
||||
targetInfo.Add(target);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -373,11 +373,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
Dictionary<string, object> target = new Dictionary<string, object>()
|
||||
{
|
||||
{ "RowMark","-"},
|
||||
{ "Organ","-"},
|
||||
{ "FirstVisit","-" },
|
||||
{ "SecondVisit", "-" },
|
||||
{ "ThirdlyVisit", "-" },
|
||||
{ "RowMark",string.Empty},
|
||||
{ "Organ",string.Empty},
|
||||
{ "FirstVisit",string.Empty },
|
||||
{ "SecondVisit", string.Empty },
|
||||
{ "ThirdlyVisit", string.Empty },
|
||||
};
|
||||
targetInfo.Add(target);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,11 +366,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
Dictionary<string, object> target = new Dictionary<string, object>()
|
||||
{
|
||||
{ "RowMark","-"},
|
||||
{ "Organ","-"},
|
||||
{ "FirstVisit","-" },
|
||||
{ "SecondVisit", "-" },
|
||||
{ "ThirdlyVisit", "-" },
|
||||
{ "RowMark",string.Empty},
|
||||
{ "Organ",string.Empty},
|
||||
{ "FirstVisit",string.Empty },
|
||||
{ "SecondVisit", string.Empty },
|
||||
{ "ThirdlyVisit", string.Empty },
|
||||
};
|
||||
targetInfo.Add(target);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue