修改一版

Test.EIImageViewer
he 2023-03-10 15:46:40 +08:00
parent 77be8b7e4a
commit 719e975a71
12 changed files with 78 additions and 18 deletions

View File

@ -40,6 +40,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid TableQuestionId { get; set; } public Guid TableQuestionId { get; set; }
public Guid? GroupId { get; set; }
public int ShowOrder { 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 Id { get; set; }
public Guid? GroupId { get; set; }
/// <summary> /// <summary>
/// 数据列 /// 数据列

View File

@ -766,6 +766,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string GroupName { get; set; } public string GroupName { get; set; }
public Guid? GroupId { get; set; }
/// <summary> /// <summary>
/// 全局阅片显示类型 /// 全局阅片显示类型
/// </summary> /// </summary>
@ -1035,6 +1038,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary> /// </summary>
public string GroupName { get; set; } public string GroupName { get; set; }
public Guid? GroupId { get; set; }
/// <summary> /// <summary>
/// 问题类型 /// 问题类型
@ -1299,6 +1304,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string TypeValue { get; set; } public string TypeValue { get; set; }
public string GroupName { get; set; } public string GroupName { get; set; }
public Guid? GroupId { get; set; }
} }
public class SetTrialQuestionIsIsJudgeQuestionInDto 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 public class GetTrialGroupNameListInDto
{ {
/// <summary> /// <summary>
@ -1535,6 +1550,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary> /// </summary>
public string GroupName { get; set; } public string GroupName { get; set; }
public Guid? GroupId { get; set; }
/// <summary> /// <summary>
/// Id /// Id
/// </summary> /// </summary>
@ -1724,6 +1741,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary> /// </summary>
public string GroupName { get; set; } public string GroupName { get; set; }
public Guid? GroupId { get; set; }
/// <summary> /// <summary>
/// 答案分组 /// 答案分组

View File

@ -203,10 +203,14 @@ namespace IRaCIS.Application.Services
/// <param name="inDto"></param> /// <param name="inDto"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [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) 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; return result;
} }
@ -250,6 +254,7 @@ namespace IRaCIS.Application.Services
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName,_userInfo.IsEn_Us), QuestionName = x.QuestionName.LanguageName(x.QuestionEnName,_userInfo.IsEn_Us),
TypeValue = x.TypeValue, TypeValue = x.TypeValue,
GroupName = x.GroupName, GroupName = x.GroupName,
GroupId=x.GroupId,
}).ToListAsync(); }).ToListAsync();
return questionList; return questionList;
@ -590,11 +595,15 @@ namespace IRaCIS.Application.Services
/// <param name="inDto"></param> /// <param name="inDto"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [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) var result = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.CriterionId && x.Type == ReadingQestionType.Group)
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId).OrderBy(t => t.ShowOrder) .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; return result;
@ -867,6 +876,10 @@ namespace IRaCIS.Application.Services
{ {
question.ParentId = questionRelation[question.ParentId??default(Guid)]; question.ParentId = questionRelation[question.ParentId??default(Guid)];
} }
if (question.GroupId != null)
{
question.GroupId = questionRelation[question.GroupId ?? default(Guid)];
}
if (question.RelevanceId != null) if (question.RelevanceId != null)
{ {
question.RelevanceId = questionRelation[question.RelevanceId ?? default(Guid)]; question.RelevanceId = questionRelation[question.RelevanceId ?? default(Guid)];

View File

@ -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) foreach (var item in result)
{ {
@ -593,7 +593,7 @@ namespace IRaCIS.Application.Services
item.Answer = answer.IsNullOrEmpty() ? item.DefaultValue : answer; 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) if (item.Childrens != null && item.Childrens.Count > 0)
{ {
foreach (var question in item.Childrens) 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(); 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(); var usedGuropIds = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupId).ToList();
qusetionList = qusetionList.Where(x => usedGurops.Contains(x.GroupName)).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, 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 => pageGroupList.ForEach(x =>
{ {
this.FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos,inDto.OrganInfos, baseLineTableAnswer); 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(); 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 => groupList.ForEach(x =>
{ {
this.FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer); this.FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer);
@ -883,7 +883,7 @@ namespace IRaCIS.Application.Services
/// <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, List<ReadingTableQuestionAnswer> baseLineTableAnswer) 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 = new TrialReadTableQuestion();
item.TableQuestions.Questions = tableQuestionLists.Where(x => x.ReadingQuestionId == item.Id).OrderBy(x => x.ShowOrder).ToList(); item.TableQuestions.Questions = tableQuestionLists.Where(x => x.ReadingQuestionId == item.Id).OrderBy(x => x.ShowOrder).ToList();

View File

@ -159,7 +159,7 @@ namespace IRaCIS.Application.Services
LesionType = data.LesionType, LesionType = data.LesionType,
QuestionGenre = data.QuestionGenre, QuestionGenre = data.QuestionGenre,
DictionaryCode = data.DictionaryCode, DictionaryCode = data.DictionaryCode,
GroupId=data.GroupId,
ShowOrder = data.ShowOrder, ShowOrder = data.ShowOrder,
RelevanceId = data.RelevanceId, RelevanceId = data.RelevanceId,
IsShowInDicom = data.IsShowInDicom, IsShowInDicom = data.IsShowInDicom,

View File

@ -175,6 +175,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<AddOrUpdateReadingQuestionSystemInDto, ReadingQuestionSystem>(); CreateMap<AddOrUpdateReadingQuestionSystemInDto, ReadingQuestionSystem>();
CreateMap<ReadingQuestionSystem, ReadingQuestionSystemView>() 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.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.ParentQuestionShowOrder, u => u.MapFrom(s => s.ParentReadingQuestionSystem.ShowOrder))
.ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionSystem.DictionaryCode)) .ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionSystem.DictionaryCode))
@ -191,7 +192,8 @@ namespace IRaCIS.Core.Application.Service
CreateMap<AddOrUpdateReadingQuestionTrialInDto, ReadingQuestionTrial>(); CreateMap<AddOrUpdateReadingQuestionTrialInDto, ReadingQuestionTrial>();
CreateMap<ReadingQuestionTrial, ReadingQuestionTrialView>() 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.ParentQuestionShowOrder, u => u.MapFrom(s => s.ParentReadingQuestionTrial.ShowOrder))
.ForMember(d => d.ParentQuestionGenre, u => u.MapFrom(s => s.ParentReadingQuestionTrial.QuestionGenre)) .ForMember(d => d.ParentQuestionGenre, u => u.MapFrom(s => s.ParentReadingQuestionTrial.QuestionGenre))
.ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionTrial.DictionaryCode)) .ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionTrial.DictionaryCode))

View File

@ -155,6 +155,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
GroupEnName=x.GroupEnName, GroupEnName=x.GroupEnName,
IsShowInDicom = x.IsShowInDicom, IsShowInDicom = x.IsShowInDicom,
Type = x.Type, Type = x.Type,
GroupId=x.GroupId,
QuestionType = x.QuestionType, QuestionType = x.QuestionType,
LesionType = x.LesionType, LesionType = x.LesionType,
QuestionGenre = x.QuestionGenre, QuestionGenre = x.QuestionGenre,
@ -173,7 +174,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
foreach (var item in questions) 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, GroupName = x.GroupName,
GroupEnName=x.GroupEnName, GroupEnName=x.GroupEnName,

View File

@ -134,6 +134,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
GroupEnName=x.GroupEnName, GroupEnName=x.GroupEnName,
IsShowInDicom = x.IsShowInDicom, IsShowInDicom = x.IsShowInDicom,
Type = x.Type, Type = x.Type,
GroupId=x.GroupId,
QuestionType = x.QuestionType, QuestionType = x.QuestionType,
LesionType = x.LesionType, LesionType = x.LesionType,
QuestionGenre = x.QuestionGenre, QuestionGenre = x.QuestionGenre,
@ -151,7 +152,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
// 分组 // 分组
foreach (var item in questions) 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, GroupName = x.GroupName,
QuestionId = x.Id, QuestionId = x.Id,

View File

@ -139,6 +139,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
GroupName = x.GroupName, GroupName = x.GroupName,
IsShowInDicom = x.IsShowInDicom, IsShowInDicom = x.IsShowInDicom,
Type = x.Type, Type = x.Type,
GroupId=x.GroupId,
GroupEnName=x.GroupEnName, GroupEnName=x.GroupEnName,
QuestionType = x.QuestionType, QuestionType = x.QuestionType,
DataSource= x.DataSource, DataSource= x.DataSource,
@ -160,7 +161,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
// 分组 // 分组
foreach (var item in questions) 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, GroupName = x.GroupName,
QuestionId = x.Id, QuestionId = x.Id,

View File

@ -245,6 +245,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<ReadingQuestionTrial, TrialReadQuestion>() 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(t => t.PageName, u => u.MapFrom(c => c.ReadingCriterionPage.PageName))
.ForMember(d => d.ParentQuestionGenre, u => u.MapFrom(s => s.ParentReadingQuestionTrial.QuestionGenre)) .ForMember(d => d.ParentQuestionGenre, u => u.MapFrom(s => s.ParentReadingQuestionTrial.QuestionGenre))
.ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionTrial.DictionaryCode)) .ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionTrial.DictionaryCode))

View File

@ -187,11 +187,22 @@ namespace IRaCIS.Core.Domain.Models
/// </summary> /// </summary>
public int? MaxAnswerLength { get; set; } public int? MaxAnswerLength { get; set; }
/// <summary>
/// 分组ID
/// </summary>
public Guid? GroupId { get; set; }
/// <summary> /// <summary>
/// 文件类型 /// 文件类型
/// </summary> /// </summary>
public string? FileType { get; set; } public string? FileType { get; set; }
[JsonIgnore]
[ForeignKey("GroupId")]
public ReadingQuestionSystem GroupInfo { get; set; }
[JsonIgnore] [JsonIgnore]
[ForeignKey("ReadingQuestionCriterionSystemId")] [ForeignKey("ReadingQuestionCriterionSystemId")]
public ReadingQuestionCriterionSystem ReadingQuestionCriterionSystem { get; set; } public ReadingQuestionCriterionSystem ReadingQuestionCriterionSystem { get; set; }

View File

@ -245,6 +245,15 @@ namespace IRaCIS.Core.Domain.Models
/// </summary> /// </summary>
public bool IsCopyLesions { get; set; } = false; public bool IsCopyLesions { get; set; } = false;
/// <summary>
/// 分组ID
/// </summary>
public Guid? GroupId { get; set; }
[JsonIgnore]
[ForeignKey("GroupId")]
public ReadingQuestionSystem GroupInfo { get; set; }
/// <summary> /// <summary>
/// 分页标准 /// 分页标准
/// </summary> /// </summary>