修改一版
parent
77be8b7e4a
commit
719e975a71
|
@ -40,6 +40,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public Guid TableQuestionId { get; set; }
|
||||
|
||||
public Guid? GroupId { get; set; }
|
||||
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
|
||||
|
@ -2207,8 +2209,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public Guid Id { get; set; }
|
||||
|
||||
|
||||
public Guid? GroupId { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数据列
|
||||
|
|
|
@ -766,6 +766,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public string GroupName { get; set; }
|
||||
|
||||
|
||||
|
||||
public Guid? GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 全局阅片显示类型
|
||||
/// </summary>
|
||||
|
@ -1035,6 +1038,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
|
||||
public Guid? GroupId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 问题类型
|
||||
|
@ -1299,6 +1304,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public string TypeValue { get; set; }
|
||||
|
||||
public string GroupName { get; set; }
|
||||
|
||||
public Guid? GroupId { get; set; }
|
||||
}
|
||||
|
||||
public class SetTrialQuestionIsIsJudgeQuestionInDto
|
||||
|
@ -1362,6 +1369,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
}
|
||||
|
||||
public class GetTrialGroupNameOutDto
|
||||
{
|
||||
public Guid GroupId { get; set; }
|
||||
|
||||
public string GroupName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
}
|
||||
public class GetTrialGroupNameListInDto
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -1535,6 +1550,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
|
||||
public Guid? GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// </summary>
|
||||
|
@ -1724,6 +1741,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
|
||||
public Guid? GroupId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 答案分组
|
||||
|
|
|
@ -203,10 +203,14 @@ namespace IRaCIS.Application.Services
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<string>> GetSystemGroupNameList(GetTrialGroupNameListInDto inDto)
|
||||
public async Task<List<GetTrialGroupNameOutDto>> GetSystemGroupNameList(GetTrialGroupNameListInDto inDto)
|
||||
{
|
||||
var result = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.CriterionId && x.Type == ReadingQestionType.Group).OrderBy(t=>t.ShowOrder)
|
||||
.Select(x => x.GroupName).ToListAsync();
|
||||
.Select(x => new GetTrialGroupNameOutDto() {
|
||||
GroupId=x.Id,
|
||||
GroupName=x.GroupName,
|
||||
|
||||
} ).ToListAsync();
|
||||
return result;
|
||||
|
||||
}
|
||||
|
@ -250,6 +254,7 @@ namespace IRaCIS.Application.Services
|
|||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName,_userInfo.IsEn_Us),
|
||||
TypeValue = x.TypeValue,
|
||||
GroupName = x.GroupName,
|
||||
GroupId=x.GroupId,
|
||||
}).ToListAsync();
|
||||
|
||||
return questionList;
|
||||
|
@ -590,11 +595,15 @@ namespace IRaCIS.Application.Services
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<string>> GetTrialGroupNameList(GetTrialGroupNameListInDto inDto)
|
||||
public async Task<List<GetTrialGroupNameOutDto>> GetTrialGroupNameList(GetTrialGroupNameListInDto inDto)
|
||||
{
|
||||
var result = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.CriterionId && x.Type == ReadingQestionType.Group)
|
||||
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId).OrderBy(t => t.ShowOrder)
|
||||
.Select(x =>x.GroupName).ToListAsync();
|
||||
.Select(x => new GetTrialGroupNameOutDto
|
||||
{
|
||||
GroupId=x.Id,
|
||||
GroupName=x.GroupName,
|
||||
}).ToListAsync();
|
||||
|
||||
return result;
|
||||
|
||||
|
@ -867,6 +876,10 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
question.ParentId = questionRelation[question.ParentId??default(Guid)];
|
||||
}
|
||||
if (question.GroupId != null)
|
||||
{
|
||||
question.GroupId = questionRelation[question.GroupId ?? default(Guid)];
|
||||
}
|
||||
if (question.RelevanceId != null)
|
||||
{
|
||||
question.RelevanceId = questionRelation[question.RelevanceId ?? default(Guid)];
|
||||
|
|
|
@ -575,9 +575,9 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
|
||||
//排除表格问题 同时排除组问题
|
||||
var groups = questions.Where(x => x.Type != ReadingQestionType.Group).Select(x => x.GroupName).ToList();
|
||||
var groupids = questions.Where(x => x.Type != ReadingQestionType.Group).Select(x => x.GroupId).ToList();
|
||||
|
||||
var result = questions.Where(x => x.Type == ReadingQestionType.Group && groups.Contains(x.GroupName)).ToList();
|
||||
var result = questions.Where(x => x.Type == ReadingQestionType.Group && groupids.Contains(x.Id)).ToList();
|
||||
|
||||
foreach (var item in result)
|
||||
{
|
||||
|
@ -593,7 +593,7 @@ namespace IRaCIS.Application.Services
|
|||
item.Answer = answer.IsNullOrEmpty() ? item.DefaultValue : answer;
|
||||
|
||||
|
||||
item.Childrens = questions.Where(x => x.ParentId == item.Id || ((item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupName == item.GroupName))).ToList();
|
||||
item.Childrens = questions.Where(x => x.ParentId == item.Id || x.GroupId==item.GroupId).ToList();
|
||||
if (item.Childrens != null && item.Childrens.Count > 0)
|
||||
{
|
||||
foreach (var question in item.Childrens)
|
||||
|
@ -778,8 +778,8 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
qusetionList = qusetionList.Where(x => x.IsShowInDicom && (x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.Group)).OrderBy(x => x.ShowOrder).ToList();
|
||||
}
|
||||
var usedGurops = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupName).ToList();
|
||||
qusetionList = qusetionList.Where(x => usedGurops.Contains(x.GroupName)).ToList();
|
||||
var usedGuropIds = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupId).ToList();
|
||||
qusetionList = qusetionList.Where(x => usedGuropIds.Contains(x.Id)|| usedGuropIds.Contains(x.GroupId)).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -841,7 +841,7 @@ namespace IRaCIS.Application.Services
|
|||
IsPublicPage = firstData.IsPublicPage,
|
||||
};
|
||||
|
||||
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).ToList();
|
||||
pageGroupList.ForEach(x =>
|
||||
{
|
||||
this.FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos,inDto.OrganInfos, baseLineTableAnswer);
|
||||
|
@ -858,7 +858,7 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
qusetionList = qusetionList.Where(x => x.ReadingCriterionPageId == null).ToList();
|
||||
|
||||
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
|
||||
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList();
|
||||
groupList.ForEach(x =>
|
||||
{
|
||||
this.FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer);
|
||||
|
@ -883,7 +883,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <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, 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 ||x.GroupId==item.Id).ToList();
|
||||
item.TableQuestions = new TrialReadTableQuestion();
|
||||
|
||||
item.TableQuestions.Questions = tableQuestionLists.Where(x => x.ReadingQuestionId == item.Id).OrderBy(x => x.ShowOrder).ToList();
|
||||
|
|
|
@ -159,7 +159,7 @@ namespace IRaCIS.Application.Services
|
|||
LesionType = data.LesionType,
|
||||
QuestionGenre = data.QuestionGenre,
|
||||
DictionaryCode = data.DictionaryCode,
|
||||
|
||||
GroupId=data.GroupId,
|
||||
ShowOrder = data.ShowOrder,
|
||||
RelevanceId = data.RelevanceId,
|
||||
IsShowInDicom = data.IsShowInDicom,
|
||||
|
|
|
@ -175,6 +175,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<AddOrUpdateReadingQuestionSystemInDto, ReadingQuestionSystem>();
|
||||
CreateMap<ReadingQuestionSystem, ReadingQuestionSystemView>()
|
||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo==null?s.GroupName:s.GroupInfo.GroupName))
|
||||
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionSystem==null?string.Empty: s.ParentReadingQuestionSystem.QuestionName))
|
||||
.ForMember(d => d.ParentQuestionShowOrder, u => u.MapFrom(s => s.ParentReadingQuestionSystem.ShowOrder))
|
||||
.ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionSystem.DictionaryCode))
|
||||
|
@ -191,7 +192,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<AddOrUpdateReadingQuestionTrialInDto, ReadingQuestionTrial>();
|
||||
CreateMap<ReadingQuestionTrial, ReadingQuestionTrialView>()
|
||||
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionTrial == null ? string.Empty : s.ParentReadingQuestionTrial.QuestionName))
|
||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
|
||||
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionTrial == null ? string.Empty : s.ParentReadingQuestionTrial.QuestionName))
|
||||
.ForMember(d => d.ParentQuestionShowOrder, u => u.MapFrom(s => s.ParentReadingQuestionTrial.ShowOrder))
|
||||
.ForMember(d => d.ParentQuestionGenre, u => u.MapFrom(s => s.ParentReadingQuestionTrial.QuestionGenre))
|
||||
.ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionTrial.DictionaryCode))
|
||||
|
|
|
@ -155,6 +155,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
GroupEnName=x.GroupEnName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId=x.GroupId,
|
||||
QuestionType = x.QuestionType,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
|
@ -173,7 +174,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
foreach (var item in questions)
|
||||
{
|
||||
// 问题
|
||||
item.Childrens = questionList.Where(x => x.GroupName == item.GroupName && x.Type != ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
item.Childrens = questionList.Where(x => x.GroupId==item.Id).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName,
|
||||
GroupEnName=x.GroupEnName,
|
||||
|
|
|
@ -134,6 +134,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
GroupEnName=x.GroupEnName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId=x.GroupId,
|
||||
QuestionType = x.QuestionType,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
|
@ -151,7 +152,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupName == item.GroupName && x.Type != ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
item.Childrens = questionList.Where(x => x.GroupId==item.Id).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName,
|
||||
QuestionId = x.Id,
|
||||
|
|
|
@ -139,6 +139,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
GroupName = x.GroupName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId=x.GroupId,
|
||||
GroupEnName=x.GroupEnName,
|
||||
QuestionType = x.QuestionType,
|
||||
DataSource= x.DataSource,
|
||||
|
@ -160,7 +161,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupName == item.GroupName && x.Type != ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
item.Childrens = questionList.Where(x => x.GroupId==item.Id).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName,
|
||||
QuestionId = x.Id,
|
||||
|
|
|
@ -245,6 +245,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
CreateMap<ReadingQuestionTrial, TrialReadQuestion>()
|
||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
|
||||
.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))
|
||||
|
|
|
@ -187,11 +187,22 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
public int? MaxAnswerLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组ID
|
||||
/// </summary>
|
||||
public Guid? GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文件类型
|
||||
/// </summary>
|
||||
public string? FileType { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("GroupId")]
|
||||
public ReadingQuestionSystem GroupInfo { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("ReadingQuestionCriterionSystemId")]
|
||||
public ReadingQuestionCriterionSystem ReadingQuestionCriterionSystem { get; set; }
|
||||
|
|
|
@ -245,6 +245,15 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
public bool IsCopyLesions { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 分组ID
|
||||
/// </summary>
|
||||
public Guid? GroupId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("GroupId")]
|
||||
public ReadingQuestionSystem GroupInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分页标准
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue