Test.EIImageViewer
hang 2023-02-21 15:51:25 +08:00
commit 5786c493c7
9 changed files with 89 additions and 30 deletions

View File

@ -2598,6 +2598,11 @@
病灶Index 病灶Index
</summary> </summary>
</member> </member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableAnsweRowInfo.LesionType">
<summary>
病灶类型
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingTableQuestionOrAnswerInDto.IsGetPreview"> <member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingTableQuestionOrAnswerInDto.IsGetPreview">
<summary> <summary>
是否获取预览 是否获取预览
@ -9695,7 +9700,7 @@
<param name="inDto"></param> <param name="inDto"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.FindChildQuestion(IRaCIS.Core.Application.Service.Reading.Dto.TrialReadQuestionData,System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TrialReadQuestionData},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionTrial},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionAnswerInfo},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TableAnsweRowInfo},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.OrganInfo})"> <member name="M:IRaCIS.Application.Services.ReadingImageTaskService.FindChildQuestion(IRaCIS.Core.Application.Service.Reading.Dto.TrialReadQuestionData,System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TrialReadQuestionData},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionTrial},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionAnswerInfo},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TableAnsweRowInfo},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.OrganInfo},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer})">
<summary> <summary>
获取子元素 获取子元素
</summary> </summary>

View File

@ -539,10 +539,10 @@ namespace IRaCIS.Application.Services
} }
Dictionary<ClinicalLevel, int> keys = new Dictionary<ClinicalLevel, int>() { Dictionary<ClinicalLevel, int> keys = new Dictionary<ClinicalLevel, int>() {
{ClinicalLevel.Subject,0 }, {ClinicalLevel.SubjectVisit,0 },
{ClinicalLevel.ImageRead,1 }, {ClinicalLevel.ImageRead,2 },
{ClinicalLevel.OncologyRead,2 }, {ClinicalLevel.OncologyRead,3 },
{ClinicalLevel.SubjectVisit,3 }, {ClinicalLevel.Subject,4 },
}; };
result.OrderBy(x => keys[x.ClinicalDataLevel]).ToList(); result.OrderBy(x => keys[x.ClinicalDataLevel]).ToList();

View File

@ -643,7 +643,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string MergeName { get; set; } public string MergeName { get; set; }
/// <summary>
/// 病灶类型
/// </summary>
public LesionType? LesionType { get; set; }
} }
public class GetReadingTableQuestionOrAnswerInDto public class GetReadingTableQuestionOrAnswerInDto

View File

@ -52,7 +52,7 @@ namespace IRaCIS.Application.Services
{ {
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId && x.TaskId == item.VisitTaskId && x.GlobalAnswerType == answer.GlobalAnswerType && x.QuestionId == answer.QuestionId); await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId && x.TaskId == item.VisitTaskId && x.GlobalAnswerType == answer.GlobalAnswerType && x.QuestionId == answer.QuestionId);
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == answer.QuestionId await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == answer.QuestionId
&& x.Answer != answer.Answer && x.Answer != string.Empty && x.Answer != answer.Answer && answer.Answer != string.Empty&& answer.Answer!=null
, x => new ReadingTaskQuestionAnswer() , x => new ReadingTaskQuestionAnswer()
{ {
GlobalChangeAnswer = answer.Answer, GlobalChangeAnswer = answer.Answer,
@ -96,10 +96,13 @@ namespace IRaCIS.Application.Services
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId && x.TaskId == visitTaskId && x.GlobalAnswerType == item.GlobalAnswerType && x.QuestionId == item.QuestionId); await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId && x.TaskId == visitTaskId && x.GlobalAnswerType == item.GlobalAnswerType && x.QuestionId == item.QuestionId);
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == item.QuestionId, x => new ReadingTaskQuestionAnswer() await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == item.QuestionId
{ && x.Answer != item.Answer && item.Answer != string.Empty && item.Answer != null
GlobalChangeAnswer = item.Answer , x => new ReadingTaskQuestionAnswer()
}); {
GlobalChangeAnswer = item.Answer,
IsGlobalChange = true,
});
} }
await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo() await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo()

View File

