IRC_NewDev
parent
546d65ab16
commit
553fa097b4
|
@ -24,6 +24,7 @@ public class UrgentMedicalReviewAddedEventConsumer(
|
|||
IRepository<User> _userRepository,
|
||||
IRepository<TaskMedicalReview> _taskMedicalReviewRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
|
@ -34,14 +35,14 @@ public class UrgentMedicalReviewAddedEventConsumer(
|
|||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
|
||||
/// <summary>
|
||||
/// 加急的医学反馈任务 通知MIM
|
||||
/// 加急的医学反馈任务 通知MIM (026,027)
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public async Task Consume(ConsumeContext<UrgentMedicalReviewAddedEvent> 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);
|
||||
|
|
|
@ -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
|
|||
/// 问题标识
|
||||
/// </summary>
|
||||
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> ExportResult
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = JsonConvert.DeserializeObject<List<ExportResult>>(this.ExportResultStr);
|
||||
return result == null ? new List<ExportResult>() : result;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<ExportResult>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[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;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
|
@ -271,7 +271,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
Childrens = new List<GetSystemReadingQuestionOutDto>(),
|
||||
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<GetSystemReadingQuestionOutDto>(),
|
||||
|
@ -310,6 +312,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
QuestionName = x.QuestionName,
|
||||
RelationQuestions = new List<GetSystemReadingQuestionOutDto>(),
|
||||
Remark = x.Remark,
|
||||
IsCopy = x.IsCopy,
|
||||
ClassifyTableQuestionId = x.ClassifyTableQuestionId,
|
||||
ClassifyAlgorithms = x.ClassifyAlgorithms,
|
||||
|
||||
}).ToList(),
|
||||
Remark = x.Remark,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue