代码修改
parent
13acd950ad
commit
3561df7574
|
@ -12,6 +12,8 @@ using System.Linq.Dynamic.Core;
|
|||
using Microsoft.Extensions.Logging;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Linq;
|
||||
using BeetleX.Redis.Commands;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
@ -1124,7 +1126,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetReadingClinicalDataListOutDto>> GetConsistencyAnalysisReadingClinicalDataList(GetConsistencyAnalysisReadingClinicalDataListInDto inDto)
|
||||
public async Task<(List<GetReadingClinicalDataListOutDto>, object)> GetConsistencyAnalysisReadingClinicalDataList(GetConsistencyAnalysisReadingClinicalDataListInDto inDto)
|
||||
{
|
||||
var result = await this.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto()
|
||||
{
|
||||
|
@ -1134,7 +1136,7 @@ namespace IRaCIS.Application.Services
|
|||
IsGetAllConsistencyAnalysis = false,
|
||||
});
|
||||
|
||||
return result;
|
||||
return (result,true);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1221,6 +1223,56 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一致性分析临床数据签名
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SignConsistencyAnalysisReadingClinicalData(SignConsistencyAnalysisReadingClinicalDataInDto inDto)
|
||||
{
|
||||
var pdfCount = await _readingConsistentClinicalDataPDFRepository.Where(x => x.ReadingConsistentClinicalDataId == inDto.ConsistentClinicalDataId).CountAsync();
|
||||
if (pdfCount == 0)
|
||||
{
|
||||
return ResponseOutput.NotOk(_localizer["ReadingClinicalData_NoHavePDF"]);
|
||||
}
|
||||
await _readingConsistentClinicalDataRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.ConsistentClinicalDataId, x => new ReadingConsistentClinicalData()
|
||||
{
|
||||
IsSign = true,
|
||||
IsBlind = inDto.IsBlind,
|
||||
IsComplete = inDto.IsComplete
|
||||
});
|
||||
await _readingClinicalDataPDFRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(pdfCount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 一致性分析临床数据签名完设置任务为有效
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetTaskValid(SetTaskValidInDto inDto)
|
||||
{
|
||||
var visittask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
var readingId = visittask.SouceReadModuleId==null? visittask.SourceSubjectVisitId: visittask.SouceReadModuleId;
|
||||
|
||||
if (await _readingConsistentClinicalDataRepository.AnyAsync(x => x.ReadingId == readingId && x.IsSign == false))
|
||||
{
|
||||
return ResponseOutput.NotOk(_localizer["ReadingClinicalData_HaveUnsignedClinicalData"]);
|
||||
}
|
||||
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.VisitTaskId, x => new VisitTask()
|
||||
{
|
||||
|
||||
TaskState = TaskState.Effect
|
||||
});
|
||||
await _visitTaskRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 阅片临床数据PDF
|
||||
|
|
|
@ -9,8 +9,30 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
public class SetTaskValidInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class AddOrUpdateReadingClinicalDataDto
|
||||
|
||||
public class SignConsistencyAnalysisReadingClinicalDataInDto
|
||||
{
|
||||
public Guid ConsistentClinicalDataId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否盲化
|
||||
/// </summary>
|
||||
public bool? IsBlind { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否完整
|
||||
/// </summary>
|
||||
public bool? IsComplete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class AddOrUpdateReadingClinicalDataDto
|
||||
{
|
||||
|
||||
public Guid? Id { get; set; }
|
||||
|
|
|
@ -368,9 +368,14 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
public bool IsNeedClinicalDataSign { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床数据是否签名
|
||||
/// </summary>
|
||||
public bool IsClinicalDataSign { get; set; }
|
||||
|
||||
//前序任务需要签名 但是未签名
|
||||
/// <summary>
|
||||
/// 前序任务需要签名 但是未签名
|
||||
/// </summary>
|
||||
public bool IsFrontTaskNeedSignButNotSign { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
|
|
Loading…
Reference in New Issue