影像转发提交
parent
68cf8c5e42
commit
25555d92dd
|
@ -362,3 +362,4 @@ MigrationBackup/
|
||||||
# Fody - auto-generated XML schema
|
# Fody - auto-generated XML schema
|
||||||
FodyWeavers.xsd
|
FodyWeavers.xsd
|
||||||
/UploadFile/Check
|
/UploadFile/Check
|
||||||
|
/TrialData/281bdb09-f792-4faa-de18-08da0e042672/50d0cf71-ee4d-4e54-af06-490f8be1bff1/72b8ef0b-4adc-465e-fa25-08da122bbd9c/eb53c5e2-6307-42f3-d710-08da122bbde1/Dicom
|
||||||
|
|
|
@ -1025,6 +1025,15 @@
|
||||||
<summary> 指定资源Id,渲染Dicom序列的Jpeg预览图像 </summary>
|
<summary> 指定资源Id,渲染Dicom序列的Jpeg预览图像 </summary>
|
||||||
<param name="seriesId"> Dicom序列的Id </param>
|
<param name="seriesId"> Dicom序列的Id </param>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.TrialSiteUserListExport(System.Guid,System.Boolean,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserSurvey})">
|
||||||
|
<summary>
|
||||||
|
|
||||||
|
</summary>
|
||||||
|
<param name="trialId"></param>
|
||||||
|
<param name="isAllSiteUser">isAllSiteUser true : site用户列表,false :Site调研汇总表</param>
|
||||||
|
<returns></returns>
|
||||||
|
<exception cref="T:System.Exception"></exception>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.GetSiteCRCList(IRaCIS.Core.Application.Contracts.DTO.SiteCrcQueryDTO)">
|
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.GetSiteCRCList(IRaCIS.Core.Application.Contracts.DTO.SiteCrcQueryDTO)">
|
||||||
<summary>Pannel 进去 SiteTab </summary>
|
<summary>Pannel 进去 SiteTab </summary>
|
||||||
</member>
|
</member>
|
||||||
|
|
|
@ -1725,7 +1725,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
var info = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).ProjectTo<DicomTrialSiteSubjectInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
var info = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).ProjectTo<DicomTrialSiteSubjectInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||||
|
|
||||||
var targetPath = Path.Combine("/IMPORT-IMAGES", info.TrialCode + "_" + info.SubjectCode + "_" + info.VisitName);
|
var targetPath ="/IMPORT-IMAGES/"+info.TrialCode + "_" + info.SubjectCode + "_" + info.VisitName;
|
||||||
|
|
||||||
var path = _dicomFileStoreHelper.GetSubjectVisitPath(info.TrialId, info.SiteId, info.SubjectId, info.SubjectVisitId);
|
var path = _dicomFileStoreHelper.GetSubjectVisitPath(info.TrialId, info.SiteId, info.SubjectId, info.SubjectVisitId);
|
||||||
|
|
||||||
|
@ -1739,49 +1739,60 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
HostName = "CS-690-sftp.mint-imaging.com",
|
HostName = "CS-690-sftp.mint-imaging.com",
|
||||||
UserName = "zdong",
|
UserName = "zdong",
|
||||||
Password = "Everest@2021",
|
Password = "Everest@2021",
|
||||||
//GiveUpSecurityAndAcceptAnySshHostKey = true,
|
|
||||||
SshHostKeyFingerprint = @"ecdsa-sha2-nistp384 384 59gkjJ5lMwv3jsB8Wz2B35tBAIor5pSd8PcJYtoamPo="
|
SshHostKeyFingerprint = @"ecdsa-sha2-nistp384 384 59gkjJ5lMwv3jsB8Wz2B35tBAIor5pSd8PcJYtoamPo="
|
||||||
};
|
};
|
||||||
|
|
||||||
using (Session session = new Session())
|
using (Session session = new Session())
|
||||||
{
|
{
|
||||||
|
var studyFolders = (new DirectoryInfo(path)).GetDirectories();
|
||||||
|
|
||||||
session.Open(sessionOptions);
|
session.Open(sessionOptions);
|
||||||
|
|
||||||
if (!session.FileExists(targetPath))
|
if (!session.FileExists(targetPath))
|
||||||
{
|
{
|
||||||
session.CreateDirectory(targetPath);
|
session.CreateDirectory(targetPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
var files = (new DirectoryInfo(path)).GetFiles();
|
foreach (var studyFolder in studyFolders)
|
||||||
|
|
||||||
foreach (var file in files)
|
|
||||||
{
|
{
|
||||||
if (file.Extension.Contains("dcm"))
|
if (!session.FileExists(Path.Combine(targetPath,studyFolder.Name))
|
||||||
{
|
{
|
||||||
string remoteFilePath =
|
session.CreateDirectory(targetPath);
|
||||||
RemotePath.TranslateLocalPathToRemote(file.FullName, path, targetPath);
|
}
|
||||||
|
|
||||||
var result = session.PutFiles(file.FullName, remoteFilePath, false);
|
foreach (var file in studyFolder.GetFiles())
|
||||||
|
{
|
||||||
if (!result.IsSuccess)
|
if (file.Extension.Contains("dcm",StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
string remoteFilePath =
|
||||||
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
|
RemotePath.TranslateLocalPathToRemote(file.FullName, studyFolder.FullName, targetPath);
|
||||||
|
|
||||||
return ResponseOutput.NotOk("Forward Failed");
|
var result = session.PutFiles(file.FullName, remoteFilePath, false);
|
||||||
|
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
{
|
||||||
|
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
||||||
|
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
|
||||||
|
|
||||||
|
return ResponseOutput.NotOk("Forward Failed" + result.Failures.ToString() + result.ToJson());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
||||||
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
|
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
||||||
u => new SubjectVisit() { ForwardState = ForwardStateEnum.Forwarded });
|
u => new SubjectVisit() { ForwardState = ForwardStateEnum.Forwarded });
|
||||||
|
@ -1789,5 +1800,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infrastructure.ExpressionExtend;
|
using IRaCIS.Core.Infrastructure.ExpressionExtend;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Application.Contracts.DTO;
|
using IRaCIS.Core.Application.Contracts.DTO;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
@ -30,7 +29,14 @@ namespace IRaCIS.Core.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trialId"></param>
|
||||||
|
/// <param name="isAllSiteUser">isAllSiteUser true : site用户列表,false :Site调研汇总表</param>
|
||||||
|
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="Exception"></exception>
|
||||||
[HttpGet, Route("{trialId:guid}/{isSiteUserNotAll:bool}")]
|
[HttpGet, Route("{trialId:guid}/{isSiteUserNotAll:bool}")]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<IActionResult> TrialSiteUserListExport(Guid trialId, bool isAllSiteUser,
|
public async Task<IActionResult> TrialSiteUserListExport(Guid trialId, bool isAllSiteUser,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using IRaCIS.Core.Infrastructure.ExpressionExtend;
|
using IRaCIS.Core.Infrastructure.ExpressionExtend;
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
@ -235,5 +234,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue