Uat_Study
he 2023-01-15 14:20:25 +08:00
parent 120dd22561
commit 25263ec709
9 changed files with 84 additions and 28 deletions

Binary file not shown.

View File

@ -229,7 +229,11 @@
"MedicalReview_SaveQuestion": "Unable to perform the current operation, please save the medical review question first.", "MedicalReview_SaveQuestion": "Unable to perform the current operation, please save the medical review question first.",
"MedicalReview_NeedSave": "Unable to perform the current operation, please save the medical review questions and conclusions first.", "MedicalReview_NeedSave": "Unable to perform the current operation, please save the medical review questions and conclusions first.",
"MedicalReview_NotClosed": "The current operation cannot be performed, and the current medical inquiry conversation has not been closed.", "MedicalReview_NotClosed": "The current operation cannot be performed, and the current medical inquiry conversation has not been closed.",
"MedicalReview_Finish": "The current medical review task has been completed" "MedicalReview_Finish": "The current medical review task has been completed",
//UserService
"User_CheckNameOrPw": "Please check the username or password."

View File

@ -230,7 +230,10 @@
"MedicalReview_SaveQuestion": "无法执行当前操作,请先保存医学审核问题。", "MedicalReview_SaveQuestion": "无法执行当前操作,请先保存医学审核问题。",
"MedicalReview_NeedSave": "无法执行当前操作,请先保存医学审核问题和结论。", "MedicalReview_NeedSave": "无法执行当前操作,请先保存医学审核问题和结论。",
"MedicalReview_NotClosed": "无法执行当前操作,当前医学质询对话未关闭。", "MedicalReview_NotClosed": "无法执行当前操作,当前医学质询对话未关闭。",
"MedicalReview_Finish": "当前医学审核已做完。" "MedicalReview_Finish": "当前医学审核已做完。",
//UserService
"User_CheckNameOrPw": "请检查用户名或者密码。"

View File

@ -608,7 +608,7 @@ namespace IRaCIS.Application.Services
if (loginDoctor == null) if (loginDoctor == null)
{ {
return ResponseOutput.NotOk("请检查用户名或者密码。", new LoginReturnDTO()); return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
} }

View File

