S-101 自定义标记

This commit is contained in:
he
2023-07-31 11:44:54 +08:00
parent ab1fd89026
commit c0fd38b03b
6 changed files with 150 additions and 2 deletions
@@ -45,6 +45,7 @@ namespace IRaCIS.Application.Services
private readonly IRepository<OrganInfo> _organInfoRepository;
private readonly IRepository<TrialDocument> _trialDocumentRepository;
private readonly IRepository<User> _userRepository;
private readonly IRepository<ReadingCustomTag> _readingCustomTagRepository;
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository;
@@ -84,6 +85,7 @@ namespace IRaCIS.Application.Services
IRepository<OrganInfo> organInfoRepository,
IRepository<TrialDocument> trialDocumentRepository,
IRepository<User> userRepository,
IRepository<ReadingCustomTag> readingCustomTagRepository,
IMemoryCache cache,
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
@@ -121,6 +123,7 @@ namespace IRaCIS.Application.Services
this._organInfoRepository = organInfoRepository;
this._trialDocumentRepository = trialDocumentRepository;
this._userRepository = userRepository;
this._readingCustomTagRepository = readingCustomTagRepository;
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
this._tumorAssessmentRepository = tumorAssessmentRepository;
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
@@ -138,6 +141,43 @@ namespace IRaCIS.Application.Services
this._trialEmailNoticeConfigService = trialEmailNoticeConfigService;
}
/// <summary>
/// 提交自定义标记
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> SubmitCustomTag(ReadingCustomTagDto inDto)
{
var entity = await _readingCustomTagRepository.InsertOrUpdateAsync(inDto, true);
return ResponseOutput.Ok(entity.Id.ToString());
}
/// <summary>
/// 删除自定义标记
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("{id:guid}")]
public async Task<IResponseOutput> DeleteCustomTag(Guid id)
{
var success = await _readingCustomTagRepository.DeleteFromQueryAsync(t => t.Id == id, true);
return ResponseOutput.Ok();
}
/// <summary>
/// 获取项目临床问题
/// </summary>
/// <param name="inQuery"></param>
/// <returns></returns>
[HttpPost]
public async Task<List<ReadingCustomTagDto>> GetCustomTag(GetCustomTagInDto inQuery)
{
var result= await _readingCustomTagRepository.Where(x => x.VisitTaskId == inQuery.VisitTaskId).ProjectTo<ReadingCustomTagDto>(_mapper.ConfigurationProvider).ToListAsync();
return result;
}
/// <summary>
/// 获取手册
/// </summary>