Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
This commit is contained in:
@@ -115,7 +115,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
public async Task AddConvertedTask(Guid taskId)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == taskId).IgnoreAutoIncludes().AsNoTracking().FirstNotNullAsync();
|
||||
taskInfo.ReadingTaskState = ReadingTaskState.WaitReading;
|
||||
@@ -148,7 +148,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
await _visitTaskRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
//为防止脏数据 这里也多判断一次
|
||||
var existCurrentVisitTaskList = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId
|
||||
&& t.TrialReadingCriterionId == trialReadingCriterionConfig.TrialReadingCriterionId && t.TaskState == TaskState.Effect
|
||||
&& t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.SourceSubjectVisitId == subjectVisit.Id).ToList();
|
||||
&& t.SourceSubjectVisitId == subjectVisit.Id).ToList();
|
||||
|
||||
if (trialReadingCriterionConfig.ReadingType == ReadingMethod.Double)
|
||||
{
|
||||
@@ -1290,6 +1290,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
//加一个去重的判断 IR 申请重阅的时候,有脏数据 (例如多个follow 2 ),但是生成时候不生成
|
||||
|
||||
//var existTask = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == reReadingVisitTask.SubjectId
|
||||
//&& t.TrialReadingCriterionId == reReadingVisitTask.TrialReadingCriterionId && t.TaskState == TaskState.Effect
|
||||
// && t.SourceSubjectVisitId == reReadingVisitTask.SourceSubjectVisitId && t.ArmEnum == reReadingVisitTask.ArmEnum && t.DoctorUserId == reReadingVisitTask.DoctorUserId).FirstOrDefault();
|
||||
|
||||
|
||||
var newTask = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
{
|
||||
|
||||
@@ -1322,7 +1327,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IsNeedClinicalDataSign = reReadingVisitTask.IsNeedClinicalDataSign,
|
||||
IsClinicalDataSign = reReadingVisitTask.IsClinicalDataSign,
|
||||
BeforeConvertedTaskId = reReadingVisitTask.BeforeConvertedTaskId,
|
||||
ReReadingApplyState= ReReadingApplyState.Default,
|
||||
ReReadingApplyState = ReReadingApplyState.Default,
|
||||
// TaskAllocationState = reReadingVisitTask.TaskAllocationState,
|
||||
// AllocateTime = DateTime.Now,
|
||||
//DoctorUserId = reReadingVisitTask.DoctorUserId,
|
||||
|
||||
@@ -1538,6 +1538,9 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
//是否是一致性分析任务 正常申请 会影响一致性分析任务
|
||||
filterExpression = filterExpression.And(t => t.IsAnalysisCreate == origenalTask.IsAnalysisCreate);
|
||||
|
||||
//IR 申请1.1 基线重阅,影响附加评估两个IR所有的任务
|
||||
var isIR1Point1AdditionalAssessmentBaseline = false;
|
||||
|
||||
//附加评估 IR 和PM 看到的影响列表不一样
|
||||
|
||||
//1.1 有附加评估,会影响其他标准的任务
|
||||
@@ -1555,7 +1558,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
// 1.1 基线任务影响BM任务
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && _subjectVisitRepository.Any(t => t.Id == origenalTask.SourceSubjectVisitId && t.IsBaseLine == true))
|
||||
{
|
||||
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
|
||||
|
||||
isIR1Point1AdditionalAssessmentBaseline = true;
|
||||
|
||||
//filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
|
||||
}
|
||||
// 1.1 非基线任务不影响BM任务
|
||||
else
|
||||
@@ -1795,6 +1801,17 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
)) || t.Id == origenalTask.Id)
|
||||
;
|
||||
}
|
||||
else if (isIR1Point1AdditionalAssessmentBaseline)
|
||||
{
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum &&
|
||||
(((
|
||||
((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId)
|
||||
// 裁判 肿瘤学是另外的医生做
|
||||
|| t.ReadingCategory == ReadingCategory.Judge
|
||||
|| t.ReadingCategory == ReadingCategory.Oncology
|
||||
) && t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId) || (t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB))
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum &&
|
||||
@@ -2579,7 +2596,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
|
||||
filterExpression = filterExpression.And(t => t.IsAnalysisCreate == filterObj.IsAnalysisCreate);
|
||||
|
||||
|
||||
//IR 申请1.1 基线重阅,影响附加评估所有的任务
|
||||
var isIR1Point1AdditionalAssessmentBaseline = false;
|
||||
|
||||
//附加评估 IR 和PM 看到的影响列表不一样
|
||||
if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment)
|
||||
@@ -2593,7 +2611,11 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
// 1.1 基线任务影响BM任务
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && _subjectVisitRepository.Any(t=>t.Id==filterObj.SourceSubjectVisitId && t.IsBaseLine==true))
|
||||
{
|
||||
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
|
||||
|
||||
isIR1Point1AdditionalAssessmentBaseline=true;
|
||||
//filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
|
||||
|
||||
|
||||
}
|
||||
// 1.1 非基线任务不影响BM任务
|
||||
else
|
||||
@@ -2629,27 +2651,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null))
|
||||
{
|
||||
|
||||
|
||||
//if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment)
|
||||
//{
|
||||
// if(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
|
||||
// {
|
||||
// filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId);
|
||||
// }
|
||||
|
||||
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// //默认影响的都是该标准的任务
|
||||
// filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId);
|
||||
//}
|
||||
|
||||
|
||||
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
|
||||
|
||||
//有序
|
||||
@@ -2662,11 +2663,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
//影响当前医生 以及当前医生之后的 1、访视任务 已经读完的
|
||||
//2、后续任务如果是全局、肿瘤学阅片任务,状态为阅片完成标记为重阅重置;若在阅片中,则标记为失效;若为待阅片,则标记为失效;
|
||||
//3、当前任务、后续访视任务或者全局任务触发了裁判任务,若裁判任务状态为阅片完成,则标记为重阅重置;若在阅片中或待阅片,则标记为失效
|
||||
// filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
|
||||
//((t.DoctorUserId == filterObj.DoctorUserId && ((t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned) || t.ReadingCategory == ReadingCategory.Global))
|
||||
// ||
|
||||
// t.ReadingCategory == ReadingCategory.Judge || t.ReadingCategory == ReadingCategory.Oncology)
|
||||
// );
|
||||
|
||||
//申请的是转化的,那么影响列表要排除转化之前的
|
||||
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && filterObj.BeforeConvertedTaskId != null)
|
||||
@@ -2682,6 +2678,18 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
)) || t.Id == filterObj.Id)
|
||||
;
|
||||
}
|
||||
// IR 申请1.1 基线重阅,影响附加评估所有的任务
|
||||
else if (isIR1Point1AdditionalAssessmentBaseline)
|
||||
{
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
|
||||
(((
|
||||
((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == filterObj.DoctorUserId)
|
||||
// 裁判 肿瘤学是另外的医生做
|
||||
|| t.ReadingCategory == ReadingCategory.Judge
|
||||
|| t.ReadingCategory == ReadingCategory.Oncology
|
||||
)&& t.TrialReadingCriterionId==filterObj.TrialReadingCriterionId )||( t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB))
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
|
||||
|
||||
@@ -67,9 +67,9 @@ namespace IRaCIS.Application.Services
|
||||
ReviewerSelectionQueryDTO selectionQuery)
|
||||
{
|
||||
//项目配置需要的医生过滤 2表示混合
|
||||
var trialConfig = await _repository.Where<Trial>(s => s.Id == selectionQuery.TrialId).Select(t=>new { t.AttendedReviewerType ,t.TrialType} ).FirstOrDefaultAsync().IfNullThrowException();
|
||||
var trialConfig = await _repository.Where<Trial>(s => s.Id == selectionQuery.TrialId).Select(t=>new { t.AttendedReviewerTypeEnumList ,t.TrialType} ).FirstOrDefaultAsync().IfNullThrowException();
|
||||
|
||||
var nation = trialConfig.AttendedReviewerType;
|
||||
//var nation = trialConfig.AttendedReviewerType;
|
||||
// 临床项目经验 多选
|
||||
var evaluationCriteriaCount = selectionQuery.EvaluationCriteriaIdList.Count();
|
||||
|
||||
@@ -78,7 +78,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
var guidList = selectionQuery.ReadingTypeIdList.Concat(selectionQuery.SubspecialityIdList).Concat(selectionQuery.TitleIdList);
|
||||
|
||||
var query = _doctorRepository.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation)
|
||||
var query = _doctorRepository/*.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation)*/
|
||||
|
||||
.WhereIf(selectionQuery.DepartmentId != null, t => t.DepartmentId == selectionQuery.DepartmentId)
|
||||
.WhereIf(selectionQuery.SpecialityId != null, t => t.SpecialityId == selectionQuery.SpecialityId)
|
||||
.WhereIf(trialConfig.TrialType == TrialType.NoneOfficial, t => t.IsVirtual ==true)
|
||||
|
||||
@@ -174,6 +174,6 @@ namespace IRaCIS.Application.Contracts
|
||||
public DateTime BeginDate { get; set; }
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
public AttendedReviewerType? AttendedReviewerType { get; set; }
|
||||
//public AttendedReviewerType? AttendedReviewerType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -552,10 +552,12 @@ namespace IRaCIS.Application.Services
|
||||
trialLambda = trialLambda.And(u => u.TrialCode.Contains(trialCode));
|
||||
}
|
||||
|
||||
if (queryParam.AttendedReviewerType != null)
|
||||
{
|
||||
trialLambda = trialLambda.And(u => u.AttendedReviewerType == queryParam.AttendedReviewerType);
|
||||
}
|
||||
//if (queryParam.AttendedReviewerType != null)
|
||||
//{
|
||||
// trialLambda = trialLambda.And(u => u.AttendedReviewerType == queryParam.AttendedReviewerType);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
Expression<Func<Doctor, bool>> doctorLambda = x => true;
|
||||
|
||||
@@ -936,15 +938,17 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
trialLambda = trialLambda.And(u => u.CROId == param.CroId);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(param.TrialCode))
|
||||
{
|
||||
var trialCode = param.TrialCode.Trim();
|
||||
trialLambda = trialLambda.And(u => u.TrialCode.Contains(trialCode));
|
||||
}
|
||||
if (param.AttendedReviewerType != null)
|
||||
{
|
||||
trialLambda = trialLambda.And(u => u.AttendedReviewerType == param.AttendedReviewerType);
|
||||
}
|
||||
|
||||
//if (param.AttendedReviewerType != null)
|
||||
//{
|
||||
// trialLambda = trialLambda.And(u => u.AttendedReviewerType == param.AttendedReviewerType);
|
||||
//}
|
||||
|
||||
var lockedPaymentIdAndYearMonth = _paymentRepository.Where(t => t.IsLock && t.YearMonthDate >= bDate && t.YearMonthDate <= eDate).Select(t => new { PaymentId = t.Id, t.YearMonth, t.DoctorId });
|
||||
|
||||
|
||||
@@ -148,7 +148,8 @@ namespace IRaCIS.Application.Contracts
|
||||
|
||||
//医生付费类型 CN US
|
||||
public int? Nation { get; set; }
|
||||
public AttendedReviewerType? AttendedReviewerType { get; set; }
|
||||
|
||||
//public AttendedReviewerType? AttendedReviewerType { get; set; }
|
||||
}
|
||||
|
||||
public class StatisticsWorkloadQueryParam : PageInput
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace IRaCIS.Application.Contracts
|
||||
{
|
||||
@@ -30,7 +31,7 @@ namespace IRaCIS.Application.Contracts
|
||||
public int? GRRReviewers { get; set; }
|
||||
public int TotalReviewers { get; set; }
|
||||
public int? Expedited { get; set; }
|
||||
public int? AttendedReviewerType { get; set; }
|
||||
|
||||
|
||||
//研究方案号
|
||||
public string ResearchProgramNo { get; set; } = string.Empty;
|
||||
@@ -44,12 +45,20 @@ namespace IRaCIS.Application.Contracts
|
||||
// 负责人PI
|
||||
public string HeadPI { get; set; } = string.Empty;
|
||||
|
||||
public Guid DeclarationTypeId { get; set; }
|
||||
//public Guid DeclarationTypeId { get; set; }
|
||||
//public int? AttendedReviewerType { get; set; }
|
||||
|
||||
public Guid IndicationTypeId { get; set; }
|
||||
public Guid? PhaseId { get; set; }
|
||||
|
||||
|
||||
public List<DeclarationType> DeclarationTypeEnumList { get; set; }
|
||||
|
||||
public List<AttendedReviewerType> AttendedReviewerTypeEnumList { get; set; }
|
||||
public string DeclarationTypes { get; set; }=string.Empty;
|
||||
public string AttendedReviewerTypes { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -116,7 +125,7 @@ namespace IRaCIS.Application.Contracts
|
||||
//统计字段
|
||||
public string Phase { get; set; } = string.Empty;
|
||||
|
||||
public string DeclarationType { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string IndicationType { get; set; } = string.Empty;
|
||||
|
||||
@@ -140,6 +149,9 @@ namespace IRaCIS.Application.Contracts
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
public bool IsLocked { get; set; }
|
||||
|
||||
|
||||
//public string DeclarationType { get; set; } = string.Empty;
|
||||
//public int? SubjectCount { get; set; }
|
||||
|
||||
//public int? StudyCount { get; set; } = 0;
|
||||
@@ -174,7 +186,11 @@ namespace IRaCIS.Application.Contracts
|
||||
|
||||
public class TrialQueryDTO : PageInput
|
||||
{
|
||||
public Guid? DeclarationTypeId { get; set; }
|
||||
//public Guid? DeclarationTypeId { get; set; }
|
||||
|
||||
public List<DeclarationType> DeclarationTypeEnumList { get; set; }=new List<DeclarationType>();
|
||||
|
||||
public List<AttendedReviewerType> AttendedReviewerTypeEnumList { get; set; } = new List<AttendedReviewerType>();
|
||||
|
||||
public Guid? IndicationTypeId { get; set; }
|
||||
public Guid? SponsorId { get; set; }
|
||||
@@ -200,7 +216,7 @@ namespace IRaCIS.Application.Contracts
|
||||
public DateTime? BeginDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public int? Expedited { get; set; }
|
||||
public AttendedReviewerType? AttendedReviewerType { get; set; }
|
||||
//public AttendedReviewerType? AttendedReviewerType { get; set; }
|
||||
}
|
||||
|
||||
public class ReviewerTrialQueryDTO : PageInput
|
||||
|
||||
@@ -9,6 +9,8 @@ using IRaCIS.Core.Infrastructure;
|
||||
using Microsoft.Extensions.Options;
|
||||
using static IRaCIS.Core.Domain.Share.StaticData;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using System.Linq.Expressions;
|
||||
using System.Linq;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
@@ -49,6 +51,23 @@ namespace IRaCIS.Application.Services
|
||||
var multiCriteriaSelectCount = searchParam.CriterionIds.Count;
|
||||
var multiReviewTypeSelectCount = searchParam.ReviewTypeIds.Count;
|
||||
|
||||
Expression<Func<Trial, bool>> trialDeclarationTypeExpression = x => true;
|
||||
|
||||
|
||||
|
||||
foreach (var item in searchParam.DeclarationTypeEnumList)
|
||||
{
|
||||
trialDeclarationTypeExpression = trialDeclarationTypeExpression.And(t => t.DeclarationTypes.Contains($"|{item}|"));
|
||||
}
|
||||
|
||||
Expression<Func<Trial, bool>> trialAttendedReviewerTypeExpression = x => true;
|
||||
|
||||
foreach (var item in searchParam.AttendedReviewerTypeEnumList)
|
||||
{
|
||||
trialAttendedReviewerTypeExpression = trialAttendedReviewerTypeExpression.And(t => t.AttendedReviewerTypes.Contains($"|{item}|"));
|
||||
}
|
||||
|
||||
|
||||
var query = _trialRepository.AsQueryable().IgnoreQueryFilters()
|
||||
.WhereIf(!string.IsNullOrEmpty(searchParam.TrialStatusStr), o => o.TrialStatusStr.Contains(searchParam.TrialStatusStr))
|
||||
.WhereIf(searchParam.SponsorId != null, o => o.SponsorId == searchParam.SponsorId)
|
||||
@@ -58,12 +77,17 @@ namespace IRaCIS.Application.Services
|
||||
.WhereIf(!string.IsNullOrEmpty(searchParam.ResearchProgramNo), o => o.ResearchProgramNo.Contains(searchParam.ResearchProgramNo))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(searchParam.ExperimentName), o => o.ExperimentName.Contains(searchParam.ExperimentName))
|
||||
.WhereIf(searchParam.PhaseId != null, o => o.PhaseId == searchParam.PhaseId)
|
||||
.WhereIf(searchParam.DeclarationTypeId != null, o => o.DeclarationTypeId == searchParam.DeclarationTypeId)
|
||||
|
||||
.WhereIf(searchParam.DeclarationTypeEnumList.Count>0 , trialDeclarationTypeExpression)
|
||||
.WhereIf(searchParam.AttendedReviewerTypeEnumList.Count > 0, trialAttendedReviewerTypeExpression)
|
||||
|
||||
//.WhereIf(searchParam.AttendedReviewerType != null, o => o.AttendedReviewerType == searchParam.AttendedReviewerType)
|
||||
|
||||
.WhereIf(searchParam.IndicationTypeId != null, o => o.IndicationTypeId == searchParam.IndicationTypeId)
|
||||
.WhereIf(searchParam.CROId != null, o => o.CROId == searchParam.CROId)
|
||||
.WhereIf(searchParam.BeginDate != null, o => o.CreateTime >= searchParam.BeginDate)
|
||||
.WhereIf(searchParam.EndDate != null, o => o.CreateTime <= searchParam.EndDate)
|
||||
.WhereIf(searchParam.AttendedReviewerType != null, o => o.AttendedReviewerType == searchParam.AttendedReviewerType)
|
||||
|
||||
.WhereIf(multiModalityIdSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Modality) == multiModalityIdSelectCount)
|
||||
.WhereIf(multiCriteriaSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Criterion) == multiCriteriaSelectCount)
|
||||
.WhereIf(multiReviewTypeSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.ReviewType) == multiReviewTypeSelectCount)
|
||||
@@ -171,6 +195,9 @@ namespace IRaCIS.Application.Services
|
||||
trial.TrialCode = (trial.TrialType == TrialType.NoneOfficial ? "T0" : yearStr.Substring(yearStr.Length - 2)) + trial.TrialCode + currentYearMaxCodeNext.ToString("D3");
|
||||
|
||||
|
||||
trial.DeclarationTypes = $"|{string.Join('|', trialAddModel.DeclarationTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|";
|
||||
trial.AttendedReviewerTypes = $"|{string.Join('|', trialAddModel.AttendedReviewerTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|";
|
||||
|
||||
//多选信息
|
||||
trialAddModel.ModalityIds.ForEach(modalityId => trial.TrialDicList.Add(new TrialDictionary() { DictionaryId = modalityId, KeyName = StaticData.Modality, TrialId = trial.Id }));
|
||||
trialAddModel.CriterionIds.ForEach(criterionId => trial.TrialDicList.Add(new TrialDictionary() { DictionaryId = criterionId, KeyName = StaticData.Criterion, TrialId = trial.Id }));
|
||||
@@ -242,6 +269,9 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
_mapper.Map(updateModel, trial);
|
||||
|
||||
trial.DeclarationTypes = $"|{string.Join('|', updateModel.DeclarationTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|";
|
||||
trial.AttendedReviewerTypes = $"|{string.Join('|', updateModel.AttendedReviewerTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|";
|
||||
|
||||
var success = await _repository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(trial);
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
//.ForMember(d => d.Code, u => u.MapFrom(s => s.TrialCode))
|
||||
.ForMember(d => d.Sponsor, u => u.MapFrom(s => s.Sponsor.SponsorName))
|
||||
.ForMember(d => d.Phase, u => u.MapFrom(s => s.Phase.MappedValue))
|
||||
.ForMember(d => d.DeclarationType, u => u.MapFrom(s => s.DeclarationType.MappedValue))
|
||||
//.ForMember(d => d.DeclarationType, u => u.MapFrom(s => s.DeclarationType.MappedValue))
|
||||
.ForMember(d => d.IndicationType, u => u.MapFrom(s => s.IndicationType.MappedValue))
|
||||
.ForMember(d => d.CRO, u => u.MapFrom(s => s.CRO.CROName))
|
||||
.ForMember(d => d.ReviewMode, u => u.MapFrom(s => s.ReviewMode.MappedValue))
|
||||
|
||||
Reference in New Issue
Block a user