修改项目配置稽查
parent
70ac13c8d4
commit
e22a4a097d
|
@ -113,26 +113,39 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
var type = GetEntityAuditOpt(item);
|
||||
|
||||
var entity = item.Entity as Trial;
|
||||
List<string> trialDics = new List<string>();
|
||||
var dictionaryIds = new List<Guid>();
|
||||
if (entity.TrialDicList == null || entity.TrialDicList.Count == 0)
|
||||
{
|
||||
dictionaryIds = await this._dbContext.TrialDictionary.Where(x => x.TrialId == entity.Id && x.KeyName == "Criterion").Select(x => x.DictionaryId).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
dictionaryIds = entity.TrialDicList.Select(x => x.DictionaryId).ToList();
|
||||
}
|
||||
|
||||
trialDics = await this._dbContext.Dictionary.Where(x => dictionaryIds.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync();
|
||||
//阅片标准
|
||||
var criterionNameList = await _dbContext.ReadingQuestionCriterionTrial.Where(t => t.TrialId == entity.Id && t.IsConfirm).OrderBy(t => t.ShowOrder).Select(t => t.CriterionName).ToListAsync();
|
||||
|
||||
//临床数据配置
|
||||
var clinicalDataSetNameList = await _dbContext.ClinicalDataTrialSet.Where(t => t.TrialId == entity.Id && t.IsConfirm).Select(t => t.ClinicalDataSetName).ToListAsync();
|
||||
|
||||
|
||||
|
||||
//List<string> trialDics = new List<string>();
|
||||
//var dictionaryIds = new List<Guid>();
|
||||
//if (entity.TrialDicList == null || entity.TrialDicList.Count == 0)
|
||||
//{
|
||||
// dictionaryIds = await this._dbContext.TrialDictionary.Where(x => x.TrialId == entity.Id && x.KeyName == "Criterion").Select(x => x.DictionaryId).ToListAsync();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// dictionaryIds = entity.TrialDicList.Select(x => x.DictionaryId).ToList();
|
||||
//}
|
||||
//trialDics = await this._dbContext.Dictionary.Where(x => dictionaryIds.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync();
|
||||
|
||||
await InsertInspection<Trial>(item.Entity as Trial, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
TrialId = x.Id,
|
||||
}, new
|
||||
{
|
||||
TrialDicList = string.Join(",", trialDics)
|
||||
});
|
||||
//TrialDicList = string.Join(",", trialDics)
|
||||
|
||||
CriterionNames = criterionNameList.Count() > 0? string.Join(",", criterionNameList):string.Empty,
|
||||
|
||||
ClinicalDataSetNames = clinicalDataSetNameList.Count() > 0 ? string.Join(",", clinicalDataSetNameList):String.Empty,
|
||||
|
||||
}); ;
|
||||
}
|
||||
|
||||
|
||||
|
@ -183,7 +196,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
var isDistinctionInterface = false;
|
||||
|
||||
//设置项目配置 肿瘤学配置 和阅片标准配置
|
||||
if (_userInfo.RequestUrl == "TrialConfig/setOncologySet" || _userInfo.RequestUrl == "TrialConfig/setTrialReadingCriterion"|| _userInfo.RequestUrl== "configTrialBasicInfo/ConfigTrialProcessInfoConfirm")
|
||||
if (_userInfo.RequestUrl == "TrialConfig/setOncologySet" || _userInfo.RequestUrl == "TrialConfig/setTrialReadingCriterion" || _userInfo.RequestUrl == "configTrialBasicInfo/ConfigTrialProcessInfoConfirm"
|
||||
)
|
||||
{
|
||||
isDistinctionInterface = true;
|
||||
}
|
||||
|
@ -191,7 +205,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
//同步的数据 后面加"/Auto" 因为同步的地方可能会改 所以取反
|
||||
var extraIdentification = string.Empty;
|
||||
if (_userInfo.RequestUrl!= "ReadingQuestion/addOrUpdateReadingQuestionCriterionTrial" && type==AuditOpt.Add)
|
||||
if (_userInfo.RequestUrl != "ReadingQuestion/addOrUpdateReadingQuestionCriterionTrial" && type == AuditOpt.Add)
|
||||
{
|
||||
extraIdentification = "/Auto";
|
||||
}
|
||||
|
@ -205,7 +219,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
ObjectRelationParentId = x.TrialId,
|
||||
|
||||
ExtraIndentification=extraIdentification
|
||||
ExtraIndentification = extraIdentification
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -287,7 +301,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
ObjectRelationParentId = x.TrialId,
|
||||
|
||||
ExtraIndentification=extraIdentification
|
||||
ExtraIndentification = extraIdentification
|
||||
|
||||
}, new { ParentQuestionShowOrder = parentQuestionShowOrder, RelavantQuestionShowOrder = relavantQuestionShowOrder });
|
||||
}
|
||||
|
@ -369,7 +383,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
ObjectRelationParentId = x.TrialId,
|
||||
|
||||
ExtraIndentification=extraIdentification
|
||||
ExtraIndentification = extraIdentification
|
||||
|
||||
}, new { ParentQuestionShowOrder = parentQuestionShowOrder, RelavantQuestionShowOrder = relavantQuestionShowOrder, DependQuestionShowOrder = dependQuestionShowOrder });
|
||||
}
|
||||
|
@ -403,7 +417,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
var extraIdentification = string.Empty;
|
||||
|
||||
//同步添加
|
||||
if (_userInfo.RequestUrl != "OrganInfo/batchAddTrialOrgan" && organTrialEntityEnrtyList.Any( t=>GetEntityAuditOpt(t) == AuditOpt.Add) )
|
||||
if (_userInfo.RequestUrl != "OrganInfo/batchAddTrialOrgan" && organTrialEntityEnrtyList.Any(t => GetEntityAuditOpt(t) == AuditOpt.Add))
|
||||
{
|
||||
extraIdentification = "/Auto";
|
||||
|
||||
|
@ -439,7 +453,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
{
|
||||
QuestionAnswerList = list.Join(organList, t => t.OrganInfoId, u => u.Id, (t, u) => u).OrderBy(t => t.ShowOrder).ToList(),
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -483,7 +497,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
{
|
||||
extraIdentification = "/IsTrial";
|
||||
|
||||
if(_userInfo.RequestUrl!= "OrganInfo/addOrUpdateCriterionNidus" && type==AuditOpt.Add)
|
||||
if (_userInfo.RequestUrl != "OrganInfo/addOrUpdateCriterionNidus" && type == AuditOpt.Add)
|
||||
{
|
||||
extraIdentification = "/IsTrial/Auto";
|
||||
}
|
||||
|
@ -499,9 +513,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
TrialReadingCriterionId = entity.IsSystemCriterion == false ? entity.CriterionId : null,
|
||||
|
||||
ExtraIndentification=extraIdentification
|
||||
ExtraIndentification = extraIdentification
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -572,7 +586,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
//不显示区分接口 通过是否是系统字典 以及字典Code 区分
|
||||
IsDistinctionInterface = false,
|
||||
ExtraIndentification=extraIdentification
|
||||
ExtraIndentification = extraIdentification
|
||||
|
||||
},
|
||||
new
|
||||
|
@ -697,7 +711,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
var extraIdentification = string.Empty;
|
||||
|
||||
//失效的时候 不区分标识
|
||||
if (_userInfo.UserTypeEnumInt==(int)UserTypeEnum.MIM)
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.MIM)
|
||||
{
|
||||
extraIdentification = $"/MIM";
|
||||
}
|
||||
|
@ -713,7 +727,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
ObjectRelationParentId = entity.TaskMedicalReviewId,
|
||||
|
||||
ExtraIndentification=extraIdentification
|
||||
ExtraIndentification = extraIdentification
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -730,7 +744,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
var extraIdentification = string.Empty;
|
||||
|
||||
//失效的时候 不区分标识
|
||||
if (_dbContext.Entry(entity).Property(t => t.IsInvalid).IsModified == true && entity.IsInvalid==true)
|
||||
if (_dbContext.Entry(entity).Property(t => t.IsInvalid).IsModified == true && entity.IsInvalid == true)
|
||||
{
|
||||
extraIdentification = $"/Invalid";
|
||||
}
|
||||
|
@ -745,7 +759,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
ExtraIndentification = extraIdentification,
|
||||
|
||||
IsDistinctionInterface= (type==AuditOpt.Add || extraIdentification !=String.Empty)?false:true
|
||||
IsDistinctionInterface = (type == AuditOpt.Add || extraIdentification != String.Empty) ? false : true
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1547,7 +1561,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
{
|
||||
IsDistinctionInterface = false,
|
||||
ObjectRelationParentId = entity.TrialId,
|
||||
ExtraIndentification=extraIdentification,
|
||||
ExtraIndentification = extraIdentification,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1989,11 +2003,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
QuestionId = u.ReadingQuestionTrialId,
|
||||
u.Answer
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
|
||||
var obj = new
|
||||
{
|
||||
TaskBlindName=visitAnswerList.Select(t=>t.TaskBlindName).FirstOrDefault(),
|
||||
TaskBlindName = visitAnswerList.Select(t => t.TaskBlindName).FirstOrDefault(),
|
||||
VisitQuestionAnswerList = visitAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.DictionaryCode, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList(),
|
||||
Reason = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.Reason).FirstOrDefault()?.Answer,
|
||||
AgreeOrNot = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.AgreeOrNot).FirstOrDefault()?.Answer,
|
||||
|
@ -2038,7 +2052,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
VisitTaskId = x.GlobalTaskId,
|
||||
TrialReadingCriterionId = trialReadingCriterionId,
|
||||
ObjectRelationParentId = x.TaskId,
|
||||
}, new { GlobalAnswerList = objList } );
|
||||
}, new { GlobalAnswerList = objList });
|
||||
|
||||
}
|
||||
|
||||
|
@ -2097,14 +2111,14 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
{
|
||||
|
||||
var visitTaskNum = entity.VisitTaskNum - ReadingCommon.TaskNumDic[ReadingCategory.Judge];
|
||||
var list = await _dbContext.VisitTask.Where(t => t.TaskState == TaskState.Effect && t.SubjectId == entity.SubjectId && t.VisitTaskNum == visitTaskNum && t.JudgeVisitTaskId==entity.Id && t.TrialReadingCriterionId==entity.TrialReadingCriterionId).Select(t => new { t.Id, t.DoctorUser.FullName, t.ArmEnum }).OrderBy(t => t.ArmEnum).ToListAsync();
|
||||
var list = await _dbContext.VisitTask.Where(t => t.TaskState == TaskState.Effect && t.SubjectId == entity.SubjectId && t.VisitTaskNum == visitTaskNum && t.JudgeVisitTaskId == entity.Id && t.TrialReadingCriterionId == entity.TrialReadingCriterionId).Select(t => new { t.Id, t.DoctorUser.FullName, t.ArmEnum }).OrderBy(t => t.ArmEnum).ToListAsync();
|
||||
|
||||
|
||||
var r1 = list.Where(t => t.ArmEnum == Arm.DoubleReadingArm1).FirstOrDefault();
|
||||
var r2 = list.Where(t => t.ArmEnum == Arm.DoubleReadingArm2).FirstOrDefault();
|
||||
|
||||
|
||||
obj = new { R1 = r1.FullName, R2 = r2.FullName, SelectResult = r1.Id== entity.JudgeResultTaskId ? "R1":"R2" };
|
||||
obj = new { R1 = r1.FullName, R2 = r2.FullName, SelectResult = r1.Id == entity.JudgeResultTaskId ? "R1" : "R2" };
|
||||
}
|
||||
|
||||
#region 通过链接跳转 2022 12-19
|
||||
|
@ -2708,20 +2722,20 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
}
|
||||
|
||||
break;
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
////标准 器官病灶表
|
||||
//case nameof(CriterionNidus):
|
||||
////标准 器官病灶表
|
||||
//case nameof(CriterionNidus):
|
||||
|
||||
// var criterionNidus = entityObj as CriterionNidus;
|
||||
// var criterionNidus = entityObj as CriterionNidus;
|
||||
|
||||
// if (criterionNidus.IsSystemCriterion == false)
|
||||
// {
|
||||
// type = type + "/IsTrial";
|
||||
// }
|
||||
// if (criterionNidus.IsSystemCriterion == false)
|
||||
// {
|
||||
// type = type + "/IsTrial";
|
||||
// }
|
||||
|
||||
// break;
|
||||
// break;
|
||||
|
||||
////系统 项目公用
|
||||
//case nameof(ReadingCriterionDictionary):
|
||||
|
|
Loading…
Reference in New Issue