Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
bc6ce155c6
|
@ -22,7 +22,7 @@ namespace IRaCIS.Core.Application.Interfaces
|
||||||
|
|
||||||
Task<IResponseOutput> DeleteTrialEmailNoticeConfig(Guid trialEmailNoticeConfigId);
|
Task<IResponseOutput> DeleteTrialEmailNoticeConfig(Guid trialEmailNoticeConfigId);
|
||||||
|
|
||||||
Task BaseBusinessScenarioSendEmailAsync( Guid visitTaskId);
|
Task BaseBusinessScenarioSendEmailAsync( Guid visitTaskId, bool? isMedicalReviewAndSuggestApplyReReading = null);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,19 +28,23 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly IRepository<TrialEmailNoticeConfig> _trialEmailNoticeConfigRepository;
|
private readonly IRepository<TrialEmailNoticeConfig> _trialEmailNoticeConfigRepository;
|
||||||
|
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
|
|
||||||
|
private readonly IRepository<TaskMedicalReview> _taskMedicalReviewRepository;
|
||||||
|
|
||||||
public IRepository<VisitTask> _visitTaskRepository { get; }
|
public IRepository<VisitTask> _visitTaskRepository { get; }
|
||||||
public IRepository<TrialUser> _trialUserRepository { get; }
|
public IRepository<TrialUser> _trialUserRepository { get; }
|
||||||
|
|
||||||
public TrialEmailNoticeConfigService(IRepository<TrialEmailNoticeConfig> trialEmailNoticeConfigRepository, IRepository<VisitTask> visitTaskRepository,
|
public TrialEmailNoticeConfigService(IRepository<TrialEmailNoticeConfig> trialEmailNoticeConfigRepository, IRepository<VisitTask> visitTaskRepository,
|
||||||
IRepository<Trial> trialRepository,
|
IRepository<Trial> trialRepository,
|
||||||
IRepository<TrialUser> trialUserRepository)
|
IRepository<TrialUser> trialUserRepository, IRepository<TaskMedicalReview> taskMedicalReviewRepository)
|
||||||
{
|
{
|
||||||
_trialEmailNoticeConfigRepository = trialEmailNoticeConfigRepository;
|
_trialEmailNoticeConfigRepository = trialEmailNoticeConfigRepository;
|
||||||
_visitTaskRepository = visitTaskRepository;
|
_visitTaskRepository = visitTaskRepository;
|
||||||
this._trialRepository = trialRepository;
|
this._trialRepository = trialRepository;
|
||||||
_trialUserRepository = trialUserRepository;
|
_trialUserRepository = trialUserRepository;
|
||||||
|
_taskMedicalReviewRepository = taskMedicalReviewRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -161,13 +165,57 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private async Task<bool> DealMedicalReviewTasKGenerateAndIsSendAsync(Guid trialId, bool? isMedicalReviewAndSuggestApplyReReading,string pdAnswer, List<Guid> taskIdList, List<Guid> minUserIdList)
|
||||||
|
{
|
||||||
|
|
||||||
|
var isNeedSend = true;
|
||||||
|
|
||||||
|
if (pdAnswer == "是")
|
||||||
|
{
|
||||||
|
isNeedSend = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
if (isMedicalReviewAndSuggestApplyReReading == null)
|
||||||
|
{
|
||||||
|
isNeedSend = false;
|
||||||
|
|
||||||
|
//生成任务
|
||||||
|
foreach (var taskId in taskIdList)
|
||||||
|
{
|
||||||
|
await _taskMedicalReviewRepository.AddAsync(new TaskMedicalReview() { TrialId = trialId, VisitTaskId = taskId, MedicalManagerUserId = minUserIdList.FirstOrDefault(), AllocateTime = DateTime.Now });
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (isMedicalReviewAndSuggestApplyReReading == true)
|
||||||
|
{
|
||||||
|
//手动发送
|
||||||
|
isNeedSend = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 医学审核确认未否了 才发
|
||||||
|
isNeedSend = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return isNeedSend;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 测试邮件 带附件 填充word --前端不需要用
|
/// 测试邮件 带附件 填充word --前端不需要用
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="visitTaskId"></param>
|
/// <param name="visitTaskId"></param>
|
||||||
|
/// <param name="isMedicalReviewAndSuggestApplyReReading"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
public async Task BaseBusinessScenarioSendEmailAsync(Guid visitTaskId)
|
public async Task BaseBusinessScenarioSendEmailAsync(Guid visitTaskId, bool? isMedicalReviewAndSuggestApplyReReading)
|
||||||
{
|
{
|
||||||
|
|
||||||
CommonDocumentBusinessScenario? businessScenarioEnum = null;
|
CommonDocumentBusinessScenario? businessScenarioEnum = null;
|
||||||
|
@ -357,6 +405,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
var answer = "否";
|
var answer = "否";
|
||||||
var isNeedSend = true;
|
var isNeedSend = true;
|
||||||
|
var minUserIdList = _trialUserRepository.Where(t => t.User.UserTypeEnum == Domain.Share.UserTypeEnum.MIM && t.TrialId == taskInfo.TrialId).Select(t => t.UserId).ToList();
|
||||||
|
|
||||||
//入组确认 根据每个标准配置的是否自动发送,发送邮件与否
|
//入组确认 根据每个标准配置的是否自动发送,发送邮件与否
|
||||||
if (businessScenarioEnum == CommonDocumentBusinessScenario.EnrollConfirmed)
|
if (businessScenarioEnum == CommonDocumentBusinessScenario.EnrollConfirmed)
|
||||||
|
@ -382,13 +431,11 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (await _repository.Where<ReadingTableQuestionAnswer>().AnyAsync(x => x.VisitTaskId == visitTaskId && x.Answer == TargetState.Exist.GetEnumInt() &&
|
if (await _repository.Where<ReadingTableQuestionAnswer>().AnyAsync(x => x.VisitTaskId == visitTaskId && x.Answer == TargetState.Exist.GetEnumInt() &&
|
||||||
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && x.ReadingQuestionTrial.LesionType == LesionType.TargetLesion))
|
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && x.ReadingQuestionTrial.LesionType == LesionType.TargetLesion))
|
||||||
{
|
{
|
||||||
|
|
||||||
answer = "是";
|
answer = "是";
|
||||||
}
|
|
||||||
|
|
||||||
//把另外一个人的任务设置为不加急(如果项目加急是否 subject 加急是否)
|
//把另外一个人的任务设置为不加急(如果项目加急是否 subject 加急是否)
|
||||||
var urgent = _repository.Where<SubjectVisit>(t => t.Id == taskInfo.SourceSubjectVisitId).Select(t => new { IsSubjectUrgent = t.Subject.IsUrgent, t.Trial.IsUrgent }).FirstOrDefault();
|
var urgent = _repository.Where<SubjectVisit>(t => t.Id == taskInfo.SourceSubjectVisitId).Select(t => new { IsSubjectUrgent = t.Subject.IsUrgent, t.Trial.IsUrgent }).FirstOrDefault();
|
||||||
|
@ -399,6 +446,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
t.Id != visitTaskId && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId, u => new VisitTask() { IsUrgent = false });
|
t.Id != visitTaskId && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId, u => new VisitTask() { IsUrgent = false });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isMedicalReviewAndSuggestApplyReReading, answer, new List<Guid>() { visitTaskId }, minUserIdList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -460,6 +509,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
throw new BusinessValidationFailedException("单重有序阅片 该类型的任务不应进入此处逻辑,请联系后台开发核查!");
|
throw new BusinessValidationFailedException("单重有序阅片 该类型的任务不应进入此处逻辑,请联系后台开发核查!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isMedicalReviewAndSuggestApplyReReading, answer, new List<Guid>() { visitTaskId }, minUserIdList);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//双重
|
//双重
|
||||||
|
@ -481,6 +532,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||||
|
|
||||||
|
|
||||||
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isMedicalReviewAndSuggestApplyReReading, answer, taskList.Select(t => t.Id).ToList(), minUserIdList);
|
||||||
|
|
||||||
}
|
}
|
||||||
//双人 产生裁判,并且裁判完成 发
|
//双人 产生裁判,并且裁判完成 发
|
||||||
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
|
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
|
||||||
|
@ -488,6 +543,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
answer = await TranslatePdStateAsync(taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().Id, ReadingCategory.Judge, taskInfo.CriterionType);
|
answer = await TranslatePdStateAsync(taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().Id, ReadingCategory.Judge, taskInfo.CriterionType);
|
||||||
|
|
||||||
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isMedicalReviewAndSuggestApplyReReading, answer, taskList.Select(t => t.Id).ToList(), minUserIdList);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -496,38 +553,16 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//在阅片期 仲裁在全局阅片,不会在访视上
|
//仲裁在阅片期
|
||||||
else if (taskInfo.ArbitrationRule == ArbitrationRule.Reading)
|
else if (taskInfo.ArbitrationRule == ArbitrationRule.Reading)
|
||||||
{
|
{
|
||||||
//是访视任务 不可能是裁判任务(访视上不会生成裁判),也不会是全局任务(全局任务 SourceSubjectVisitId=null )
|
//是访视任务 不可能是裁判任务(访视上不会生成裁判),也不会是全局任务(全局任务 SourceSubjectVisitId=null )
|
||||||
if (taskInfo.SourceSubjectVisitId != null)
|
if (taskInfo.SourceSubjectVisitId != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
#region MyRegion
|
|
||||||
|
|
||||||
////看该访视是否是截止访视
|
|
||||||
//var moduleIdList = await _repository.Where<ReadModule>(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.SubjectVisitId == taskInfo.SourceSubjectVisitId && t.ReadingSetType == ReadingSetType.ImageReading)
|
|
||||||
// .Select(t => (Guid?) t.Id).ToListAsync();
|
|
||||||
|
|
||||||
////截止访视
|
|
||||||
//if (moduleIdList.Count > 0)
|
|
||||||
//{
|
|
||||||
// //截止访视,需要等待生成全局,完成全局再发
|
|
||||||
|
|
||||||
// isNeedSend = false;
|
|
||||||
|
|
||||||
//}
|
|
||||||
////非截止访视 CRC在该访视设置PD后,在提交的时候,生成了阅片期,一定会生成全局任务
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
|
|
||||||
// isNeedSend = false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
//访视类型的任务 根本就不需要发送邮件
|
//访视类型的任务 根本就不需要发送邮件
|
||||||
|
|
||||||
isNeedSend = false;
|
isNeedSend = false;
|
||||||
|
@ -544,6 +579,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||||
|
|
||||||
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isMedicalReviewAndSuggestApplyReReading, answer, taskList.Select(t => t.Id).ToList(), minUserIdList);
|
||||||
}
|
}
|
||||||
//双人全局产生裁判
|
//双人全局产生裁判
|
||||||
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Global).Count() == 2)
|
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Global).Count() == 2)
|
||||||
|
@ -551,6 +588,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
answer = await TranslatePdStateAsync(taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().Id, ReadingCategory.Judge, taskInfo.CriterionType);
|
answer = await TranslatePdStateAsync(taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().Id, ReadingCategory.Judge, taskInfo.CriterionType);
|
||||||
|
|
||||||
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isMedicalReviewAndSuggestApplyReReading, answer, taskList.Select(t => t.Id).ToList(), minUserIdList);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -569,19 +608,19 @@ namespace IRaCIS.Core.Application.Service
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
//throw new BusinessValidationFailedException("双重有序阅片 没有定义该仲裁规则处理逻辑,请联系业务和后台开发核查!");
|
throw new BusinessValidationFailedException("双重有序阅片 没有定义该仲裁规则处理逻辑,请联系业务和后台开发核查!");
|
||||||
|
|
||||||
//只发第一个人
|
////只发第一个人
|
||||||
if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false &&
|
//if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false &&
|
||||||
t.Id != visitTaskId && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId))
|
//t.Id != visitTaskId && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId))
|
||||||
{
|
//{
|
||||||
isNeedSend = false;
|
// isNeedSend = false;
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
|
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
// answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -602,6 +641,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
if (taskInfo.ReadingType == ReadingMethod.Single && taskInfo.ArbitrationRule == ArbitrationRule.None)
|
if (taskInfo.ReadingType == ReadingMethod.Single && taskInfo.ArbitrationRule == ArbitrationRule.None)
|
||||||
{
|
{
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||||
|
|
||||||
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isMedicalReviewAndSuggestApplyReReading, answer, new List<Guid>() { visitTaskId }, minUserIdList);
|
||||||
}
|
}
|
||||||
//双重 截止访视只在阅片期的时候存在 要求PD确认的访视 肯定是非截止访视
|
//双重 截止访视只在阅片期的时候存在 要求PD确认的访视 肯定是非截止访视
|
||||||
else if (taskInfo.ReadingType == ReadingMethod.Double && taskInfo.ArbitrationRule == ArbitrationRule.Visit)
|
else if (taskInfo.ReadingType == ReadingMethod.Double && taskInfo.ArbitrationRule == ArbitrationRule.Visit)
|
||||||
|
@ -615,11 +656,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||||
|
|
||||||
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isMedicalReviewAndSuggestApplyReReading, answer, taskList.Select(t => t.Id).ToList(), minUserIdList);
|
||||||
}
|
}
|
||||||
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
|
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
answer = await TranslatePdStateAsync(taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().Id, ReadingCategory.Judge, taskInfo.CriterionType);
|
answer = await TranslatePdStateAsync(taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().Id, ReadingCategory.Judge, taskInfo.CriterionType);
|
||||||
|
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isMedicalReviewAndSuggestApplyReReading, answer, taskList.Select(t => t.Id).ToList(), minUserIdList);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -630,25 +675,32 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//throw new BusinessValidationFailedException("无序阅片配置有误(应为单重无仲裁对象,双重针对访视仲裁),请核查!");
|
throw new BusinessValidationFailedException("无序阅片配置有误(应为单重无仲裁对象,双重针对访视仲裁),请核查!");
|
||||||
|
|
||||||
|
|
||||||
//只发第一个人
|
////只发第一个人
|
||||||
if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false &&
|
//if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false &&
|
||||||
t.Id != visitTaskId && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId))
|
//t.Id != visitTaskId && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId))
|
||||||
{
|
//{
|
||||||
isNeedSend = false;
|
// isNeedSend = false;
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
|
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
// answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory, taskInfo.CriterionType);
|
||||||
}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -750,17 +802,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
if (answer == OverallAssessment.PD.GetEnumInt())
|
if (answer == OverallAssessment.PD.GetEnumInt())
|
||||||
{
|
{
|
||||||
return "是";
|
answer = "是";
|
||||||
}
|
}
|
||||||
//if (answer == OverallAssessment.NA.GetEnumInt())
|
|
||||||
//{
|
|
||||||
// return "NA";
|
|
||||||
//}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return "否";
|
answer = "否";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case CriterionType.PCWG3:
|
case CriterionType.PCWG3:
|
||||||
if (readingCategory == ReadingCategory.Visit)
|
if (readingCategory == ReadingCategory.Visit)
|
||||||
{
|
{
|
||||||
|
@ -791,20 +841,21 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
if (answer == VisitTumorEvaluation.PD.GetEnumInt())
|
if (answer == VisitTumorEvaluation.PD.GetEnumInt())
|
||||||
{
|
{
|
||||||
return "是";
|
answer = "是";
|
||||||
}
|
}
|
||||||
if (answer == VisitTumorEvaluation.ND.GetEnumInt())
|
if (answer == VisitTumorEvaluation.ND.GetEnumInt())
|
||||||
{
|
{
|
||||||
return "ND";
|
answer = "ND";
|
||||||
}
|
}
|
||||||
if (answer == VisitTumorEvaluation.NE.GetEnumInt())
|
if (answer == VisitTumorEvaluation.NE.GetEnumInt())
|
||||||
{
|
{
|
||||||
return "NE";
|
answer = "NE";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return "否";
|
answer = "否";
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case CriterionType.SelfDefine:
|
case CriterionType.SelfDefine:
|
||||||
case CriterionType.mRECISTMesothelioma:
|
case CriterionType.mRECISTMesothelioma:
|
||||||
case CriterionType.RECIL:
|
case CriterionType.RECIL:
|
||||||
|
@ -827,7 +878,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return answer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
private readonly IRepository<ReadingMedicineQuestionAnswer> _readingMedicineQuestionAnswerRepository;
|
private readonly IRepository<ReadingMedicineQuestionAnswer> _readingMedicineQuestionAnswerRepository;
|
||||||
private readonly IRepository<ReadingMedicineSystemQuestion> _readingMedicineSystemQuestionRepository;
|
private readonly IRepository<ReadingMedicineSystemQuestion> _readingMedicineSystemQuestionRepository;
|
||||||
|
|
||||||
|
private readonly ITrialEmailNoticeConfigService _trialEmailNoticeConfigService;
|
||||||
|
|
||||||
public ReadingMedicalReviewService(
|
public ReadingMedicalReviewService(
|
||||||
IRepository<ReadingMedicineTrialQuestion> readingMedicineTrialQuestionRepository,
|
IRepository<ReadingMedicineTrialQuestion> readingMedicineTrialQuestionRepository,
|
||||||
IRepository<Trial> trialRepository,
|
IRepository<Trial> trialRepository,
|
||||||
|
@ -54,7 +56,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
IRepository<ReadingMedicalReviewDialog> readingMedicalReviewDialogRepository,
|
IRepository<ReadingMedicalReviewDialog> readingMedicalReviewDialogRepository,
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial,
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial,
|
||||||
IRepository<ReadingMedicineQuestionAnswer> readingMedicineQuestionAnswerRepository,
|
IRepository<ReadingMedicineQuestionAnswer> readingMedicineQuestionAnswerRepository,
|
||||||
IRepository<ReadingMedicineSystemQuestion> readingMedicineSystemQuestionRepository
|
IRepository<ReadingMedicineSystemQuestion> readingMedicineSystemQuestionRepository,
|
||||||
|
ITrialEmailNoticeConfigService trialEmailNoticeConfigService
|
||||||
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this._readingMedicineTrialQuestionRepository = readingMedicineTrialQuestionRepository;
|
this._readingMedicineTrialQuestionRepository = readingMedicineTrialQuestionRepository;
|
||||||
|
@ -72,6 +76,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
||||||
this._readingMedicineQuestionAnswerRepository = readingMedicineQuestionAnswerRepository;
|
this._readingMedicineQuestionAnswerRepository = readingMedicineQuestionAnswerRepository;
|
||||||
this._readingMedicineSystemQuestionRepository = readingMedicineSystemQuestionRepository;
|
this._readingMedicineSystemQuestionRepository = readingMedicineSystemQuestionRepository;
|
||||||
|
_trialEmailNoticeConfigService = trialEmailNoticeConfigService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -678,6 +683,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
AuditSignTime=DateTime.Now,
|
AuditSignTime=DateTime.Now,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(medicalReviewInfo.VisitTaskId, true&& medicalReviewInfo.IsApplyHeavyReading);
|
||||||
|
|
||||||
var result = await _taskMedicalReviewRepository.SaveChangesAsync();
|
var result = await _taskMedicalReviewRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Result(result);
|
return ResponseOutput.Result(result);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue