diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index cfff70b9f..5984add7a 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1444,6 +1444,36 @@ 答案 + + + 是否有问题 + + + + + 质询问题 + + + + + 图片路径 + + + + + 审核建议 + + + + + 是否完成 + + + + + 是否关闭 + + 答案 @@ -2221,11 +2251,6 @@ - - - 阅片医学审核 - - 医学审核问题 diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs index 0abe6d5f1..849685bf3 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs @@ -28,11 +28,48 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public List TaskList { get; set; } = new List(); - public List OtherDoctorTaskList { get; set; } = new List(); - - + public List QuestionAnswerList { get; set; } = new List(); + + public MedicalReviewInfo MedicalReviewInfo { get; set; } + + } + + public class MedicalReviewInfo + { + + public Guid VisitTaskId { get; set; } + + /// + /// 是否有问题 + /// + public bool IsHaveQuestion { get; set; } = false; + + /// + /// 质询问题 + /// + public string Questioning { get; set; } = string.Empty; + + /// + /// 图片路径 + /// + public string ImagePath { get; set; } = string.Empty; + + /// + /// 审核建议 + /// + public AuditAdvice AuditAdviceEnum { get; set; } + + /// + /// 是否完成 + /// + public bool IsFinish { get; set; } + + /// + /// 是否关闭 + /// + public bool IsClosed { get; set; } } public class ReadingMedicineQuestion @@ -95,7 +132,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public class TaskInfo { - public Guid Id { get; set; } + public Guid TaskId { get; set; } /// /// 是否是当前任务 @@ -121,6 +158,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string EvaluationResult { get; set; } public ReadingCategory ReadingCategory { get; set; } + + + public Guid? SourceSubjectVisitId { get; set; } + public Guid? SouceReadModuleId { get; set; } + + public Guid? OtherTaskId { get; set; } + } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs index be3ec8b8f..c9901ba8e 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs @@ -56,9 +56,10 @@ namespace IRaCIS.Core.Application.Service IsReadingTaskViewInOrder=x.IsReadingTaskViewInOrder }).FirstNotNullAsync(); - var taskMedicalReview = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync(); + medicalReviewInfo.MedicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId) + .ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(); - var taskInfo = await _visitTaskRepository.Where(x => x.Id == taskMedicalReview.VisitTaskId).FirstNotNullAsync(); + var taskInfo = await _visitTaskRepository.Where(x => x.Id == medicalReviewInfo.MedicalReviewInfo.VisitTaskId).FirstNotNullAsync(); #region 取任务 if (medicalReviewInfo.IsReadingTaskViewInOrder) @@ -70,63 +71,76 @@ namespace IRaCIS.Core.Application.Service && x.DoctorUserId == taskInfo.DoctorUserId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReReadingApplyState != ReReadingApplyState.Agree ).OrderBy(x => x.VisitTaskNum).Select(x => new TaskInfo() { - Id = x.Id, + TaskId = x.Id, IsCurrentTask = x.Id == taskInfo.Id, ReadingCategory = x.ReadingCategory, TaskBlindName = x.TaskBlindName, ArmEnum=x.ArmEnum, - TaskName = x.TaskName + TaskName = x.TaskName, + SouceReadModuleId=x.SouceReadModuleId, + SourceSubjectVisitId=x.SourceSubjectVisitId, }).ToListAsync(); - if (medicalReviewInfo.ReadingType == ReadingMethod.Double) - { - if (taskInfo.ArmEnum != Arm.JudgeArm) - { - medicalReviewInfo.OtherDoctorTaskList = await _visitTaskRepository.Where(x => x.ArmEnum != Arm.JudgeArm && x.SubjectId == taskInfo.SubjectId - && x.DoctorUserId != taskInfo.DoctorUserId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReReadingApplyState != ReReadingApplyState.Agree + + + List< TaskInfo > otherTask = await _visitTaskRepository.Where(x => x.ArmEnum != Arm.JudgeArm && x.SubjectId == taskInfo.SubjectId + && x.DoctorUserId != taskInfo.DoctorUserId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReReadingApplyState != ReReadingApplyState.Agree ).OrderBy(x => x.VisitTaskNum).Select(x => new TaskInfo() { - Id = x.Id, + TaskId = x.Id, + IsCurrentTask = x.Id == taskInfo.Id, ReadingCategory = x.ReadingCategory, TaskBlindName = x.TaskBlindName, - ArmEnum=x.ArmEnum, - TaskName = x.TaskName + ArmEnum = x.ArmEnum, + TaskName = x.TaskName, + SouceReadModuleId = x.SouceReadModuleId, + SourceSubjectVisitId = x.SourceSubjectVisitId, }).ToListAsync(); - } - } + + medicalReviewInfo.TaskList.ForEach(x => + { + x.OtherTaskId = otherTask.Where(y => y.SouceReadModuleId == x.SouceReadModuleId && y.SourceSubjectVisitId == x.SourceSubjectVisitId).Select(y => y.TaskId).FirstOrDefault(); + }); } else { medicalReviewInfo.TaskList = await _visitTaskRepository.Where(x => x.Id == taskInfo.Id).Select(x => new TaskInfo() { - Id = x.Id, + TaskId = x.Id, IsCurrentTask = x.Id == taskInfo.Id, ReadingCategory = x.ReadingCategory, TaskBlindName = x.TaskBlindName, - ArmEnum=x.ArmEnum, - TaskName = x.TaskName + ArmEnum = x.ArmEnum, + TaskName = x.TaskName, + SouceReadModuleId = x.SouceReadModuleId, + SourceSubjectVisitId = x.SourceSubjectVisitId, }).ToListAsync(); - if (medicalReviewInfo.ReadingType == ReadingMethod.Double) - { - if (taskInfo.ArmEnum != Arm.JudgeArm) - { - medicalReviewInfo.OtherDoctorTaskList = await _visitTaskRepository.Where(x => x.ArmEnum != Arm.JudgeArm && x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId - && x.DoctorUserId != taskInfo.DoctorUserId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReReadingApplyState != ReReadingApplyState.Agree + + List otherTask = await _visitTaskRepository.Where(x => x.ArmEnum != Arm.JudgeArm && x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId + && x.DoctorUserId != taskInfo.DoctorUserId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReReadingApplyState != ReReadingApplyState.Agree ).OrderBy(x => x.VisitTaskNum).Select(x => new TaskInfo() { - Id = x.Id, - ReadingCategory = x.ReadingCategory, - TaskBlindName = x.TaskBlindName, - TaskName = x.TaskName, - ArmEnum=x.ArmEnum, - }).ToListAsync(); - } - } + TaskId = x.Id, + IsCurrentTask = x.Id == taskInfo.Id, + ReadingCategory = x.ReadingCategory, + TaskBlindName = x.TaskBlindName, + ArmEnum = x.ArmEnum, + TaskName = x.TaskName, + SouceReadModuleId = x.SouceReadModuleId, + SourceSubjectVisitId = x.SourceSubjectVisitId, + }).ToListAsync(); + medicalReviewInfo.TaskList.ForEach(x => + { + + x.OtherTaskId = otherTask.Where(y => y.SouceReadModuleId == x.SouceReadModuleId && y.SourceSubjectVisitId == x.SourceSubjectVisitId).Select(y => y.TaskId).FirstOrDefault(); + }); } #endregion medicalReviewInfo.QuestionAnswerList = await this.GetMedicalQuestionAnswer(inDto); + + return medicalReviewInfo; } diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index 05311fa55..f86ea0520 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -91,6 +91,9 @@ namespace IRaCIS.Core.Application.Service .ForMember(x=>x.ParentShowOrder,y=>y.MapFrom(n=>n.ParentQuestion.ShowOrder)); CreateMap(); + + + CreateMap(); #endregion diff --git a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs index 7f0998d76..ef4ea8915 100644 --- a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs +++ b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs @@ -56,7 +56,26 @@ namespace IRaCIS.Core.Domain.Share HaveSigned=2 } + /// + /// + /// + public enum AuditAdvice + { + /// + /// 无 + /// + None=0, + /// + /// 退回重阅 + /// + HeavyReading = 1, + + /// + /// 提醒注意 + /// + Remind = 2, + } public enum MedicalReviewDoctorUserIdea diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs index 045faa5c6..99aad5008 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs @@ -88,6 +88,37 @@ namespace IRaCIS.Core.Domain.Models public TaskMedicalReviewRule TaskMedicalReviewRule { get; set; } + /// + /// 是否有问题 + /// + public bool IsHaveQuestion { get; set; } = false; + + /// + /// 质询问题 + /// + public string Questioning { get; set; } = string.Empty; + + + /// + /// 图片路径 + /// + public string ImagePath { get; set; } = string.Empty; + + /// + /// 审核建议 + /// + public AuditAdvice AuditAdviceEnum { get; set; } + + /// + /// 是否完成 + /// + public bool IsFinish { get; set; } + + /// + /// 是否关闭 + /// + public bool IsClosed { get; set; } + }