diff --git a/20220103后端提示语.xlsx b/20220103后端提示语.xlsx
index 594b6bcf5..6442fdec8 100644
Binary files a/20220103后端提示语.xlsx and b/20220103后端提示语.xlsx differ
diff --git a/IRaCIS.Core.Application/Resources/en-US.json b/IRaCIS.Core.Application/Resources/en-US.json
index 060025d88..d1fe2dff8 100644
--- a/IRaCIS.Core.Application/Resources/en-US.json
+++ b/IRaCIS.Core.Application/Resources/en-US.json
@@ -229,7 +229,11 @@
"MedicalReview_SaveQuestion": "Unable to perform the current operation, please save the medical review question first.",
"MedicalReview_NeedSave": "Unable to perform the current operation, please save the medical review questions and conclusions first.",
"MedicalReview_NotClosed": "The current operation cannot be performed, and the current medical inquiry conversation has not been closed.",
- "MedicalReview_Finish": "The current medical review task has been completed"
+ "MedicalReview_Finish": "The current medical review task has been completed",
+ //UserService
+ "User_CheckNameOrPw": "Please check the username or password."
+
+
diff --git a/IRaCIS.Core.Application/Resources/zh-CN.json b/IRaCIS.Core.Application/Resources/zh-CN.json
index 1f107f73c..2bb34c908 100644
--- a/IRaCIS.Core.Application/Resources/zh-CN.json
+++ b/IRaCIS.Core.Application/Resources/zh-CN.json
@@ -230,7 +230,10 @@
"MedicalReview_SaveQuestion": "无法执行当前操作,请先保存医学审核问题。",
"MedicalReview_NeedSave": "无法执行当前操作,请先保存医学审核问题和结论。",
"MedicalReview_NotClosed": "无法执行当前操作,当前医学质询对话未关闭。",
- "MedicalReview_Finish": "当前医学审核已做完。"
+ "MedicalReview_Finish": "当前医学审核已做完。",
+ //UserService
+ "User_CheckNameOrPw": "请检查用户名或者密码。"
+
diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs
index 73ee067cd..4db65f04c 100644
--- a/IRaCIS.Core.Application/Service/Management/UserService.cs
+++ b/IRaCIS.Core.Application/Service/Management/UserService.cs
@@ -608,7 +608,7 @@ namespace IRaCIS.Application.Services
if (loginDoctor == null)
{
- return ResponseOutput.NotOk("请检查用户名或者密码。", new LoginReturnDTO());
+ return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
}
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index d007518b5..eeb1047ff 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -75,7 +75,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string BlindName { get; set; } = string.Empty;
- public Guid RowId { get; set; }
+ public Guid? RowId { get; set; }
public string SplitOrMergeLesionName { get; set; }
@@ -495,6 +495,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public QuestionMark? QuestionMark { get; set; }
+ public bool IsCopy { get; set; }
+
///
/// 问题Id
@@ -585,6 +587,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
}
+ ///
+ /// 病灶Index
+ ///
+ public class lesionsIndexDto
+ {
+
+
+ public Guid QuestionId { get; set; }
+
+ public List Rowindexs { get; set; }
+ }
+
public class TableAnsweRowInfo : ReadingTableAnswerRowInfo
{
public string SplitName { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
index f1f58385c..7b03369a6 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
@@ -327,7 +327,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string QuestionName { get; set; } = string.Empty;
public IsRequired IsRequired { get; set; }
-
+ ///
+ /// 复制病灶的时候 是否复制这个问题
+ ///
+ public bool IsCopy { get; set; } = false;
public int ShowOrder { get; set; }
public string TypeValue { get; set; } = string.Empty;
@@ -765,6 +768,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public Guid ReadingQuestionCriterionTrialId { get; set; }
+ ///
+ /// 是否复制病灶
+ ///
+ public bool IsCopyLesions { get; set; } = false;
+
public Guid TrialId { get; set; }
///
@@ -1600,6 +1608,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid TrialId { get; set; }
+ ///
+ /// 是否复制病灶
+ ///
+ public bool IsCopyLesions { get; set; } = false;
+
///
/// 全局阅片显示类型
///
diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs
index a79218b11..1d008bc83 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs
@@ -107,6 +107,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var criterionId = visitTaskInfo.TrialReadingCriterionId;
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
+
+ var lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto()
+ {
+ QuestionId = x.Key.QuestionId,
+ Rowindexs = x.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList()
+
+ }).ToListAsync();
+
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
@@ -191,19 +199,28 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
+ question.Childrens = new List();
- question.Childrens = rowlist.Select(x => new ReadingReportDto()
+ var rowoindexs = lesionsIndexs.Where(x => x.QuestionId == question.QuestionId).Select(x => x.Rowindexs.OrderBy(y => y).ToList()).FirstOrDefault();
+
+ foreach (var rowoindex in rowoindexs)
{
- QuestionName = question.OrderMark + x.RowIndex.GetLesionMark(),
- RowId=x.Id,
- SplitOrMergeLesionName = x.MergeName.IsNullOrEmpty() ? x.SplitName : x.MergeName,
- SplitOrMergeType = x.SplitOrMergeType,
- LesionType = question.LesionType,
- IsCanEditPosition = x.IsCanEditPosition,
- RowIndex = x.RowIndex,
- BlindName = x.BlindName,
- ReportLayType = ReportLayType.Lesions,
- }).ToList();
+ var rowinfo = rowlist.Where(x => x.RowIndex == rowoindex).FirstOrDefault();
+ question.Childrens.Add(new ReadingReportDto()
+ {
+ QuestionName = question.OrderMark + rowoindex.GetLesionMark(),
+ RowId = rowinfo?.Id,
+ SplitOrMergeLesionName = rowinfo!=null? (rowinfo.MergeName.IsNullOrEmpty() ? rowinfo.SplitName : rowinfo.MergeName):string.Empty,
+ SplitOrMergeType = rowinfo != null ? (rowinfo.SplitOrMergeType):null,
+ LesionType = question.LesionType,
+ IsCanEditPosition = rowinfo != null ? (rowinfo.IsCanEditPosition):false,
+ RowIndex = rowoindex,
+ BlindName = rowinfo != null ? rowinfo.BlindName : string.Empty,
+ ReportLayType = ReportLayType.Lesions,
+ });
+ }
+
+
foreach (var row in question.Childrens)
@@ -336,7 +353,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
public async Task AddTaskLesionAnswerFromLastTask(AddTaskLesionAnswerFromLastTaskInDto inDto)
{
var visitTaskId = inDto.VisitTaskId;
-
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync();
var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
@@ -358,7 +374,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
- var copyTableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new CopyTableAnswerDto()
+ var copyTableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == LastVisitTaskId&&x.ReadingQuestionTrial.IsCopyLesions).Select(x => new CopyTableAnswerDto()
{
Answer = x.Answer,
QuestionId = x.QuestionId,
@@ -366,10 +382,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
QuestionMark = x.ReadingTableQuestionTrial.QuestionMark,
TableQuestionId = x.TableQuestionId,
RowIndex = x.RowIndex,
- TrialId = x.TrialId
+ IsCopy=x.ReadingTableQuestionTrial.IsCopy,
+ TrialId = x.TrialId,
}).ToListAsync();
- var tableRowAnswers = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == LastVisitTaskId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
+ var tableRowAnswers = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == LastVisitTaskId&&x.ReadingQuestionTrial.IsCopyLesions).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
tableRowAnswers.ForEach(x =>
@@ -390,17 +407,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
});
- List notNeedCopyMarks = new List()
- {
- QuestionMark.MajorAxis,
- QuestionMark.ShortAxis,
- QuestionMark.State,
- };
+
var tableAnswers = copyTableAnswers.Select(x => new ReadingTableQuestionAnswer
{
Id = NewId.NextGuid(),
- Answer = notNeedCopyMarks.Contains(x.QuestionMark) ? string.Empty : x.Answer,
+ Answer = x.IsCopy ? x.Answer:string.Empty ,
QuestionId = x.QuestionId,
RowIndex = x.RowIndex,
RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(),
diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
index e520fe454..729de9cdb 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
@@ -230,6 +230,11 @@ namespace IRaCIS.Core.Domain.Models
///
public string GroupEnName { get; set; } = string.Empty;
+ ///
+ /// 是否复制病灶
+ ///
+ public bool IsCopyLesions { get; set; } = false;
+
///
/// 分页标准
///
diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs
index 135f03fb6..1507fc301 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs
@@ -193,7 +193,12 @@ namespace IRaCIS.Core.Domain.Models
[ForeignKey("ReadingQuestionId")]
public ReadingQuestionTrial ReadingQuestionTrial { get; set; }
-
+ ///
+ /// 复制病灶的时候 是否复制这个问题
+ ///
+ public bool IsCopy { get; set; } = false;
+
+
[NotMapped]
public List ParentTriggerValueList
{