删除检查不删除pacs推送过来的
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
parent
80b3defd37
commit
caffff259e
|
|
@ -8,6 +8,7 @@ using IRaCIS.Core.Infra.EFCore;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using IRaCIS.Core.SCP.Service;
|
using IRaCIS.Core.SCP.Service;
|
||||||
|
using MassTransit;
|
||||||
using Medallion.Threading;
|
using Medallion.Threading;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
@ -95,7 +96,7 @@ namespace IRaCIS.Core.SCP.Service
|
||||||
public Task OnReceiveAssociationRequestAsync(DicomAssociation association)
|
public Task OnReceiveAssociationRequestAsync(DicomAssociation association)
|
||||||
{
|
{
|
||||||
|
|
||||||
_upload = new SCPImageUpload() { StartTime = DateTime.Now, CallingAE = association.CallingAE, CalledAE = association.CalledAE, CallingAEIP = association.RemoteHost };
|
_upload = new SCPImageUpload() { Id = NewId.NextSequentialGuid(), StartTime = DateTime.Now, CallingAE = association.CallingAE, CalledAE = association.CalledAE, CallingAEIP = association.RemoteHost };
|
||||||
|
|
||||||
|
|
||||||
Log.Logger.Warning($"接收到来自{association.CallingAE}的连接");
|
Log.Logger.Warning($"接收到来自{association.CallingAE}的连接");
|
||||||
|
|
@ -644,7 +645,7 @@ namespace IRaCIS.Core.SCP.Service
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
|
|
||||||
//irc 从路径最后一截取Guid
|
//irc 从路径最后一截取Guid
|
||||||
storeRelativePath = await ossService.UploadToOSSAsync(ms, ossFolderPath, instanceId.ToString(), false, uploadInfo: new FileUploadRecordAddOrEdit() { TrialId = _trialId, BatchDataType = BatchDataType.PACSReceive });
|
storeRelativePath = await ossService.UploadToOSSAsync(ms, ossFolderPath, instanceId.ToString(), false, uploadInfo: new FileUploadRecordAddOrEdit() { TrialId = _trialId, BatchDataType = BatchDataType.PACSReceive, UploadBatchId = _upload.Id.ToString() });
|
||||||
|
|
||||||
fileSize = ms.Length;
|
fileSize = ms.Length;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1111,12 +1111,12 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
var visit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId);
|
var visit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId);
|
||||||
|
|
||||||
var isExistStudyClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(t => t.TrialId == visit.TrialId && t.ClinicalDataLevel == ClinicalLevel.Study&&t.IsConfirm&&t.IsApply);
|
var isExistStudyClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(t => t.TrialId == visit.TrialId && t.ClinicalDataLevel == ClinicalLevel.Study && t.IsConfirm && t.IsApply);
|
||||||
if(isExistStudyClinicalData)
|
if (isExistStudyClinicalData)
|
||||||
{
|
{
|
||||||
List<string> modalitieTypes = new List<string>() { "PT、CT", "CT、PT", "PET-CT" };
|
List<string> modalitieTypes = new List<string>() { "PT、CT", "CT、PT", "PET-CT" };
|
||||||
|
|
||||||
var studyList=await _dicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId&& modalitieTypes.Contains(t.Modalities)).ProjectTo<QAStudyInfoDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
var studyList = await _dicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId && modalitieTypes.Contains(t.Modalities)).ProjectTo<QAStudyInfoDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
if (studyList.Any(x => x.IsHasEmptyPatientInfo))
|
if (studyList.Any(x => x.IsHasEmptyPatientInfo))
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk(_localizer["QCOperation_IsHasEmptyPatientInfo"]);
|
return ResponseOutput.NotOk(_localizer["QCOperation_IsHasEmptyPatientInfo"]);
|
||||||
|
|
@ -1189,7 +1189,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
await _scpStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new SCPStudy() { SubjectVisitId = null });
|
await _scpStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new SCPStudy() { SubjectVisitId = null });
|
||||||
|
|
||||||
if (fisrtPath.IsNotNullOrEmpty())
|
if (fisrtPath.IsNotNullOrEmpty() && study.IsFromPACS == false)
|
||||||
{
|
{
|
||||||
var prefix = fisrtPath.Substring(1, fisrtPath.LastIndexOf('/') - 1);
|
var prefix = fisrtPath.Substring(1, fisrtPath.LastIndexOf('/') - 1);
|
||||||
|
|
||||||
|
|
@ -1230,7 +1230,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
string cacheKey = CacheKeys.UserQCSkipTask(_userInfo.UserRoleId);
|
string cacheKey = CacheKeys.UserQCSkipTask(_userInfo.UserRoleId);
|
||||||
|
|
||||||
|
|
||||||
await _fusionCache.SetAsync(cacheKey, new List<Guid>(), TimeSpan.FromMinutes(60));
|
await _fusionCache.SetAsync(cacheKey, new List<Guid>(), TimeSpan.FromMinutes(60));
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
@ -1393,12 +1393,12 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
|
|
||||||
// 获取当前缓存中的访视Id集合(如果没有则创建空集合)
|
// 获取当前缓存中的访视Id集合(如果没有则创建空集合)
|
||||||
var skippedVisits = await _fusionCache.GetOrDefaultAsync<List<Guid>>(CacheKeys.UserQCSkipTask(_userInfo.UserRoleId), new List<Guid>() { });
|
var skippedVisits = await _fusionCache.GetOrDefaultAsync<List<Guid>>(CacheKeys.UserQCSkipTask(_userInfo.UserRoleId), new List<Guid>() { });
|
||||||
//跳过当前访视
|
//跳过当前访视
|
||||||
if (inDto.IsSkipCurrentVisit)
|
if (inDto.IsSkipCurrentVisit)
|
||||||
{
|
{
|
||||||
skippedVisits.Add(inDto.SubjectVisitId);
|
skippedVisits.Add(inDto.SubjectVisitId);
|
||||||
|
|
||||||
currentActionList = currentActionList.Where(t => !skippedVisits.Contains(t.SubjectVisitId)).ToList();
|
currentActionList = currentActionList.Where(t => !skippedVisits.Contains(t.SubjectVisitId)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1449,7 +1449,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
//跳过当前访视
|
//跳过当前访视
|
||||||
if (inDto.IsSkipCurrentVisit)
|
if (inDto.IsSkipCurrentVisit)
|
||||||
{
|
{
|
||||||
visitList = visitList.Where(t => !skippedVisits.Contains(t.SubjectVisitId)).ToList();
|
visitList = visitList.Where(t => !skippedVisits.Contains(t.SubjectVisitId)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue