diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs index ad21a1032..962d5d6c3 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs @@ -24,6 +24,7 @@ public class UrgentMedicalReviewAddedEventConsumer( IRepository _userRepository, IRepository _taskMedicalReviewRepository, IRepository _trialRepository, + IRepository _subjectVisitRepository, IRepository _readingQuestionCriterionTrialRepository, IRepository _visitTaskRepository, IRepository _dictionaryRepository, @@ -34,14 +35,14 @@ public class UrgentMedicalReviewAddedEventConsumer( private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue; /// - /// 加急的医学反馈任务 通知MIM + /// 加急的医学反馈任务 通知MIM (026,027) /// /// /// /// public async Task Consume(ConsumeContext context) { - Console.WriteLine("发送【加急的医学反馈任务 通知MIM】邮件!!!"); + Console.WriteLine("发送(026,027) 【加急的医学反馈任务 通知MIM】邮件!!!"); var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US; var medicalReviewId = context.Message.MedicalReviewId; @@ -61,6 +62,13 @@ public class UrgentMedicalReviewAddedEventConsumer( var taskInfo = await _visitTaskRepository.Where(x => x.Id == medicalReview.VisitTaskId).Include(x=>x.SourceSubjectVisit).Include(x => x.ReadModule).Include(x => x.Subject).FirstNotNullAsync(); + var visitid = taskInfo.SourceSubjectVisit == null ? taskInfo.ReadModule.SubjectVisitId : taskInfo.SourceSubjectVisitId; + + + var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == visitid).FirstOrDefaultAsync(); + + + var messageToSend = new MimeMessage(); //发件地址 messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail)); @@ -91,15 +99,16 @@ public class UrgentMedicalReviewAddedEventConsumer( var topicStr = string.Format(input.topicStr, companyName, trialInfo.ResearchProgramNo); var htmlBodyStr = string.Format( CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr), - userinfo.FullName, // 用户名 - trialInfo.ExperimentName, // 项目 - criterion.CriterionName, // 阅片标准 - taskInfo.BlindSubjectCode.IsNullOrEmpty() ? taskInfo.Subject.Code : taskInfo.BlindSubjectCode, // 受试者 - taskInfo.TaskBlindName, // 访视 - dictionValue[0], // 任务类型 - dictionValue[1], // 阅片人是否同意 - dictionValue[2], // 审核状态 - dictionValue[3] // 是否加急 + userinfo.FullName, // 用户名 {0} + trialInfo.ExperimentName, // 项目 {1} + criterion.CriterionName, // 阅片标准 {2} + taskInfo.BlindSubjectCode.IsNullOrEmpty() ? taskInfo.Subject.Code : taskInfo.BlindSubjectCode, // 受试者 {3} + taskInfo.TaskBlindName, // 访视 {4} + dictionValue[0], // 任务类型 {5} + //dictionValue[1], // 阅片人是否同意 {6} + dictionValue[2], // 审核状态 {6} + dictionValue[3], // 是否加急 {7} + ); return (topicStr, htmlBodyStr); diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index 8a275b60c..e7c209fed 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -1,4 +1,5 @@ using IRaCIS.Core.Domain.Share; +using Newtonsoft.Json; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -2536,6 +2537,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// 问题标识 /// public QuestionMark? QuestionMark { get; set; } + + + + [Comment("复制病灶的时候 是否复制这个问题")] + public bool IsCopy { get; set; } = false; + + [Comment("分类问题表格Id")] + public Guid? ClassifyTableQuestionId { get; set; } + + [Comment("分类算法")] + public string ClassifyAlgorithms { get; set; } = string.Empty; } @@ -2749,6 +2761,47 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto } } + + + [Comment("导出标识")] + public ExportIdentification? ExportIdentification { get; set; } + + [Comment("导出结果")] + public string ExportResultStr { get; set; } = "[]"; + + [Comment("分类算法")] + public string ClassifyAlgorithms { get; set; } = string.Empty; + + [Comment("分类问题Id")] + public Guid? ClassifyQuestionId { get; set; } + + [NotMapped] + public List ExportResult + { + get + { + try + { + var result = JsonConvert.DeserializeObject>(this.ExportResultStr); + return result == null ? new List() : result; + } + catch (Exception) + { + + return new List(); + } + + } + } + + + + [Comment("复制病灶的时候 是否复制这个问题")] + public bool IsCopy { get; set; } = false; + + [Comment("分类问题表格Id")] + public Guid? ClassifyTableQuestionId { get; set; } + } public class GetTrialReadingQuestionOutDto @@ -2968,6 +3021,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto + [Comment("复制病灶的时候 是否复制这个问题")] + public bool IsCopy { get; set; } = false; + + [Comment("分类问题表格Id")] + public Guid? ClassifyTableQuestionId { get; set; } + + [Comment("分类算法")] + public string ClassifyAlgorithms { get; set; } = string.Empty; + } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index c32298cc2..0ff36e8bf 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1336,6 +1336,9 @@ namespace IRaCIS.Core.Application.Service Remark = x.Remark, ValueType = x.ValueType, Unit = x.Unit, + ClassifyAlgorithms=x.ClassifyAlgorithms, + IsCopy=x.IsCopy, + ClassifyTableQuestionId=x.ClassifyTableQuestionId, }).ToList(); }); diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingTaskQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingTaskQuestionService.cs index 756612de3..1571c096a 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingTaskQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingTaskQuestionService.cs @@ -271,7 +271,6 @@ namespace IRaCIS.Core.Application.Service Childrens = new List(), ShowOrder = x.ShowOrder, GroupName = string.Empty, - Id = x.Id, Type = x.Type, DictionaryCode = x.DictionaryCode, @@ -288,6 +287,9 @@ namespace IRaCIS.Core.Application.Service DataTableColumn = x.DataTableColumn, LesionType = item.LesionType, QuestionName = x.QuestionName, + IsCopy=x.IsCopy, + ClassifyTableQuestionId= x.ClassifyTableQuestionId, + ClassifyAlgorithms=x.ClassifyAlgorithms, RelationQuestions = tableQuestions.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).Select(x => new GetSystemReadingQuestionOutDto { Childrens = new List(), @@ -310,6 +312,9 @@ namespace IRaCIS.Core.Application.Service QuestionName = x.QuestionName, RelationQuestions = new List(), Remark = x.Remark, + IsCopy = x.IsCopy, + ClassifyTableQuestionId = x.ClassifyTableQuestionId, + ClassifyAlgorithms = x.ClassifyAlgorithms, }).ToList(), Remark = x.Remark, diff --git a/IRaCIS.Core.Domain/_DomainEvent/ReadingEnrollOrPDRelationEvent.cs b/IRaCIS.Core.Domain/_DomainEvent/ReadingEnrollOrPDRelationEvent.cs index c83db2497..12647f2ba 100644 --- a/IRaCIS.Core.Domain/_DomainEvent/ReadingEnrollOrPDRelationEvent.cs +++ b/IRaCIS.Core.Domain/_DomainEvent/ReadingEnrollOrPDRelationEvent.cs @@ -17,6 +17,8 @@ public class UrgentMedicalReviewAddedEvent : DomainEvent public Guid VisitTaskId { get; set; } public Guid MedicalReviewId { get; set; } + public bool IsPD { get; set; } + } //IR 回复医学反馈通知MIM diff --git a/IRaCIS.Core.Infra.EFCore/Interceptor/AddDomainExt.cs b/IRaCIS.Core.Infra.EFCore/Interceptor/AddDomainExt.cs index 080570706..9651ef38b 100644 --- a/IRaCIS.Core.Infra.EFCore/Interceptor/AddDomainExt.cs +++ b/IRaCIS.Core.Infra.EFCore/Interceptor/AddDomainExt.cs @@ -180,7 +180,7 @@ public static class DBContext_Ext if (findSubjectVisit.IsEnrollmentConfirm || findSubjectVisit.PDState == PDStateEnum.PDProgress) { - taskMedicalReview.AddDomainEvent(new UrgentMedicalReviewAddedEvent() { MedicalReviewId = taskMedicalReview.Id, VisitTaskId = taskMedicalReview.VisitTaskId }); + taskMedicalReview.AddDomainEvent(new UrgentMedicalReviewAddedEvent() { IsPD= findSubjectVisit.PDState == PDStateEnum.PDProgress, MedicalReviewId = taskMedicalReview.Id, VisitTaskId = taskMedicalReview.VisitTaskId }); //添加进记录 eventStoreList.AddRange(GetStoreEvents(taskMedicalReview.DomainEvents));