diff --git a/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_IRECIST1.1_CN_V1.docx b/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_IRECIST1.1_CN_V1.docx index 622fea062..b9c5fecb2 100644 Binary files a/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_IRECIST1.1_CN_V1.docx and b/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_IRECIST1.1_CN_V1.docx differ diff --git a/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_IRECIST1.1_EN_V1.docx b/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_IRECIST1.1_EN_V1.docx index 8852ba1b6..59b2312b3 100644 Binary files a/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_IRECIST1.1_EN_V1.docx and b/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_IRECIST1.1_EN_V1.docx differ diff --git a/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_RECIST1.1_CN_V1.docx b/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_RECIST1.1_CN_V1.docx index 9fe233724..97246810b 100644 Binary files a/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_RECIST1.1_CN_V1.docx and b/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_RECIST1.1_CN_V1.docx differ diff --git a/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_RECIST1.1_EN_V1.docx b/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_RECIST1.1_EN_V1.docx index 951e7e0eb..2a07890e2 100644 Binary files a/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_RECIST1.1_EN_V1.docx and b/IRaCIS.Core.API/wwwroot/ReadReoprtTemplate/TumorEvaluation_RECIST1.1_EN_V1.docx differ diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ExportTumorEvaluationDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ExportTumorEvaluationDto.cs index 3b4e2162d..76ecec6e6 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ExportTumorEvaluationDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ExportTumorEvaluationDto.cs @@ -1,4 +1,5 @@ using DocumentFormat.OpenXml.Wordprocessing; +using IRaCIS.Core.Infra.EFCore.Common; using MassTransit.Caching.Internals; using System; using System.Collections; @@ -522,7 +523,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto { get { - return VisitTargetInfoList.Sum(x => x.VisitLength); + return VisitTargetInfoList.Sum(x => x.VisitLength.IsNullOrEmptyReturn0()); } } @@ -618,7 +619,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 长度 /// - public decimal? VisitLength { get; set; } + public string VisitLength { get; set; } } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs index 86640ced0..d04e5068d 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs @@ -151,10 +151,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate OverallResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.Tumor), DoctorName = x.DoctorUser.LastName + x.DoctorUser.FirstName, SignTime = x.SignTime?.ToString("yyyy-MM-dd HH:mm:ss"), - VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion, x.Id), - VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id), - NewVisitTargetInfoList = getLesionInfo(LesionType.NewTargetLesion, x.Id), - NewNoVisitTargetInfoList = getLesionInfo(LesionType.NewNonTargetLesion, x.Id), + VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion, x.Id,1), + VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id,1), + NewVisitTargetInfoList = getLesionInfo(LesionType.NewTargetLesion, x.Id,1), + NewNoVisitTargetInfoList = getLesionInfo(LesionType.NewNonTargetLesion, x.Id,1), }).OrderBy(x => x.VisitNum).ToList(); @@ -203,7 +203,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate return targetInfo; } - decimal getStateInfo(Guid visitTaskid, decimal item, LesionType lesionType) + // 靶病灶和新靶病灶取长度 其他病灶取状态 + string getStateInfo(Guid visitTaskid, decimal item, LesionType lesionType) { // 非淋巴结取长径 淋巴结取长短径 var state = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.State, item); @@ -214,19 +215,25 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var result = string.Empty; - if (!majorAxis.IsNullOrEmpty()) + + switch (lesionType) { - result = majorAxis; - + case LesionType.TargetLesion: + case LesionType.NewTargetLesion: + if (!majorAxis.IsNullOrEmpty()) + { + result = majorAxis; + } + if (isLymph.EqEnum(YesOrNoOrNa.Yes) && !shortAxis.IsNullOrEmpty()) + { + result = shortAxis; + } + break; + default: + result = state; + break; } - - if (isLymph.EqEnum(YesOrNoOrNa.Yes) && !shortAxis.IsNullOrEmpty()) - { - result = shortAxis; - } - - return result.IsNullOrEmptyReturn0(); - + return result; } #endregion diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs index 1c6cbed5e..6fde180bc 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs @@ -1,4 +1,5 @@ -using DocumentFormat.OpenXml.Office.SpreadSheetML.Y2023.MsForms; +using DocumentFormat.OpenXml.Drawing.Charts; +using DocumentFormat.OpenXml.Office.SpreadSheetML.Y2023.MsForms; using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.Helper; @@ -101,13 +102,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate OverallResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.Tumor), DoctorName = x.DoctorUser.LastName + x.DoctorUser.FirstName, SignTime = x.SignTime?.ToString("yyyy-MM-dd HH:mm:ss"), - VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion, x.Id), - VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id), + VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion, x.Id, 1), + VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id, 1), }).OrderBy(x => x.VisitNum).ToList(); #region 两个函数 - List getLesionInfo(LesionType lesionType, Guid Visittaskid) + List getLesionInfo(LesionType lesionType, Guid Visittaskid, int? minNum = null) { var targetFocus = rowinfoList.Where(x => x.VisitTaskId == Visittaskid && x.ReadingQuestionTrial.LesionType == lesionType).OrderBy(x => x.RowIndex).ToList(); @@ -142,24 +143,25 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate num++; } - //if (lesionType == LesionType.TargetLesion) - //{ - // for (int i = num; i <= 5; i++) - // { - // VisitLesionInfo target = new VisitLesionInfo - // { - // Number = i, - // }; - // targetInfo.Add(target); - // } + if (minNum != null) + { + for (int i = num; i <= minNum.Value; i++) + { + VisitLesionInfo target = new VisitLesionInfo + { + Number = i, + }; + targetInfo.Add(target); - //} + } + } return targetInfo; } - decimal getStateInfo(Guid visitTaskid, decimal item, LesionType lesionType) + // 靶病灶和新靶病灶取长度 其他病灶取状态 + string getStateInfo(Guid visitTaskid, decimal item, LesionType lesionType) { // 非淋巴结取长径 淋巴结取长短径 var state = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.State, item); @@ -170,19 +172,25 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var result = string.Empty; - if (!majorAxis.IsNullOrEmpty()) + + switch (lesionType) { - result = majorAxis; - + case LesionType.TargetLesion: + case LesionType.NewTargetLesion: + if (!majorAxis.IsNullOrEmpty()) + { + result = majorAxis; + } + if (isLymph.EqEnum(YesOrNoOrNa.Yes) && !shortAxis.IsNullOrEmpty()) + { + result = shortAxis; + } + break; + default: + result = state; + break; } - - if (isLymph.EqEnum(YesOrNoOrNa.Yes) && !shortAxis.IsNullOrEmpty()) - { - result = shortAxis; - } - - return result.IsNullOrEmptyReturn0(); - + return result; } #endregion diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs index 09c052966..45096cc0d 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs @@ -116,13 +116,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate OverallResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.Tumor), DoctorName = x.DoctorUser.LastName + x.DoctorUser.FirstName, SignTime = x.SignTime?.ToString("yyyy-MM-dd HH:mm:ss"), - VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion,x.Id), - VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id), + VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion,x.Id,1), + VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id,1), }).OrderBy(x=>x.VisitNum).ToList(); #region 两个函数 - List getLesionInfo(LesionType lesionType,Guid Visittaskid) + List getLesionInfo(LesionType lesionType,Guid Visittaskid, int? minNum = null) { var targetFocus = rowinfoList.Where(x => x.VisitTaskId == Visittaskid && x.ReadingQuestionTrial.LesionType == lesionType).OrderBy(x => x.RowIndex).ToList(); @@ -149,47 +149,55 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate num++; } - //if (lesionType == LesionType.TargetLesion) - //{ - // for (int i = num; i <= 5; i++) - // { - // VisitLesionInfo target = new VisitLesionInfo - // { - // Number = i, - // }; - // targetInfo.Add(target); + if (minNum != null) + { + for (int i = num; i <= minNum.Value; i++) + { + VisitLesionInfo target = new VisitLesionInfo + { + Number = i, + }; + targetInfo.Add(target); - // } + } - //} + } return targetInfo; } - decimal getStateInfo(Guid visitTaskid, decimal item, LesionType lesionType) + // 靶病灶和新靶病灶取长度 其他病灶取状态 + string getStateInfo(Guid visitTaskid, decimal item, LesionType lesionType) { // 非淋巴结取长径 淋巴结取长短径 var state = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.State, item); - var majorAxis = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.MajorAxis, item,false); + var majorAxis = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.MajorAxis, item, false); var isLymph = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.IsLymph, item); var shortAxis = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.ShortAxis, item, false); var result = string.Empty; - if (!majorAxis.IsNullOrEmpty()) + + switch (lesionType) { - result = majorAxis; - + case LesionType.TargetLesion: + case LesionType.NewTargetLesion: + if (!majorAxis.IsNullOrEmpty()) + { + result = majorAxis; + } + if (isLymph.EqEnum(YesOrNoOrNa.Yes) && !shortAxis.IsNullOrEmpty()) + { + result = shortAxis; + } + break; + case LesionType.NonTargetLesions: + case LesionType.NewNonTargetLesion: + result = state; + break; } - - if (isLymph.EqEnum(YesOrNoOrNa.Yes) && !shortAxis.IsNullOrEmpty()) - { - result = shortAxis; - } - - return result.IsNullOrEmptyReturn0(); - + return result; } #endregion diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs index bab64170e..4eedcb686 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs @@ -112,8 +112,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate OverallResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.Tumor), DoctorName = x.DoctorUser.LastName + x.DoctorUser.FirstName, SignTime = x.SignTime?.ToString("yyyy-MM-dd HH:mm:ss"), - VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion, x.Id), - VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id), + VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion, x.Id,1), + VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id,1), }).OrderBy(x => x.VisitNum).ToList(); @@ -162,7 +162,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate return targetInfo; } - decimal getStateInfo(Guid visitTaskid, decimal item, LesionType lesionType) + // 靶病灶和新靶病灶取长度 其他病灶取状态 + string getStateInfo(Guid visitTaskid, decimal item, LesionType lesionType) { // 非淋巴结取长径 淋巴结取长短径 var state = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.State, item); @@ -173,19 +174,25 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var result = string.Empty; - if (!majorAxis.IsNullOrEmpty()) + + switch (lesionType) { - result = majorAxis; - + case LesionType.TargetLesion: + case LesionType.NewTargetLesion: + if (!majorAxis.IsNullOrEmpty()) + { + result = majorAxis; + } + if (isLymph.EqEnum(YesOrNoOrNa.Yes) && !shortAxis.IsNullOrEmpty()) + { + result = shortAxis; + } + break; + default: + result = state; + break; } - - if (isLymph.EqEnum(YesOrNoOrNa.Yes) && !shortAxis.IsNullOrEmpty()) - { - result = shortAxis; - } - - return result.IsNullOrEmptyReturn0(); - + return result; } #endregion