Uat_Study
parent
b818c05525
commit
c737c494a7
|
@ -1,6 +1,7 @@
|
|||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Domain.Share.Reading;
|
||||
using MassTransit;
|
||||
using NPOI.POIFS.NIO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -30,14 +31,37 @@ namespace IRaCIS.Core.Application.Service
|
|||
public static List<CriterionAdditionalAssessment> SystemDefeaultAdditionalAssessmentList { get; set; } = new List<CriterionAdditionalAssessment>();
|
||||
static AdditionalAssessment()
|
||||
{
|
||||
|
||||
var gropId = NewId.NextGuid();
|
||||
//Resist1.1 脑转移 默认评估问题
|
||||
SystemDefeaultAdditionalAssessmentList.Add(new CriterionAdditionalAssessment()
|
||||
{
|
||||
CriterionType = CriterionType.RECIST1Point1,
|
||||
AdditionalAssessmentType = AdditionalAssessmentType.BrainMetastasis,
|
||||
AdditionalQuestionList = new List<ReadingQuestionTrial>(){ new ReadingQuestionTrial()
|
||||
AdditionalQuestionList = new List<ReadingQuestionTrial>(){
|
||||
|
||||
new ReadingQuestionTrial()
|
||||
{
|
||||
LimitEdit=LimitEdit.OnlyBaseLine,
|
||||
Id=gropId,
|
||||
IsJudgeQuestion=false,
|
||||
IsShowInDicom=false,
|
||||
GlobalReadingShowType=GlobalReadingShowType.NotShow,
|
||||
QuestionEnName="脑转移评估",
|
||||
QuestionName="Brain Metastasis Assessment",
|
||||
Type="group",
|
||||
QuestionGenre=TableQuestionType.Customize,
|
||||
DataSource=DataSources.ManualEntry,
|
||||
ShowQuestion=ShowQuestion.Show,
|
||||
|
||||
|
||||
IsAdditional=true
|
||||
} ,
|
||||
|
||||
new ReadingQuestionTrial()
|
||||
{
|
||||
GroupId=gropId,
|
||||
LimitEdit=LimitEdit.OnlyBaseLine,
|
||||
DictionaryCode="ReadingYesOrNo",
|
||||
IsJudgeQuestion=false,
|
||||
IsShowInDicom=false,
|
||||
|
@ -51,7 +75,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
IsAdditional=true
|
||||
} }
|
||||
} ,
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -133,12 +133,12 @@ namespace IRaCIS.Application.Services
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<(List<TrialReadQuestion>,bool)> GetTaskAdditionalQuestion(GetTaskAdditionalQuestionInDto inDto)
|
||||
public async Task<(List<TrialAdditionaQuestion>,bool)> GetTaskAdditionalQuestion(GetTaskAdditionalQuestionInDto inDto)
|
||||
{
|
||||
|
||||
var answerList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).IgnoreAutoIncludes().ToListAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => inDto.VisitTaskId == x.Id).FirstNotNullAsync();
|
||||
var result= await _readingQuestionTrialRepository.Where(x => x.IsAdditional && x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId).IgnoreAutoIncludes().IgnoreQueryFilters().ProjectTo<TrialReadQuestion>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
var result= await _readingQuestionTrialRepository.Where(x => x.IsAdditional && x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId).IgnoreAutoIncludes().IgnoreQueryFilters().ProjectTo<TrialAdditionaQuestion>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
result.ForEach(x =>
|
||||
{
|
||||
|
@ -151,8 +151,16 @@ namespace IRaCIS.Application.Services
|
|||
});
|
||||
|
||||
|
||||
var resultData = result.Where(x => x.Type == "group").ToList();
|
||||
|
||||
return (result,true);
|
||||
resultData.ForEach(x =>
|
||||
{
|
||||
x.Childrens = result.Where(y => y.GroupId == x.Id).ToList();
|
||||
|
||||
});
|
||||
|
||||
|
||||
return (resultData, true);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -550,10 +550,16 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public int? ParentQuestionShowOrder { get; set; }
|
||||
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class TrialAdditionaQuestion: TrialReadQuestion
|
||||
{
|
||||
public List<TrialAdditionaQuestion> Childrens { get; set; } = new List<TrialAdditionaQuestion>();
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class TrialJudgeQuestion
|
||||
{
|
||||
|
||||
|
|
|
@ -243,7 +243,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<ReadingQuestionCriterionTrial, GetTrialReadingInfoOutDto>();
|
||||
|
||||
|
||||
|
||||
CreateMap<ReadingQuestionTrial, TrialAdditionaQuestion>()
|
||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
|
||||
.ForMember(d => d.GroupEnName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupEnName : s.GroupInfo.GroupEnName))
|
||||
.ForMember(t => t.PageName, u => u.MapFrom(c => c.ReadingCriterionPage.PageName))
|
||||
.ForMember(d => d.ParentQuestionGenre, u => u.MapFrom(s => s.ParentReadingQuestionTrial.QuestionGenre))
|
||||
.ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionTrial.DictionaryCode))
|
||||
.ForMember(t => t.ParentQuestionName, u => u.MapFrom(c => c.ParentReadingQuestionTrial.QuestionName))
|
||||
.ForMember(t => t.RelevanceShowOrder, u => u.MapFrom(c => c.RelevanceReadingQuestionTrial.ShowOrder))
|
||||
.ForMember(t => t.ParentQuestionShowOrder, u => u.MapFrom(c => c.ParentReadingQuestionTrial.ShowOrder));
|
||||
|
||||
CreateMap<ReadingQuestionTrial, TrialReadQuestion>()
|
||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
|
||||
.ForMember(d => d.GroupEnName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupEnName : s.GroupInfo.GroupEnName))
|
||||
|
|
Loading…
Reference in New Issue