修改一版
parent
3f573d6c11
commit
665ca1b7ae
|
@ -9,6 +9,7 @@ using IRaCIS.Core.Application.Image.QA;
|
||||||
using IRaCIS.Core.Application.Interfaces;
|
using IRaCIS.Core.Application.Interfaces;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||||
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
using IRaCIS.Core.Infra.EFCore;
|
||||||
|
@ -29,6 +30,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
private readonly IUserInfo _userInfo;
|
private readonly IUserInfo _userInfo;
|
||||||
private readonly ITrialDocumentService _trialDocumentService;
|
private readonly ITrialDocumentService _trialDocumentService;
|
||||||
private readonly IQCListService _qCListService;
|
private readonly IQCListService _qCListService;
|
||||||
|
private readonly IReadingImageTaskService _iReadingImageTaskService;
|
||||||
private readonly IHttpContextAccessor _httpContext;
|
private readonly IHttpContextAccessor _httpContext;
|
||||||
private readonly ITrialConfigService _trialConfigService;
|
private readonly ITrialConfigService _trialConfigService;
|
||||||
private readonly INoneDicomStudyService _noneDicomStudyService;
|
private readonly INoneDicomStudyService _noneDicomStudyService;
|
||||||
|
@ -38,6 +40,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
private readonly IQCOperationService _qCOperationService;
|
private readonly IQCOperationService _qCOperationService;
|
||||||
private readonly IClinicalDataService _clinicalDataService;
|
private readonly IClinicalDataService _clinicalDataService;
|
||||||
private readonly IVisitPlanService _visitPlanService;
|
private readonly IVisitPlanService _visitPlanService;
|
||||||
|
|
||||||
private readonly IInspectionService _inspectionService;
|
private readonly IInspectionService _inspectionService;
|
||||||
|
|
||||||
private readonly IRepository<DataInspection> _dataInspectionRepository;
|
private readonly IRepository<DataInspection> _dataInspectionRepository;
|
||||||
|
@ -49,6 +52,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
ITrialDocumentService trialDocumentService,
|
ITrialDocumentService trialDocumentService,
|
||||||
IRepository<DataInspection> dataInspectionRepository,
|
IRepository<DataInspection> dataInspectionRepository,
|
||||||
IQCListService _qCListService,
|
IQCListService _qCListService,
|
||||||
|
IReadingImageTaskService _iReadingImageTaskService,
|
||||||
IHttpContextAccessor httpContext,
|
IHttpContextAccessor httpContext,
|
||||||
IInspectionService sinspectionService,
|
IInspectionService sinspectionService,
|
||||||
ITrialConfigService _trialConfigService,
|
ITrialConfigService _trialConfigService,
|
||||||
|
@ -67,6 +71,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
this._inspectionService = sinspectionService;
|
this._inspectionService = sinspectionService;
|
||||||
this._trialDocumentService = trialDocumentService;
|
this._trialDocumentService = trialDocumentService;
|
||||||
this._qCListService = _qCListService;
|
this._qCListService = _qCListService;
|
||||||
|
this._iReadingImageTaskService = _iReadingImageTaskService;
|
||||||
this._httpContext = httpContext;
|
this._httpContext = httpContext;
|
||||||
this._trialConfigService = _trialConfigService;
|
this._trialConfigService = _trialConfigService;
|
||||||
this._noneDicomStudyService = noneDicomStudyService;
|
this._noneDicomStudyService = noneDicomStudyService;
|
||||||
|
@ -95,8 +100,17 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[HttpPost, Route("Inspection/ReadingImageTask/SubmitVisitTaskQuestionsInDto")]
|
||||||
|
[UnitOfWork]
|
||||||
|
public async Task<IResponseOutput> SubmitVisitTaskQuestions(DataInspectionDto<SubmitVisitTaskQuestionsInDto> opt)
|
||||||
|
{
|
||||||
|
var singid = await _inspectionService.RecordSing(opt.SignInfo);
|
||||||
|
var result = await _iReadingImageTaskService.SubmitVisitTaskQuestions(opt.Data);
|
||||||
|
await _inspectionService.CompletedSign(singid, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 配置 基础逻辑信息并确认
|
/// 配置 基础逻辑信息并确认
|
||||||
|
|
|
@ -4236,13 +4236,6 @@
|
||||||
IR影像阅片
|
IR影像阅片
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetReadingImageFile(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingImgInDto)">
|
|
||||||
<summary>
|
|
||||||
获取阅片非Dicom文件
|
|
||||||
</summary>
|
|
||||||
<param name="inDto"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetTrialConfirmCriterionList(IRaCIS.Core.Application.Service.Reading.Dto.GetConfirmCriterionInDto)">
|
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetTrialConfirmCriterionList(IRaCIS.Core.Application.Service.Reading.Dto.GetConfirmCriterionInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取项目已确认的标准
|
获取项目已确认的标准
|
||||||
|
@ -4257,6 +4250,13 @@
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.FindChildQuestion(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialReadingQuestionOutDto,System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingQuestionTrial})">
|
||||||
|
<summary>
|
||||||
|
找子问题
|
||||||
|
</summary>
|
||||||
|
<param name="trialReadingQuestion"></param>
|
||||||
|
<param name="questionlists"></param>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Application.Services.ReadingPeriodSetService">
|
<member name="T:IRaCIS.Application.Services.ReadingPeriodSetService">
|
||||||
<summary>
|
<summary>
|
||||||
阅片期配置
|
阅片期配置
|
||||||
|
@ -4335,6 +4335,12 @@
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.SetSystemCriterionDisable(System.Guid,System.Nullable{System.Guid})">
|
||||||
|
<summary>
|
||||||
|
设置系统标准被禁用
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.SetSystemReadingQuestionCriterionIsCompleteConfig(IRaCIS.Core.Application.Service.Reading.Dto.SetSystemReadingQuestionCriterionIsIsCompleteConfig)">
|
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.SetSystemReadingQuestionCriterionIsCompleteConfig(IRaCIS.Core.Application.Service.Reading.Dto.SetSystemReadingQuestionCriterionIsIsCompleteConfig)">
|
||||||
<summary>
|
<summary>
|
||||||
设置系统问题标准是否完成配置
|
设置系统问题标准是否完成配置
|
||||||
|
|
|
@ -3,6 +3,7 @@ using IRaCIS.Application.Contracts;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -18,15 +19,21 @@ 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 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,
|
||||||
|
IReadingQuestionService readingQuestionService
|
||||||
|
|
||||||
|
|
||||||
|
)
|
||||||
{
|
{
|
||||||
_dicRepository = sysDicRepository;
|
_dicRepository = sysDicRepository;
|
||||||
_doctorDictionaryRepository = doctorDictionaryRepository;
|
_doctorDictionaryRepository = doctorDictionaryRepository;
|
||||||
_trialDictionaryRepository = trialDictionaryRepository;
|
_trialDictionaryRepository = trialDictionaryRepository;
|
||||||
_doctorRepository = doctorRepository;
|
_doctorRepository = doctorRepository;
|
||||||
_trialRepository = trialRepository;
|
_trialRepository = trialRepository;
|
||||||
|
this._readingQuestionService = readingQuestionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -101,8 +108,16 @@ namespace IRaCIS.Application.Services
|
||||||
VerifyMsg = $"已有{addOrEditBasic.Code}名称的字典",
|
VerifyMsg = $"已有{addOrEditBasic.Code}名称的字典",
|
||||||
IsVerify= addOrEditBasic.ParentId ==null
|
IsVerify= addOrEditBasic.ParentId ==null
|
||||||
};
|
};
|
||||||
|
// 验证阅片标准是否可禁用
|
||||||
|
if (!addOrEditBasic.IsEnable&&addOrEditBasic.Id!=null)
|
||||||
|
{
|
||||||
|
var result = await _readingQuestionService.SetSystemCriterionDisable(addOrEditBasic.Id.Value,addOrEditBasic.ParentId);
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
var entity = await _dicRepository.InsertOrUpdateAsync(addOrEditBasic, true, verifyExp1);
|
var entity = await _dicRepository.InsertOrUpdateAsync(addOrEditBasic, true, verifyExp1);
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +202,6 @@ namespace IRaCIS.Application.Services
|
||||||
return searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
return searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region 稽查相关
|
#region 稽查相关
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public class GetReadingImgInDto
|
public class GetReadingImgInDto
|
||||||
{
|
{
|
||||||
|
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetConfirmCriterionInDto
|
public class GetConfirmCriterionInDto
|
||||||
|
@ -34,12 +34,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetTrialConfirmCriterionListOutDto
|
public class GetTrialConfirmCriterionListOutDto
|
||||||
{
|
{
|
||||||
public Guid CriterionId { get; set; }
|
public Guid ReadingQuestionCriterionTrialId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 标准
|
/// 标准
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CriterionName { get; set; }
|
public string ReadingQuestionCriterionTrialName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,33 +54,42 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SubmitVisitTaskQuestionsInDto
|
public class SubmitVisitTaskQuestionsInDto
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public Guid VisitTaskId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
public Guid ReadingQuestionCriterionTrialId { get; set; }
|
||||||
|
|
||||||
public List<QuestionAnswer> AnswerList { get; set; } = new List<QuestionAnswer>();
|
public List<QuestionAnswer> AnswerList { get; set; } = new List<QuestionAnswer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class QuestionAnswer
|
public class QuestionAnswer
|
||||||
{
|
{
|
||||||
public Guid TrialQuestionId { get; set; }
|
public Guid ReadingQuestionTrialId { get; set; }
|
||||||
|
|
||||||
public string Answer { get; set; }
|
public string Answer { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class GetTrialReadingQuestionDto
|
//public class GetTrialReadingQuestionDto
|
||||||
{
|
//{
|
||||||
public Guid Id { get; set; }
|
// public Guid Id { get; set; }
|
||||||
|
|
||||||
public string GroupName { get; set; }
|
// public string GroupName { get; set; }
|
||||||
|
|
||||||
List<GetTrialReadingQuestionOutDto> Questions { get; set; }
|
// List<GetTrialReadingQuestionOutDto> Questions { get; set; }
|
||||||
}
|
//}
|
||||||
|
|
||||||
public class GetTrialReadingQuestionOutDto
|
public class GetTrialReadingQuestionOutDto
|
||||||
{
|
{
|
||||||
|
public Guid ReadingQuestionTrialId { get; set; }
|
||||||
|
|
||||||
public Guid Id { get; set; }
|
/// <summary>
|
||||||
|
/// 项目标准Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid ReadingQuestionCriterionTrialId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 项目Id
|
/// 项目Id
|
||||||
|
@ -97,6 +106,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ParentTriggerValue { get; set; }
|
public string ParentTriggerValue { get; set; }
|
||||||
|
|
||||||
|
public string GroupName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 问题名称
|
/// 问题名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
|
// 生成时间 2021-12-23 13:20:59
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
|
using IRaCIS.Core.Domain.Share.Reading;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IReadingImageTaskService
|
||||||
|
{
|
||||||
|
Task<IResponseOutput> SubmitVisitTaskQuestions(SubmitVisitTaskQuestionsInDto inDto);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
|
// 生成时间 2021-12-23 13:20:59
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
|
using IRaCIS.Core.Domain.Share.Reading;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IReadingQuestionService
|
||||||
|
{
|
||||||
|
Task<IResponseOutput> SetSystemCriterionDisable(Guid dictionaryId, Guid? parentId);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,6 +11,8 @@ using MassTransit;
|
||||||
using IRaCIS.Core.Application.Service.Reading;
|
using IRaCIS.Core.Application.Service.Reading;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using Panda.DynamicWebApi.Attributes;
|
using Panda.DynamicWebApi.Attributes;
|
||||||
|
using AutoMapper;
|
||||||
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -18,41 +20,49 @@ namespace IRaCIS.Application.Services
|
||||||
/// IR影像阅片
|
/// IR影像阅片
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ApiExplorerSettings(GroupName = "Reading")]
|
[ApiExplorerSettings(GroupName = "Reading")]
|
||||||
public class ReadingImageTaskService : BaseService
|
public class ReadingImageTaskService : BaseService, IReadingImageTaskService
|
||||||
{
|
{
|
||||||
|
private readonly IMapper mapper;
|
||||||
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
||||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
|
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository;
|
||||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
||||||
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
||||||
|
|
||||||
public ReadingImageTaskService(
|
public ReadingImageTaskService(
|
||||||
|
IMapper mapper,
|
||||||
IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
||||||
IRepository<VisitTask> visitTaskRepository,
|
IRepository<VisitTask> visitTaskRepository,
|
||||||
|
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
this.mapper = mapper;
|
||||||
this._noneDicomStudyRepository = noneDicomStudyRepository;
|
this._noneDicomStudyRepository = noneDicomStudyRepository;
|
||||||
this._visitTaskRepository = visitTaskRepository;
|
this._visitTaskRepository = visitTaskRepository;
|
||||||
|
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
||||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 获取阅片非Dicom文件
|
///// 获取阅片非Dicom文件
|
||||||
/// </summary>
|
///// </summary>
|
||||||
/// <param name="inDto"></param>
|
///// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
///// <returns></returns>
|
||||||
[HttpPost]
|
//[HttpPost]
|
||||||
public async Task<List<GetReadingImgOutDto>> GetReadingImageFile(GetReadingImgInDto inDto)
|
//public async Task<List<GetReadingImgOutDto>> GetReadingImageFile(GetReadingImgInDto inDto)
|
||||||
{
|
//{
|
||||||
List<GetReadingImgOutDto> imgList =await _noneDicomStudyRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId)
|
// var subjectVisitId=await _visitTaskRepository.Where(x=>x.Id==inDto.VisitTaskId).Select(x=>x.vi)
|
||||||
.SelectMany(x => x.NoneDicomFileList).Select(x=> new GetReadingImgOutDto() {
|
|
||||||
FileName=x.FileName,
|
// List<GetReadingImgOutDto> imgList =await _noneDicomStudyRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId)
|
||||||
Path=x.Path
|
// .SelectMany(x => x.NoneDicomFileList).Select(x=> new GetReadingImgOutDto() {
|
||||||
}).ToListAsync();
|
// FileName=x.FileName,
|
||||||
return imgList;
|
// Path=x.Path
|
||||||
}
|
// }).ToListAsync();
|
||||||
|
// return imgList;
|
||||||
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取项目已确认的标准
|
/// 获取项目已确认的标准
|
||||||
|
@ -62,11 +72,11 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<GetTrialConfirmCriterionListOutDto>> GetTrialConfirmCriterionList(GetConfirmCriterionInDto inDto)
|
public async Task<List<GetTrialConfirmCriterionListOutDto>> GetTrialConfirmCriterionList(GetConfirmCriterionInDto inDto)
|
||||||
{
|
{
|
||||||
var result= await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsConfirm)
|
var result= await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsConfirm&&x.IsCompleteConfig)
|
||||||
.Select(x => new GetTrialConfirmCriterionListOutDto()
|
.Select(x => new GetTrialConfirmCriterionListOutDto()
|
||||||
{
|
{
|
||||||
CriterionId = x.Id,
|
ReadingQuestionCriterionTrialId = x.Id,
|
||||||
CriterionName = x.CriterionName
|
ReadingQuestionCriterionTrialName = x.CriterionName
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -79,27 +89,69 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<GetTrialReadingQuestionOutDto>> GetTrialReadingQuestion(GetTrialReadingQuestionInDto inDto)
|
public async Task<List<GetTrialReadingQuestionOutDto>> GetTrialReadingQuestion(GetTrialReadingQuestionInDto inDto)
|
||||||
{
|
{
|
||||||
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.CriterionId).ToListAsync();
|
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.CriterionId).ToListAsync();
|
||||||
//List<GetTrialReadingQuestionDto> groupNames
|
|
||||||
|
|
||||||
var result = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.CriterionId)
|
List<GetTrialReadingQuestionOutDto> groupList = _mapper.Map<List<GetTrialReadingQuestionOutDto>>(qusetionList.Where(x => x.ParentId == null));
|
||||||
.ProjectTo<GetTrialReadingQuestionOutDto>(_mapper.ConfigurationProvider).ToListAsync();
|
groupList.ForEach(x =>
|
||||||
return result;
|
{
|
||||||
|
FindChildQuestion(x, qusetionList);
|
||||||
|
});
|
||||||
|
return groupList;
|
||||||
}
|
}
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
/////
|
/// <summary>
|
||||||
///// </summary>
|
/// 找子问题
|
||||||
///// <param name="InDto"></param>
|
/// </summary>
|
||||||
///// <returns></returns>
|
/// <param name="trialReadingQuestion"></param>
|
||||||
//public async Task<IResponseOutput> SubmitVisitTaskQuestions(SubmitVisitTaskQuestionsInDto InDto)
|
/// <param name="questionlists"></param>
|
||||||
//{
|
|
||||||
|
private void FindChildQuestion(GetTrialReadingQuestionOutDto trialReadingQuestion, List<ReadingQuestionTrial> questionlists)
|
||||||
|
{
|
||||||
|
trialReadingQuestion.Childrens = _mapper.Map<List<GetTrialReadingQuestionOutDto>>(questionlists.Where(x => x.ParentId == trialReadingQuestion.ReadingQuestionTrialId));
|
||||||
|
if (trialReadingQuestion.Childrens != null && trialReadingQuestion.Childrens.Count != 0)
|
||||||
|
{
|
||||||
|
trialReadingQuestion.Childrens.ForEach(x =>
|
||||||
|
{
|
||||||
|
FindChildQuestion(x, questionlists);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 提交问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[NonDynamicMethod]
|
||||||
|
public async Task<IResponseOutput> SubmitVisitTaskQuestions(SubmitVisitTaskQuestionsInDto inDto)
|
||||||
|
{
|
||||||
|
var subjectId =await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.SubjectId).FirstOrDefaultAsync();
|
||||||
|
List<ReadingTaskQuestionAnswer> readingTaskAnswerList = inDto.AnswerList.Select(x => new ReadingTaskQuestionAnswer()
|
||||||
|
{
|
||||||
|
Id = NewId.NextGuid(),
|
||||||
|
SubjectId = subjectId,
|
||||||
|
Answer = x.Answer,
|
||||||
|
ReadingQuestionCriterionTrialId = inDto.ReadingQuestionCriterionTrialId,
|
||||||
|
ReadingQuestionTrialId = x.ReadingQuestionTrialId,
|
||||||
|
VisitTaskId = inDto.VisitTaskId,
|
||||||
|
TrialId = inDto.TrialId
|
||||||
|
}).ToList();
|
||||||
|
await _readingTaskQuestionAnswerRepository.AddRangeAsync(readingTaskAnswerList);
|
||||||
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.VisitTaskId, x => new VisitTask()
|
||||||
|
{
|
||||||
|
ReadingTaskState = ReadingTaskState.HaveSigned
|
||||||
|
});
|
||||||
|
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Ok(result);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ using MassTransit;
|
||||||
using IRaCIS.Core.Application.Service.Reading;
|
using IRaCIS.Core.Application.Service.Reading;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using Panda.DynamicWebApi.Attributes;
|
using Panda.DynamicWebApi.Attributes;
|
||||||
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -18,7 +19,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// 阅片问题.标准
|
/// 阅片问题.标准
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ApiExplorerSettings(GroupName = "Reading")]
|
[ApiExplorerSettings(GroupName = "Reading")]
|
||||||
public class ReadingQuestionService : BaseService
|
public class ReadingQuestionService : BaseService, IReadingQuestionService
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||||
|
@ -82,6 +83,31 @@ namespace IRaCIS.Application.Services
|
||||||
inDto.Asc);
|
inDto.Asc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置系统标准被禁用
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[NonDynamicMethod]
|
||||||
|
public async Task<IResponseOutput> SetSystemCriterionDisable(Guid dictionaryId, Guid? parentId)
|
||||||
|
{
|
||||||
|
// 判断是否是阅片
|
||||||
|
if (await _dictionaryRepository.AnyAsync(x => x.Id == parentId && x.Code == "ReadingStandard"))
|
||||||
|
{
|
||||||
|
// 判断当前阅片是否在项目里面存在
|
||||||
|
var systemCriterion = await _readingQuestionCriterionSystemRepository.FirstOrDefaultAsync(x => x.CriterionId == dictionaryId);
|
||||||
|
if (systemCriterion != null)
|
||||||
|
{
|
||||||
|
var trialCriterionIds = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == systemCriterion.Id).Select(x=>x.ReadingQuestionCriterionSystemId).ToListAsync();
|
||||||
|
await _readingQuestionCriterionTrialRepository.BatchDeleteNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == systemCriterion.Id);
|
||||||
|
await _readingQuestionTrialRepository.BatchDeleteNoTrackingAsync(x => trialCriterionIds.Contains(x.ReadingQuestionCriterionTrialId));
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
///// 设置系统问题标准是否生效
|
///// 设置系统问题标准是否生效
|
||||||
///// </summary>
|
///// </summary>
|
||||||
|
@ -212,6 +238,9 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取系统问题
|
/// 获取系统问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -73,7 +73,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IR阅片
|
#region IR阅片
|
||||||
CreateMap<ReadingQuestionTrial, GetTrialReadingQuestionOutDto>();
|
CreateMap<ReadingQuestionTrial, GetTrialReadingQuestionOutDto>()
|
||||||
|
.ForMember(x=>x.ReadingQuestionTrialId, y=>y.MapFrom(z=>z.Id));
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public class ReadingQuestionTrial : Entity, IAuditAdd
|
public class ReadingQuestionTrial : Entity, IAuditAdd
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 系统标准Id
|
/// 项目标准Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid ReadingQuestionCriterionTrialId { get; set; }
|
public Guid ReadingQuestionCriterionTrialId { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid ReadingQuestionTrialId { get; set; }
|
public Guid ReadingQuestionTrialId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 项目问题标准Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid ReadingQuestionCriterionTrialId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 项目ID
|
/// 项目ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue