|
|
|
@@ -33,9 +33,9 @@ namespace IRaCIS.Application.Services
|
|
|
|
|
IMapper mapper,
|
|
|
|
|
IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
|
|
|
|
IRepository<VisitTask> visitTaskRepository,
|
|
|
|
|
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
|
|
|
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
|
|
|
|
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
|
|
|
|
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
|
|
|
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
|
|
|
|
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
this.mapper = mapper;
|
|
|
|
@@ -46,23 +46,27 @@ namespace IRaCIS.Application.Services
|
|
|
|
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 获取阅片非Dicom文件
|
|
|
|
|
///// </summary>
|
|
|
|
|
///// <param name="inDto"></param>
|
|
|
|
|
///// <returns></returns>
|
|
|
|
|
//[HttpPost]
|
|
|
|
|
//public async Task<List<GetReadingImgOutDto>> GetReadingImageFile(GetReadingImgInDto inDto)
|
|
|
|
|
//{
|
|
|
|
|
// var subjectVisitId=await _visitTaskRepository.Where(x=>x.Id==inDto.VisitTaskId).Select(x=>x.vi)
|
|
|
|
|
|
|
|
|
|
// List<GetReadingImgOutDto> imgList =await _noneDicomStudyRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId)
|
|
|
|
|
// .SelectMany(x => x.NoneDicomFileList).Select(x=> new GetReadingImgOutDto() {
|
|
|
|
|
// FileName=x.FileName,
|
|
|
|
|
// Path=x.Path
|
|
|
|
|
// }).ToListAsync();
|
|
|
|
|
// return imgList;
|
|
|
|
|
//}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取阅片非Dicom文件
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="inDto"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public async Task<List<GetReadingImgOutDto>> GetReadingImageFile(GetReadingImgInDto inDto)
|
|
|
|
|
{
|
|
|
|
|
Guid? subjectVisitId = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.SourceSubjectVisitId).FirstOrDefaultAsync();
|
|
|
|
|
if (subjectVisitId == null)
|
|
|
|
|
{
|
|
|
|
|
throw new QueryBusinessObjectNotExistException($"数据异常,当前任务没有访视Id");
|
|
|
|
|
}
|
|
|
|
|
List<GetReadingImgOutDto> imgList = await _noneDicomStudyRepository.Where(x => x.SubjectVisitId == subjectVisitId)
|
|
|
|
|
.SelectMany(x => x.NoneDicomFileList).Select(x => new GetReadingImgOutDto()
|
|
|
|
|
{
|
|
|
|
|
FileName = x.FileName,
|
|
|
|
|
Path = x.Path
|
|
|
|
|
}).ToListAsync();
|
|
|
|
|
return imgList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取项目已确认的标准
|
|
|
|
@@ -89,7 +93,7 @@ namespace IRaCIS.Application.Services
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public async Task<List<GetTrialReadingQuestionOutDto>> GetTrialReadingQuestion(GetTrialReadingQuestionInDto inDto)
|
|
|
|
|
{
|
|
|
|
|
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.CriterionId).ToListAsync();
|
|
|
|
|
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId).ToListAsync();
|
|
|
|
|
|
|
|
|
|
List<GetTrialReadingQuestionOutDto> groupList = _mapper.Map<List<GetTrialReadingQuestionOutDto>>(qusetionList.Where(x => x.ParentId == null));
|
|
|
|
|
groupList.ForEach(x =>
|
|
|
|
|