Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
5786c493c7
|
@ -2598,6 +2598,11 @@
|
|||
病灶Index
|
||||
</summary>
|
||||
</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">
|
||||
<summary>
|
||||
是否获取预览
|
||||
|
@ -9695,7 +9700,7 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</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>
|
||||
|
|
|
@ -539,10 +539,10 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
|
||||
Dictionary<ClinicalLevel, int> keys = new Dictionary<ClinicalLevel, int>() {
|
||||
{ClinicalLevel.Subject,0 },
|
||||
{ClinicalLevel.ImageRead,1 },
|
||||
{ClinicalLevel.OncologyRead,2 },
|
||||
{ClinicalLevel.SubjectVisit,3 },
|
||||
{ClinicalLevel.SubjectVisit,0 },
|
||||
{ClinicalLevel.ImageRead,2 },
|
||||
{ClinicalLevel.OncologyRead,3 },
|
||||
{ClinicalLevel.Subject,4 },
|
||||
};
|
||||
|
||||
result.OrderBy(x => keys[x.ClinicalDataLevel]).ToList();
|
||||
|
|
|
@ -643,7 +643,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public string MergeName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 病灶类型
|
||||
/// </summary>
|
||||
public LesionType? LesionType { get; set; }
|
||||
}
|
||||
|
||||
public class GetReadingTableQuestionOrAnswerInDto
|
||||
|
|
|
@ -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 _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()
|
||||
{
|
||||
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 _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == item.QuestionId, x => new ReadingTaskQuestionAnswer()
|
||||
{
|
||||
GlobalChangeAnswer = item.Answer
|
||||
});
|
||||
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == item.QuestionId
|
||||
&& x.Answer != item.Answer && item.Answer != string.Empty && item.Answer != null
|
||||
, x => new ReadingTaskQuestionAnswer()
|
||||
{
|
||||
GlobalChangeAnswer = item.Answer,
|
||||
IsGlobalChange = true,
|
||||
});
|
||||
}
|
||||
|
||||
await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo()
|
||||
|
|
|
@ -804,6 +804,27 @@ namespace IRaCIS.Application.Services
|
|||
.OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
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)
|
||||
{
|
||||
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();
|
||||
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();
|
||||
|
@ -839,7 +860,7 @@ namespace IRaCIS.Application.Services
|
|||
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
|
||||
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();
|
||||
|
@ -859,7 +880,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <param name="item"></param>
|
||||
/// <param name="questionlists"></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.TableQuestions = new TrialReadTableQuestion();
|
||||
|
@ -993,6 +1014,10 @@ namespace IRaCIS.Application.Services
|
|||
answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString());
|
||||
answers.Add("SplitOrMergeLesionName", rowInfo.SplitName.IsNullOrEmpty() ? rowInfo.MergeName : rowInfo.SplitName);
|
||||
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);
|
||||
|
@ -1002,7 +1027,7 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
item.Childrens.ForEach(x =>
|
||||
{
|
||||
this.FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos);
|
||||
this.FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos, baseLineTableAnswer);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,6 +88,9 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<GetJudgeReadingInfoOutDto> GetJudgeReadingInfo(GetJudgeReadingInfo inDto)
|
||||
{
|
||||
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()
|
||||
{
|
||||
ReadingTaskState = visitTask.ReadingTaskState,
|
||||
|
@ -302,14 +305,17 @@ namespace IRaCIS.Application.Services
|
|||
};
|
||||
|
||||
|
||||
|
||||
// 加全局是否更新 和访视点注释
|
||||
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
|
||||
if (criterionType != CriterionType.PCWG3)
|
||||
{
|
||||
Answer = item.AfterQuestionList.Any(x => x.IsHaveChange),
|
||||
QuestionType = JudgeReadingQuestionType.GlobalChange,
|
||||
// 加全局是否更新 和访视点注释 PCWG3不要
|
||||
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
|
||||
{
|
||||
Answer = item.AfterQuestionList.Any(x => x.IsHaveChange),
|
||||
QuestionType = JudgeReadingQuestionType.GlobalChange,
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
|
||||
{
|
||||
|
@ -338,13 +344,21 @@ namespace IRaCIS.Application.Services
|
|||
}).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()
|
||||
{
|
||||
|
|
|
@ -149,7 +149,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
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.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>()
|
||||
|
|
|
@ -121,7 +121,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// <summary>
|
||||
/// 裁判类型
|
||||
/// </summary>
|
||||
public JudgeTypeEnum JudgeType { get; set; }
|
||||
public JudgeTypeEnum JudgeType { get; set; } = JudgeTypeEnum.AnswerDisaffinity;
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue