修改
This commit is contained in:
@@ -80,6 +80,50 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public bool IsCopyQuestion { get; set; }
|
||||
}
|
||||
|
||||
public class SetAssessTypeInDto
|
||||
{
|
||||
|
||||
[NotDefault]
|
||||
public Guid CriterionId { get; set; }
|
||||
|
||||
public string ParentCode { get; set; }
|
||||
|
||||
public List<Guid> DictionaryIds { get; set; }
|
||||
|
||||
public bool IsSystemCriterion { get; set; } = true;
|
||||
}
|
||||
|
||||
public class GetAssessTypeInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid CriterionId { get; set; }
|
||||
|
||||
public string ParentCode { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetAssessTypeOutDto
|
||||
{
|
||||
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid DictionaryId { get; set; }
|
||||
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
public string Code { get; set; }
|
||||
|
||||
public string ParentCode { get; set; }
|
||||
|
||||
public string ChildGroup { get; set; }
|
||||
|
||||
public string Value { get; set; } = string.Empty;
|
||||
|
||||
public string ValueCN { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
public class GetSystemCriterionListOutDto
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace IRaCIS.Application.Services
|
||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||
private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
|
||||
private readonly IRepository<Dictionary> _dictionaryRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
||||
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
@@ -42,6 +43,7 @@ namespace IRaCIS.Application.Services
|
||||
IRepository<ClinicalDataTrialSet> ClinicalDataTrialSetRepository,
|
||||
IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
|
||||
IRepository<Dictionary> dictionaryRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||
IRepository<Trial> trialRepository,
|
||||
@@ -60,6 +62,7 @@ namespace IRaCIS.Application.Services
|
||||
this._clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository;
|
||||
this._clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository;
|
||||
this._dictionaryRepository = dictionaryRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
||||
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
||||
this._trialRepository = trialRepository;
|
||||
@@ -70,6 +73,61 @@ namespace IRaCIS.Application.Services
|
||||
this._previousPDFRepository = previousPDFRepository;
|
||||
}
|
||||
|
||||
#region 全局评估类型 肿瘤学评估类型
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取标准字典
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetAssessTypeOutDto>> GetAssessType(GetAssessTypeInDto inDto)
|
||||
{
|
||||
List<GetAssessTypeOutDto> result = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.CriterionId
|
||||
&&x.ParentCode==inDto.ParentCode
|
||||
)
|
||||
.Select(x => new GetAssessTypeOutDto()
|
||||
{
|
||||
Id = x.Id,
|
||||
DictionaryId = x.DictionaryId,
|
||||
ChildGroup = x.Dictionary.ChildGroup,
|
||||
Code = x.Dictionary.Code,
|
||||
Description = x.Dictionary.Description,
|
||||
ShowOrder = x.Dictionary.ShowOrder,
|
||||
ParentCode = x.Dictionary.Parent.Code,
|
||||
Value = x.Dictionary.Value,
|
||||
ValueCN = x.Dictionary.ValueCN
|
||||
}).OrderBy(x => x.ParentCode).ThenBy(x => x.ShowOrder).ToListAsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置标准字典
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetAssessType(SetAssessTypeInDto inDto)
|
||||
{
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.CriterionId && x.ParentCode == inDto.ParentCode);
|
||||
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryIds.Select(x => new ReadingCriterionDictionary()
|
||||
{
|
||||
CriterionId = inDto.CriterionId,
|
||||
DictionaryId = x,
|
||||
IsSystemCriterion = inDto.IsSystemCriterion,
|
||||
ParentCode = inDto.ParentCode
|
||||
}));
|
||||
|
||||
await _readingCriterionDictionaryRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 系统标准
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user