Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
a03c11ae9d
|
@ -24,6 +24,7 @@ public class UrgentMedicalReviewAddedEventConsumer(
|
||||||
IRepository<User> _userRepository,
|
IRepository<User> _userRepository,
|
||||||
IRepository<TaskMedicalReview> _taskMedicalReviewRepository,
|
IRepository<TaskMedicalReview> _taskMedicalReviewRepository,
|
||||||
IRepository<Trial> _trialRepository,
|
IRepository<Trial> _trialRepository,
|
||||||
|
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||||
IRepository<VisitTask> _visitTaskRepository,
|
IRepository<VisitTask> _visitTaskRepository,
|
||||||
IRepository<Dictionary> _dictionaryRepository,
|
IRepository<Dictionary> _dictionaryRepository,
|
||||||
|
@ -34,14 +35,14 @@ public class UrgentMedicalReviewAddedEventConsumer(
|
||||||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加急的医学反馈任务 通知MIM
|
/// 加急的医学反馈任务 通知MIM (026,027)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="context"></param>
|
/// <param name="context"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public async Task Consume(ConsumeContext<UrgentMedicalReviewAddedEvent> context)
|
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 isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||||
|
|
||||||
var medicalReviewId = context.Message.MedicalReviewId;
|
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 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();
|
var messageToSend = new MimeMessage();
|
||||||
//发件地址
|
//发件地址
|
||||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
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 topicStr = string.Format(input.topicStr, companyName, trialInfo.ResearchProgramNo);
|
||||||
var htmlBodyStr = string.Format(
|
var htmlBodyStr = string.Format(
|
||||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
userinfo.FullName, // 用户名
|
userinfo.FullName, // 用户名 {0}
|
||||||
trialInfo.ExperimentName, // 项目
|
trialInfo.ExperimentName, // 项目 {1}
|
||||||
criterion.CriterionName, // 阅片标准
|
criterion.CriterionName, // 阅片标准 {2}
|
||||||
taskInfo.BlindSubjectCode.IsNullOrEmpty() ? taskInfo.Subject.Code : taskInfo.BlindSubjectCode, // 受试者
|
taskInfo.BlindSubjectCode.IsNullOrEmpty() ? taskInfo.Subject.Code : taskInfo.BlindSubjectCode, // 受试者 {3}
|
||||||
taskInfo.TaskBlindName, // 访视
|
taskInfo.TaskBlindName, // 访视 {4}
|
||||||
dictionValue[0], // 任务类型
|
dictionValue[0], // 任务类型 {5}
|
||||||
dictionValue[1], // 阅片人是否同意
|
//dictionValue[1], // 阅片人是否同意 {6}
|
||||||
dictionValue[2], // 审核状态
|
dictionValue[2], // 审核状态 {6}
|
||||||
dictionValue[3] // 是否加急
|
dictionValue[3], // 是否加急 {7}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return (topicStr, htmlBodyStr);
|
return (topicStr, htmlBodyStr);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
@ -2536,6 +2537,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// 问题标识
|
/// 问题标识
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public QuestionMark? QuestionMark { get; set; }
|
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
|
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,
|
Remark = x.Remark,
|
||||||
ValueType = x.ValueType,
|
ValueType = x.ValueType,
|
||||||
Unit = x.Unit,
|
Unit = x.Unit,
|
||||||
|
ClassifyAlgorithms=x.ClassifyAlgorithms,
|
||||||
|
IsCopy=x.IsCopy,
|
||||||
|
ClassifyTableQuestionId=x.ClassifyTableQuestionId,
|
||||||
}).ToList();
|
}).ToList();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
Childrens = new List<GetSystemReadingQuestionOutDto>(),
|
Childrens = new List<GetSystemReadingQuestionOutDto>(),
|
||||||
ShowOrder = x.ShowOrder,
|
ShowOrder = x.ShowOrder,
|
||||||
GroupName = string.Empty,
|
GroupName = string.Empty,
|
||||||
|
|
||||||
Id = x.Id,
|
Id = x.Id,
|
||||||
Type = x.Type,
|
Type = x.Type,
|
||||||
DictionaryCode = x.DictionaryCode,
|
DictionaryCode = x.DictionaryCode,
|
||||||
|
@ -288,6 +287,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
DataTableColumn = x.DataTableColumn,
|
DataTableColumn = x.DataTableColumn,
|
||||||
LesionType = item.LesionType,
|
LesionType = item.LesionType,
|
||||||
QuestionName = x.QuestionName,
|
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
|
RelationQuestions = tableQuestions.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).Select(x => new GetSystemReadingQuestionOutDto
|
||||||
{
|
{
|
||||||
Childrens = new List<GetSystemReadingQuestionOutDto>(),
|
Childrens = new List<GetSystemReadingQuestionOutDto>(),
|
||||||
|
@ -310,6 +312,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
QuestionName = x.QuestionName,
|
QuestionName = x.QuestionName,
|
||||||
RelationQuestions = new List<GetSystemReadingQuestionOutDto>(),
|
RelationQuestions = new List<GetSystemReadingQuestionOutDto>(),
|
||||||
Remark = x.Remark,
|
Remark = x.Remark,
|
||||||
|
IsCopy = x.IsCopy,
|
||||||
|
ClassifyTableQuestionId = x.ClassifyTableQuestionId,
|
||||||
|
ClassifyAlgorithms = x.ClassifyAlgorithms,
|
||||||
|
|
||||||
}).ToList(),
|
}).ToList(),
|
||||||
Remark = x.Remark,
|
Remark = x.Remark,
|
||||||
|
|
|
@ -17,6 +17,8 @@ public class UrgentMedicalReviewAddedEvent : DomainEvent
|
||||||
public Guid VisitTaskId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
public Guid MedicalReviewId { get; set; }
|
public Guid MedicalReviewId { get; set; }
|
||||||
|
|
||||||
|
public bool IsPD { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//IR 回复医学反馈通知MIM
|
//IR 回复医学反馈通知MIM
|
||||||
|
|
|
@ -180,7 +180,7 @@ public static class DBContext_Ext
|
||||||
if (findSubjectVisit.IsEnrollmentConfirm || findSubjectVisit.PDState == PDStateEnum.PDProgress)
|
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));
|
eventStoreList.AddRange(GetStoreEvents(taskMedicalReview.DomainEvents));
|
||||||
|
|
Loading…
Reference in New Issue