Uat_Study
commit
43174b37cf
|
@ -51,6 +51,30 @@
|
||||||
//Repository
|
//Repository
|
||||||
"Repository_UpdateError": "Updated data does not exist in the database. ",
|
"Repository_UpdateError": "Updated data does not exist in the database. ",
|
||||||
"Repository_DeleteError": "Deleted data does not exist in the database.",
|
"Repository_DeleteError": "Deleted data does not exist in the database.",
|
||||||
|
//OrganInfoService
|
||||||
|
"OrganInfo_DuplicateData": "There are duplicate data, operation failed.",
|
||||||
|
//ReadingCriterionService
|
||||||
|
"ReadingCriterion_Referenced": "The current standard has been referenced and cannot be deleted.",
|
||||||
|
"ReadingCriterion_InUse": "This standard has been used in the project and cannot be deleted.",
|
||||||
|
"ReadingCriterion_ArbitratorWithoutJudgment": "There is no referee problem but there is an arbitration object, operation failed.",
|
||||||
|
//ReadingQuestionService
|
||||||
|
"ReadingQuestion_IdDup": "Duplicate problem ID.",
|
||||||
|
"ReadingQuestion_ChildrenExist": "This problem has sub-problems, please delete the sub-problems first.",
|
||||||
|
"ReadingQuestion_GroupReferenced": "This grouping has been referenced, please delete the referenced problems first.",
|
||||||
|
"ReadingQuestion_JudgmentSet": "The current problem already has a referee standard set, modification failed.",
|
||||||
|
"ReadingQuestion_ExcludeWithDependency": "The displayed dependent parent problem and the required dependent problem are the same, but the answers are mutually exclusive, operation failed.",
|
||||||
|
"ReadingQuestion_CircularDependency": "Calculation dependency has looped!",
|
||||||
|
//ReadingPeriodSetService
|
||||||
|
"ReadingPeriodSet_AlreadyAdded": "{0} has already added the review period, cannot set it effective.",
|
||||||
|
"ReadingPeriodSet_TaskCompletedCannotRevoke": "The current standard review has generated tasks and the review is completed, revoke failed.",
|
||||||
|
"ReadingPeriodSet_LastVisit": "Last visit.",
|
||||||
|
//ReadModuleService
|
||||||
|
"ReadModule_AlreadyAdded": "The current visit has already added a review period.",
|
||||||
|
"ReadModule_AddGlobalFirst": "Please add global review first.",
|
||||||
|
"ReadModule_VisitNotFound": "No visits found that meet the criteria.",
|
||||||
|
"ReadModule_SignedDataCannotDelete": "Clinical data has been signed and cannot be deleted.",
|
||||||
|
"ReadModule_TumorExists": "The current visit has a tumor review, please delete the tumor review first.",
|
||||||
|
"ReadModule_TaskGenerated": "The current review has generated tasks, operation failed.",
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
|
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
|
||||||
|
|
|
@ -50,6 +50,30 @@
|
||||||
//Repository
|
//Repository
|
||||||
"Repository_UpdateError": "修改的数据在数据库不存在。",
|
"Repository_UpdateError": "修改的数据在数据库不存在。",
|
||||||
"Repository_DeleteError": "删除的数据在数据库不存在。",
|
"Repository_DeleteError": "删除的数据在数据库不存在。",
|
||||||
|
//OrganInfoService
|
||||||
|
"OrganInfo_DuplicateData": "存在相同的数据,操作失败",
|
||||||
|
//ReadingCriterionService
|
||||||
|
"ReadingCriterion_Referenced": "当前标准被引用过了,不可以删除",
|
||||||
|
"ReadingCriterion_InUse": "此标准在项目里面已被使用,操作失败",
|
||||||
|
"ReadingCriterion_ArbitratorWithoutJudgment": "无裁判问题却有仲裁对象,操作失败",
|
||||||
|
//ReadingQuestionService
|
||||||
|
"ReadingQuestion_IdDup": "问题编号重复",
|
||||||
|
"ReadingQuestion_ChildrenExist": "此问题存在子问题,请先删除子问题",
|
||||||
|
"ReadingQuestion_GroupReferenced": "此分组已被引用,请先删除被引用的问题",
|
||||||
|
"ReadingQuestion_JudgmentSet": "当前问题已经设置了裁判标准了,修改失败",
|
||||||
|
"ReadingQuestion_ExcludeWithDependency": "显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败",
|
||||||
|
"ReadingQuestion_CircularDependency": "计算依赖循环了!",
|
||||||
|
//ReadingPeriodSetService
|
||||||
|
"ReadingPeriodSet_AlreadyAdded": "{0}已经添加过阅片期,无法设置生效",
|
||||||
|
"ReadingPeriodSet_TaskCompletedCannotRevoke": "当前标准阅片已生成任务并且阅片完成,撤销失败。",
|
||||||
|
"ReadingPeriodSet_LastVisit": "末次访视",
|
||||||
|
//ReadModuleService
|
||||||
|
"ReadModule_AlreadyAdded": "当前访视已经添加过阅片期",
|
||||||
|
"ReadModule_AddGlobalFirst": "请先添加全局阅片",
|
||||||
|
"ReadModule_VisitNotFound": "未找到符合要求的访视",
|
||||||
|
"ReadModule_SignedDataCannotDelete": "临床资料已签名,不允许删除",
|
||||||
|
"ReadModule_TumorExists": "当前访视存在肿瘤学阅片,请先删除肿瘤学阅片",
|
||||||
|
"ReadModule_TaskGenerated": "当前阅片已生成任务,操作失败。",
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
|
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
|
||||||
|
|
|
@ -22,6 +22,8 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||||
private readonly IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository;
|
private readonly IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository;
|
||||||
|
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||||
|
|
||||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
||||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
||||||
|
@ -32,6 +34,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||||
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCodeRepository,
|
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCodeRepository,
|
||||||
|
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystem,
|
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystem,
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial,
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial,
|
||||||
|
@ -47,6 +50,7 @@ namespace IRaCIS.Application.Services
|
||||||
_trialRepository = trialRepository;
|
_trialRepository = trialRepository;
|
||||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||||
this._trialCriterionDictionaryCodeRepository = trialCriterionDictionaryCodeRepository;
|
this._trialCriterionDictionaryCodeRepository = trialCriterionDictionaryCodeRepository;
|
||||||
|
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||||
this._readingQuestionCriterionSystem = readingQuestionCriterionSystem;
|
this._readingQuestionCriterionSystem = readingQuestionCriterionSystem;
|
||||||
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
||||||
|
@ -179,6 +183,13 @@ namespace IRaCIS.Application.Services
|
||||||
//return ResponseOutput.NotOk(_localizer["Dictionary_DictionaryDeletion"]);
|
//return ResponseOutput.NotOk(_localizer["Dictionary_DictionaryDeletion"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (await _readingTrialCriterionDictionaryRepository.AnyAsync(x => x.DictionaryId == id))
|
||||||
|
{
|
||||||
|
await _readingTrialCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.DictionaryId == id);
|
||||||
|
//---当前字典在标准中被引用,不允许删除!
|
||||||
|
//return ResponseOutput.NotOk(_localizer["Dictionary_DictionaryDeletion"]);
|
||||||
|
}
|
||||||
|
|
||||||
if (await _dicRepository.AnyAsync(t => t.ParentId == id))
|
if (await _dicRepository.AnyAsync(t => t.ParentId == id))
|
||||||
{
|
{
|
||||||
//---有子项数据,不允许直接删除!
|
//---有子项数据,不允许直接删除!
|
||||||
|
@ -201,12 +212,6 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.NotOk(_localizer["Dictionary_ProjectReference"]);
|
return ResponseOutput.NotOk(_localizer["Dictionary_ProjectReference"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await _readingCriterionDictionaryRepository.AnyAsync(x => x.DictionaryId == id))
|
|
||||||
{
|
|
||||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.DictionaryId == id);
|
|
||||||
//---当前条目已经在阅片标准中被引用。
|
|
||||||
//return ResponseOutput.NotOk(_localizer["Dictionary_StandardReference"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
var success = await _dicRepository.BatchDeleteNoTrackingAsync(t => t.Id == id);
|
var success = await _dicRepository.BatchDeleteNoTrackingAsync(t => t.Id == id);
|
||||||
return ResponseOutput.Result(success);
|
return ResponseOutput.Result(success);
|
||||||
|
@ -293,7 +298,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
var criterionCodes = await _trialCriterionDictionaryCodeRepository.Where(x => x.TrialCriterionId == inDto.TrialCriterionId).ToListAsync();
|
var criterionCodes = await _trialCriterionDictionaryCodeRepository.Where(x => x.TrialCriterionId == inDto.TrialCriterionId).ToListAsync();
|
||||||
|
|
||||||
var parentCodes = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialCriterionId).Select(x => x.ParentCode).ToListAsync();
|
var parentCodes = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialCriterionId).Select(x => x.ParentCode).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
var codes = criterionCodes.Select(x => x.Code).ToList();
|
var codes = criterionCodes.Select(x => x.Code).ToList();
|
||||||
|
@ -337,15 +342,48 @@ namespace IRaCIS.Application.Services
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
List<string> selectCode = new List<string>();
|
List<string> selectCode = new List<string>();
|
||||||
|
List<BasicDicSelect> criterionDictionList = new List<BasicDicSelect>();
|
||||||
|
|
||||||
var isSystemCriterion = await _readingQuestionCriterionSystem.AnyAsync(x => x.Id == inDto.ReadingCriterionId);
|
var isSystemCriterion = await _readingQuestionCriterionSystem.AnyAsync(x => x.Id == inDto.ReadingCriterionId);
|
||||||
if (isSystemCriterion)
|
if (isSystemCriterion)
|
||||||
{
|
{
|
||||||
selectCode = await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.ReadingCriterionId).Select(x => x.Code).ToListAsync();
|
selectCode = await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.ReadingCriterionId).Select(x => x.Code).ToListAsync();
|
||||||
|
|
||||||
|
criterionDictionList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.ReadingCriterionId).Select(x => new BasicDicSelect()
|
||||||
|
{
|
||||||
|
ChildGroup = x.Dictionary.ChildGroup,
|
||||||
|
Code = x.Dictionary.Code,
|
||||||
|
DataTypeEnum = x.Dictionary.DataTypeEnum,
|
||||||
|
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
|
||||||
|
ShowOrder = x.Dictionary.ShowOrder,
|
||||||
|
ParentCode = x.ParentCode,
|
||||||
|
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
|
||||||
|
Id = x.DictionaryId,
|
||||||
|
ParentId = x.Dictionary.ParentId,
|
||||||
|
Value = x.Dictionary.Value,
|
||||||
|
ValueCN = x.Dictionary.ValueCN
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
selectCode = await _trialCriterionDictionaryCodeRepository.Where(x => x.TrialCriterionId == inDto.ReadingCriterionId).Select(x => x.Code).ToListAsync();
|
selectCode = await _trialCriterionDictionaryCodeRepository.Where(x => x.TrialCriterionId == inDto.ReadingCriterionId).Select(x => x.Code).ToListAsync();
|
||||||
|
|
||||||
|
criterionDictionList = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.ReadingCriterionId).Select(x => new BasicDicSelect()
|
||||||
|
{
|
||||||
|
ChildGroup = x.Dictionary.ChildGroup,
|
||||||
|
Code = x.Dictionary.Code,
|
||||||
|
DataTypeEnum = x.Dictionary.DataTypeEnum,
|
||||||
|
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
|
||||||
|
ShowOrder = x.Dictionary.ShowOrder,
|
||||||
|
ParentCode = x.ParentCode,
|
||||||
|
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
|
||||||
|
Id = x.DictionaryId,
|
||||||
|
ParentId = x.Dictionary.ParentId,
|
||||||
|
Value = x.Dictionary.Value,
|
||||||
|
ValueCN = x.Dictionary.ValueCN
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -361,21 +399,7 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var criterionDictionList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.ReadingCriterionId).Select(x => new BasicDicSelect()
|
|
||||||
{
|
|
||||||
ChildGroup = x.Dictionary.ChildGroup,
|
|
||||||
Code = x.Dictionary.Code,
|
|
||||||
DataTypeEnum = x.Dictionary.DataTypeEnum,
|
|
||||||
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
|
|
||||||
ShowOrder = x.Dictionary.ShowOrder,
|
|
||||||
ParentCode = x.ParentCode,
|
|
||||||
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
|
|
||||||
Id = x.DictionaryId,
|
|
||||||
ParentId = x.Dictionary.ParentId,
|
|
||||||
Value = x.Dictionary.Value,
|
|
||||||
ValueCN = x.Dictionary.ValueCN
|
|
||||||
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
criterionDictionList = criterionDictionList.Where(x => selectCode.Contains(x.ParentCode)).ToList();
|
criterionDictionList = criterionDictionList.Where(x => selectCode.Contains(x.ParentCode)).ToList();
|
||||||
|
|
||||||
|
@ -438,7 +462,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var criterionDictionList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId).Select(x => new BasicDicSelect()
|
var criterionDictionList = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId).Select(x => new BasicDicSelect()
|
||||||
{
|
{
|
||||||
ChildGroup = x.Dictionary.ChildGroup,
|
ChildGroup = x.Dictionary.ChildGroup,
|
||||||
Code = x.Dictionary.Code,
|
Code = x.Dictionary.Code,
|
||||||
|
|
|
@ -67,7 +67,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public class GetCriterionLesionTypeInDto
|
public class GetCriterionLesionTypeInDto
|
||||||
{
|
{
|
||||||
public Guid CriterionId { get; set; }
|
public Guid? SystemCriterionId { get; set; }
|
||||||
|
|
||||||
|
public Guid? TrialCriterionId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
///<summary>CriterionNidusQuery 列表查询参数模型</summary>
|
///<summary>CriterionNidusQuery 列表查询参数模型</summary>
|
||||||
|
|
|
@ -1247,6 +1247,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public JudgeTypeEnum JudgeType { get; set; }
|
public JudgeTypeEnum JudgeType { get; set; }
|
||||||
|
|
||||||
|
public int ShowOrder { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 类型值
|
/// 类型值
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -156,8 +156,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public class GetAssessTypeInDto
|
public class GetAssessTypeInDto
|
||||||
{
|
{
|
||||||
[NotDefault]
|
|
||||||
public Guid CriterionId { get; set; }
|
public Guid? SystemCriterionId { get; set; }
|
||||||
|
|
||||||
|
public Guid? TrialCriterionId { get; set; }
|
||||||
|
|
||||||
public string ParentCode { get; set; } = string.Empty;
|
public string ParentCode { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
// 生成时间 2022-08-12 14:07:20
|
// 生成时间 2022-08-12 14:07:20
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
@ -28,6 +28,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
private readonly IRepository<OrganTrialInfo> _organTrialInfoRepository;
|
private readonly IRepository<OrganTrialInfo> _organTrialInfoRepository;
|
||||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
||||||
private readonly IRepository<CriterionNidus> _criterionNidusRepository;
|
private readonly IRepository<CriterionNidus> _criterionNidusRepository;
|
||||||
|
private readonly IRepository<CriterionNidusTrial> _criterionNidusTrialRepository;
|
||||||
|
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository;
|
||||||
|
|
||||||
public OrganInfoService(
|
public OrganInfoService(
|
||||||
IRepository<OrganInfo> organInfoRepository,
|
IRepository<OrganInfo> organInfoRepository,
|
||||||
|
@ -35,6 +37,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
IRepository<VisitTask> visitTaskRepository,
|
IRepository<VisitTask> visitTaskRepository,
|
||||||
IRepository<OrganTrialInfo> organTrialInfoRepository,
|
IRepository<OrganTrialInfo> organTrialInfoRepository,
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial,
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial,
|
||||||
|
IRepository<CriterionNidusTrial> criterionNidusTrialRepository,
|
||||||
|
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
||||||
IRepository<CriterionNidus> criterionNidusRepository
|
IRepository<CriterionNidus> criterionNidusRepository
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -44,6 +48,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
this._organTrialInfoRepository = organTrialInfoRepository;
|
this._organTrialInfoRepository = organTrialInfoRepository;
|
||||||
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
||||||
this._criterionNidusRepository = criterionNidusRepository;
|
this._criterionNidusRepository = criterionNidusRepository;
|
||||||
|
this._criterionNidusTrialRepository = criterionNidusTrialRepository;
|
||||||
|
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -146,7 +152,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
join trialData in _organTrialInfoRepository.AsQueryable().Where( x => x.IsEnable&&x.TrialCriterionId== trialReadingCriterionId)
|
join trialData in _organTrialInfoRepository.AsQueryable().Where( x => x.IsEnable&&x.TrialCriterionId== trialReadingCriterionId)
|
||||||
on data.Id equals trialData.OrganInfoId
|
on data.Id equals trialData.OrganInfoId
|
||||||
join criterionNidus in _criterionNidusRepository.AsQueryable().Where(x=>x.CriterionId== trialReadingCriterionId)
|
join criterionNidus in _criterionNidusTrialRepository.AsQueryable().Where(x=>x.CriterionId== trialReadingCriterionId)
|
||||||
on data.OrganType equals criterionNidus.OrganType
|
on data.OrganType equals criterionNidus.OrganType
|
||||||
select new ReadingOrganDto()
|
select new ReadingOrganDto()
|
||||||
{
|
{
|
||||||
|
@ -203,7 +209,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
if (inDto.LesionType != null)
|
if (inDto.LesionType != null)
|
||||||
{
|
{
|
||||||
var criterion = await _readingQuestionCriterionTrial.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
var criterion = await _readingQuestionCriterionTrial.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||||
organs = await _criterionNidusRepository.Where(x => x.CriterionId == (criterion == null ? default(Guid) : criterion.Id) && x.LesionType == inDto.LesionType)
|
organs = await _criterionNidusTrialRepository.Where(x => x.CriterionId == (criterion == null ? default(Guid) : criterion.Id) && x.LesionType == inDto.LesionType)
|
||||||
.Select(x => x.OrganType).ToListAsync();
|
.Select(x => x.OrganType).ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,7 +321,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public async Task<List<OrganDictionary>> GetCriterionLesionType(GetCriterionLesionTypeInDto inDto)
|
public async Task<List<OrganDictionary>> GetCriterionLesionType(GetCriterionLesionTypeInDto inDto)
|
||||||
{
|
{
|
||||||
var dicNums = new List<string>();
|
var dicNums = new List<string>();
|
||||||
dicNums = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.CriterionId).Select(x => ((int)x.LesionType).ToString()).Distinct().ToListAsync();
|
if (inDto.TrialCriterionId != null)
|
||||||
|
{
|
||||||
|
dicNums = await _criterionNidusTrialRepository.Where(x => x.CriterionId == inDto.TrialCriterionId).Select(x => ((int)x.LesionType).ToString()).Distinct().ToListAsync();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dicNums = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => ((int)x.LesionType).ToString()).Distinct().ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
var dictionaryId = await _dictionaryRepository.Where(x => x.Code == "LesionType").Select(x => x.Id).FirstOrDefaultAsync();
|
var dictionaryId = await _dictionaryRepository.Where(x => x.Code == "LesionType").Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
|
|
||||||
var result = await _dictionaryRepository.Where(x => x.ParentId == dictionaryId && dicNums.Contains(x.Code)).ProjectTo<OrganDictionary>(_mapper.ConfigurationProvider).ToListAsync();
|
var result = await _dictionaryRepository.Where(x => x.ParentId == dictionaryId && dicNums.Contains(x.Code)).ProjectTo<OrganDictionary>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
@ -332,11 +346,19 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public async Task<List<CriterionNidusView>> GetCriterionNidusList(CriterionNidusQuery inQuery)
|
public async Task<List<CriterionNidusView>> GetCriterionNidusList(CriterionNidusQuery inQuery)
|
||||||
{
|
{
|
||||||
|
|
||||||
var criterionNidusQueryable = _criterionNidusRepository
|
if (await _readingQuestionCriterionSystemRepository.AnyAsync(x => x.Id == inQuery.CriterionId))
|
||||||
|
{
|
||||||
|
return await _criterionNidusRepository
|
||||||
.Where(x => x.CriterionId == inQuery.CriterionId)
|
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||||
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider);
|
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return await _criterionNidusTrialRepository
|
||||||
|
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||||
|
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
return await criterionNidusQueryable.ToListAsync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -350,7 +372,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
if (await _criterionNidusRepository.AnyAsync(x => x.OrganType == inDto.OrganType && x.LesionType == inDto.LesionType && x.CriterionId == inDto.CriterionId && x.Id != inDto.Id))
|
if (await _criterionNidusRepository.AnyAsync(x => x.OrganType == inDto.OrganType && x.LesionType == inDto.LesionType && x.CriterionId == inDto.CriterionId && x.Id != inDto.Id))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("存在相同的数据,操作失败");
|
//---存在相同的数据,操作失败
|
||||||
|
throw new BusinessValidationFailedException(_localizer["OrganInfo_DuplicateData"]);
|
||||||
}
|
}
|
||||||
var entity = await _criterionNidusRepository.InsertOrUpdateAsync(inDto, true);
|
var entity = await _criterionNidusRepository.InsertOrUpdateAsync(inDto, true);
|
||||||
|
|
||||||
|
@ -418,20 +441,22 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
inDto.SystemCriterionId = readingQuestionCriterionTrial.ReadingQuestionCriterionSystemId;
|
inDto.SystemCriterionId = readingQuestionCriterionTrial.ReadingQuestionCriterionSystemId;
|
||||||
}
|
}
|
||||||
await _criterionNidusRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterionId);
|
await _criterionNidusTrialRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterionId);
|
||||||
List<CriterionNidusData> criterionNidusList = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => new CriterionNidusData()
|
|
||||||
|
|
||||||
|
List<CriterionNidusTrial> criterionNidusList = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => new CriterionNidusTrial()
|
||||||
{
|
{
|
||||||
Id = x.Id,
|
Id = x.Id,
|
||||||
CriterionId = trialCriterionId,
|
CriterionId = trialCriterionId,
|
||||||
LesionType = x.LesionType,
|
LesionType = x.LesionType,
|
||||||
OriginalId = x.Id,
|
|
||||||
OrganType=x.OrganType,
|
OrganType=x.OrganType,
|
||||||
IsSystemCriterion=false,
|
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
criterionNidusList.ForEach(x => x.Id = NewId.NextGuid());
|
criterionNidusList.ForEach(x => x.Id = NewId.NextGuid());
|
||||||
|
|
||||||
await _criterionNidusRepository.AddRangeAsync(criterionNidusList);
|
await _criterionNidusTrialRepository.AddRangeAsync(criterionNidusList);
|
||||||
await _organTrialInfoRepository.BatchDeleteNoTrackingAsync(x => x.TrialCriterionId == readingQuestionCriterionTrial.Id);
|
await _organTrialInfoRepository.BatchDeleteNoTrackingAsync(x => x.TrialCriterionId == readingQuestionCriterionTrial.Id);
|
||||||
List<OrganTrialInfo> organTrialInfoList = await _organInfoRepository.Where(x =>x.SystemCriterionId== inDto.SystemCriterionId).Select(x => new OrganTrialInfo()
|
List<OrganTrialInfo> organTrialInfoList = await _organInfoRepository.Where(x =>x.SystemCriterionId== inDto.SystemCriterionId).Select(x => new OrganTrialInfo()
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
||||||
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||||
|
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||||
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
||||||
|
@ -32,6 +33,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
||||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||||
|
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||||
IRepository<VisitTask> visitTaskRepository,
|
IRepository<VisitTask> visitTaskRepository,
|
||||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||||
|
@ -46,6 +48,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||||
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
||||||
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
||||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||||
|
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||||
this._visitTaskRepository = visitTaskRepository;
|
this._visitTaskRepository = visitTaskRepository;
|
||||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||||
this._readingTableQuestionAnswerRepository = readingTableQuestionAnswerRepository;
|
this._readingTableQuestionAnswerRepository = readingTableQuestionAnswerRepository;
|
||||||
|
@ -310,7 +313,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||||
|
|
||||||
if (await _readingQuestionCriterionTrialRepository.AnyAsync(x => x.IsConfirm && x.ReadingQuestionCriterionSystemId == id))
|
if (await _readingQuestionCriterionTrialRepository.AnyAsync(x => x.IsConfirm && x.ReadingQuestionCriterionSystemId == id))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前标准被引用过了,不可以删除");
|
//---当前标准被引用过了,不可以删除
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingCriterion_Referenced"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
await _readingQuestionCriterionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
await _readingQuestionCriterionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||||
|
@ -333,7 +337,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||||
var trialCriterionIds = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.Id).Select(x => x.Id).ToListAsync();
|
var trialCriterionIds = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.Id).Select(x => x.Id).ToListAsync();
|
||||||
if (await _readingTaskQuestionAnswer.AnyAsync(x => trialCriterionIds.Contains(x.ReadingQuestionCriterionTrialId)))
|
if (await _readingTaskQuestionAnswer.AnyAsync(x => trialCriterionIds.Contains(x.ReadingQuestionCriterionTrialId)))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("此标准在项目里面已被使用,操作失败");
|
//---此标准在项目里面已被使用,操作失败
|
||||||
|
return ResponseOutput.NotOk(_localizer["ReadingCriterion_InUse"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -473,7 +478,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||||
|
|
||||||
if (judgeCount == 0 && (inDto.ArbitrationRule == ArbitrationRule.Visit || inDto.ArbitrationRule == ArbitrationRule.Reading))
|
if (judgeCount == 0 && (inDto.ArbitrationRule == ArbitrationRule.Visit || inDto.ArbitrationRule == ArbitrationRule.Reading))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("无裁判问题却有仲裁对象,操作失败");
|
//---无裁判问题却有仲裁对象,操作失败
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingCriterion_ArbitratorWithoutJudgment"]);
|
||||||
}
|
}
|
||||||
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
||||||
{
|
{
|
||||||
|
@ -568,11 +574,23 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<CriterionDictionaryInfo>> GetAssessType(GetAssessTypeInDto inDto)
|
public async Task<List<CriterionDictionaryInfo>> GetAssessType(GetAssessTypeInDto inDto)
|
||||||
{
|
{
|
||||||
List<CriterionDictionaryInfo> result = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.CriterionId
|
|
||||||
|
if (inDto.SystemCriterionId != null)
|
||||||
|
{
|
||||||
|
return await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.SystemCriterionId
|
||||||
)
|
)
|
||||||
.WhereIf(!inDto.ParentCode.IsNullOrEmpty(), x => x.ParentCode ==inDto.ParentCode)
|
.WhereIf(!inDto.ParentCode.IsNullOrEmpty(), x => x.ParentCode == inDto.ParentCode)
|
||||||
.ProjectTo<CriterionDictionaryInfo>(_mapper.ConfigurationProvider).OrderBy(x => x.ParentCode).ThenBy(x => x.ShowOrder).ToListAsync();
|
.ProjectTo<CriterionDictionaryInfo>(_mapper.ConfigurationProvider).OrderBy(x => x.ParentCode).ThenBy(x => x.ShowOrder).ToListAsync();
|
||||||
return result;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.SystemCriterionId
|
||||||
|
)
|
||||||
|
.WhereIf(!inDto.ParentCode.IsNullOrEmpty(), x => x.ParentCode == inDto.ParentCode)
|
||||||
|
.ProjectTo<CriterionDictionaryInfo>(_mapper.ConfigurationProvider).OrderBy(x => x.ParentCode).ThenBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,8 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionCriterionSystemId == indto.ReadingQuestionCriterionSystemId))
|
if (await _readingQuestionSystemRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionCriterionSystemId == indto.ReadingQuestionCriterionSystemId))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("问题编号重复");
|
//---问题编号重复
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
|
||||||
}
|
}
|
||||||
var entity = await _readingQuestionSystemRepository.InsertOrUpdateAsync(indto, true);
|
var entity = await _readingQuestionSystemRepository.InsertOrUpdateAsync(indto, true);
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
@ -302,7 +303,14 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.ParentId == id))
|
if (await _readingQuestionSystemRepository.AnyAsync(x => x.ParentId == id))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
|
//---此问题存在子问题,请先删除子问题
|
||||||
|
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (await _readingQuestionSystemRepository.AnyAsync(x => x.GroupId == id))
|
||||||
|
{
|
||||||
|
//---此分组已被引用,请先删除被引用的问题
|
||||||
|
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
|
||||||
}
|
}
|
||||||
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||||
var success = await _readingQuestionSystemRepository.SaveChangesAsync();
|
var success = await _readingQuestionSystemRepository.SaveChangesAsync();
|
||||||
|
@ -382,7 +390,8 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
if (await _readingTableQuestionSystemRepository.AnyAsync(x => x.ParentId == Id || x.RelevanceId == Id))
|
if (await _readingTableQuestionSystemRepository.AnyAsync(x => x.ParentId == Id || x.RelevanceId == Id))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("当前问题存在子问题 删除失败");
|
//---此问题存在子问题,请先删除子问题
|
||||||
|
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
await _readingTableQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
await _readingTableQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
||||||
|
@ -406,19 +415,22 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None))
|
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前问题已经设置了裁判标准了,修改失败");
|
//---当前问题已经设置了裁判标准了,修改失败
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_JudgmentSet"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (indto.ParentId == indto.RelevanceId && indto.ParentId != null && indto.ParentTriggerValue != indto.RelevanceValue)
|
if (indto.ParentId == indto.RelevanceId && indto.ParentId != null && indto.ParentTriggerValue != indto.RelevanceValue)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败");
|
//---显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_ExcludeWithDependency"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.TrialId == indto.TrialId && x.ReadingQuestionCriterionTrialId == indto.ReadingQuestionCriterionTrialId && x.ReadingCriterionPageId == indto.ReadingCriterionPageId))
|
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.TrialId == indto.TrialId && x.ReadingQuestionCriterionTrialId == indto.ReadingQuestionCriterionTrialId && x.ReadingCriterionPageId == indto.ReadingCriterionPageId))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("问题编号重复");
|
//---问题编号重复
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
|
||||||
}
|
}
|
||||||
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||||
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
|
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
|
||||||
|
@ -480,14 +492,16 @@ namespace IRaCIS.Application.Services
|
||||||
// 防止有脏数据 循环验证 最多10000次
|
// 防止有脏数据 循环验证 最多10000次
|
||||||
if (count >= 10000)
|
if (count >= 10000)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("计算依赖循环了!");
|
//---计算依赖循环了!
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CircularDependency"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var relation = relationList.Where(x=>x.CalculateQuestionList.Any(y=>y.QuestionId== QuestionId||y.TableQuestionId==QuestionId)).ToList();
|
var relation = relationList.Where(x=>x.CalculateQuestionList.Any(y=>y.QuestionId== QuestionId||y.TableQuestionId==QuestionId)).ToList();
|
||||||
|
|
||||||
if (relation.Select(x => x.QuestionId).ToList().Contains(originalId))
|
if (relation.Select(x => x.QuestionId).ToList().Contains(originalId))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("计算依赖循环了!");
|
//---计算依赖循环了!
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CircularDependency"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -585,7 +599,14 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.ParentId == id))
|
if (await _readingQuestionTrialRepository.AnyAsync(x => x.ParentId == id))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
|
//---此问题存在子问题,请先删除子问题
|
||||||
|
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (await _readingQuestionTrialRepository.AnyAsync(x => x.GroupId == id))
|
||||||
|
{
|
||||||
|
//---此分组已被引用,请先删除被引用的问题
|
||||||
|
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
|
||||||
}
|
}
|
||||||
await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||||
var success = await _readingQuestionTrialRepository.SaveChangesAsync();
|
var success = await _readingQuestionTrialRepository.SaveChangesAsync();
|
||||||
|
@ -676,7 +697,8 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionId==indto.ReadingQuestionId))
|
if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionId==indto.ReadingQuestionId))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("问题编号重复");
|
//---问题编号重复
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||||
|
@ -727,7 +749,8 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.ParentId == Id || x.RelevanceId == Id))
|
if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.ParentId == Id || x.RelevanceId == Id))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("当前问题存在子问题 删除失败");
|
//---此问题存在子问题,请先删除子问题
|
||||||
|
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
await _readingTableQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
await _readingTableQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
||||||
|
|
|
@ -248,6 +248,7 @@ namespace IRaCIS.Application.Services
|
||||||
GlobalReadingShowType=y.ReadingQuestionTrial.GlobalReadingShowType,
|
GlobalReadingShowType=y.ReadingQuestionTrial.GlobalReadingShowType,
|
||||||
AnswerCombination = y.ReadingQuestionTrial.AnswerCombination,
|
AnswerCombination = y.ReadingQuestionTrial.AnswerCombination,
|
||||||
JudgeType = y.ReadingQuestionTrial.JudgeType,
|
JudgeType = y.ReadingQuestionTrial.JudgeType,
|
||||||
|
ShowOrder= y.ReadingQuestionTrial.ShowOrder,
|
||||||
Type = y.ReadingQuestionTrial.Type,
|
Type = y.ReadingQuestionTrial.Type,
|
||||||
TypeValue = y.ReadingQuestionTrial.TypeValue,
|
TypeValue = y.ReadingQuestionTrial.TypeValue,
|
||||||
ValueType = y.ReadingQuestionTrial.ValueType,
|
ValueType = y.ReadingQuestionTrial.ValueType,
|
||||||
|
@ -255,10 +256,54 @@ namespace IRaCIS.Application.Services
|
||||||
Answer =y.Answer,
|
Answer =y.Answer,
|
||||||
}).ToList()
|
}).ToList()
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
var globalQuestionList = await _readingQuestionTrialRepository.Where(x => x.GlobalReadingShowType != GlobalReadingShowType.NotShow && x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId).IgnoreAutoIncludes().ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
result.TaskList.ForEach(x =>
|
result.TaskList.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.CrterionDictionaryGroup = ReadingCommon.GetCrterionDictionaryGroup(x.IsConvertedTask);
|
x.CrterionDictionaryGroup = ReadingCommon.GetCrterionDictionaryGroup(x.IsConvertedTask);
|
||||||
|
if (x.BeforeQuestionList.Count() != globalQuestionList.Count())
|
||||||
|
{
|
||||||
|
var beforeQuestionIds = x.BeforeQuestionList.Select(x => x.QuestionId).ToList();
|
||||||
|
|
||||||
|
globalQuestionList.ForEach(y =>
|
||||||
|
{
|
||||||
|
if (!beforeQuestionIds.Contains(y.Id))
|
||||||
|
{
|
||||||
|
x.BeforeQuestionList.Add(new GlobalQuestionInfo()
|
||||||
|
{
|
||||||
|
QuestionId = y.Id,
|
||||||
|
QuestionName = y.QuestionName.LanguageName(y.QuestionEnName, _userInfo.IsEn_Us),
|
||||||
|
QuestionEnName = y.QuestionEnName,
|
||||||
|
AnswerGroup = y.AnswerGroup,
|
||||||
|
QuestionType = y.QuestionType,
|
||||||
|
LimitEdit = y.LimitEdit,
|
||||||
|
MaxAnswerLength = y.MaxAnswerLength,
|
||||||
|
FileType = y.FileType,
|
||||||
|
QuestionGenre = y.QuestionGenre,
|
||||||
|
ShowOrder=y.ShowOrder,
|
||||||
|
DictionaryCode = y.DictionaryCode,
|
||||||
|
GlobalReadingShowType = y.GlobalReadingShowType,
|
||||||
|
AnswerCombination = y.AnswerCombination,
|
||||||
|
JudgeType = y.JudgeType,
|
||||||
|
Type = y.Type,
|
||||||
|
TypeValue = y.TypeValue,
|
||||||
|
ValueType = y.ValueType,
|
||||||
|
IsJudgeQuestion = y.IsJudgeQuestion,
|
||||||
|
Answer = string.Empty,
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
x.BeforeQuestionList = x.BeforeQuestionList.OrderBy(y => y.ShowOrder).ToList();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var globalReadingQuestion = await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == inDto.VisitTaskId).ToListAsync();
|
var globalReadingQuestion = await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == inDto.VisitTaskId).ToListAsync();
|
||||||
|
@ -300,7 +345,8 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
result.TaskList.ForEach(x =>
|
result.TaskList.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.AfterQuestionList = x.BeforeQuestionList.Where(x=>x.IsJudgeQuestion).GroupJoin(
|
x.AfterQuestionList = x.BeforeQuestionList
|
||||||
|
.GroupJoin(
|
||||||
globalReadingQuestion
|
globalReadingQuestion
|
||||||
, l => new { a = l.QuestionId, b = x.VisitTaskId }
|
, l => new { a = l.QuestionId, b = x.VisitTaskId }
|
||||||
, r => new { a = r.QuestionId, b = r.TaskId }
|
, r => new { a = r.QuestionId, b = r.TaskId }
|
||||||
|
@ -435,7 +481,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var subjectVisitId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
|
var subjectVisitId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
|
||||||
var isBaseLine = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Select(x => x.IsBaseLine).FirstOrDefaultAsync();
|
var isBaseLine = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Select(x => x.IsBaseLine).FirstOrDefaultAsync();
|
||||||
List<CriterionDictionaryInfo> assessTypeList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == taskInfo.TrialReadingCriterionId
|
List<CriterionDictionaryInfo> assessTypeList = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == taskInfo.TrialReadingCriterionId
|
||||||
&& x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess
|
&& x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess
|
||||||
)
|
)
|
||||||
//.WhereIf(isBaseLine,x=>x.IsBaseLineUse)
|
//.WhereIf(isBaseLine,x=>x.IsBaseLineUse)
|
||||||
|
|
|
@ -43,6 +43,7 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<DicomInstance> _dicomInstanceRepository;
|
private readonly IRepository<DicomInstance> _dicomInstanceRepository;
|
||||||
private readonly IRepository<OrganInfo> _organInfoRepository;
|
private readonly IRepository<OrganInfo> _organInfoRepository;
|
||||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||||
|
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||||
private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository;
|
private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository;
|
||||||
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
||||||
private readonly IRepository<ReadingTableQuestionSystem> _readingTableQuestionSystemRepository;
|
private readonly IRepository<ReadingTableQuestionSystem> _readingTableQuestionSystemRepository;
|
||||||
|
@ -80,6 +81,7 @@ namespace IRaCIS.Application.Services
|
||||||
IRepository<OrganInfo> organInfoRepository,
|
IRepository<OrganInfo> organInfoRepository,
|
||||||
IMemoryCache cache,
|
IMemoryCache cache,
|
||||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||||
|
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||||
IRepository<TumorAssessment_RECIST1Point1> tumorAssessmentRepository,
|
IRepository<TumorAssessment_RECIST1Point1> tumorAssessmentRepository,
|
||||||
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
|
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
|
||||||
IRepository<ReadingTableQuestionSystem> readingTableQuestionSystemRepository,
|
IRepository<ReadingTableQuestionSystem> readingTableQuestionSystemRepository,
|
||||||
|
@ -120,6 +122,8 @@ namespace IRaCIS.Application.Services
|
||||||
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
||||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||||
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
||||||
|
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||||
|
|
||||||
this._readingQuestionSystem = ReadingQuestionSystem;
|
this._readingQuestionSystem = ReadingQuestionSystem;
|
||||||
this._noneDicomStudyFileSystem = noneDicomStudyFileSystem;
|
this._noneDicomStudyFileSystem = noneDicomStudyFileSystem;
|
||||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
result.OncologyVisits = oncologyVisits;
|
result.OncologyVisits = oncologyVisits;
|
||||||
|
|
||||||
List<CriterionDictionaryInfo> assessTypeList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == taskInfo.TrialReadingCriterionId
|
List<CriterionDictionaryInfo> assessTypeList = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == taskInfo.TrialReadingCriterionId
|
||||||
&& x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess
|
&& x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess
|
||||||
)
|
)
|
||||||
.Select(x => new CriterionDictionaryInfo()
|
.Select(x => new CriterionDictionaryInfo()
|
||||||
|
|
|
@ -272,7 +272,8 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if (await _readModuleRepository.AnyAsync(x => x.SubjectVisitId == visit.Id&&x.ModuleType== moduleType && x.TrialReadingCriterionId == dto.TrialReadingCriterionId))
|
if (await _readModuleRepository.AnyAsync(x => x.SubjectVisitId == visit.Id&&x.ModuleType== moduleType && x.TrialReadingCriterionId == dto.TrialReadingCriterionId))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException($"当前访视已经添加过阅片期");
|
//---当前访视已经添加过阅片期
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadModule_AlreadyAdded"]);
|
||||||
}
|
}
|
||||||
var readModuleData = new ReadModule()
|
var readModuleData = new ReadModule()
|
||||||
{
|
{
|
||||||
|
@ -383,7 +384,8 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("请先添加全局阅片");
|
//---请先添加全局阅片
|
||||||
|
return ResponseOutput.NotOk(_localizer["ReadModule_AddGlobalFirst"]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -392,7 +394,8 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("未找到符合要求的访视");
|
//---未找到符合要求的访视
|
||||||
|
return ResponseOutput.NotOk(_localizer["ReadModule_VisitNotFound"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -416,18 +419,21 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if(await _repository.Where<ReadingClinicalData>(t => t.ReadingId == readModuleId).AnyAsync(t => t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned))
|
if(await _repository.Where<ReadingClinicalData>(t => t.ReadingId == readModuleId).AnyAsync(t => t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("临床资料已签名,不允许删除");
|
//---临床资料已签名,不允许删除
|
||||||
|
return ResponseOutput.NotOk(_localizer["ReadModule_SignedDataCannotDelete"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//增加标准
|
//增加标准
|
||||||
if (readModule.ModuleType==ModuleTypeEnum.Global&&(await _readModuleRepository.AnyAsync(x=>x.ModuleType==ModuleTypeEnum.Oncology&&x.SubjectVisitId== readModule.SubjectVisitId && x.TrialReadingCriterionId==readModule.TrialReadingCriterionId)))
|
if (readModule.ModuleType==ModuleTypeEnum.Global&&(await _readModuleRepository.AnyAsync(x=>x.ModuleType==ModuleTypeEnum.Oncology&&x.SubjectVisitId== readModule.SubjectVisitId && x.TrialReadingCriterionId==readModule.TrialReadingCriterionId)))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前访视存在肿瘤学阅片,请先删除肿瘤学阅片");
|
//---当前访视存在肿瘤学阅片,请先删除肿瘤学阅片
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadModule_TumorExists"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await _visitTaskRepository.AnyAsync(x => readModuleId==x.SouceReadModuleId))
|
if (await _visitTaskRepository.AnyAsync(x => readModuleId==x.SouceReadModuleId))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前阅片已生成任务,操作失败。");
|
//---当前阅片已生成任务,操作失败。
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadModule_TaskGenerated"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ namespace IRaCIS.Application.Services
|
||||||
var repeatVisitNames = _readModuleRepository.Where(x => x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId && x.ReadingSetType == readingPeriodSet.ReadingSetType && needAddVisitIds.Contains(x.SubjectVisitId)).Select(x => x.Subject.Code + "的" + x.SubjectVisit.VisitName).ToList();
|
var repeatVisitNames = _readModuleRepository.Where(x => x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId && x.ReadingSetType == readingPeriodSet.ReadingSetType && needAddVisitIds.Contains(x.SubjectVisitId)).Select(x => x.Subject.Code + "的" + x.SubjectVisit.VisitName).ToList();
|
||||||
if (repeatVisitNames.Count != 0)
|
if (repeatVisitNames.Count != 0)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk($"{string.Join(",", repeatVisitNames)}已经添加过阅片期,无法设置生效");
|
return ResponseOutput.NotOk(_localizer["ReadingPeriodSet_AlreadyAdded", string.Join(",", repeatVisitNames)]);
|
||||||
}
|
}
|
||||||
List<ReadModule> readModules = new List<ReadModule>();
|
List<ReadModule> readModules = new List<ReadModule>();
|
||||||
foreach (var item in plans)
|
foreach (var item in plans)
|
||||||
|
@ -307,7 +307,8 @@ namespace IRaCIS.Application.Services
|
||||||
&& x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId
|
&& x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId
|
||||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && x.TaskState == TaskState.Effect))
|
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && x.TaskState == TaskState.Effect))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前标准阅片已生成任务并且阅片完成,撤销失败。");
|
//---当前标准阅片已生成任务并且阅片完成,撤销失败。
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingPeriodSet_TaskCompletedCannotRevoke"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -422,7 +423,8 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
pageList.CurrentPageData.ForEach(x =>
|
pageList.CurrentPageData.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.SubjectVisitName = x.IsGlobal ? "末次访视" : x.SubjectVisitName;
|
//---末次访视
|
||||||
|
x.SubjectVisitName = x.IsGlobal ? _localizer["ReadingPeriodSet_LastVisit"] : x.SubjectVisitName;
|
||||||
});
|
});
|
||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ForMember(d => d.Value, u => u.MapFrom(s => s.Dictionary.Value))
|
.ForMember(d => d.Value, u => u.MapFrom(s => s.Dictionary.Value))
|
||||||
.ForMember(d => d.ValueCN, u => u.MapFrom(s => s.Dictionary.ValueCN));
|
.ForMember(d => d.ValueCN, u => u.MapFrom(s => s.Dictionary.ValueCN));
|
||||||
|
|
||||||
|
CreateMap<ReadingTrialCriterionDictionary, CriterionDictionaryInfo>()
|
||||||
|
.ForMember(d => d.ChildGroup, u => u.MapFrom(s => s.Dictionary.ChildGroup))
|
||||||
|
.ForMember(d => d.Code, u => u.MapFrom(s => s.Dictionary.Code))
|
||||||
|
.ForMember(d => d.Description, u => u.MapFrom(s => s.Dictionary.Description))
|
||||||
|
.ForMember(d => d.ShowOrder, u => u.MapFrom(s => s.Dictionary.ShowOrder))
|
||||||
|
.ForMember(d => d.ParentCode, u => u.MapFrom(s => s.Dictionary.Parent.Code))
|
||||||
|
.ForMember(d => d.Value, u => u.MapFrom(s => s.Dictionary.Value))
|
||||||
|
.ForMember(d => d.ValueCN, u => u.MapFrom(s => s.Dictionary.ValueCN));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
|
//CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
|
||||||
|
@ -242,7 +251,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
#region 阅片部位
|
#region 阅片部位
|
||||||
|
|
||||||
|
CreateMap<CriterionNidusTrial, CriterionNidusView>();
|
||||||
CreateMap<CriterionNidus, CriterionNidusView>();
|
CreateMap<CriterionNidus, CriterionNidusView>();
|
||||||
CreateMap<CriterionNidus, CriterionNidusAddOrEdit>().ReverseMap();
|
CreateMap<CriterionNidus, CriterionNidusAddOrEdit>().ReverseMap();
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||||
|
|
||||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId&&x.ShowQuestion!= ShowQuestion.Hide).ToListAsync();
|
||||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||||
|
|
||||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId)
|
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide)
|
||||||
//.Where(x => x.LesionType != LesionType.BaselineLesions)
|
//.Where(x => x.LesionType != LesionType.BaselineLesions)
|
||||||
.Where(x=>x.QuestionType!=QuestionType.TherapeuticEffectEvaluationGroup)
|
.Where(x=>x.QuestionType!=QuestionType.TherapeuticEffectEvaluationGroup)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
|
@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||||
|
|
||||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync();
|
||||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||||
|
|
||||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync();
|
||||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||||
|
|
||||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync();
|
||||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
var lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto()
|
var lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto()
|
||||||
|
|
|
@ -39,6 +39,7 @@ namespace IRaCIS.Core.Application
|
||||||
private readonly IOrganInfoService _iOrganInfoService;
|
private readonly IOrganInfoService _iOrganInfoService;
|
||||||
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
|
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
|
||||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||||
|
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||||
private readonly IReadingQuestionService iReadingQuestionService;
|
private readonly IReadingQuestionService iReadingQuestionService;
|
||||||
private readonly IRepository<TrialCriterionAdditionalAssessmentType> _trialCriterionAdditionalAssessmentTypeRepository;
|
private readonly IRepository<TrialCriterionAdditionalAssessmentType> _trialCriterionAdditionalAssessmentTypeRepository;
|
||||||
|
|
||||||
|
@ -61,6 +62,7 @@ namespace IRaCIS.Core.Application
|
||||||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||||
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
|
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
|
||||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||||
|
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||||
IReadingQuestionService iReadingQuestionService,
|
IReadingQuestionService iReadingQuestionService,
|
||||||
IEasyCachingProvider provider,
|
IEasyCachingProvider provider,
|
||||||
IOrganInfoService iOrganInfoService,
|
IOrganInfoService iOrganInfoService,
|
||||||
|
@ -77,6 +79,7 @@ namespace IRaCIS.Core.Application
|
||||||
_trialRepository = trialRepository;
|
_trialRepository = trialRepository;
|
||||||
_taskAllocationRuleRepository = taskAllocationRuleRepository;
|
_taskAllocationRuleRepository = taskAllocationRuleRepository;
|
||||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||||
|
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||||
this.iReadingQuestionService = iReadingQuestionService;
|
this.iReadingQuestionService = iReadingQuestionService;
|
||||||
this._trialQCQuestionRepository = trialQCQuestionRepository;
|
this._trialQCQuestionRepository = trialQCQuestionRepository;
|
||||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||||
|
@ -250,7 +253,7 @@ namespace IRaCIS.Core.Application
|
||||||
|
|
||||||
|
|
||||||
await _trialCriterionDictionaryCode.BatchDeleteNoTrackingAsync(x => x.TrialCriterionId == trialCriterion.Id);
|
await _trialCriterionDictionaryCode.BatchDeleteNoTrackingAsync(x => x.TrialCriterionId == trialCriterion.Id);
|
||||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterion.Id);
|
await _readingTrialCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterion.Id);
|
||||||
|
|
||||||
var criterionDictionaryCodeList = await _systemCriterionDictionaryCode.Where(x => x.SystemCriterionId == trialCriterion.ReadingQuestionCriterionSystemId.Value)
|
var criterionDictionaryCodeList = await _systemCriterionDictionaryCode.Where(x => x.SystemCriterionId == trialCriterion.ReadingQuestionCriterionSystemId.Value)
|
||||||
.Select(x => new TrialCriterionDictionaryCode()
|
.Select(x => new TrialCriterionDictionaryCode()
|
||||||
|
@ -266,15 +269,25 @@ namespace IRaCIS.Core.Application
|
||||||
|
|
||||||
|
|
||||||
var criterionDictionaryList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == trialCriterion.ReadingQuestionCriterionSystemId.Value)
|
var criterionDictionaryList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == trialCriterion.ReadingQuestionCriterionSystemId.Value)
|
||||||
|
.Select(x=>new ReadingTrialCriterionDictionary() {
|
||||||
|
|
||||||
|
CriterionId = inDto.TrialReadingCriterionId,
|
||||||
|
CrterionDictionaryGroup=x.CrterionDictionaryGroup,
|
||||||
|
IsBaseLineUse=x.IsBaseLineUse,
|
||||||
|
IsFollowVisitUse=x.IsFollowVisitUse,
|
||||||
|
DictionaryId=x.DictionaryId,
|
||||||
|
ParentCode=x.ParentCode,
|
||||||
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
criterionDictionaryList.ForEach(x =>
|
criterionDictionaryList.ForEach(x =>
|
||||||
{
|
{
|
||||||
|
|
||||||
x.Id = NewId.NextGuid();
|
x.Id = NewId.NextGuid();
|
||||||
x.Dictionary = null;
|
|
||||||
x.IsSystemCriterion = false;
|
|
||||||
x.CriterionId = inDto.TrialReadingCriterionId;
|
|
||||||
});
|
});
|
||||||
await _readingCriterionDictionaryRepository.AddRangeAsync(criterionDictionaryList);
|
|
||||||
|
await _readingTrialCriterionDictionaryRepository.AddRangeAsync(criterionDictionaryList);
|
||||||
|
|
||||||
await _trialCriterionDictionaryCode.AddRangeAsync(criterionDictionaryCodeList);
|
await _trialCriterionDictionaryCode.AddRangeAsync(criterionDictionaryCodeList);
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -328,14 +341,18 @@ namespace IRaCIS.Core.Application
|
||||||
public async Task<IResponseOutput> SetGlobalReadingInfo(SetGlobalReadingInfoInDto inDto)
|
public async Task<IResponseOutput> SetGlobalReadingInfo(SetGlobalReadingInfoInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess);
|
//await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
||||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.GlobalAssessList.Select(x => new ReadingCriterionDictionary
|
//{
|
||||||
|
// IsGlobalReading = inDto.IsGlobalReading
|
||||||
|
|
||||||
|
//});
|
||||||
|
await _readingTrialCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess);
|
||||||
|
await _readingTrialCriterionDictionaryRepository.AddRangeAsync(inDto.GlobalAssessList.Select(x => new ReadingTrialCriterionDictionary
|
||||||
{
|
{
|
||||||
CriterionId = inDto.TrialReadingCriterionId,
|
CriterionId = inDto.TrialReadingCriterionId,
|
||||||
DictionaryId = x.DictionaryId,
|
DictionaryId = x.DictionaryId,
|
||||||
IsBaseLineUse = x.IsBaseLineUse,
|
IsBaseLineUse = x.IsBaseLineUse,
|
||||||
IsFollowVisitUse = x.IsFollowVisitUse,
|
IsFollowVisitUse = x.IsFollowVisitUse,
|
||||||
IsSystemCriterion = false,
|
|
||||||
ParentCode = ReadingCommon.CriterionDictionary.GlobalAssess
|
ParentCode = ReadingCommon.CriterionDictionary.GlobalAssess
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -359,7 +376,7 @@ namespace IRaCIS.Core.Application
|
||||||
IsGlobalReading = trialCriterion.IsGlobalReading,
|
IsGlobalReading = trialCriterion.IsGlobalReading,
|
||||||
IsSystemCriterion = trialCriterion.ReadingQuestionCriterionSystemId != null,
|
IsSystemCriterion = trialCriterion.ReadingQuestionCriterionSystemId != null,
|
||||||
IsSign = trialCriterion.IsSigned,
|
IsSign = trialCriterion.IsSigned,
|
||||||
GlobalAssessTypes = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId
|
GlobalAssessTypes = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId
|
||||||
&& x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess
|
&& x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess
|
||||||
)
|
)
|
||||||
.Select(x => new CriterionDictionaryInfo()
|
.Select(x => new CriterionDictionaryInfo()
|
||||||
|
@ -393,7 +410,7 @@ namespace IRaCIS.Core.Application
|
||||||
return new GetOncologySetOutDto
|
return new GetOncologySetOutDto
|
||||||
{
|
{
|
||||||
EvaluationReason = trialCriterion.EvaluationReason.IsNullOrEmpty() ? ReadingCommon.EvaluationReason : trialCriterion.EvaluationReason,
|
EvaluationReason = trialCriterion.EvaluationReason.IsNullOrEmpty() ? ReadingCommon.EvaluationReason : trialCriterion.EvaluationReason,
|
||||||
OncologyAssessIds = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess).Select(x => x.DictionaryId).ToListAsync(),
|
OncologyAssessIds = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess).Select(x => x.DictionaryId).ToListAsync(),
|
||||||
IsSystemCriterion = trialCriterion.ReadingQuestionCriterionSystemId != null,
|
IsSystemCriterion = trialCriterion.ReadingQuestionCriterionSystemId != null,
|
||||||
IsSign = trialCriterion.IsSigned,
|
IsSign = trialCriterion.IsSigned,
|
||||||
};
|
};
|
||||||
|
@ -418,13 +435,12 @@ namespace IRaCIS.Core.Application
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess);
|
await _readingTrialCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess);
|
||||||
|
|
||||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.OncologyAssessIds.Select(x => new ReadingCriterionDictionary
|
await _readingTrialCriterionDictionaryRepository.AddRangeAsync(inDto.OncologyAssessIds.Select(x => new ReadingTrialCriterionDictionary
|
||||||
{
|
{
|
||||||
CriterionId = inDto.TrialReadingCriterionId,
|
CriterionId = inDto.TrialReadingCriterionId,
|
||||||
DictionaryId = x,
|
DictionaryId = x,
|
||||||
IsSystemCriterion = false,
|
|
||||||
ParentCode = ReadingCommon.CriterionDictionary.OncologyAssess
|
ParentCode = ReadingCommon.CriterionDictionary.OncologyAssess
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -409,7 +409,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
await _repository.BatchDeleteAsync<CriterionNidus>(o => o.TrialReadingCriterion.TrialId == trialId) ||
|
await _repository.BatchDeleteAsync<CriterionNidus>(o => o.TrialReadingCriterion.TrialId == trialId) ||
|
||||||
await _repository.BatchDeleteAsync<ReadingCriterionDictionary>(o => o.TrialReadingCriterion.TrialId == trialId) ||
|
|
||||||
|
|
||||||
|
|
||||||
await _repository.BatchDeleteAsync<DataInspection>(o => o.TrialId == trialId) ||
|
await _repository.BatchDeleteAsync<DataInspection>(o => o.TrialId == trialId) ||
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 标准病灶中间表
|
/// 标准病灶中间表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Table("CriterionNidus")]
|
[Table("CriterionNidusSystem")]
|
||||||
public class CriterionNidus : Entity, IAuditAdd
|
public class CriterionNidus : Entity, IAuditAdd
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
|
// 生成时间 2023-04-24 09:29:54
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
using System;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
namespace IRaCIS.Core.Domain.Models
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///CriterionNidusTrial
|
||||||
|
///</summary>
|
||||||
|
[Table("CriterionNidusTrial")]
|
||||||
|
public class CriterionNidusTrial : Entity, IAuditAdd
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CriterionId
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public Guid CriterionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CreateTime
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CreateUserId
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 病灶类型
|
||||||
|
/// </summary>
|
||||||
|
public LesionType LesionType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 器官类型
|
||||||
|
/// </summary>
|
||||||
|
public OrganType OrganType { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -10,7 +10,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
///<summary>
|
///<summary>
|
||||||
///ReadingCriterionDictionary
|
///ReadingCriterionDictionary
|
||||||
///</summary>
|
///</summary>
|
||||||
[Table("ReadingCriterionDictionary")]
|
[Table("ReadingSystemCriterionDictionary")]
|
||||||
public class ReadingCriterionDictionary : Entity, IAuditAdd
|
public class ReadingCriterionDictionary : Entity, IAuditAdd
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -63,9 +63,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[ForeignKey("DictionaryId")]
|
[ForeignKey("DictionaryId")]
|
||||||
public Dictionary Dictionary { get; set; }
|
public Dictionary Dictionary { get; set; }
|
||||||
|
|
||||||
[ForeignKey("CriterionId")]
|
|
||||||
[JsonIgnore]
|
|
||||||
public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
|
// 生成时间 2023-04-24 09:32:01
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
using System;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
namespace IRaCIS.Core.Domain.Models
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///ReadingTrialCriterionDictionary
|
||||||
|
///</summary>
|
||||||
|
[Table("ReadingTrialCriterionDictionary")]
|
||||||
|
public class ReadingTrialCriterionDictionary : Entity, IAuditAdd
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CriterionId
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public Guid CriterionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DictionaryId
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public Guid DictionaryId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CreateTime
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CreateUserId
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ParentCode
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public string ParentCode { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IsBaseLineUse
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public bool IsBaseLineUse { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IsFollowVisitUse
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public bool IsFollowVisitUse { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CrterionDictionaryGroup
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public CrterionDictionaryGroup CrterionDictionaryGroup { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("DictionaryId")]
|
||||||
|
public Dictionary Dictionary { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("CriterionId")]
|
||||||
|
[JsonIgnore]
|
||||||
|
public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1013,3 +1013,17 @@ delete ReadingTaskRelation where RelevanceType=2
|
||||||
|
|
||||||
INSERT INTO ReadingTaskRelation(Id, TaskId, RelevanceTaskId, RelevanceType, CreateTime,CreateUserId)
|
INSERT INTO ReadingTaskRelation(Id, TaskId, RelevanceTaskId, RelevanceType, CreateTime,CreateUserId)
|
||||||
SELECT NEWID(), TaskId, RelevanceTaskId, 2,ReadingTaskRelation.CreateTime ,ReadingTaskRelation.CreateUserId FROM ReadingTaskRelation inner join VisitTask on VisitTask.Id=ReadingTaskRelation.TaskId WHERE RelevanceType = 1 and ReadingCategory=1
|
SELECT NEWID(), TaskId, RelevanceTaskId, 2,ReadingTaskRelation.CreateTime ,ReadingTaskRelation.CreateUserId FROM ReadingTaskRelation inner join VisitTask on VisitTask.Id=ReadingTaskRelation.TaskId WHERE RelevanceType = 1 and ReadingCategory=1
|
||||||
|
|
||||||
|
-----------------------------------------2023-04-24-----------------------------------
|
||||||
|
-- 维护CriterionNidusTrial 数据
|
||||||
|
INSERT INTO CriterionNidusTrial (Id, CriterionId, CreateTime, CreateUserId, LesionType, OrganType)
|
||||||
|
SELECT NEWID(), CriterionId, GETDATE(), '00000000-0000-0000-0000-000000000000', LesionType, OrganType
|
||||||
|
FROM CriterionNidus
|
||||||
|
WHERE CriterionId NOT IN (SELECT DISTINCT CriterionId FROM CriterionNidusTrial ) and IsSystemCriterion=0
|
||||||
|
|
||||||
|
|
||||||
|
-- 维护ReadingTrialCriterionDictionary 数据
|
||||||
|
INSERT INTO ReadingTrialCriterionDictionary (Id, CriterionId, DictionaryId, CreateTime, CreateUserId, ParentCode, IsBaseLineUse, IsFollowVisitUse, CrterionDictionaryGroup)
|
||||||
|
SELECT NEWID(), RC.CriterionId, RC.DictionaryId, GETDATE(), '00000000-0000-0000-0000-000000000000', RC.ParentCode, RC.IsBaseLineUse, RC.IsFollowVisitUse, RC.CrterionDictionaryGroup
|
||||||
|
FROM ReadingCriterionDictionary RC
|
||||||
|
WHERE CriterionId NOT IN (SELECT DISTINCT CriterionId FROM ReadingTrialCriterionDictionary ) and IsSystemCriterion=0
|
|
@ -261,6 +261,10 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
public virtual DbSet<CriterionNidus> CriterionNidus { get; set; }
|
public virtual DbSet<CriterionNidus> CriterionNidus { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<CriterionNidusTrial> CriterionNidusTrial { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<ReadingTrialCriterionDictionary> ReadingTrialCriterionDictionary { get; set; }
|
||||||
|
|
||||||
public virtual DbSet<ReadingTableQuestionTrial> ReadingTableQuestionTrial { get; set; }
|
public virtual DbSet<ReadingTableQuestionTrial> ReadingTableQuestionTrial { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
||||||
public static readonly string DbDatabase = "IRaCIS_New_Tet";
|
public static readonly string DbDatabase = "IRaCIS_New_Tet";
|
||||||
//表名称用字符串,拼接
|
//表名称用字符串,拼接
|
||||||
public static readonly string TableName = "SubjectCriteriaEvaluation";
|
public static readonly string TableName = "ReadingTrialCriterionDictionary";
|
||||||
//具体文件里面 例如service 可以配置是否分页
|
//具体文件里面 例如service 可以配置是否分页
|
||||||
}
|
}
|
||||||
#>
|
#>
|
||||||
|
|
BIN
后端提示语.xlsx
BIN
后端提示语.xlsx
Binary file not shown.
Loading…
Reference in New Issue