修改一版
This commit is contained in:
@@ -282,7 +282,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "TrialId为null")]
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -293,16 +293,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// <summary>
|
||||
/// 对象ID
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "ReadingId为null")]
|
||||
public Guid? ReadingId { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "SubjectId为null")]
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是访视
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "IsVisit为null")]
|
||||
public bool? IsVisit { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
|
||||
public class GetReadingImgOutDto
|
||||
{
|
||||
public string Path { get; set; }
|
||||
|
||||
public string FileName { get; set; }
|
||||
}
|
||||
|
||||
public class GetReadingImgInDto
|
||||
{
|
||||
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
}
|
||||
|
||||
public class GetConfirmCriterionInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 返回对象
|
||||
/// </summary>
|
||||
public class GetTrialConfirmCriterionListOutDto
|
||||
{
|
||||
public Guid CriterionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准
|
||||
/// </summary>
|
||||
public string CriterionName { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetTrialReadingQuestionInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid CriterionId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SubmitVisitTaskQuestionsInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public List<QuestionAnswer> AnswerList { get; set; } = new List<QuestionAnswer>();
|
||||
}
|
||||
|
||||
|
||||
public class QuestionAnswer
|
||||
{
|
||||
public Guid TrialQuestionId { get; set; }
|
||||
|
||||
public string Answer { get; set; }
|
||||
}
|
||||
|
||||
public class GetTrialReadingQuestionOutDto
|
||||
{
|
||||
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
/// </summary>
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父问题触发
|
||||
/// </summary>
|
||||
public string ParentTriggerValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题名称
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是必须
|
||||
/// </summary>
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父问题ID
|
||||
/// </summary>
|
||||
public Guid? ParentId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -253,7 +253,6 @@ namespace IRaCIS.Application.Services
|
||||
var result = await _readingClinicalDataPDFRepository.Where(x => x.ReadingClinicalDataId == inDto.ReadingClinicalDataId).ProjectTo<GetReadingClinicalDataPDFListOutDto>(_mapper.ConfigurationProvider)
|
||||
.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(GetReadingClinicalDataPDFListOutDto.FileName) : inDto.SortField,
|
||||
inDto.Asc);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
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)
|
||||
//{
|
||||
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -167,7 +167,6 @@ namespace IRaCIS.Application.Services
|
||||
PageSize = inDto.PageSize,
|
||||
PageIndex = inDto.PageIndex,
|
||||
TotalCount = totalCount,
|
||||
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace IRaCIS.Application.Services
|
||||
};
|
||||
var questionList =await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.ReadingQuestionCriterionSystemId)
|
||||
.Where(x=> types.Contains(x.Type))
|
||||
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id)
|
||||
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id&&x.ParentId!= inDto.Id)
|
||||
.Select(x => new CriterionOtherQuestionOutDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
@@ -421,7 +421,7 @@ namespace IRaCIS.Application.Services
|
||||
};
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId)
|
||||
.Where(x => types.Contains(x.Type))
|
||||
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id)
|
||||
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
|
||||
.Select(x => new CriterionOtherQuestionOutDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
|
||||
@@ -70,7 +70,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionTrial == null ? string.Empty : s.ParentReadingQuestionTrial.QuestionName)); ;
|
||||
#endregion
|
||||
|
||||
|
||||
#region IR阅片
|
||||
CreateMap<ReadingQuestionTrial, GetTrialReadingQuestionOutDto>();
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user