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
39bb3bf56b
|
@ -13071,6 +13071,7 @@
|
|||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "T:IRaCIS.Core.Application.MassTransit.Consumer.PMRepliedCheckChallengeEventConsumer" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.MassTransit.Consumer.PMRepliedCheckChallengeEventConsumer.#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.CheckChallengeDialog},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})" -->
|
||||
<member name="T:IRaCIS.Core.Application.MassTransit.Consumer.CheckStateChangedToAuditEventConsumer">
|
||||
<summary>
|
||||
通知PM 进行一致性核查 (018,030)
|
||||
|
@ -13083,7 +13084,12 @@
|
|||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.MassTransit.Consumer.QCClaimTaskEventConsumer">
|
||||
<summary>
|
||||
QC 领取了质控任务
|
||||
QC 领取了质控任务 (007,008)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.QCClaimTaskEventConsumer.#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>
|
||||
QC 领取了质控任务 (007,008)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.MassTransit.Consumer.MasstransitTestConsumer">
|
||||
|
@ -15011,6 +15017,11 @@
|
|||
<member name="T:IRaCIS.Core.Application.Contracts.TrialSiteSurveyQuery">
|
||||
<summary>TrialSiteSurveyQuery 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.UseUserIDGetDoctorIDOutDto">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.TrialSiteSurveyAddOrEdit">
|
||||
<summary> TrialSiteSurveyAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
|
@ -15050,6 +15061,13 @@
|
|||
<param name="userInfo"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.UseUserIDGetDoctorID(IRaCIS.Core.Application.Contracts.UseUserIDGetDoctorIDInDto)">
|
||||
<summary>
|
||||
通过UserId获取Doctorid
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.VerifyEmialGetDoctorInfo(IRaCIS.Core.Application.Contracts.VerifyEmialGetDoctorInfoInDto)">
|
||||
<summary>
|
||||
验证邮箱验证码 获取医生信息Id
|
||||
|
|
|
@ -8,6 +8,7 @@ using IRaCIS.Core.Infra.EFCore.Common;
|
|||
using MassTransit;
|
||||
using Microsoft.Extensions.Options;
|
||||
using MimeKit;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
|
@ -47,6 +48,8 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
|
|||
var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.IQC).ToList();
|
||||
|
||||
|
||||
var pmandAPm = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.APM || x.UserTypeEnum == UserTypeEnum.ProjectManager).ToList();
|
||||
|
||||
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
||||
|
||||
var auditStateCode = "AuditStatePE";
|
||||
|
@ -77,6 +80,10 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
|
|||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
||||
|
||||
foreach (var pm in pmandAPm)
|
||||
{
|
||||
messageToSend.Cc.Add(new MailboxAddress(String.Empty, pm.EMail));
|
||||
}
|
||||
|
||||
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
|
||||
|
@ -143,7 +150,12 @@ public class CRCRepliedQCChallengeEventConsumer(
|
|||
|
||||
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 pmandAPm = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.APM || x.UserTypeEnum == UserTypeEnum.ProjectManager).ToList();
|
||||
|
||||
|
||||
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
||||
|
||||
|
@ -155,7 +167,10 @@ public class CRCRepliedQCChallengeEventConsumer(
|
|||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
||||
|
||||
|
||||
foreach (var pm in pmandAPm)
|
||||
{
|
||||
messageToSend.Cc.Add(new MailboxAddress(String.Empty, pm.EMail));
|
||||
}
|
||||
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
|
||||
|
||||
|
@ -389,11 +404,110 @@ public class CRCRepliedCheckChallengeEventConsumer(
|
|||
/// PM 一致性核查 通知CRC (016,017)
|
||||
|
||||
/// </summary>
|
||||
public class PMRepliedCheckChallengeEventConsumer : IConsumer<PMRepliedCheckChallengeEvent>
|
||||
public class PMRepliedCheckChallengeEventConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<TrialUser> _trialUseRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<CheckChallengeDialog> _checkChallengeDialogRepository,
|
||||
IRepository<QCChallengeDialog> _qCChallengeDialogRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
||||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig) : IConsumer<PMRepliedCheckChallengeEvent>
|
||||
{
|
||||
public Task Consume(ConsumeContext<PMRepliedCheckChallengeEvent> context)
|
||||
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
public async Task Consume(ConsumeContext<PMRepliedCheckChallengeEvent> context)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
Console.WriteLine("发送(016,017) 【 PM 一致性核查 通知CRC】邮件!!!");
|
||||
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||
var checkChallengeDialog = await _checkChallengeDialogRepository.Where(x => x.Id == context.Message.CheckChallengeDialogId).FirstNotNullAsync();
|
||||
var subjectVisitId = context.Message.SubjectVisitId;
|
||||
|
||||
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync();
|
||||
|
||||
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.ClinicalResearchCoordinator).ToList();
|
||||
|
||||
var craInfo = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.CRA).FirstOrDefault();
|
||||
|
||||
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
||||
|
||||
string json = checkChallengeDialog.ParamInfo;
|
||||
List<string> modalities = new List<string>();
|
||||
if (json.IsNotNullOrEmpty())
|
||||
{
|
||||
List<Dictionary<string, string>> studies = JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(json);
|
||||
foreach (var study in studies)
|
||||
{
|
||||
if (study.ContainsKey("Modality"))
|
||||
{
|
||||
modalities.Add(study["Modality"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
modalities = modalities.Distinct().ToList();
|
||||
|
||||
|
||||
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
||||
{
|
||||
|
||||
DictionaryRepository = _dictionaryRepository,
|
||||
IsEn_US = isEn_US,
|
||||
DictionaryList = new List<DictionaryDto>()
|
||||
{
|
||||
new DictionaryDto (){DictionaryCode= "CheckState",EnumValue=subjectVisit.CheckState.GetEnumInt(), }, //核查状态
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
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));
|
||||
if (craInfo != null)
|
||||
{
|
||||
messageToSend.Cc.Add(new MailboxAddress(String.Empty, craInfo.EMail));
|
||||
}
|
||||
|
||||
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}
|
||||
string.Join(',', modalities), // 检查类型 {4}
|
||||
dictionValue[0], // 核查状态 {5}
|
||||
checkChallengeDialog.TalkContent,// 质疑内容{6}
|
||||
_systemEmailConfig.SiteUrl // 链接 {7}
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
|
||||
|
||||
context.Message.IsPd ? EmailBusinessScenario.PDVerification_UnderDR : EmailBusinessScenario.EligibilityVerification_UnderDR,
|
||||
|
||||
messageToSend, emailConfigFunc);
|
||||
|
||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -487,12 +601,106 @@ public class CheckStateChangedToAuditEventConsumer(
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// QC 领取了质控任务
|
||||
/// QC 领取了质控任务 (007,008)
|
||||
/// </summary>
|
||||
public class QCClaimTaskEventConsumer : IConsumer<QCClaimTaskEvent>
|
||||
public class QCClaimTaskEventConsumer(
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<TrialUser> _trialUseRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<QCChallenge> _qCChallengeRepository,
|
||||
IRepository<QCChallengeDialog> _qCChallengeDialogRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
||||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig) : IConsumer<QCClaimTaskEvent>
|
||||
{
|
||||
public Task Consume(ConsumeContext<QCClaimTaskEvent> context)
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
public async Task Consume(ConsumeContext<QCClaimTaskEvent> context)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
Console.WriteLine("发送(Code007,008) 【QC 领取了质控任务】邮件!!!");
|
||||
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||
|
||||
var subjectVisitId = context.Message.SubjectVisitId;
|
||||
|
||||
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).Include(x => x.CurrentActionUser).FirstNotNullAsync();
|
||||
|
||||
|
||||
var subjectVisitList = await _subjectVisitRepository.Where(x => x.CurrentActionUserId == context.Message.CurrentActionUserId && x.TrialId == subjectVisit.TrialId).Include(x => x.Subject).ToListAsync();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var pmandAPm = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.APM || x.UserTypeEnum == UserTypeEnum.ProjectManager).ToList();
|
||||
|
||||
|
||||
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
||||
|
||||
|
||||
var userinfo = subjectVisit.CurrentActionUser;
|
||||
|
||||
var messageToSend = new MimeMessage();
|
||||
//发件地址
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
||||
|
||||
foreach (var pm in pmandAPm)
|
||||
{
|
||||
messageToSend.Cc.Add(new MailboxAddress(String.Empty, pm.EMail));
|
||||
}
|
||||
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
|
||||
var auditStateCode = "AuditStatePE";
|
||||
|
||||
if (trialInfo.QCProcessEnum == TrialQCProcess.DoubleAudit)
|
||||
{
|
||||
auditStateCode = "AuditStateRC";
|
||||
}
|
||||
|
||||
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
||||
{
|
||||
DictionaryRepository = _dictionaryRepository,
|
||||
IsEn_US = isEn_US,
|
||||
DictionaryList = new List<DictionaryDto>()
|
||||
{
|
||||
new DictionaryDto (){DictionaryCode= auditStateCode,EnumValue=subjectVisit.AuditState.GetEnumInt(), }, //审核状态
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
var subjectcodes = subjectVisitList.Select(x => x.Subject.Code).ToList();
|
||||
var visitnames = subjectVisitList.Select(x => x.VisitName).ToList();
|
||||
|
||||
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}
|
||||
string.Join(',', subjectcodes), // 受试者 {2}
|
||||
string.Join(',', visitnames), // 访视 {3}
|
||||
dictionValue[0], // 审核状态 {4}
|
||||
|
||||
_systemEmailConfig.SiteUrl // 链接 {5}
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
|
||||
|
||||
context.Message.IsPd ? EmailBusinessScenario.PDVerification_PendingImageQCClaim : EmailBusinessScenario.EligibilityVerification_PendingClaim,
|
||||
|
||||
messageToSend, emailConfigFunc);
|
||||
|
||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using AutoMapper.EquivalencyExpression;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
|
@ -15,8 +16,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
CreateMap<UserCommand, User>().ForMember(d => d.UserCode, x => x.Ignore());
|
||||
CreateMap<UserType, UserTypeMenuAddOrEdit>().ReverseMap()
|
||||
.ForMember(t => t.UserTypeMenuList, u => u.MapFrom(c => c.MenuIds))
|
||||
|
|
|
@ -1598,6 +1598,165 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public Guid QuestionId { get; set; }
|
||||
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public List<string> ParentTriggerValueList
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.ParentTriggerValue.Split(',').ToList();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
[NotMapped]
|
||||
public List<string> RelevanceValueList
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.RelevanceValue.Split(',').ToList();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Comment("系统表的问题Id ReadingQuestionSystem的Id")]
|
||||
public Guid ReadingQuestionId { get; set; }
|
||||
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public Guid? ParentId { get; set; }
|
||||
|
||||
[Comment("父问题触发值")]
|
||||
public string ParentTriggerValue { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
||||
public IsRequired IsRequired { get; set; }
|
||||
|
||||
[Comment("排序号")]
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
[Comment("值")]
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
|
||||
[Comment("是否启用")]
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
[Comment("备注")]
|
||||
public string Remark { get; set; } = string.Empty;
|
||||
|
||||
[Comment("显示父问题")]
|
||||
public Guid? RelevanceId { get; set; }
|
||||
|
||||
[Comment("显示父问题的值")]
|
||||
public string RelevanceValue { get; set; } = string.Empty;
|
||||
|
||||
[Comment("是否显示")]
|
||||
public int ShowQuestion { get; set; }
|
||||
|
||||
[Comment("最大问题数")]
|
||||
public int? MaxRowCount { get; set; }
|
||||
|
||||
[Comment("图片数量")]
|
||||
public int? ImageCount { get; set; }
|
||||
|
||||
[Comment("数据表名称")]
|
||||
public string DataTableName { get; set; } = string.Empty;
|
||||
|
||||
[Comment("数据列")]
|
||||
public string DataTableColumn { get; set; } = string.Empty;
|
||||
[Comment("关联父问题")]
|
||||
public Guid? DependParentId { get; set; }
|
||||
|
||||
[Comment("是否关联")]
|
||||
public IsDepend IsDepend { get; set; }
|
||||
|
||||
[Comment("表格问题类型")]
|
||||
public TableQuestionType? TableQuestionType { get; set; }
|
||||
|
||||
[Comment("系统标准Id")]
|
||||
public Guid SystemCriterionId { get; set; }
|
||||
|
||||
[Comment("问题标识")]
|
||||
public QuestionMark? QuestionMark { get; set; }
|
||||
|
||||
[Comment("字典code")]
|
||||
public string DictionaryCode { get; set; } = string.Empty;
|
||||
[Comment("数值类型")]
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
|
||||
[Comment("单位")]
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
[Comment("问题英文名称")]
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
|
||||
[Comment("数据来源")]
|
||||
public DataSources DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
[Comment("限制编辑")]
|
||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||
|
||||
[Comment("最大答案长度")]
|
||||
public int? MaxAnswerLength { get; set; }
|
||||
|
||||
[Comment("文件类型")]
|
||||
public string? FileType { get; set; } = string.Empty;
|
||||
|
||||
[Comment("问题分类")]
|
||||
public QuestionClassify? QuestionClassify { get; set; }
|
||||
|
||||
[Comment("复制病灶的时候 是否复制这个问题")]
|
||||
public bool IsCopy { get; set; } = false;
|
||||
|
||||
[Comment("分类问题表格Id")]
|
||||
public Guid? ClassifyTableQuestionId { get; set; }
|
||||
|
||||
[Comment("分类类型")]
|
||||
public ClassifyType? ClassifyType { get; set; }
|
||||
|
||||
[Comment("分类算法")]
|
||||
public string ClassifyAlgorithms { get; set; } = string.Empty;
|
||||
|
||||
[Comment("导出标识")]
|
||||
public ExportIdentification? ExportIdentification { get; set; }
|
||||
|
||||
[Comment("导出结果")]
|
||||
public string ExportResultStr { 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>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -152,13 +152,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
.Where(x => x.ReadingQuestionId == inDto.QuestionId)
|
||||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
|
||||
.OrderBy(x => x.ShowOrder)
|
||||
.Select(x => new GetCalculateTableQuestionsOutDto
|
||||
()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)
|
||||
|
||||
}).ToListAsync();
|
||||
.ProjectTo<GetCalculateTableQuestionsOutDto>(_mapper.ConfigurationProvider, new
|
||||
{
|
||||
isEn_Us = _userInfo.IsEn_Us,
|
||||
}).ToListAsync();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -177,13 +174,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
.Where(x => x.ReadingQuestionId == inDto.QuestionId)
|
||||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
|
||||
.OrderBy(x => x.ShowOrder)
|
||||
.Select(x => new GetCalculateTableQuestionsOutDto
|
||||
()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)
|
||||
|
||||
}).ToListAsync();
|
||||
.ProjectTo<GetCalculateTableQuestionsOutDto>(_mapper.ConfigurationProvider, new
|
||||
{
|
||||
isEn_Us = _userInfo.IsEn_Us,
|
||||
}).ToListAsync();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -228,7 +228,15 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<ReadingQuestionTrial, GetCalculateQuestionsOutDto>();
|
||||
|
||||
|
||||
CreateMap<ReadingQuestionSystem, GetCalculateQuestionsOutDto>();
|
||||
CreateMap<ReadingQuestionSystem, GetSystemCalculateQuestionsOutDto>();
|
||||
|
||||
|
||||
CreateMap<ReadingTableQuestionSystem, GetCalculateTableQuestionsOutDto>()
|
||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
||||
|
||||
CreateMap<ReadingTableQuestionTrial, GetCalculateTableQuestionsOutDto>()
|
||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
||||
|
||||
|
||||
CreateMap<ReadingTableQuestionTrial, ReadingTableQuestionTrialView>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
|
|
|
@ -229,6 +229,20 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string EmailOrPhone { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UseUserIDGetDoctorIDOutDto
|
||||
{
|
||||
public Guid? DoctorID { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class UseUserIDGetDoctorIDInDto
|
||||
{
|
||||
public Guid UserID { get; set; }
|
||||
}
|
||||
|
||||
public class VerifyEmialGetDoctorInfoOutDto
|
||||
{
|
||||
public Guid? DoctorId { get; set; }
|
||||
|
|
|
@ -18,6 +18,8 @@ using Microsoft.VisualBasic;
|
|||
using MimeKit;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using static MassTransit.ValidationResultExtensions;
|
||||
using DocumentFormat.OpenXml.Vml.Spreadsheet;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
|
@ -68,6 +70,50 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通过UserId获取Doctorid
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<UseUserIDGetDoctorIDOutDto> UseUserIDGetDoctorID(UseUserIDGetDoctorIDInDto inDto)
|
||||
{
|
||||
|
||||
var userinfo = await _userRepository.Where(x => x.Id == inDto.UserID).FirstOrDefaultAsync();
|
||||
|
||||
if (userinfo != null && userinfo.DoctorId != null)
|
||||
{
|
||||
return new UseUserIDGetDoctorIDOutDto()
|
||||
{
|
||||
|
||||
DoctorID = userinfo.DoctorId
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
Doctor doctor = new Doctor()
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
var info = await _doctorRepository.AddAsync(doctor, true);
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.UserID, x => new User()
|
||||
{
|
||||
|
||||
DoctorId = info.Id
|
||||
});
|
||||
|
||||
return new UseUserIDGetDoctorIDOutDto()
|
||||
{
|
||||
|
||||
DoctorID = info.Id
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证邮箱验证码 获取医生信息Id
|
||||
/// </summary>
|
||||
|
@ -107,6 +153,18 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
result.DoctorId = dockerInfo.Id;
|
||||
result.ReviewStatus = dockerInfo.ReviewStatus;
|
||||
}
|
||||
else
|
||||
{
|
||||
Doctor doctor = new Doctor()
|
||||
{
|
||||
EMail = inDto.EmailOrPhone
|
||||
};
|
||||
|
||||
var info=await _doctorRepository.AddAsync(doctor,true);
|
||||
|
||||
result.DoctorId = info.Id;
|
||||
result.ReviewStatus = info.ReviewStatus;
|
||||
}
|
||||
|
||||
result.Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo()));
|
||||
}
|
||||
|
|
|
@ -52,14 +52,14 @@ public class Doctor : BaseFullAuditEntity
|
|||
|
||||
public Guid AuditUserId { get; set; }
|
||||
|
||||
public string BlindName { get; set; } = null!;
|
||||
public string BlindName { get; set; } = string.Empty;
|
||||
|
||||
public string BlindNameCN { get; set; } = null!;
|
||||
public string BlindNameCN { get; set; } = string.Empty;
|
||||
[MaxLength]
|
||||
public string? BlindPublications { get; set; }
|
||||
|
||||
|
||||
public string ChineseName { get; set; } = null!;
|
||||
public string ChineseName { get; set; } = string.Empty;
|
||||
|
||||
public int Code { get; set; }
|
||||
|
||||
|
@ -68,16 +68,16 @@ public class Doctor : BaseFullAuditEntity
|
|||
public Guid? DepartmentId { get; set; }
|
||||
|
||||
|
||||
public string DepartmentOther { get; set; } = null!;
|
||||
public string DepartmentOther { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string DepartmentOtherCN { get; set; } = null!;
|
||||
|
||||
|
||||
public string EMail { get; set; } = null!;
|
||||
public string DepartmentOtherCN { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string FirstName { get; set; } = null!;
|
||||
|
||||
public string EMail { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
|
||||
public int GCP { get; set; }
|
||||
|
||||
|
@ -95,19 +95,19 @@ public class Doctor : BaseFullAuditEntity
|
|||
|
||||
public Guid? HospitalId { get; set; }
|
||||
|
||||
public string HospitalOther { get; set; } = null!;
|
||||
public string HospitalOther { get; set; } = string.Empty;
|
||||
|
||||
public string HospitalOtherCN { get; set; } = null!;
|
||||
public string HospitalOtherCN { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength]
|
||||
public string Introduction { get; set; } = null!;
|
||||
public string Introduction { get; set; } = string.Empty;
|
||||
|
||||
public bool IsVirtual { get; set; }
|
||||
|
||||
public DateTime? LastLoginTime { get; set; }
|
||||
|
||||
|
||||
public string LastName { get; set; } = null!;
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
|
||||
public int Nation { get; set; }
|
||||
|
||||
|
@ -118,48 +118,48 @@ public class Doctor : BaseFullAuditEntity
|
|||
public string? OtherClinicalExperienceCN { get; set; }
|
||||
|
||||
|
||||
public string Password { get; set; } = null!;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string Phone { get; set; } = null!;
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
|
||||
public string PhotoPath { get; set; } = null!;
|
||||
public string PhotoPath { get; set; } = string.Empty;
|
||||
|
||||
public string Physician { get; set; } = null!;
|
||||
public string Physician { get; set; } = string.Empty;
|
||||
|
||||
public string PhysicianCN { get; set; } = null!;
|
||||
public string PhysicianCN { get; set; } = string.Empty;
|
||||
|
||||
public Guid? PhysicianId { get; set; }
|
||||
|
||||
public Guid? PositionId { get; set; }
|
||||
|
||||
|
||||
public string PositionOther { get; set; } = null!;
|
||||
public string PositionOther { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string PositionOtherCN { get; set; } = null!;
|
||||
public string PositionOtherCN { get; set; } = string.Empty;
|
||||
|
||||
public Guid? RankId { get; set; }
|
||||
|
||||
|
||||
public string RankOther { get; set; } = null!;
|
||||
public string RankOther { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string RankOtherCN { get; set; } = null!;
|
||||
public string RankOtherCN { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string ReadingTypeOther { get; set; } = null!;
|
||||
public string ReadingTypeOther { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string ReadingTypeOtherCN { get; set; } = null!;
|
||||
public string ReadingTypeOtherCN { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(1000)]
|
||||
public string ResumePath { get; set; } = null!;
|
||||
public string ResumePath { get; set; } = string.Empty;
|
||||
|
||||
public ResumeStatusEnum ResumeStatus { get; set; } = ResumeStatusEnum.Failed;
|
||||
|
||||
|
||||
public string ReviewerCode { get; set; } = null!;
|
||||
public string ReviewerCode { get; set; } = string.Empty;
|
||||
|
||||
public ReviewerInformationConfirmStatus ReviewStatus { get; set; } = ReviewerInformationConfirmStatus.ConfirmRefuse;
|
||||
|
||||
|
@ -168,19 +168,19 @@ public class Doctor : BaseFullAuditEntity
|
|||
public Guid? SpecialityId { get; set; }
|
||||
|
||||
|
||||
public string SpecialityOther { get; set; } = null!;
|
||||
public string SpecialityOther { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string SpecialityOtherCN { get; set; } = null!;
|
||||
public string SpecialityOtherCN { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string SubspecialityOther { get; set; } = null!;
|
||||
public string SubspecialityOther { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string SubspecialityOtherCN { get; set; } = null!;
|
||||
public string SubspecialityOtherCN { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string WeChat { get; set; } = null!;
|
||||
public string WeChat { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// ¹¤×÷¼æÖ°
|
||||
|
|
|
@ -72,6 +72,8 @@ public class CRCRepliedCheckChallengeEvent : DomainEvent
|
|||
/// </summary>
|
||||
public class PMRepliedCheckChallengeEvent : DomainEvent
|
||||
{
|
||||
public bool IsPd { get; set; }
|
||||
|
||||
public Guid CheckChallengeDialogId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
@ -99,4 +101,6 @@ public class QCClaimTaskEvent : DomainEvent
|
|||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public Guid CurrentActionUserId { get; set; }
|
||||
|
||||
public bool IsPd { get; set; }
|
||||
}
|
|
@ -99,7 +99,7 @@ public static class DBContext_Ext
|
|||
var delaySeconds = dbContext.TrialEmailNoticeConfig.Where(t => t.BusinessScenarioEnum == businessEnum)
|
||||
.Select(t => t.EmailDelaySeconds).FirstOrDefault();
|
||||
|
||||
subjectVisit.AddDomainEvent(new QCClaimTaskEvent() { SubjectVisitId = subjectVisit.Id, DelaySeconds= delaySeconds, CurrentActionUserId = (Guid)subjectVisit.CurrentActionUserId });
|
||||
subjectVisit.AddDomainEvent(new QCClaimTaskEvent() { IsPd = subjectVisit.PDState == PDStateEnum.PDProgress, SubjectVisitId = subjectVisit.Id, DelaySeconds= delaySeconds, CurrentActionUserId = (Guid)subjectVisit.CurrentActionUserId });
|
||||
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ public static class DBContext_Ext
|
|||
}
|
||||
else if (entry.State == EntityState.Added && checkChallengeDialog.UserTypeEnum == UserTypeEnum.ProjectManager)
|
||||
{
|
||||
checkChallengeDialog.AddDomainEvent(new PMRepliedCheckChallengeEvent() { CheckChallengeDialogId = checkChallengeDialog.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
|
||||
checkChallengeDialog.AddDomainEvent(new PMRepliedCheckChallengeEvent() { IsPd = findSubjectVisit.PDState == PDStateEnum.PDProgress, CheckChallengeDialogId = checkChallengeDialog.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
|
||||
}
|
||||
|
||||
//添加进记录
|
||||
|
|
Loading…
Reference in New Issue