@ -75,7 +75,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string BlindName { get; set; } = string.Empty; public string BlindName { get; set; } = string.Empty;
public Guid RowId { get; set; } public Guid? RowId { get; set; }
public string SplitOrMergeLesionName { get; set; } public string SplitOrMergeLesionName { get; set; }
@ -495,6 +495,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary> /// </summary>
public QuestionMark? QuestionMark { get; set; } public QuestionMark? QuestionMark { get; set; }
public bool IsCopy { get; set; }
/// <summary> /// <summary>
/// 问题Id /// 问题Id
@ -585,6 +587,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
} }
/// <summary>
/// 病灶Index
/// </summary>
public class lesionsIndexDto
{
public Guid QuestionId { get; set; }
public List<decimal> Rowindexs { get; set; }
}
public class TableAnsweRowInfo : ReadingTableAnswerRowInfo public class TableAnsweRowInfo : ReadingTableAnswerRowInfo
{ {
public string SplitName { get; set; } public string SplitName { get; set; }

View File

@ -327,7 +327,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string QuestionName { get; set; } = string.Empty; public string QuestionName { get; set; } = string.Empty;
public IsRequired IsRequired { get; set; } public IsRequired IsRequired { get; set; }
/// <summary>
/// 复制病灶的时候 是否复制这个问题
/// </summary>
public bool IsCopy { get; set; } = false;
public int ShowOrder { get; set; } public int ShowOrder { get; set; }
public string TypeValue { get; set; } = string.Empty; public string TypeValue { get; set; } = string.Empty;
@ -765,6 +768,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary> /// </summary>
public Guid ReadingQuestionCriterionTrialId { get; set; } public Guid ReadingQuestionCriterionTrialId { get; set; }
/// <summary>
/// 是否复制病灶
/// </summary>
public bool IsCopyLesions { get; set; } = false;
public Guid TrialId { get; set; } public Guid TrialId { get; set; }
/// <summary> /// <summary>
@ -1600,6 +1608,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid TrialId { get; set; } public Guid TrialId { get; set; }
/// <summary>
/// 是否复制病灶
/// </summary>
public bool IsCopyLesions { get; set; } = false;
/// <summary> /// <summary>
/// 全局阅片显示类型 /// 全局阅片显示类型
/// </summary> /// </summary>

View File

@ -107,6 +107,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var criterionId = visitTaskInfo.TrialReadingCriterionId; var criterionId = visitTaskInfo.TrialReadingCriterionId;
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync(); var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync(); var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
var lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto()
{
QuestionId = x.Key.QuestionId,
Rowindexs = x.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList()
}).ToListAsync();
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync(); var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync(); var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
@ -191,19 +199,28 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList(); var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
question.Childrens = new List<ReadingReportDto>();
question.Childrens = rowlist.Select(x => new ReadingReportDto() var rowoindexs = lesionsIndexs.Where(x => x.QuestionId == question.QuestionId).Select(x => x.Rowindexs.OrderBy(y => y).ToList()).FirstOrDefault();
foreach (var rowoindex in rowoindexs)
{ {
QuestionName = question.OrderMark + x.RowIndex.GetLesionMark(), var rowinfo = rowlist.Where(x => x.RowIndex == rowoindex).FirstOrDefault();
RowId=x.Id, question.Childrens.Add(new ReadingReportDto()
SplitOrMergeLesionName = x.MergeName.IsNullOrEmpty() ? x.SplitName : x.MergeName, {
SplitOrMergeType = x.SplitOrMergeType, QuestionName = question.OrderMark + rowoindex.GetLesionMark(),
LesionType = question.LesionType, RowId = rowinfo?.Id,
IsCanEditPosition = x.IsCanEditPosition, SplitOrMergeLesionName = rowinfo!=null? (rowinfo.MergeName.IsNullOrEmpty() ? rowinfo.SplitName : rowinfo.MergeName):string.Empty,
RowIndex = x.RowIndex, SplitOrMergeType = rowinfo != null ? (rowinfo.SplitOrMergeType):null,
BlindName = x.BlindName, LesionType = question.LesionType,
ReportLayType = ReportLayType.Lesions, IsCanEditPosition = rowinfo != null ? (rowinfo.IsCanEditPosition):false,
}).ToList(); RowIndex = rowoindex,
BlindName = rowinfo != null ? rowinfo.BlindName : string.Empty,
ReportLayType = ReportLayType.Lesions,
});
}
foreach (var row in question.Childrens) foreach (var row in question.Childrens)
@ -336,7 +353,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
public async Task<AddTaskLesionAnswerFromLastTaskOutDto> AddTaskLesionAnswerFromLastTask(AddTaskLesionAnswerFromLastTaskInDto inDto) public async Task<AddTaskLesionAnswerFromLastTaskOutDto> AddTaskLesionAnswerFromLastTask(AddTaskLesionAnswerFromLastTaskInDto inDto)
{ {
var visitTaskId = inDto.VisitTaskId; var visitTaskId = inDto.VisitTaskId;
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync(); var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync();
var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync(); var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
@ -358,7 +374,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var copyTableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new CopyTableAnswerDto() var copyTableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == LastVisitTaskId&&x.ReadingQuestionTrial.IsCopyLesions).Select(x => new CopyTableAnswerDto()
{ {
Answer = x.Answer, Answer = x.Answer,
QuestionId = x.QuestionId, QuestionId = x.QuestionId,
@ -366,10 +382,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
QuestionMark = x.ReadingTableQuestionTrial.QuestionMark, QuestionMark = x.ReadingTableQuestionTrial.QuestionMark,
TableQuestionId = x.TableQuestionId, TableQuestionId = x.TableQuestionId,
RowIndex = x.RowIndex, RowIndex = x.RowIndex,
TrialId = x.TrialId IsCopy=x.ReadingTableQuestionTrial.IsCopy,
TrialId = x.TrialId,
}).ToListAsync(); }).ToListAsync();
var tableRowAnswers = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == LastVisitTaskId).ProjectTo<CopyTableAnswerRowInfo>(_mapper.ConfigurationProvider).ToListAsync(); var tableRowAnswers = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == LastVisitTaskId&&x.ReadingQuestionTrial.IsCopyLesions).ProjectTo<CopyTableAnswerRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
tableRowAnswers.ForEach(x => tableRowAnswers.ForEach(x =>
@ -390,17 +407,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
}); });
List<QuestionMark?> notNeedCopyMarks = new List<QuestionMark?>()
{
QuestionMark.MajorAxis,
QuestionMark.ShortAxis,
QuestionMark.State,
};
var tableAnswers = copyTableAnswers.Select(x => new ReadingTableQuestionAnswer var tableAnswers = copyTableAnswers.Select(x => new ReadingTableQuestionAnswer
{ {
Id = NewId.NextGuid(), Id = NewId.NextGuid(),
Answer = notNeedCopyMarks.Contains(x.QuestionMark) ? string.Empty : x.Answer, Answer = x.IsCopy ? x.Answer:string.Empty ,
QuestionId = x.QuestionId, QuestionId = x.QuestionId,
RowIndex = x.RowIndex, RowIndex = x.RowIndex,
RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(), RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(),

View File

@ -230,6 +230,11 @@ namespace IRaCIS.Core.Domain.Models
/// </summary> /// </summary>
public string GroupEnName { get; set; } = string.Empty; public string GroupEnName { get; set; } = string.Empty;
/// <summary>
/// 是否复制病灶
/// </summary>
public bool IsCopyLesions { get; set; } = false;
/// <summary> /// <summary>
/// 分页标准 /// 分页标准
/// </summary> /// </summary>

View File

@ -193,7 +193,12 @@ namespace IRaCIS.Core.Domain.Models
[ForeignKey("ReadingQuestionId")] [ForeignKey("ReadingQuestionId")]
public ReadingQuestionTrial ReadingQuestionTrial { get; set; } public ReadingQuestionTrial ReadingQuestionTrial { get; set; }
/// <summary>
/// 复制病灶的时候 是否复制这个问题
/// </summary>
public bool IsCopy { get; set; } = false;
[NotMapped] [NotMapped]
public List<string> ParentTriggerValueList public List<string> ParentTriggerValueList
{ {