Uat_Study
commit
43174b37cf
|
@ -51,6 +51,30 @@
|
|||
//Repository
|
||||
"Repository_UpdateError": "Updated 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--------------------------------------------------------------------
|
||||
|
|
|
@ -50,6 +50,30 @@
|
|||
//Repository
|
||||
"Repository_UpdateError": "修改的数据在数据库不存在。",
|
||||
"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--------------------------------------------------------------------
|
||||
|
|
|
@ -22,8 +22,10 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
||||
private readonly IReadingQuestionService _readingQuestionService;
|
||||
|
||||
|
@ -32,7 +34,8 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCodeRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystem,
|
||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial,
|
||||
IReadingQuestionService readingQuestionService
|
||||
|
@ -47,7 +50,8 @@ namespace IRaCIS.Application.Services
|
|||
_trialRepository = trialRepository;
|
||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||
this._trialCriterionDictionaryCodeRepository = trialCriterionDictionaryCodeRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._readingQuestionCriterionSystem = readingQuestionCriterionSystem;
|
||||
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
||||
this._readingQuestionService = readingQuestionService;
|
||||
|
@ -179,7 +183,14 @@ namespace IRaCIS.Application.Services
|
|||
//return ResponseOutput.NotOk(_localizer["Dictionary_DictionaryDeletion"]);
|
||||
}
|
||||
|
||||
if (await _dicRepository.AnyAsync(t => t.ParentId == id))
|
||||
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))
|
||||
{
|
||||
//---有子项数据,不允许直接删除!
|
||||
return ResponseOutput.NotOk(_localizer["Dictionary_SubitemDeletion"]);
|
||||
|
@ -201,12 +212,6 @@ namespace IRaCIS.Application.Services
|
|||
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);
|
||||
return ResponseOutput.Result(success);
|
||||
|
@ -293,7 +298,7 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
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();
|
||||
|
@ -337,16 +342,49 @@ namespace IRaCIS.Application.Services
|
|||
else
|
||||
{
|
||||
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)
|
||||
{
|
||||
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
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
var criterionCode = await _dicRepository.Where(x => x.ConfigDictionary.Code == "Reading_eCRF_Criterion").Select(x => x.Code).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();
|
||||
|
||||
|
@ -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,
|
||||
Code = x.Dictionary.Code,
|
||||
|
|
|
@ -67,8 +67,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public class GetCriterionLesionTypeInDto
|
||||
{
|
||||
public Guid CriterionId { get; set; }
|
||||
}
|
||||
public Guid? SystemCriterionId { get; set; }
|
||||
|
||||
public Guid? TrialCriterionId { get; set; }
|
||||
}
|
||||
|
||||
///<summary>CriterionNidusQuery 列表查询参数模型</summary>
|
||||
public class CriterionNidusQuery
|
||||
|
|
|
@ -1247,10 +1247,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public JudgeTypeEnum JudgeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数值类型
|
||||
|
|
|
@ -156,8 +156,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//--------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2022-08-12 14:07:20
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
|
@ -28,14 +28,18 @@ namespace IRaCIS.Core.Application.Service
|
|||
private readonly IRepository<OrganTrialInfo> _organTrialInfoRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
||||
private readonly IRepository<CriterionNidus> _criterionNidusRepository;
|
||||
private readonly IRepository<CriterionNidusTrial> _criterionNidusTrialRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository;
|
||||
|
||||
public OrganInfoService(
|
||||
public OrganInfoService(
|
||||
IRepository<OrganInfo> organInfoRepository,
|
||||
IRepository<Dictionary> dictionaryRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<OrganTrialInfo> organTrialInfoRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial,
|
||||
IRepository<CriterionNidus> criterionNidusRepository
|
||||
IRepository<CriterionNidusTrial> criterionNidusTrialRepository,
|
||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
||||
IRepository<CriterionNidus> criterionNidusRepository
|
||||
)
|
||||
{
|
||||
_organInfoRepository = organInfoRepository;
|
||||
|
@ -44,7 +48,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
this._organTrialInfoRepository = organTrialInfoRepository;
|
||||
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
||||
this._criterionNidusRepository = criterionNidusRepository;
|
||||
}
|
||||
this._criterionNidusTrialRepository = criterionNidusTrialRepository;
|
||||
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
||||
}
|
||||
|
||||
|
||||
#region 系统器官
|
||||
|
@ -146,7 +152,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
join trialData in _organTrialInfoRepository.AsQueryable().Where( x => x.IsEnable&&x.TrialCriterionId== trialReadingCriterionId)
|
||||
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
|
||||
select new ReadingOrganDto()
|
||||
{
|
||||
|
@ -203,7 +209,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
if (inDto.LesionType != null)
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -315,7 +321,15 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<List<OrganDictionary>> GetCriterionLesionType(GetCriterionLesionTypeInDto inDto)
|
||||
{
|
||||
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 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)
|
||||
{
|
||||
|
||||
var criterionNidusQueryable = _criterionNidusRepository
|
||||
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await criterionNidusQueryable.ToListAsync();
|
||||
if (await _readingQuestionCriterionSystemRepository.AnyAsync(x => x.Id == inQuery.CriterionId))
|
||||
{
|
||||
return await _criterionNidusRepository
|
||||
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
return await _criterionNidusTrialRepository
|
||||
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <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))
|
||||
{
|
||||
throw new BusinessValidationFailedException("存在相同的数据,操作失败");
|
||||
//---存在相同的数据,操作失败
|
||||
throw new BusinessValidationFailedException(_localizer["OrganInfo_DuplicateData"]);
|
||||
}
|
||||
var entity = await _criterionNidusRepository.InsertOrUpdateAsync(inDto, true);
|
||||
|
||||
|
@ -418,20 +441,22 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
inDto.SystemCriterionId = readingQuestionCriterionTrial.ReadingQuestionCriterionSystemId;
|
||||
}
|
||||
await _criterionNidusRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterionId);
|
||||
List<CriterionNidusData> criterionNidusList = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => new CriterionNidusData()
|
||||
await _criterionNidusTrialRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterionId);
|
||||
|
||||
|
||||
List<CriterionNidusTrial> criterionNidusList = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => new CriterionNidusTrial()
|
||||
{
|
||||
Id = x.Id,
|
||||
CriterionId = trialCriterionId,
|
||||
LesionType = x.LesionType,
|
||||
OriginalId = x.Id,
|
||||
|
||||
OrganType=x.OrganType,
|
||||
IsSystemCriterion=false,
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
criterionNidusList.ForEach(x => x.Id = NewId.NextGuid());
|
||||
|
||||
await _criterionNidusRepository.AddRangeAsync(criterionNidusList);
|
||||
await _criterionNidusTrialRepository.AddRangeAsync(criterionNidusList);
|
||||
await _organTrialInfoRepository.BatchDeleteNoTrackingAsync(x => x.TrialCriterionId == readingQuestionCriterionTrial.Id);
|
||||
List<OrganTrialInfo> organTrialInfoList = await _organInfoRepository.Where(x =>x.SystemCriterionId== inDto.SystemCriterionId).Select(x => new OrganTrialInfo()
|
||||
{
|
||||
|
|
|
@ -20,7 +20,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
||||
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
||||
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
||||
|
@ -32,7 +33,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||
IRepository<ReadingTableQuestionAnswer> readingTableQuestionAnswerRepository,
|
||||
|
@ -46,7 +48,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
||||
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._visitTaskRepository = visitTaskRepository;
|
||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||
this._visitTaskRepository = visitTaskRepository;
|
||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||
this._readingTableQuestionAnswerRepository = readingTableQuestionAnswerRepository;
|
||||
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
||||
|
@ -310,7 +313,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
|
||||
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);
|
||||
|
@ -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();
|
||||
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))
|
||||
{
|
||||
throw new BusinessValidationFailedException("无裁判问题却有仲裁对象,操作失败");
|
||||
//---无裁判问题却有仲裁对象,操作失败
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingCriterion_ArbitratorWithoutJudgment"]);
|
||||
}
|
||||
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
||||
{
|
||||
|
@ -568,11 +574,23 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
[HttpPost]
|
||||
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();
|
||||
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))
|
||||
{
|
||||
throw new BusinessValidationFailedException("问题编号重复");
|
||||
//---问题编号重复
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
|
||||
}
|
||||
var entity = await _readingQuestionSystemRepository.InsertOrUpdateAsync(indto, true);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
@ -302,9 +303,16 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.ParentId == id))
|
||||
{
|
||||
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
|
||||
//---此问题存在子问题,请先删除子问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||
}
|
||||
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
|
||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.GroupId == id))
|
||||
{
|
||||
//---此分组已被引用,请先删除被引用的问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
|
||||
}
|
||||
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
var success = await _readingQuestionSystemRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
@ -382,7 +390,8 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
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);
|
||||
|
@ -406,19 +415,22 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
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)
|
||||
{
|
||||
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))
|
||||
{
|
||||
throw new BusinessValidationFailedException("问题编号重复");
|
||||
//---问题编号重复
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
|
||||
}
|
||||
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
|
||||
|
@ -480,14 +492,16 @@ namespace IRaCIS.Application.Services
|
|||
// 防止有脏数据 循环验证 最多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();
|
||||
|
||||
if (relation.Select(x => x.QuestionId).ToList().Contains(originalId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("计算依赖循环了!");
|
||||
//---计算依赖循环了!
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CircularDependency"]);
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -585,9 +599,16 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.ParentId == id))
|
||||
{
|
||||
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
|
||||
//---此问题存在子问题,请先删除子问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||
}
|
||||
await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.GroupId == id))
|
||||
{
|
||||
//---此分组已被引用,请先删除被引用的问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
|
||||
}
|
||||
await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
var success = await _readingQuestionTrialRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
throw new BusinessValidationFailedException("问题编号重复");
|
||||
//---问题编号重复
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
|
||||
}
|
||||
|
||||
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))
|
||||
{
|
||||
return ResponseOutput.NotOk("当前问题存在子问题 删除失败");
|
||||
//---此问题存在子问题,请先删除子问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||
}
|
||||
|
||||
await _readingTableQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
||||
|
@ -1505,4 +1528,4 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -248,18 +248,63 @@ namespace IRaCIS.Application.Services
|
|||
GlobalReadingShowType=y.ReadingQuestionTrial.GlobalReadingShowType,
|
||||
AnswerCombination = y.ReadingQuestionTrial.AnswerCombination,
|
||||
JudgeType = y.ReadingQuestionTrial.JudgeType,
|
||||
Type = y.ReadingQuestionTrial.Type,
|
||||
ShowOrder= y.ReadingQuestionTrial.ShowOrder,
|
||||
Type = y.ReadingQuestionTrial.Type,
|
||||
TypeValue = y.ReadingQuestionTrial.TypeValue,
|
||||
ValueType = y.ReadingQuestionTrial.ValueType,
|
||||
IsJudgeQuestion =y.ReadingQuestionTrial.IsJudgeQuestion,
|
||||
Answer =y.Answer,
|
||||
}).ToList()
|
||||
}).ToListAsync();
|
||||
var globalQuestionList = await _readingQuestionTrialRepository.Where(x => x.GlobalReadingShowType != GlobalReadingShowType.NotShow && x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId).IgnoreAutoIncludes().ToListAsync();
|
||||
|
||||
|
||||
|
||||
|
||||
result.TaskList.ForEach(x =>
|
||||
{
|
||||
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 criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
|
||||
|
@ -300,7 +345,8 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
result.TaskList.ForEach(x =>
|
||||
{
|
||||
x.AfterQuestionList = x.BeforeQuestionList.Where(x=>x.IsJudgeQuestion).GroupJoin(
|
||||
x.AfterQuestionList = x.BeforeQuestionList
|
||||
.GroupJoin(
|
||||
globalReadingQuestion
|
||||
, l => new { a = l.QuestionId, b = x.VisitTaskId }
|
||||
, 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 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
|
||||
)
|
||||
//.WhereIf(isBaseLine,x=>x.IsBaseLineUse)
|
||||
|
|
|
@ -43,7 +43,8 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<DicomInstance> _dicomInstanceRepository;
|
||||
private readonly IRepository<OrganInfo> _organInfoRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository;
|
||||
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
||||
private readonly IRepository<ReadingTableQuestionSystem> _readingTableQuestionSystemRepository;
|
||||
private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
||||
|
@ -80,7 +81,8 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<OrganInfo> organInfoRepository,
|
||||
IMemoryCache cache,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<TumorAssessment_RECIST1Point1> tumorAssessmentRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IRepository<TumorAssessment_RECIST1Point1> tumorAssessmentRepository,
|
||||
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
|
||||
IRepository<ReadingTableQuestionSystem> readingTableQuestionSystemRepository,
|
||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||
|
@ -120,7 +122,9 @@ namespace IRaCIS.Application.Services
|
|||
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
||||
this._readingQuestionSystem = ReadingQuestionSystem;
|
||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||
|
||||
this._readingQuestionSystem = ReadingQuestionSystem;
|
||||
this._noneDicomStudyFileSystem = noneDicomStudyFileSystem;
|
||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||
this._cache = cache;
|
||||
|
|
|
@ -145,7 +145,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
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
|
||||
)
|
||||
.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))
|
||||
{
|
||||
throw new BusinessValidationFailedException($"当前访视已经添加过阅片期");
|
||||
//---当前访视已经添加过阅片期
|
||||
throw new BusinessValidationFailedException(_localizer["ReadModule_AlreadyAdded"]);
|
||||
}
|
||||
var readModuleData = new ReadModule()
|
||||
{
|
||||
|
@ -383,7 +384,8 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
else
|
||||
{
|
||||
return ResponseOutput.NotOk("请先添加全局阅片");
|
||||
//---请先添加全局阅片
|
||||
return ResponseOutput.NotOk(_localizer["ReadModule_AddGlobalFirst"]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -392,7 +394,8 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
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))
|
||||
{
|
||||
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)))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前访视存在肿瘤学阅片,请先删除肿瘤学阅片");
|
||||
//---当前访视存在肿瘤学阅片,请先删除肿瘤学阅片
|
||||
throw new BusinessValidationFailedException(_localizer["ReadModule_TumorExists"]);
|
||||
}
|
||||
|
||||
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();
|
||||
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>();
|
||||
foreach (var item in plans)
|
||||
|
@ -307,7 +307,8 @@ namespace IRaCIS.Application.Services
|
|||
&& x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId
|
||||
&& 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 =>
|
||||
{
|
||||
x.SubjectVisitName = x.IsGlobal ? "末次访视" : x.SubjectVisitName;
|
||||
//---末次访视
|
||||
x.SubjectVisitName = x.IsGlobal ? _localizer["ReadingPeriodSet_LastVisit"] : x.SubjectVisitName;
|
||||
});
|
||||
return pageList;
|
||||
}
|
||||
|
|
|
@ -39,16 +39,25 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.Value, u => u.MapFrom(s => s.Dictionary.Value))
|
||||
.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<ReadingClinicalData, GetReadingClinicalDataListOutDto>()
|
||||
//.ForMember(d => d.ClinicalDataLevel, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataLevel))
|
||||
//.ForMember(d => d.ClinicalDataLevelName, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataSetName))
|
||||
//.ForMember(d => d.ClinicalUploadType, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalUploadType));
|
||||
//.ForMember(d => d.FileCount, u => u.MapFrom(s => s.ReadingClinicalDataPDFList.Count()));
|
||||
|
||||
CreateMap<ReadingClinicalDataPDF, GetReadingClinicalDataPDFListOutDto>();
|
||||
//CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
|
||||
// CreateMap<ReadingClinicalData, GetReadingClinicalDataListOutDto>()
|
||||
//.ForMember(d => d.ClinicalDataLevel, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataLevel))
|
||||
//.ForMember(d => d.ClinicalDataLevelName, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataSetName))
|
||||
//.ForMember(d => d.ClinicalUploadType, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalUploadType));
|
||||
//.ForMember(d => d.FileCount, u => u.MapFrom(s => s.ReadingClinicalDataPDFList.Count()));
|
||||
|
||||
CreateMap<ReadingClinicalDataPDF, GetReadingClinicalDataPDFListOutDto>();
|
||||
|
||||
//.ForMember(d => d.SiteNames, u => u.MapFrom(s => s.ReadingPeriodSites.SelectMany(x => x.Site.SiteName).ToList()));
|
||||
|
||||
|
@ -238,12 +247,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
//.ForMember(x => x.FileList, y => y.MapFrom(n => n.FileList))
|
||||
.ForMember(x => x.CreateUserName, y => y.MapFrom(n => n.CreateUser.UserName));
|
||||
|
||||
#endregion
|
||||
|
||||
#region 阅片部位
|
||||
#endregion
|
||||
|
||||
#region 阅片部位
|
||||
|
||||
CreateMap<CriterionNidus, CriterionNidusView>();
|
||||
CreateMap<CriterionNidusTrial, CriterionNidusView>();
|
||||
CreateMap<CriterionNidus, CriterionNidusView>();
|
||||
CreateMap<CriterionNidus, CriterionNidusAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<OrganInfoAddOrEdit, OrganInfo>();
|
||||
|
|
|
@ -117,7 +117,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
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 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 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.QuestionType!=QuestionType.TherapeuticEffectEvaluationGroup)
|
||||
.ToListAsync();
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
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 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 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 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 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 lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto()
|
||||
|
|
|
@ -39,7 +39,8 @@ namespace IRaCIS.Core.Application
|
|||
private readonly IOrganInfoService _iOrganInfoService;
|
||||
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IReadingQuestionService iReadingQuestionService;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
private readonly IReadingQuestionService iReadingQuestionService;
|
||||
private readonly IRepository<TrialCriterionAdditionalAssessmentType> _trialCriterionAdditionalAssessmentTypeRepository;
|
||||
|
||||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
||||
|
@ -61,7 +62,8 @@ namespace IRaCIS.Core.Application
|
|||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IReadingQuestionService iReadingQuestionService,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IReadingQuestionService iReadingQuestionService,
|
||||
IEasyCachingProvider provider,
|
||||
IOrganInfoService iOrganInfoService,
|
||||
IRepository<TrialCriterionAdditionalAssessmentType> trialCriterionAdditionalAssessmentTypeRepository,
|
||||
|
@ -77,7 +79,8 @@ namespace IRaCIS.Core.Application
|
|||
_trialRepository = trialRepository;
|
||||
_taskAllocationRuleRepository = taskAllocationRuleRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this.iReadingQuestionService = iReadingQuestionService;
|
||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||
this.iReadingQuestionService = iReadingQuestionService;
|
||||
this._trialQCQuestionRepository = trialQCQuestionRepository;
|
||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||
|
@ -250,7 +253,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
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)
|
||||
.Select(x => new TrialCriterionDictionaryCode()
|
||||
|
@ -266,15 +269,25 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
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();
|
||||
|
||||
criterionDictionaryList.ForEach(x =>
|
||||
{
|
||||
|
||||
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);
|
||||
#endregion
|
||||
|
@ -328,14 +341,18 @@ namespace IRaCIS.Core.Application
|
|||
public async Task<IResponseOutput> SetGlobalReadingInfo(SetGlobalReadingInfoInDto inDto)
|
||||
{
|
||||
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.TrialReadingCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess);
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.GlobalAssessList.Select(x => new ReadingCriterionDictionary
|
||||
//await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
||||
//{
|
||||
// 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,
|
||||
DictionaryId = x.DictionaryId,
|
||||
IsBaseLineUse = x.IsBaseLineUse,
|
||||
IsFollowVisitUse = x.IsFollowVisitUse,
|
||||
IsSystemCriterion = false,
|
||||
ParentCode = ReadingCommon.CriterionDictionary.GlobalAssess
|
||||
}));
|
||||
|
||||
|
@ -359,7 +376,7 @@ namespace IRaCIS.Core.Application
|
|||
IsGlobalReading = trialCriterion.IsGlobalReading,
|
||||
IsSystemCriterion = trialCriterion.ReadingQuestionCriterionSystemId != null,
|
||||
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
|
||||
)
|
||||
.Select(x => new CriterionDictionaryInfo()
|
||||
|
@ -393,7 +410,7 @@ namespace IRaCIS.Core.Application
|
|||
return new GetOncologySetOutDto
|
||||
{
|
||||
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,
|
||||
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,
|
||||
DictionaryId = x,
|
||||
IsSystemCriterion = false,
|
||||
ParentCode = ReadingCommon.CriterionDictionary.OncologyAssess
|
||||
}));
|
||||
|
||||
|
|
|
@ -409,7 +409,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
|
||||
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) ||
|
||||
|
|
|
@ -9,16 +9,16 @@ using System.ComponentModel.DataAnnotations;
|
|||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 标准病灶中间表
|
||||
/// </summary>
|
||||
[Table("CriterionNidus")]
|
||||
public class CriterionNidus : Entity, IAuditAdd
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 标准病灶中间表
|
||||
/// </summary>
|
||||
[Table("CriterionNidusSystem")]
|
||||
public class CriterionNidus : Entity, IAuditAdd
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 标准ID
|
||||
/// </summary>
|
||||
/// 标准ID
|
||||
/// </summary>
|
||||
public Guid CriterionId { get; set; }
|
||||
|
||||
|
||||
|
@ -33,14 +33,14 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
public LesionType LesionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -49,12 +49,12 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public bool IsSystemCriterion { get; set; }
|
||||
|
||||
|
||||
[ForeignKey("CriterionId")]
|
||||
[JsonIgnore]
|
||||
public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }
|
||||
[ForeignKey("CriterionId")]
|
||||
[JsonIgnore]
|
||||
public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
///ReadingCriterionDictionary
|
||||
///</summary>
|
||||
[Table("ReadingCriterionDictionary")]
|
||||
[Table("ReadingSystemCriterionDictionary")]
|
||||
public class ReadingCriterionDictionary : Entity, IAuditAdd
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -63,9 +63,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
[ForeignKey("DictionaryId")]
|
||||
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)
|
||||
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,7 +261,11 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
|
||||
public virtual DbSet<CriterionNidus> CriterionNidus { get; set; }
|
||||
|
||||
public virtual DbSet<ReadingTableQuestionTrial> ReadingTableQuestionTrial { 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<TumorAssessment_RECIST1Point1BM> TumorAssessment_RECIST1Point1BM { 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 DbDatabase = "IRaCIS_New_Tet";
|
||||
//表名称用字符串,拼接
|
||||
public static readonly string TableName = "SubjectCriteriaEvaluation";
|
||||
public static readonly string TableName = "ReadingTrialCriterionDictionary";
|
||||
//具体文件里面 例如service 可以配置是否分页
|
||||
}
|
||||
#>
|
||||
|
|
BIN
后端提示语.xlsx
BIN
后端提示语.xlsx
Binary file not shown.
Loading…
Reference in New Issue