@ -804,6 +804,27 @@ namespace IRaCIS.Application.Services
.OrderBy(x => x.ShowOrder).ToListAsync(); .OrderBy(x => x.ShowOrder).ToListAsync();
var result = new GetReadingTableQuestionOutDto(); var result = new GetReadingTableQuestionOutDto();
List<ReadingTableQuestionAnswer> baseLineTableAnswer = new List<ReadingTableQuestionAnswer>();
if(inDto.TaskId!=null)
{
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.TaskId).FirstNotNullAsync();
// 取基线
var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskInfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstNotNullAsync();
var baselineTaskId = await _visitTaskRepository.Where(x => x.SourceSubjectVisitId == baseLineVisitId
&& x.ArmEnum == taskInfo.ArmEnum
&& x.DoctorUserId == taskInfo.DoctorUserId
&& x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
&& x.TaskState == TaskState.Effect
&&x.TrialReadingCriterionId== taskInfo.TrialReadingCriterionId
).Select(x => x.Id).FirstNotNullAsync();
baseLineTableAnswer = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == baselineTaskId).Include(x=>x.ReadingTableQuestionTrial).ToListAsync();
}
if (criterionInfo.FormType == FormType.MultiplePage) if (criterionInfo.FormType == FormType.MultiplePage)
{ {
qusetionList = qusetionList.Where(x => x.ReadingCriterionPageId != null).ToList(); qusetionList = qusetionList.Where(x => x.ReadingCriterionPageId != null).ToList();
@ -822,7 +843,7 @@ namespace IRaCIS.Application.Services
var pageGroupList = newPageQusetionList.Where(x => x.Type == ReadingQestionType.Group || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList(); var pageGroupList = newPageQusetionList.Where(x => x.Type == ReadingQestionType.Group || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
pageGroupList.ForEach(x => pageGroupList.ForEach(x =>
{ {
this.FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos,inDto.OrganInfos); this.FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos,inDto.OrganInfos, baseLineTableAnswer);
}); });
page.Childrens = pageGroupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count() == 0)).ToList(); page.Childrens = pageGroupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count() == 0)).ToList();
@ -839,7 +860,7 @@ namespace IRaCIS.Application.Services
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList(); groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
groupList.ForEach(x => groupList.ForEach(x =>
{ {
this.FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos); this.FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer);
}); });
groupList = groupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count() == 0)).ToList(); groupList = groupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count() == 0)).ToList();
@ -859,7 +880,7 @@ namespace IRaCIS.Application.Services
/// <param name="item"></param> /// <param name="item"></param>
/// <param name="questionlists"></param> /// <param name="questionlists"></param>
/// <param name="tableQuestionLists"></param> /// <param name="tableQuestionLists"></param>
private async void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<TableQuestionTrial> tableQuestionLists, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos,List<OrganInfo> organInfos) private async void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<TableQuestionTrial> tableQuestionLists, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos,List<OrganInfo> organInfos, List<ReadingTableQuestionAnswer> baseLineTableAnswer)
{ {
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupName == item.GroupName)).ToList(); item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupName == item.GroupName)).ToList();
item.TableQuestions = new TrialReadTableQuestion(); item.TableQuestions = new TrialReadTableQuestion();
@ -993,6 +1014,10 @@ namespace IRaCIS.Application.Services
answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString()); answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString());
answers.Add("SplitOrMergeLesionName", rowInfo.SplitName.IsNullOrEmpty() ? rowInfo.MergeName : rowInfo.SplitName); answers.Add("SplitOrMergeLesionName", rowInfo.SplitName.IsNullOrEmpty() ? rowInfo.MergeName : rowInfo.SplitName);
answers.Add("SplitOrMergeType", rowInfo.SplitOrMergeType == null ? string.Empty : ((int)rowInfo.SplitOrMergeType).ToString()); answers.Add("SplitOrMergeType", rowInfo.SplitOrMergeType == null ? string.Empty : ((int)rowInfo.SplitOrMergeType).ToString());
if (rowInfo.LesionType == LesionType.BaselineLesions)
{
answers.Add("BaseLineLesionNumber", baseLineTableAnswer.Where(n=>n.ReadingTableQuestionTrial.QuestionMark==QuestionMark.LesionNumber&&n.RowIndex==rowInfo.RowIndex).Select(x=>x.Answer).FirstIsNullReturnEmpty());
}
item.TableQuestions.Answers.Add(answers); item.TableQuestions.Answers.Add(answers);
@ -1002,7 +1027,7 @@ namespace IRaCIS.Application.Services
{ {
item.Childrens.ForEach(x => item.Childrens.ForEach(x =>
{ {
this.FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos); this.FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos, baseLineTableAnswer);
}); });
} }
} }

View File

@ -88,6 +88,9 @@ namespace IRaCIS.Application.Services
public async Task<GetJudgeReadingInfoOutDto> GetJudgeReadingInfo(GetJudgeReadingInfo inDto) public async Task<GetJudgeReadingInfoOutDto> GetJudgeReadingInfo(GetJudgeReadingInfo inDto)
{ {
var visitTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstOrDefaultAsync(); var visitTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstOrDefaultAsync();
var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == visitTask.TrialReadingCriterionId).Select(x => x.CriterionType).FirstNotNullAsync();
GetJudgeReadingInfoOutDto judgeInfo = new GetJudgeReadingInfoOutDto() GetJudgeReadingInfoOutDto judgeInfo = new GetJudgeReadingInfoOutDto()
{ {
ReadingTaskState = visitTask.ReadingTaskState, ReadingTaskState = visitTask.ReadingTaskState,
@ -302,14 +305,17 @@ namespace IRaCIS.Application.Services
}; };
if (criterionType != CriterionType.PCWG3)
// 加全局是否更新 和访视点注释
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
{ {
Answer = item.AfterQuestionList.Any(x => x.IsHaveChange), // 加全局是否更新 和访视点注释 PCWG3不要
QuestionType = JudgeReadingQuestionType.GlobalChange, judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
{
Answer = item.AfterQuestionList.Any(x => x.IsHaveChange),
QuestionType = JudgeReadingQuestionType.GlobalChange,
}); });
}
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion() judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
{ {
@ -338,13 +344,21 @@ namespace IRaCIS.Application.Services
}).ToList() }).ToList()
}; };
// 加全局是否更新 和访视点注释
rTwoJudge.JudgeQuestionList.Add(new JudgeQuestion()
{
Answer = twoItem.AfterQuestionList.Any(x => x.IsHaveChange),
QuestionType = JudgeReadingQuestionType.GlobalChange,
});
if (criterionType != CriterionType.PCWG3)
{
// 加全局是否更新 和访视点注释
rTwoJudge.JudgeQuestionList.Add(new JudgeQuestion()
{
Answer = twoItem.AfterQuestionList.Any(x => x.IsHaveChange),
QuestionType = JudgeReadingQuestionType.GlobalChange,
});
}
rTwoJudge.JudgeQuestionList.Add(new JudgeQuestion() rTwoJudge.JudgeQuestionList.Add(new JudgeQuestion()
{ {

View File

@ -149,7 +149,8 @@ namespace IRaCIS.Core.Application.Service
CreateMap<ReadingTableAnswerRowInfo, TableAnsweRowInfo>() CreateMap<ReadingTableAnswerRowInfo, TableAnsweRowInfo>()
.ForMember(d => d.MergeName, u => u.MapFrom(s => s.MergeRow == null ? string.Empty : s.MergeRow.ReadingQuestionTrial.OrderMark + s.MergeRow.RowIndex.GetLesionMark())) .ForMember(d => d.MergeName, u => u.MapFrom(s => s.MergeRow == null ? string.Empty : s.MergeRow.ReadingQuestionTrial.OrderMark + s.MergeRow.RowIndex.GetLesionMark()))
.ForMember(d => d.SplitName, u => u.MapFrom(s => s.SplitRow == null ? string.Empty : s.SplitRow.ReadingQuestionTrial.OrderMark + s.SplitRow.RowIndex.GetLesionMark())); .ForMember(d => d.SplitName, u => u.MapFrom(s => s.SplitRow == null ? string.Empty : s.SplitRow.ReadingQuestionTrial.OrderMark + s.SplitRow.RowIndex.GetLesionMark()))
.ForMember(d => d.LesionType, u => u.MapFrom(s => s.ReadingQuestionTrial == null ?null : s.ReadingQuestionTrial.LesionType));
CreateMap<ReadingTableQuestionSystem, ReadingTrialTableQuestionData>() CreateMap<ReadingTableQuestionSystem, ReadingTrialTableQuestionData>()

View File

@ -121,7 +121,7 @@ namespace IRaCIS.Core.Domain.Models
/// <summary> /// <summary>
/// 裁判类型 /// 裁判类型
/// </summary> /// </summary>
public JudgeTypeEnum JudgeType { get; set; } public JudgeTypeEnum JudgeType { get; set; } = JudgeTypeEnum.AnswerDisaffinity;
/// <summary> /// <summary>
/// 创建人 /// 创建人

View File

@ -941,4 +941,12 @@ where ReadingQuestionTrial.ReadingQuestionSystemId is not null and ReadingTableQ
------------------------------------------------------ ------------------------------------------------------
update ReadingQuestionCriterionTrial set IsSigned=1 where ReadingInfoSignTime is not null update ReadingQuestionCriterionTrial set IsSigned=1 where ReadingInfoSignTime is not null
---------------------------------------------2023-02-20-----------------------------------
--
update ReadingTaskQuestionAnswer set IsGlobalChange=1 where GlobalChangeAnswer is not null and GlobalChangeAnswer!='' and Answer!=GlobalChangeAnswer