Uat_Study
he 2022-07-13 14:27:06 +08:00
parent 768c7432ae
commit 00fe76f326
6 changed files with 113 additions and 17 deletions

View File

@ -107,6 +107,24 @@ namespace IRaCIS.Core.API.Controllers
/// <summary>
/// 项目阅片信息签名
/// </summary>
/// <param name="opt"></param>
/// <returns></returns>
[HttpPost, Route("Inspection/configTrialBasicInfo/TrialReadingInfoSignInDto")]
[UnitOfWork]
public async Task<IResponseOutput> TrialReadingInfoSignInDto(DataInspectionDto<TrialReadingInfoSignInDto> opt)
{
var singid = await _inspectionService.RecordSing(opt.SignInfo);
var result = await _trialConfigService.TrialReadingInfoSign(opt.Data);
await _inspectionService.CompletedSign(singid, result);
return result;
}
/// <summary>
/// 医学审核完成
/// </summary>

View File

@ -3829,7 +3829,7 @@
任务组织级别
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.GetTrialReadingInfoOutDto.IsImageStandard">
<member name="P:IRaCIS.Core.Application.Contracts.GetTrialReadingInfoOutDto.IsImageIabeled">
<summary>
影像是否有标注
</summary>
@ -4014,7 +4014,7 @@
任务组织级别
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.SetTrialReadingInfoInDto.IsImageStandard">
<member name="P:IRaCIS.Core.Application.Contracts.SetTrialReadingInfoInDto.IsImageIabeled">
<summary>
影像是否有标注
</summary>

View File

