Compare commits
No commits in common. "056feade12118933ad8395d67490af21b9763118" and "698ce08d3080ef119a0880c47856bad2de2666fd" have entirely different histories.
056feade12
...
698ce08d30
|
|
@ -1297,13 +1297,6 @@
|
||||||
<param name="doctorId">医生Id</param>
|
<param name="doctorId">医生Id</param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ResearchPublicationService.AddOrUpdateResearchPublicationInfo(IRaCIS.Application.Contracts.ResearchPublicationInfoDTO)">
|
|
||||||
<summary>
|
|
||||||
新增或修改ResearchPublication 传null不修改
|
|
||||||
</summary>
|
|
||||||
<param name="param"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.TrialExperienceService.GetTrialExperience(System.Guid)">
|
<member name="M:IRaCIS.Core.Application.Service.TrialExperienceService.GetTrialExperience(System.Guid)">
|
||||||
<summary>
|
<summary>
|
||||||
根据医生Id,获取临床试验经历 界面所有数据
|
根据医生Id,获取临床试验经历 界面所有数据
|
||||||
|
|
@ -13041,12 +13034,7 @@
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.MassTransit.Consumer.CRCRepliedQCChallengeEventConsumer">
|
<member name="T:IRaCIS.Core.Application.MassTransit.Consumer.CRCRepliedQCChallengeEventConsumer">
|
||||||
<summary>
|
<summary>
|
||||||
CRC 回复质控质疑 通知QC Code012,013
|
CRC 回复质控质疑 通知QC
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.CRCRepliedQCChallengeEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.User},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallenge},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.QCChallengeDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
|
||||||
<summary>
|
|
||||||
CRC 回复质控质疑 通知QC Code012,013
|
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.MassTransit.Consumer.QCRepliedQCChallengeEventConsumer">
|
<member name="T:IRaCIS.Core.Application.MassTransit.Consumer.QCRepliedQCChallengeEventConsumer">
|
||||||
|
|
|
||||||
|
|
@ -115,8 +115,8 @@ public class CRCRepliedQCChallengeEventConsumer(
|
||||||
IRepository<TrialUser> _trialUseRepository,
|
IRepository<TrialUser> _trialUseRepository,
|
||||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||||
IRepository<Trial> _trialRepository,
|
IRepository<Trial> _trialRepository,
|
||||||
IRepository<QCChallenge> _qCChallengeRepository,
|
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||||
IRepository<QCChallengeDialog> _qCChallengeDialogRepository,
|
IRepository<VisitTask> _visitTaskRepository,
|
||||||
IRepository<Dictionary> _dictionaryRepository,
|
IRepository<Dictionary> _dictionaryRepository,
|
||||||
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
||||||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig) : IConsumer<CRCRepliedQCChallengeEvent>
|
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig) : IConsumer<CRCRepliedQCChallengeEvent>
|
||||||
|
|
@ -125,74 +125,76 @@ public class CRCRepliedQCChallengeEventConsumer(
|
||||||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||||
public async Task Consume(ConsumeContext<CRCRepliedQCChallengeEvent> context)
|
public async Task Consume(ConsumeContext<CRCRepliedQCChallengeEvent> context)
|
||||||
{
|
{
|
||||||
Console.WriteLine("发送(Code012,013) 【CRC 回复质控质疑 通知QC】邮件!!!");
|
//Console.WriteLine("发送(Code012,013) 【加急项目所有IQC待领取质控任务】邮件!!!");
|
||||||
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
//var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||||
|
|
||||||
var subjectVisitId = context.Message.SubjectVisitId;
|
//var subjectVisitId = context.Message.SubjectVisitId;
|
||||||
|
|
||||||
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).Include(x => x.CurrentActionUser).FirstNotNullAsync();
|
//var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
//var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
|
||||||
|
|
||||||
|
//var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.IQC).ToList();
|
||||||
|
|
||||||
|
|
||||||
var qCChallengeDialog = await _qCChallengeDialogRepository.Where(x => x.Id == context.Message.QCChallengeDialogId).Include(x => x.QCChallenge).FirstNotNullAsync();
|
//var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
||||||
|
|
||||||
|
//var auditStateCode = "AuditStatePE";
|
||||||
|
|
||||||
|
//if (trialInfo.QCProcessEnum == TrialQCProcess.DoubleAudit)
|
||||||
|
//{
|
||||||
|
// auditStateCode = "AuditStateRC";
|
||||||
|
//}
|
||||||
|
|
||||||
|
//foreach (var userinfo in userinfoList)
|
||||||
|
//{
|
||||||
|
// var messageToSend = new MimeMessage();
|
||||||
|
// //发件地址
|
||||||
|
// messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||||
|
// messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
||||||
|
|
||||||
|
|
||||||
|
// var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||||
var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
|
|
||||||
|
|
||||||
var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.IQC).ToList();
|
|
||||||
|
|
||||||
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
|
||||||
|
|
||||||
|
|
||||||
var userinfo = subjectVisit.CurrentActionUser;
|
// var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
||||||
|
// {
|
||||||
|
|
||||||
var messageToSend = new MimeMessage();
|
// DictionaryRepository = _dictionaryRepository,
|
||||||
//发件地址
|
// IsEn_US = isEn_US,
|
||||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
// DictionaryList = new List<DictionaryDto>()
|
||||||
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
// {
|
||||||
|
// new DictionaryDto (){DictionaryCode= auditStateCode,EnumValue=subjectVisit.AuditState.GetEnumInt(), }, //审核状态
|
||||||
|
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
// Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||||
|
// {
|
||||||
|
// var subjectCode = subjectVisit.Subject.Code;
|
||||||
|
// var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
||||||
|
// var htmlBodyStr = string.Format(
|
||||||
|
// CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
|
// userinfo.FullName, // 用户名 {0}
|
||||||
|
// trialInfo.ExperimentName, // 项目 {1}
|
||||||
|
// subjectCode, // 受试者 {2}
|
||||||
|
// subjectVisit.VisitName, // 访视 {3}
|
||||||
|
// dictionValue[0], // 审核状态 {4}
|
||||||
|
// _systemEmailConfig.SiteUrl // 链接 {5}
|
||||||
|
// );
|
||||||
|
|
||||||
|
// return (topicStr, htmlBodyStr);
|
||||||
|
// };
|
||||||
|
|
||||||
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
// await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
|
||||||
{
|
|
||||||
|
|
||||||
DictionaryRepository = _dictionaryRepository,
|
// context.Message.IsPd ? EmailBusinessScenario.PDVerification_PendingImageQCClaim : EmailBusinessScenario.EligibilityVerification_PendingClaim,
|
||||||
IsEn_US = isEn_US,
|
|
||||||
DictionaryList = new List<DictionaryDto>()
|
|
||||||
{
|
|
||||||
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString(), }, //是否关闭
|
|
||||||
|
|
||||||
}
|
// messageToSend, emailConfigFunc);
|
||||||
});
|
|
||||||
|
|
||||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
// await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||||
{
|
|
||||||
var subjectCode = subjectVisit.Subject.Code;
|
|
||||||
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
|
||||||
var htmlBodyStr = string.Format(
|
|
||||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
|
||||||
userinfo.FullName, // 用户名 {0}
|
|
||||||
trialInfo.ExperimentName, // 项目 {1}
|
|
||||||
subjectCode, // 受试者 {2}
|
|
||||||
subjectVisit.VisitName, // 访视 {3}
|
|
||||||
dictionValue[0], // 是否关闭 {4}
|
|
||||||
qCChallengeDialog.TalkContent, // 质疑内容{5}
|
|
||||||
_systemEmailConfig.SiteUrl // 链接 {6}
|
|
||||||
);
|
|
||||||
|
|
||||||
return (topicStr, htmlBodyStr);
|
}
|
||||||
};
|
|
||||||
|
|
||||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
|
|
||||||
|
|
||||||
context.Message.IsPd ? EmailBusinessScenario.PDVerification_UnderQCQuery : EmailBusinessScenario.EligibilityVerification_Pending,
|
|
||||||
|
|
||||||
messageToSend, emailConfigFunc);
|
|
||||||
|
|
||||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,20 +16,4 @@
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class ResearchPublicationInfoDTO
|
|
||||||
{
|
|
||||||
public Guid? Id { get; set; }
|
|
||||||
public Guid DoctorId { get; set; }
|
|
||||||
public string? Research { get; set; }
|
|
||||||
public string? Grants { get; set; }
|
|
||||||
public string? Publications { get; set; }
|
|
||||||
public string? AwardsHonors { get; set; }
|
|
||||||
|
|
||||||
public string? ResearchCN { get; set; }
|
|
||||||
public string? GrantsCN { get; set; }
|
|
||||||
public string? PublicationsCN { get; set; }
|
|
||||||
public string? AwardsHonorsCN { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -31,18 +31,5 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id);
|
return ResponseOutput.Ok(entity.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 新增或修改ResearchPublication 传null不修改
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="param"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IResponseOutput> AddOrUpdateResearchPublicationInfo(ResearchPublicationInfoDTO param)
|
|
||||||
{
|
|
||||||
var entity = await _researchPublicationRepository.InsertOrUpdateAsync(param, true);
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
using AutoMapper.EquivalencyExpression;
|
using AutoMapper.EquivalencyExpression;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Application.Contracts.Pay;
|
using IRaCIS.Application.Contracts.Pay;
|
||||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
|
|
@ -39,10 +38,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
CreateMap<ResearchPublicationDTO, ResearchPublication>().EqualityComparison((odto, o) => odto.Id == o.Id);
|
CreateMap<ResearchPublicationDTO, ResearchPublication>().EqualityComparison((odto, o) => odto.Id == o.Id);
|
||||||
CreateMap<TrialExperienceCommand, TrialExperience>().EqualityComparison((odto, o) => odto.Id == o.Id);
|
CreateMap<TrialExperienceCommand, TrialExperience>().EqualityComparison((odto, o) => odto.Id == o.Id);
|
||||||
|
|
||||||
CreateMap<ResearchPublicationInfoDTO, ResearchPublication>()
|
|
||||||
.ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));
|
|
||||||
|
|
||||||
|
|
||||||
//医生账户
|
//医生账户
|
||||||
CreateMap<DoctorAccountLoginDTO, Doctor>();
|
CreateMap<DoctorAccountLoginDTO, Doctor>();
|
||||||
CreateMap<DoctorAccountRegisterModel, Doctor>();
|
CreateMap<DoctorAccountRegisterModel, Doctor>();
|
||||||
|
|
|
||||||
|
|
@ -15,17 +15,10 @@ public class SubjectVisit : BaseFullDeleteAuditEntity
|
||||||
public SubjectVisit OutPlanPreviousVisit { get; set; }
|
public SubjectVisit OutPlanPreviousVisit { get; set; }
|
||||||
[ForeignKey("ForwardUserId")]
|
[ForeignKey("ForwardUserId")]
|
||||||
public User ForwardUser { get; set; }
|
public User ForwardUser { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 初审
|
|
||||||
/// </summary>
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("PreliminaryAuditUserId")]
|
[ForeignKey("PreliminaryAuditUserId")]
|
||||||
public User PreliminaryAuditUser { get; set; }
|
public User PreliminaryAuditUser { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 复审
|
|
||||||
/// </summary>
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("ReviewAuditUserId")]
|
[ForeignKey("ReviewAuditUserId")]
|
||||||
public User ReviewAuditUser { get; set; }
|
public User ReviewAuditUser { get; set; }
|
||||||
|
|
@ -112,7 +105,6 @@ public class SubjectVisit : BaseFullDeleteAuditEntity
|
||||||
[Comment("审核状态")]
|
[Comment("审核状态")]
|
||||||
public AuditStateEnum AuditState { get; set; }
|
public AuditStateEnum AuditState { get; set; }
|
||||||
public ForwardStateEnum ForwardState { get; set; }
|
public ForwardStateEnum ForwardState { get; set; }
|
||||||
|
|
||||||
[Comment("单审通过人")]
|
[Comment("单审通过人")]
|
||||||
public Guid? PreliminaryAuditUserId { get; set; }
|
public Guid? PreliminaryAuditUserId { get; set; }
|
||||||
|
|
||||||
|
|
@ -127,9 +119,6 @@ public class SubjectVisit : BaseFullDeleteAuditEntity
|
||||||
public Guid? ForwardUserId { get; set; }
|
public Guid? ForwardUserId { get; set; }
|
||||||
public DateTime? ForwardTime { get; set; }
|
public DateTime? ForwardTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 当前领取
|
|
||||||
/// </summary>
|
|
||||||
[Comment("当前质控领取人")]
|
[Comment("当前质控领取人")]
|
||||||
public Guid? CurrentActionUserId { get; set; }
|
public Guid? CurrentActionUserId { get; set; }
|
||||||
public DateTime? CurrentActionUserExpireTime { get; set; }
|
public DateTime? CurrentActionUserExpireTime { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,6 @@ public class CRCSubmitedAndQCToAuditEvent : DomainEvent
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CRCRepliedQCChallengeEvent : DomainEvent
|
public class CRCRepliedQCChallengeEvent : DomainEvent
|
||||||
{
|
{
|
||||||
|
|
||||||
public bool IsPd { get; set; }
|
|
||||||
|
|
||||||
public Guid QCChallengeDialogId { get; set; }
|
public Guid QCChallengeDialogId { get; set; }
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
@ -40,9 +37,6 @@ public class CRCRepliedQCChallengeEvent : DomainEvent
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class QCRepliedQCChallengeEvent : DomainEvent
|
public class QCRepliedQCChallengeEvent : DomainEvent
|
||||||
{
|
{
|
||||||
|
|
||||||
public bool IsPd { get; set; }
|
|
||||||
|
|
||||||
public Guid QCChallengeDialogId { get; set; }
|
public Guid QCChallengeDialogId { get; set; }
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -121,12 +121,12 @@ public static class DBContext_Ext
|
||||||
//CRC 针对质控质疑进行回复
|
//CRC 针对质控质疑进行回复
|
||||||
if (entry.State == EntityState.Added && qCChallengeDialog.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)
|
if (entry.State == EntityState.Added && qCChallengeDialog.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)
|
||||||
{
|
{
|
||||||
qCChallengeDialog.AddDomainEvent(new CRCRepliedQCChallengeEvent() { IsPd = findSubjectVisit.PDState == PDStateEnum.PDProgress, QCChallengeDialogId = qCChallengeDialog.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
|
qCChallengeDialog.AddDomainEvent(new CRCRepliedQCChallengeEvent() { QCChallengeDialogId = qCChallengeDialog.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
|
||||||
}
|
}
|
||||||
//QC 针对质控质疑进行回复
|
//QC 针对质控质疑进行回复
|
||||||
else if (entry.State == EntityState.Added && qCChallengeDialog.UserTypeEnum == UserTypeEnum.IQC)
|
else if (entry.State == EntityState.Added && qCChallengeDialog.UserTypeEnum == UserTypeEnum.IQC)
|
||||||
{
|
{
|
||||||
qCChallengeDialog.AddDomainEvent(new QCRepliedQCChallengeEvent() { IsPd = findSubjectVisit.PDState == PDStateEnum.PDProgress, QCChallengeDialogId = qCChallengeDialog.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
|
qCChallengeDialog.AddDomainEvent(new QCRepliedQCChallengeEvent() { QCChallengeDialogId = qCChallengeDialog.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue