From 5fdf9e060609d04187b034428ce9028b467c4150 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 25 Sep 2024 13:12:22 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/Dto/ReadingCalculateViewModel.cs | 28 ++ .../ReadingCalculate/OCTCalculateService.cs | 275 ++++++++++++++++++ 2 files changed, 303 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs index f580bda15..599bb8379 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs @@ -234,6 +234,34 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto } } + public class OCTFCTUploadData + { + /// + /// 斑块编号 + /// + public int PlaqueNum { get; set; } + + /// + /// 第一次 + /// + public int FirstData { get; set; } + + /// + /// 第二次 + /// + public int SecondData { get; set; } + + /// + /// 第三次 + /// + public int ThirdData { get; set; } + + public decimal Avg { get { + + return ( FirstData*1m + SecondData * 1m + ThirdData * 1m) / 3; + } } + } + public class OCTInfo { diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs index 414e7cb28..ba5225d8d 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs @@ -2,7 +2,9 @@ using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infra.EFCore.Common; +using IRaCIS.Core.Infrastructure; using MassTransit; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; @@ -18,6 +20,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate IRepository _readingTableAnswerRowInfoRepository, IRepository _readingQuestionTrialRepository, IRepository _organInfoRepository, + IHttpContextAccessor httpContext, IRepository _readingGlobalTaskInfoRepository, IRepository _subjectVisitRepository, IRepository _tumorAssessmentRepository, @@ -456,6 +459,159 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate }); } + /// + /// 导入OCT-FCT数据 + /// + /// + [HttpPost] + public async Task UploadOCTFCTTemplate() + { + var request = httpContext.HttpContext!.Request; + var file = request.Form.Files[0]; + Guid visitTaskId = Guid.Parse(request.Form["VisitTaskId"]); + var dataTable = await _generalCalculateService.GetDataTableFromUpload(file); + + var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Include(x => x.Subject).Include(x => x.TrialReadingCriterion).FirstNotNullAsync(); + + var values = new + { + SubjectID = taskinfo.BlindSubjectCode.IsNullOrEmpty() ? taskinfo.Subject.Code : taskinfo.BlindSubjectCode, + TaskBlindName = taskinfo.TaskBlindName, + }; + + if (values.SubjectID != dataTable.Rows[0]["B"].ToString() || values.TaskBlindName != dataTable.Rows[1]["B"].ToString()) + { + throw new BusinessValidationFailedException(_localizer["IVUS_UploadVisitTaskError"]); + } + + List measuredValueList = new List(); + + try + { + for (int i = 3; i < dataTable.Rows.Count; i++) + { + measuredValueList.Add(new OCTFCTUploadData() + { + PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()), + FirstData = int.Parse(dataTable.Rows[i]["B"].ToString()), + SecondData = int.Parse(dataTable.Rows[i]["C"].ToString()), + ThirdData = int.Parse(dataTable.Rows[i]["D"].ToString()), + }); + } + } + catch (Exception) + { + throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]); + } + + var questionInfo = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.LesionType == LesionType.FCT).FirstNotNullAsync(); + var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == questionInfo.Id).ToListAsync(); + List tableAnsweRowInfos = new List(); + List tableAnswers = new List(); + + var maxnum = _readingTableAnswerRowInfoRepository.Where(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id).MaxOrDefault(x => x.RowIndex); + + + foreach (var item in measuredValueList) + { + maxnum = maxnum + 1; + var newRowId = NewId.NextGuid(); + // 斑块数据统计 + tableAnsweRowInfos.Add(new ReadingTableAnswerRowInfo() + { + Id = newRowId, + QuestionId = questionInfo.Id, + VisitTaskId = taskinfo.Id, + TrialId = taskinfo.TrialId, + RowIndex = maxnum, + IsCurrentTaskAdd = true, + BlindName = taskinfo.TaskBlindName, + OrderMark = questionInfo.OrderMark, + FristAddTaskNum = taskinfo.VisitTaskNum, + FristAddTaskId = taskinfo.Id, + RowMark = questionInfo.OrderMark + decimal.Parse(maxnum.ToString()).GetLesionMark() + }); + + // 编号 + tableAnswers.Add(new ReadingTableQuestionAnswer() + { + Answer = item.PlaqueNum.ToString(), + QuestionId = questionInfo.Id, + TrialId = taskinfo.TrialId, + VisitTaskId = taskinfo.Id, + RowId = newRowId, + RowIndex = maxnum, + TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.PlaqueNumber).Select(x => x.Id).FirstOrDefault(), + }); + + var avg = item.Avg.ToString(); + + + if (taskinfo.TrialReadingCriterion.DigitPlaces != -1) + { + var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0; + avg = decimal.Round(decimal.Parse(avg ?? "0"), digitPlaces).ToString("F" + digitPlaces.ToString()); + + } + + // 第一次 + tableAnswers.Add(new ReadingTableQuestionAnswer() + { + Answer = item.FirstData.ToString(), + QuestionId = questionInfo.Id, + TrialId = taskinfo.TrialId, + VisitTaskId = taskinfo.Id, + RowId = newRowId, + RowIndex = maxnum, + TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.FirstFCT).Select(x => x.Id).FirstOrDefault(), + }); + + tableAnswers.Add(new ReadingTableQuestionAnswer() + { + Answer = item.SecondData.ToString(), + QuestionId = questionInfo.Id, + TrialId = taskinfo.TrialId, + VisitTaskId = taskinfo.Id, + RowId = newRowId, + RowIndex = maxnum, + TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.SecondFCT).Select(x => x.Id).FirstOrDefault(), + }); + + tableAnswers.Add(new ReadingTableQuestionAnswer() + { + Answer = item.ThirdData.ToString(), + QuestionId = questionInfo.Id, + TrialId = taskinfo.TrialId, + VisitTaskId = taskinfo.Id, + RowId = newRowId, + RowIndex = maxnum, + TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.ThirdFCT).Select(x => x.Id).FirstOrDefault(), + }); + + tableAnswers.Add(new ReadingTableQuestionAnswer() + { + Answer = avg, + QuestionId = questionInfo.Id, + TrialId = taskinfo.TrialId, + VisitTaskId = taskinfo.Id, + RowId = newRowId, + RowIndex = maxnum, + TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.AvgFCT).Select(x => x.Id).FirstOrDefault(), + }); + } + await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id); + await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id); + await _readingTableAnswerRowInfoRepository.AddRangeAsync(tableAnsweRowInfos); + await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); + await _readingTableQuestionAnswerRepository.SaveChangesAsync(); + + await this.CalculateTask(new CalculateTaskInDto() + { + + VisitTaskId = taskinfo.Id, + }); + } + /// /// 获取OCT-脂质角度模板 /// @@ -478,6 +634,125 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate }); } + /// + /// 导入OCT-脂质角度数据 + /// + /// + [HttpPost] + public async Task UploadOCTLipidAngleTemplate() + { + var request = httpContext.HttpContext!.Request; + var file = request.Form.Files[0]; + Guid visitTaskId = Guid.Parse(request.Form["VisitTaskId"]); + var dataTable = await _generalCalculateService.GetDataTableFromUpload(file); + + var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Include(x => x.Subject).Include(x => x.TrialReadingCriterion).FirstNotNullAsync(); + + var values = new + { + SubjectID = taskinfo.BlindSubjectCode.IsNullOrEmpty() ? taskinfo.Subject.Code : taskinfo.BlindSubjectCode, + TaskBlindName = taskinfo.TaskBlindName, + }; + + if (values.SubjectID != dataTable.Rows[0]["B"].ToString() || values.TaskBlindName != dataTable.Rows[1]["B"].ToString()) + { + throw new BusinessValidationFailedException(_localizer["IVUS_UploadVisitTaskError"]); + } + + List measuredValueList = new List(); + + try + { + for (int i = 3; i < dataTable.Rows.Count; i++) + { + measuredValueList.Add(new OCTFCTUploadData() + { + PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()), + FirstData = int.Parse(dataTable.Rows[i]["B"].ToString()), + + }); + } + } + catch (Exception) + { + throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]); + } + + var questionInfo = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.LesionType == LesionType.LipidAngle).FirstNotNullAsync(); + var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == questionInfo.Id).ToListAsync(); + List tableAnsweRowInfos = new List(); + List tableAnswers = new List(); + + var maxnum = _readingTableAnswerRowInfoRepository.Where(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id).MaxOrDefault(x => x.RowIndex); + + + foreach (var item in measuredValueList) + { + maxnum = maxnum + 1; + var newRowId = NewId.NextGuid(); + // 斑块数据统计 + tableAnsweRowInfos.Add(new ReadingTableAnswerRowInfo() + { + Id = newRowId, + QuestionId = questionInfo.Id, + VisitTaskId = taskinfo.Id, + TrialId = taskinfo.TrialId, + RowIndex = maxnum, + IsCurrentTaskAdd = true, + BlindName = taskinfo.TaskBlindName, + OrderMark = questionInfo.OrderMark, + FristAddTaskNum = taskinfo.VisitTaskNum, + FristAddTaskId = taskinfo.Id, + RowMark = questionInfo.OrderMark + decimal.Parse(maxnum.ToString()).GetLesionMark() + }); + + // 编号 + tableAnswers.Add(new ReadingTableQuestionAnswer() + { + Answer = item.PlaqueNum.ToString(), + QuestionId = questionInfo.Id, + TrialId = taskinfo.TrialId, + VisitTaskId = taskinfo.Id, + RowId = newRowId, + RowIndex = maxnum, + TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.PlaqueNumber).Select(x => x.Id).FirstOrDefault(), + }); + + var avg = item.Avg.ToString(); + + + if (taskinfo.TrialReadingCriterion.DigitPlaces != -1) + { + var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0; + avg = decimal.Round(decimal.Parse(avg ?? "0"), digitPlaces).ToString("F" + digitPlaces.ToString()); + + } + + // 脂质角度 + tableAnswers.Add(new ReadingTableQuestionAnswer() + { + Answer = item.FirstData.ToString(), + QuestionId = questionInfo.Id, + TrialId = taskinfo.TrialId, + VisitTaskId = taskinfo.Id, + RowId = newRowId, + RowIndex = maxnum, + TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.LipidAngle).Select(x => x.Id).FirstOrDefault(), + }); + } + await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id); + await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id); + await _readingTableAnswerRowInfoRepository.AddRangeAsync(tableAnsweRowInfos); + await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); + await _readingTableQuestionAnswerRepository.SaveChangesAsync(); + + await this.CalculateTask(new CalculateTaskInDto() + { + + VisitTaskId = taskinfo.Id, + }); + } + /// /// 自动计算 From ff8fa9434103b1608fc7dd134f76e10b90929063 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 25 Sep 2024 13:44:16 +0800 Subject: [PATCH 2/5] =?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 | 77 +++++++++++++++++++ .../ReadingCalculate/OCTCalculateService.cs | 12 +-- 2 files changed, 83 insertions(+), 6 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 738a2f15a..461c2f746 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -3939,6 +3939,32 @@ + + + 获取OCT-FCT模板 + + + + + + + 导入OCT-FCT数据 + + + + + + 获取OCT-脂质角度模板 + + + + + + + 导入OCT-脂质角度数据 + + + 自动计算 @@ -3954,6 +3980,27 @@ + + + 斑块1-匹配动脉段最小FCT + + + + + + + 斑块2-匹配动脉段最小FCT + + + + + + + 斑块3-匹配动脉段最小FCT + + + + 验证访视提交 @@ -6482,6 +6529,36 @@ 外弹力膜面积- 管腔面积 + + + 斑块编号 + + + + + 第一次 + + + + + 第二次 + + + + + 第三次 + + + + + 斑块编号 + + + + + 值 + + 阅片计算Dto diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs index ba5225d8d..0435cd531 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs @@ -509,7 +509,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate List tableAnsweRowInfos = new List(); List tableAnswers = new List(); - var maxnum = _readingTableAnswerRowInfoRepository.Where(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id).MaxOrDefault(x => x.RowIndex); + var maxnum = 0; foreach (var item in measuredValueList) @@ -683,7 +683,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate List tableAnsweRowInfos = new List(); List tableAnswers = new List(); - var maxnum = _readingTableAnswerRowInfoRepository.Where(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id).MaxOrDefault(x => x.RowIndex); + var maxnum = 0; foreach (var item in measuredValueList) @@ -977,7 +977,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 匹配动脉段最小FCT tableAnswers.Add(new ReadingTableQuestionAnswer() { - Answer = GetDigitPlacesData(oCTFCTInfos.Where(x => x.PlaqueNum == item).MinOrDefault(x => x.Data).ToString()), + Answer = oCTFCTInfos.Count()==0?"0": GetDigitPlacesData(oCTFCTInfos.Where(x => x.PlaqueNum == item).MinOrDefault(x => x.Data).ToString()), Id = NewId.NextGuid(), QuestionId = patchDataStatisticsInfo.Id, TrialId = inDto.TrialId, @@ -990,7 +990,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 平均最小FCT tableAnswers.Add(new ReadingTableQuestionAnswer() { - Answer = GetDigitPlacesData(oCTFCTInfos.Where(x => x.PlaqueNum == item).Average(x => x.Data).ToString()), + Answer = oCTFCTInfos.Count() == 0 ? "0" : GetDigitPlacesData(oCTFCTInfos.Where(x => x.PlaqueNum == item).Average(x => x.Data).ToString()), Id = NewId.NextGuid(), QuestionId = patchDataStatisticsInfo.Id, TrialId = inDto.TrialId, @@ -1003,7 +1003,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 脂质角度平均值 tableAnswers.Add(new ReadingTableQuestionAnswer() { - Answer = GetDigitPlacesData(lipidAngleInfos.Where(x => x.PlaqueNum == item).Average(x => x.Data).ToString()), + Answer = lipidAngleInfos.Count() == 0 ? "0" : GetDigitPlacesData(lipidAngleInfos.Where(x => x.PlaqueNum == item).Average(x => x.Data).ToString()), Id = NewId.NextGuid(), QuestionId = patchDataStatisticsInfo.Id, TrialId = inDto.TrialId, @@ -1016,7 +1016,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 脂质角度最大值 tableAnswers.Add(new ReadingTableQuestionAnswer() { - Answer = GetDigitPlacesData(lipidAngleInfos.Where(x => x.PlaqueNum == item).MaxOrDefault(x => x.Data).ToString()), + Answer = lipidAngleInfos.Count() == 0 ? "0" : GetDigitPlacesData(lipidAngleInfos.Where(x => x.PlaqueNum == item).MaxOrDefault(x => x.Data).ToString()), Id = NewId.NextGuid(), QuestionId = patchDataStatisticsInfo.Id, TrialId = inDto.TrialId, From 6713fff0e7998428054affe1d73a7d7a0a22ee2f Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 25 Sep 2024 13:44:41 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ReadingCalculate/OCTCalculateService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs index 0435cd531..ca062a59f 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs @@ -977,7 +977,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 匹配动脉段最小FCT tableAnswers.Add(new ReadingTableQuestionAnswer() { - Answer = oCTFCTInfos.Count()==0?"0": GetDigitPlacesData(oCTFCTInfos.Where(x => x.PlaqueNum == item).MinOrDefault(x => x.Data).ToString()), + Answer = oCTFCTInfos.Count()==0? "0.00" : GetDigitPlacesData(oCTFCTInfos.Where(x => x.PlaqueNum == item).MinOrDefault(x => x.Data).ToString()), Id = NewId.NextGuid(), QuestionId = patchDataStatisticsInfo.Id, TrialId = inDto.TrialId, @@ -990,7 +990,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 平均最小FCT tableAnswers.Add(new ReadingTableQuestionAnswer() { - Answer = oCTFCTInfos.Count() == 0 ? "0" : GetDigitPlacesData(oCTFCTInfos.Where(x => x.PlaqueNum == item).Average(x => x.Data).ToString()), + Answer = oCTFCTInfos.Count() == 0 ? "0.00" : GetDigitPlacesData(oCTFCTInfos.Where(x => x.PlaqueNum == item).Average(x => x.Data).ToString()), Id = NewId.NextGuid(), QuestionId = patchDataStatisticsInfo.Id, TrialId = inDto.TrialId, @@ -1003,7 +1003,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 脂质角度平均值 tableAnswers.Add(new ReadingTableQuestionAnswer() { - Answer = lipidAngleInfos.Count() == 0 ? "0" : GetDigitPlacesData(lipidAngleInfos.Where(x => x.PlaqueNum == item).Average(x => x.Data).ToString()), + Answer = lipidAngleInfos.Count() == 0 ? "0.00" : GetDigitPlacesData(lipidAngleInfos.Where(x => x.PlaqueNum == item).Average(x => x.Data).ToString()), Id = NewId.NextGuid(), QuestionId = patchDataStatisticsInfo.Id, TrialId = inDto.TrialId, @@ -1016,7 +1016,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 脂质角度最大值 tableAnswers.Add(new ReadingTableQuestionAnswer() { - Answer = lipidAngleInfos.Count() == 0 ? "0" : GetDigitPlacesData(lipidAngleInfos.Where(x => x.PlaqueNum == item).MaxOrDefault(x => x.Data).ToString()), + Answer = lipidAngleInfos.Count() == 0 ? "0.00" : GetDigitPlacesData(lipidAngleInfos.Where(x => x.PlaqueNum == item).MaxOrDefault(x => x.Data).ToString()), Id = NewId.NextGuid(), QuestionId = patchDataStatisticsInfo.Id, TrialId = inDto.TrialId, From c2f72d677fd5a146dc6ef04e2bf4a9ddf0132f93 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 25 Sep 2024 14:06:29 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ReadingCalculate/OCTCalculateService.cs | 13 +++++++++++++ IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs index ca062a59f..ea7b703b4 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs @@ -1026,6 +1026,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.MaxAvgLipidAngle).Select(x => x.Id).FirstOrDefault(), }); + // 待定指标 + tableAnswers.Add(new ReadingTableQuestionAnswer() + { + Answer = string.Empty, + Id = NewId.NextGuid(), + QuestionId = patchDataStatisticsInfo.Id, + TrialId = inDto.TrialId, + VisitTaskId = inDto.VisitTaskId, + RowId = newRowId, + RowIndex = item, + TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.Undetermined).Select(x => x.Id).FirstOrDefault(), + }); + } await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x =>x.QuestionId== patchDataStatisticsInfo.Id && x.VisitTaskId == inDto.VisitTaskId); diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index e08575d27..d16a83dd6 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -2146,6 +2146,11 @@ public enum SUVChangeVSBaseline /// MaxAvgLipidAngle = 1020, + /// + /// 待定指标 + /// + Undetermined = 1021, + } From 19fdd02429a605068a3d4d2a4d8b21bd5e7b5f0a Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 25 Sep 2024 14:11:01 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/ReadingCriterion/ReadingCriterionService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs index 030ca5721..6fa5ab142 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs @@ -665,19 +665,19 @@ namespace IRaCIS.Core.Application.Service.RC //needAddQuestionList.AddRange(readingQuestionTrialList); }); - // 标准的默认值 + // 标准的默认值 标准默认值 foreach (var criterion in needAddCriterionList) { switch (criterion.CriterionType) { case CriterionType.IVUS: - criterion.IsImageFilter = true; + criterion.IsImageFilter = false; criterion.IsReadingTaskViewInOrder = ReadingOrder.SubjectRandom; criterion.ImageDownloadEnum = ReadingImageDownload.Subejct; criterion.ImageUploadEnum = ReadingImageUpload.IRReadingSubejctEnable; break; case CriterionType.OCT: - criterion.IsImageFilter = true; + criterion.IsImageFilter = false; criterion.IsReadingPeriod = false; criterion.IsGlobalReading = false; criterion.IsReadingTaskViewInOrder = ReadingOrder.SubjectRandom;