From 0b7878b1c60437492b7089e3bcf27f28cc6b95c7 Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Tue, 16 May 2023 18:05:02 +0800
Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRECIST1Point1CalculateService.cs | 30 +++++++++++++------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs
index 425327950..4471b153b 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs
@@ -2539,7 +2539,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
/// {
/// 疗效为 iUPD
/// }
- /// else if ((靶病灶评估为iCR || 非靶病灶评估为iCR) && 新病灶评估为ND)
+ /// else if ((靶病灶评估为iCR && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为iCR && 非靶病灶评估为ND && 新病灶评估为ND))
/// {
/// 疗效为 iCR
/// }
@@ -2638,14 +2638,26 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
// 疗效为 iUPD
result = OverallAssessment.iUPD;
}
- // else if ((靶病灶评估为iCR||靶病灶评估为ND) && (非靶病灶评估为iCR||非靶病灶评估为ND)) && 新病灶评估为ND)
- else if (((inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iCR))
- || inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.ND)) )
- &&
- (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iCR))
- || inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.ND))
- ))
- && inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.ND))
+ //
+ // else if ((靶病灶评估为iCR && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为iCR && 非靶病灶评估为ND && 新病灶评估为ND))
+ else if (
+
+ (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iCR))
+ && inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iCR))
+ && inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.ND))
+ )
+ ||
+
+ (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.ND))
+ && inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iCR))
+ && inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.ND))
+ )
+ ||
+
+ (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iCR))
+ && inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.ND))
+ && inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.ND))
+ )
)
{
// 疗效为 iCR
From 36576d193628c02252c35796ff84ed21752ab37c Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Wed, 17 May 2023 13:40:10 +0800
Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 10 ++++++
.../Reading/Dto/ReadingImageTaskViewModel.cs | 15 ++++++++-
.../ReadingImageTaskService.cs | 33 +++++++++++++++++++
.../General/GeneralCalculateService.cs | 2 +-
.../General/ReadingCalculateService.cs | 4 +--
.../IRECIST1Point1CalculateService.cs | 4 +--
.../Interface/ICriterionCalculateService.cs | 2 +-
.../Interface/IReadingCalculateService.cs | 2 +-
.../ReadingCalculate/PCWG3CalculateService.cs | 4 +--
.../RECIST1Point1CalculateService.cs | 4 +--
.../RECIST1Point1_BMCalculateService.cs | 4 +--
.../SelfDefineCalculateService.cs | 4 +--
IRaCIS.Core.Domain/Allocation/VisitTask.cs | 4 +++
13 files changed, 76 insertions(+), 16 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index b336482c7..d09adad8e 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -3834,6 +3834,16 @@
字典code
+
+
+ 是否存在疾病
+
+
+
+
+ 整体肿瘤评估
+
+
任务Id
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index 4530544ce..6fb1dca6e 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -176,7 +176,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public object ReportCalculateResult{ get; set; }
- public object CalculateResult { get; set; }
+ public GetReportVerifyOutDto CalculateResult { get; set; }
public ReadingTaskState ReadingTaskState { get; set; }
public List VisitTaskList { get; set; }
@@ -1687,6 +1687,19 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Func> Fun { get; set; }
}
+ public class GetReportVerifyOutDto
+ {
+ ///
+ /// 是否存在疾病
+ ///
+ public string? IsExistDisease { get; set; }
+
+ ///
+ /// 整体肿瘤评估
+ ///
+ public string? TumorEvaluate { get; set; }
+ }
+
public class GetReportVerifyInDto
{
public Guid VisitTaskId { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
index 151e25924..d985796c8 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
@@ -1406,7 +1406,40 @@ namespace IRaCIS.Application.Services
public async Task ChangeDicomReadingQuestionAnswer(ChangeDicomReadingQuestionAnswerInDto inDto)
{
await VerifyTaskIsSign(inDto.VisitTaskId);
+
+
+
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
+
+ var tumorQuestionId = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.QuestionType == QuestionType.Tumor).Select(x => x.Id).FirstOrDefaultAsync();
+
+ var tumorAnswer = inDto.Answers.Where(x => x.Id == tumorQuestionId).FirstOrDefault();
+ if (tumorAnswer != null)
+ {
+ var isConvertedTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.IsConvertedTask).FirstOrDefaultAsync();
+ var reportVerify = await _readingCalculateService.GetReportVerify(new GetReportVerifyInDto() {
+ BeforeConvertedTaskId= taskInfo.BeforeConvertedTaskId,
+ IsConvertTask= isConvertedTask,
+ VisitTaskId=inDto.VisitTaskId
+ });
+
+ if (tumorAnswer.Answer == reportVerify.TumorEvaluate)
+ {
+ await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.VisitTaskId, x => new VisitTask()
+ {
+ IsChangeTumorEvaluate = false
+ });
+ }
+ else
+ {
+ await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.VisitTaskId, x => new VisitTask()
+ {
+ IsChangeTumorEvaluate = true
+ });
+ }
+ }
+
+
var criterionId = taskInfo.TrialReadingCriterionId;
var questionIds = inDto.Answers.Select(x => x.Id).ToList();
await _readingTaskQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && questionIds.Contains(x.ReadingQuestionTrialId));
diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs
index 6fffbc2b4..44a48cfa5 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs
@@ -155,7 +155,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{
var originalTask = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
- var taskAnswer = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == beforeConvertedTaskId && x.ReadingQuestionTrial.Type != "calculation").IgnoreAutoIncludes().AsNoTracking().ToListAsync();
+ var taskAnswer = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == beforeConvertedTaskId &&x.ReadingQuestionTrial.QuestionType!=QuestionType.AdjustReason && x.ReadingQuestionTrial.Type != "calculation").IgnoreAutoIncludes().AsNoTracking().ToListAsync();
taskAnswer.ForEach(x => {
diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs
index 91e3c1ede..6b37448c4 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs
@@ -162,7 +162,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
///
///
///
- public async Task