@ -305,7 +305,7 @@ namespace IRaCIS.Core.Application.Contracts
/// <summary>
/// 影像是否有标注
/// </summary>
public bool IsImageLabled { get; set; }
public bool IsImageIabeled { get; set; }
/// <summary>
/// IR阅片是否显示受试者信息
@ -320,20 +320,23 @@ namespace IRaCIS.Core.Application.Contracts
//读片任务显示是否顺序
public bool IsReadingTaskViewInOrder { get; set; } = true;
/// <summary>
/// 修约小数点
/// </summary>
public int? DigitPlaces { get; set; } = 2;
/// <summary>
/// 仲裁规则/对象
/// </summary>
public int ArbitrationRule { get; set; } = 2;
/// <summary>
/// 修约小数点
/// </summary>
public int? DigitPlaces { get; set; }
public FormType? FormType { get; set; }
/// <summary>
/// 项目标准Id
/// </summary>
public List<Guid> TrialCriterionId { get; set; }
public Guid? TrialCriterionId { get; set; }
///// <summary>
///// 全局阅片
@ -531,12 +534,36 @@ namespace IRaCIS.Core.Application.Contracts
public string CriterionName { get; set; }
}
public class TrialReadingInfoSignInDto
{
[NotDefault]
public Guid TrialId { get; set; }
}
public class GetTrialReadingInfoInDto
{
[NotDefault]
public Guid TrialId { get; set; }
}
public class SetTrialReadingCriterionInDto
{
public Guid ReadingQuestionCriterionTrialId { get; set; }
/// <summary>
/// 表单类型
/// </summary>
public FormType FormType { get; set; }
/// <summary>
/// 修约小数点
/// </summary>
public int? DigitPlaces { get; set; }
}
public class SetTrialReadingInfoInDto
{
@ -563,7 +590,7 @@ namespace IRaCIS.Core.Application.Contracts
/// <summary>
/// 影像是否有标注
/// </summary>
public bool IsImageLabled { get; set; }
public bool IsImageIabeled { get; set; }
//读片任务显示是否顺序
public bool IsReadingTaskViewInOrder { get; set; } = true;

View File

@ -6,6 +6,7 @@ namespace IRaCIS.Application.Interfaces
{
public interface ITrialConfigService
{
Task<IResponseOutput> TrialReadingInfoSign(TrialReadingInfoSignInDto inDto);
Task<IResponseOutput> UpdateTrialState(Guid trialId, string trialStatusStr, string? reason);
Task<IResponseOutput> AbandonTrial(Guid trialId, bool isAbandon);
Task<TrialConfigDTO> GetTrialConfigInfo(Guid trialId);

View File

@ -8,6 +8,7 @@ using EasyCaching.Core;
using IRaCIS.Core.Infrastructure;
using Microsoft.AspNetCore.Authorization;
using IRaCIS.Core.Application.Auth;
using Panda.DynamicWebApi.Attributes;
namespace IRaCIS.Core.Application
{
@ -44,6 +45,25 @@ namespace IRaCIS.Core.Application
this._provider = provider;
}
/// <summary>
/// 阅片信息签名
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[NonDynamicMethod]
public async Task<IResponseOutput> TrialReadingInfoSign(TrialReadingInfoSignInDto inDto)
{
await _trialRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.TrialId, x => new Trial()
{
ReadingInfoSignTime = DateTime.Now
});
var result = await _trialRepository.SaveChangesAsync();
return ResponseOutput.Ok(result);
}
/// <summary>
/// 获取项目阅片信息
/// </summary>
@ -53,9 +73,18 @@ namespace IRaCIS.Core.Application
public async Task<GetTrialReadingInfoOutDto> GetTrialReadingInfo(GetTrialReadingInfoInDto inDto)
{
GetTrialReadingInfoOutDto trialInfo= await _trialRepository.Where(x=>x.Id==inDto.TrialId).ProjectTo<GetTrialReadingInfoOutDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
trialInfo.DigitPlaces = null;
trialInfo.ReadingCriterionPageList = await _readingCriterionPageRepository.Where(x => x.TrialId == inDto.TrialId).ProjectTo<ReadingCriterionPageDto>(_mapper.ConfigurationProvider).ToListAsync();
trialInfo.TrialCriterionId = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).Select(x => x.Id).ToListAsync();
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstOrDefaultAsync();
if (trialCriterion != null)
{
trialInfo.DigitPlaces= trialCriterion.DigitPlaces;
trialInfo.TrialCriterionId = trialCriterion.Id;
trialInfo.FormType = trialCriterion.FormType;
};
trialInfo.TrialJudgeQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm && x.IsJudgeQuestion && x.TrialId == inDto.TrialId)
.Select(x => new TrialJudgeQuestion()
{
@ -69,12 +98,30 @@ namespace IRaCIS.Core.Application
trialInfo.TrialQuestionList= await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm&&x.TrialId==inDto.TrialId)
.ProjectTo<TrialReadQuestion>(_mapper.ConfigurationProvider).ToListAsync();
return trialInfo;
}
/// <summary>
/// 设置项目阅片标准
/// </summary>
/// <returns></returns>
public async Task<IResponseOutput> SetTrialReadingCriterion(SetTrialReadingCriterionInDto inDto)
{
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.ReadingQuestionCriterionTrialId, x => new ReadingQuestionCriterionTrial()
{
FormType = inDto.FormType,
DigitPlaces = inDto.DigitPlaces,
});
var result = await _trialRepository.SaveChangesAsync();
return ResponseOutput.Ok(result);
}
/// <summary>
/// 设置项目阅片信息
/// </summary>
@ -88,7 +135,7 @@ namespace IRaCIS.Core.Application
//DigitPlaces=inDto.DigitPlaces,
IsReadingTaskViewInOrder=inDto.IsReadingTaskViewInOrder,
ReadingTaskViewEnum = inDto.ReadingTaskViewEnum,
IsImageLabled = inDto.IsImageLabled,
IsImageIabeled = inDto.IsImageIabeled,
IsReadingShowSubjectInfo = inDto.IsReadingShowSubjectInfo,
IsReadingShowPreviousResults = inDto.IsReadingShowPreviousResults,
ImagePlatform=inDto.ImagePlatform,

View File

@ -372,10 +372,13 @@ namespace IRaCIS.Core.Domain.Models
/// <summary>
/// 图像是否有标注
/// </summary>
public bool IsImageLabled { get; set; }
public bool IsImageIabeled { get; set; }
/// <summary>
/// 阅片信息签名时间
/// </summary>
public DateTime? ReadingInfoSignTime { get; set; }
//public Guid? ReviewTypeId { get; set; } = Guid.Empty;