Test.EIImageViewer
parent
d8dcc47006
commit
55b36519d1
|
@ -40,37 +40,6 @@ namespace IRaCIS.Application.Contracts
|
||||||
public string ValueCN { get; set; } = string.Empty;
|
public string ValueCN { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetTrialConfigDictionaryListInDto
|
|
||||||
{
|
|
||||||
[NotDefault]
|
|
||||||
public Guid TrialId { get; set; }
|
|
||||||
|
|
||||||
public string ParentCode { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public class GetTrialConfigDictionarySelectOutDto: BasicDicView
|
|
||||||
{
|
|
||||||
public bool IsAdded { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class GetTrialConfigDictionarySelectInDto
|
|
||||||
{
|
|
||||||
[NotDefault]
|
|
||||||
public Guid TrialId { get; set; }
|
|
||||||
|
|
||||||
public string ParentCode { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class AddTrialConfigDictionaryListInDto
|
|
||||||
{
|
|
||||||
[NotDefault]
|
|
||||||
public Guid TrialId { get; set; }
|
|
||||||
|
|
||||||
public List<Guid> DictionaryIds { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class AddOrEditBasicDic
|
public class AddOrEditBasicDic
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,12 +20,10 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<TrialDictionary> _trialDictionaryRepository;
|
private readonly IRepository<TrialDictionary> _trialDictionaryRepository;
|
||||||
private readonly IRepository<Doctor> _doctorRepository;
|
private readonly IRepository<Doctor> _doctorRepository;
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
private readonly IRepository<TrialConfigDictionary> _trialConfigDictionaryRepository;
|
|
||||||
private readonly IReadingQuestionService _readingQuestionService;
|
private readonly IReadingQuestionService _readingQuestionService;
|
||||||
|
|
||||||
public DictionaryService(IRepository<Dictionary> sysDicRepository, IRepository<DoctorDictionary> doctorDictionaryRepository, IRepository<TrialDictionary> trialDictionaryRepository,
|
public DictionaryService(IRepository<Dictionary> sysDicRepository, IRepository<DoctorDictionary> doctorDictionaryRepository, IRepository<TrialDictionary> trialDictionaryRepository,
|
||||||
IRepository<Doctor> doctorRepository, IRepository<Trial> trialRepository,
|
IRepository<Doctor> doctorRepository, IRepository<Trial> trialRepository,
|
||||||
IRepository<TrialConfigDictionary> trialConfigDictionaryRepository,
|
|
||||||
IReadingQuestionService readingQuestionService
|
IReadingQuestionService readingQuestionService
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +34,7 @@ namespace IRaCIS.Application.Services
|
||||||
_trialDictionaryRepository = trialDictionaryRepository;
|
_trialDictionaryRepository = trialDictionaryRepository;
|
||||||
_doctorRepository = doctorRepository;
|
_doctorRepository = doctorRepository;
|
||||||
_trialRepository = trialRepository;
|
_trialRepository = trialRepository;
|
||||||
this._trialConfigDictionaryRepository = trialConfigDictionaryRepository;
|
|
||||||
this._readingQuestionService = readingQuestionService;
|
this._readingQuestionService = readingQuestionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,96 +134,6 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除项目字典
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="Id"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost("{Id:guid}")]
|
|
||||||
public async Task<IResponseOutput> DeleteTrialConfigDictionary(Guid Id)
|
|
||||||
{
|
|
||||||
await _trialConfigDictionaryRepository.DeleteFromQueryAsync(Id);
|
|
||||||
await _trialConfigDictionaryRepository.SaveChangesAsync();
|
|
||||||
return ResponseOutput.Ok(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取待添加的项目字典数据
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<List<GetTrialConfigDictionarySelectOutDto>> GetTrialConfigDictionarySelect(GetTrialConfigDictionarySelectInDto inDto)
|
|
||||||
{
|
|
||||||
var parentId = await _dicRepository.Where(x => x.Code == inDto.ParentCode).Select(x => x.Id).FirstNotNullAsync();
|
|
||||||
|
|
||||||
List<GetTrialConfigDictionarySelectOutDto> result= await _dicRepository.Where(t => t.ParentId == parentId)
|
|
||||||
.OrderBy(t => t.ShowOrder).ProjectTo<GetTrialConfigDictionarySelectOutDto>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<Guid> addIds = await _trialConfigDictionaryRepository.Where(x => x.Dictionary.ParentId == parentId).Select(x => x.DictionaryId).ToListAsync();
|
|
||||||
|
|
||||||
result.ForEach(x => {
|
|
||||||
x.IsAdded = addIds.Contains(x.Id.Value);
|
|
||||||
});
|
|
||||||
|
|
||||||
return result;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 批量添加项目字典
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IResponseOutput> AddTrialConfigDictionaryList(AddTrialConfigDictionaryListInDto inDto)
|
|
||||||
{
|
|
||||||
|
|
||||||
await _trialConfigDictionaryRepository.AddRangeAsync(inDto.DictionaryIds.Select(x => new TrialConfigDictionary() {
|
|
||||||
TrialId = inDto.TrialId,
|
|
||||||
DictionaryId = x
|
|
||||||
|
|
||||||
}));
|
|
||||||
|
|
||||||
await _trialConfigDictionaryRepository.SaveChangesAsync();
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取项目字典
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<List<GetTrialConfigDictionaryListOutDto>> GetTrialConfigDictionaryList(GetTrialConfigDictionaryListInDto inDto)
|
|
||||||
{
|
|
||||||
List<GetTrialConfigDictionaryListOutDto> result = await _trialConfigDictionaryRepository.Where(x => x.TrialId == inDto.TrialId)
|
|
||||||
.WhereIf(!inDto.ParentCode.IsNullOrEmpty(), x => x.Dictionary.Parent.Code == inDto.ParentCode)
|
|
||||||
.Select(x => new GetTrialConfigDictionaryListOutDto()
|
|
||||||
{
|
|
||||||
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>
|
||||||
/// 获取子项数组
|
/// 获取子项数组
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -80,6 +80,50 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public bool IsCopyQuestion { get; set; }
|
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
|
public class GetSystemCriterionListOutDto
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||||
private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
|
private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
|
||||||
private readonly IRepository<Dictionary> _dictionaryRepository;
|
private readonly IRepository<Dictionary> _dictionaryRepository;
|
||||||
|
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||||
private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
||||||
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
|
@ -42,6 +43,7 @@ namespace IRaCIS.Application.Services
|
||||||
IRepository<ClinicalDataTrialSet> ClinicalDataTrialSetRepository,
|
IRepository<ClinicalDataTrialSet> ClinicalDataTrialSetRepository,
|
||||||
IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
|
IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
|
||||||
IRepository<Dictionary> dictionaryRepository,
|
IRepository<Dictionary> dictionaryRepository,
|
||||||
|
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||||
IRepository<Trial> trialRepository,
|
IRepository<Trial> trialRepository,
|
||||||
|
@ -60,6 +62,7 @@ namespace IRaCIS.Application.Services
|
||||||
this._clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository;
|
this._clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository;
|
||||||
this._clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository;
|
this._clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository;
|
||||||
this._dictionaryRepository = dictionaryRepository;
|
this._dictionaryRepository = dictionaryRepository;
|
||||||
|
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||||
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
||||||
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
||||||
this._trialRepository = trialRepository;
|
this._trialRepository = trialRepository;
|
||||||
|
@ -70,6 +73,61 @@ namespace IRaCIS.Application.Services
|
||||||
this._previousPDFRepository = previousPDFRepository;
|
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 系统标准
|
#region 系统标准
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -8,15 +8,15 @@ using Newtonsoft.Json;
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
///TrialConfigDictionary
|
///ReadingCriterionDictionary
|
||||||
///</summary>
|
///</summary>
|
||||||
[Table("TrialConfigDictionary")]
|
[Table("ReadingCriterionDictionary")]
|
||||||
public class TrialConfigDictionary : Entity, IAuditAdd
|
public class ReadingCriterionDictionary : Entity, IAuditAdd
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// TrialId
|
/// CriterionId
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid TrialId { get; set; }
|
public Guid CriterionId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DictionaryId
|
/// DictionaryId
|
||||||
|
@ -28,6 +28,16 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IsSystemCriterion
|
||||||
|
/// </summary>
|
||||||
|
public bool IsSystemCriterion { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ParentCode
|
||||||
|
/// </summary>
|
||||||
|
public string ParentCode { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CreateUserId
|
/// CreateUserId
|
||||||
/// </summary>
|
/// </summary>
|
|
@ -210,6 +210,8 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
#region Reading
|
#region Reading
|
||||||
public virtual DbSet<OrganInfo> OrganInfo { get; set; }
|
public virtual DbSet<OrganInfo> OrganInfo { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<ReadingCriterionDictionary> ReadingCriterionDictionary { get; set; }
|
||||||
public virtual DbSet<ReadingTableAnswerRowInfo> ReadingTableAnswerRowInfo { get; set; }
|
public virtual DbSet<ReadingTableAnswerRowInfo> ReadingTableAnswerRowInfo { get; set; }
|
||||||
public virtual DbSet<OrganTrialInfo> OrganTrialInfo { get; set; }
|
public virtual DbSet<OrganTrialInfo> OrganTrialInfo { get; set; }
|
||||||
public virtual DbSet<ReadingTableQuestionSystem> ReadingTableQuestionSystem { get; set; }
|
public virtual DbSet<ReadingTableQuestionSystem> ReadingTableQuestionSystem { get; set; }
|
||||||
|
@ -319,7 +321,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
#region Trial
|
#region Trial
|
||||||
public virtual DbSet<Trial> Trial { get; set; }
|
public virtual DbSet<Trial> Trial { get; set; }
|
||||||
|
|
||||||
public virtual DbSet<TrialConfigDictionary> TrialConfigDictionary { get; set; }
|
|
||||||
public virtual DbSet<TrialDictionary> TrialDictionary { get; set; }
|
public virtual DbSet<TrialDictionary> TrialDictionary { get; set; }
|
||||||
public virtual DbSet<TrialStatusDetail> TrialDetail { get; set; }
|
public virtual DbSet<TrialStatusDetail> TrialDetail { get; set; }
|
||||||
public virtual DbSet<TrialUser> UserTrial { get; set; }
|
public virtual DbSet<TrialUser> UserTrial { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue