104 lines
3.9 KiB
C#
104 lines
3.9 KiB
C#
using IRaCIS.Application.Interfaces;
|
|
using IRaCIS.Core.Infra.EFCore;
|
|
using IRaCIS.Core.Domain.Share;
|
|
using IRaCIS.Core.Application.Filter;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using IRaCIS.Core.Application.Service.WorkLoad.DTO;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using IRaCIS.Core.Application.Auth;
|
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
|
using IRaCIS.Core.Domain.Share.Reading;
|
|
using MassTransit;
|
|
using IRaCIS.Core.Application.Service.Reading;
|
|
using IRaCIS.Core.Infra.EFCore.Common;
|
|
using Panda.DynamicWebApi.Attributes;
|
|
|
|
namespace IRaCIS.Application.Services
|
|
{
|
|
/// <summary>
|
|
/// IR影像阅片
|
|
/// </summary>
|
|
[ApiExplorerSettings(GroupName = "Reading")]
|
|
public class ReadingImageTaskService : BaseService
|
|
{
|
|
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
|
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
|
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
|
|
|
public ReadingImageTaskService(
|
|
IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
|
IRepository<VisitTask> visitTaskRepository,
|
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
|
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
|
)
|
|
{
|
|
this._noneDicomStudyRepository = noneDicomStudyRepository;
|
|
this._visitTaskRepository = visitTaskRepository;
|
|
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取阅片非Dicom文件
|
|
/// </summary>
|
|
/// <param name="inDto"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task<List<GetReadingImgOutDto>> GetReadingImageFile(GetReadingImgInDto inDto)
|
|
{
|
|
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>
|
|
/// 获取项目已确认的标准
|
|
/// </summary>
|
|
/// <param name="inDto"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task<List<GetTrialConfirmCriterionListOutDto>> GetTrialConfirmCriterionList(GetConfirmCriterionInDto inDto)
|
|
{
|
|
var result= await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsConfirm)
|
|
.Select(x => new GetTrialConfirmCriterionListOutDto()
|
|
{
|
|
CriterionId = x.Id,
|
|
CriterionName = x.CriterionName
|
|
}).ToListAsync();
|
|
return result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取项目的阅片问题
|
|
/// </summary>
|
|
/// <param name="inDto"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task<List<GetTrialReadingQuestionOutDto>> GetTrialReadingQuestion(GetTrialReadingQuestionInDto inDto)
|
|
{
|
|
var result = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.CriterionId)
|
|
.ProjectTo<GetTrialReadingQuestionOutDto>(_mapper.ConfigurationProvider).ToListAsync();
|
|
return result;
|
|
}
|
|
|
|
///// <summary>
|
|
/////
|
|
///// </summary>
|
|
///// <param name="InDto"></param>
|
|
///// <returns></returns>
|
|
//public async Task<IResponseOutput> SubmitVisitTaskQuestions(SubmitVisitTaskQuestionsInDto InDto)
|
|
//{
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|