Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
c1d618326b
|
@ -5761,6 +5761,11 @@
|
|||
裁判百分比或绝对值的相差值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialCriterionJudgeQuestionListOutDto.Type">
|
||||
<summary>
|
||||
类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialCriterionJudgeQuestionListOutDto.JudgeDifferenceType">
|
||||
<summary>
|
||||
裁判百分比或绝对值的相差值匹配规则
|
||||
|
|
|
@ -42,22 +42,9 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
|
|||
public bool IsExistMutiFrames => InstanceInfoList.Any(t => t.NumberOfFrames > 1);
|
||||
|
||||
|
||||
#region 以后废弃
|
||||
|
||||
public List<Guid> InstanceList { get; set; } = new List<Guid>();
|
||||
|
||||
public List<string> InstancePathList { get; set; } = new List<string>();
|
||||
|
||||
public List<string> InstanceHtmlPathList { get; set; }
|
||||
|
||||
|
||||
|
||||
//存放在instance 上面
|
||||
public string WindowCenter { get; set; } = string.Empty;
|
||||
public string WindowWidth { get; set; } = string.Empty;
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
public string ImageResizePath { get; set; }
|
||||
}
|
||||
|
|
|
@ -157,8 +157,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
studyMonitor.UploadFinishedTime = DateTime.Now;
|
||||
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
||||
studyMonitor.FailedFileCount = incommand.FailedFileCount;
|
||||
studyMonitor.IsSuccess = incommand.FailedFileCount==0;
|
||||
studyMonitor.RecordPath=incommand.RecordPath;
|
||||
studyMonitor.IsSuccess = incommand.FailedFileCount == 0;
|
||||
studyMonitor.RecordPath = incommand.RecordPath;
|
||||
|
||||
//上传
|
||||
if (studyMonitor.IsDicomReUpload == false)
|
||||
|
@ -192,6 +192,16 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
study.SubjectId = incommand.SubjectId;
|
||||
study.SubjectVisitId = incommand.SubjectVisitId;
|
||||
|
||||
//如果因为意外情况,连续点击两次,导致第一次插入了,第二次进来也会插入,在此判断一下
|
||||
var findStudy = await _dicomstudyRepository.FirstOrDefaultAsync(t => t.Id == study.Id);
|
||||
|
||||
if (findStudy != null)
|
||||
{
|
||||
//直接返回
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//特殊处理逻辑
|
||||
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Distinct());
|
||||
|
@ -469,9 +479,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
.WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
|
||||
.WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
|
||||
.WhereIf(studyQuery.SiteId != null, t => t.SiteId == studyQuery.SiteId)
|
||||
.WhereIf(studyQuery.IsDicom != null, t => t.IsDicom == studyQuery.IsDicom )
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.Uploader), t => t.Uploader.UserName.Contains(studyQuery.Uploader))
|
||||
.WhereIf(studyQuery.IsSuccess != null, t => t.IsSuccess == studyQuery.IsSuccess)
|
||||
.WhereIf(studyQuery.IsDicom != null, t => t.IsDicom == studyQuery.IsDicom)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.Uploader), t => t.Uploader.UserName.Contains(studyQuery.Uploader))
|
||||
.WhereIf(studyQuery.IsSuccess != null, t => t.IsSuccess == studyQuery.IsSuccess)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.StudyCode), t => t.StudyCode.Contains(studyQuery.StudyCode))
|
||||
.Select(t => new UnionStudyMonitorModel()
|
||||
{
|
||||
|
@ -505,7 +515,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
ArchiveFinishedTime = t.ArchiveFinishedTime,
|
||||
|
||||
|
||||
RecordPath=t.RecordPath,
|
||||
RecordPath = t.RecordPath,
|
||||
|
||||
IsDicomReUpload = t.IsDicomReUpload,
|
||||
StudyId = t.Id,
|
||||
|
@ -727,15 +737,15 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
StudyInstanceUid = t.StudyInstanceUid
|
||||
}).ToList(),
|
||||
|
||||
UploadStudyList = u.TaskStudyList.Select(t => new
|
||||
UploadStudyList = u.TaskStudyList.Select(t => new
|
||||
{
|
||||
Id = t.Id,
|
||||
StudyInstanceUid = t.StudyInstanceUid,
|
||||
|
||||
SeriesList=t.SeriesList.Select(t => new UploadedSeries()
|
||||
SeriesList = t.SeriesList.Select(t => new UploadedSeries()
|
||||
{ SeriesId = t.Id, SeriesInstanceUid = t.SeriesInstanceUid, SOPInstanceUIDList = t.InstanceList.Select(c => c.SopInstanceUid).ToList() }).ToList()
|
||||
|
||||
|
||||
|
||||
}).ToList()
|
||||
});
|
||||
|
||||
|
@ -777,12 +787,12 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
if (findOriginStudy == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("该检查不属于该受试者,请核查") ;
|
||||
throw new BusinessValidationFailedException("该检查不属于该受试者,请核查");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if(findOriginStudy.UploadStudyList.Any(t=>t.StudyInstanceUid == studyInstanceUid))
|
||||
if (findOriginStudy.UploadStudyList.Any(t => t.StudyInstanceUid == studyInstanceUid))
|
||||
{
|
||||
result.AllowReUpload = true;
|
||||
result.AllowUpload = false;
|
||||
|
@ -897,7 +907,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
var result = new VerifyStudyUploadResult();
|
||||
|
||||
if (_provider.Exists($"StudyUid_{trialId}_{studyInstanceUid}") && _provider.Get<Guid>($"StudyUid_{trialId}_{studyInstanceUid}").Value!=_userInfo.Id)
|
||||
if (_provider.Exists($"StudyUid_{trialId}_{studyInstanceUid}") && _provider.Get<Guid>($"StudyUid_{trialId}_{studyInstanceUid}").Value != _userInfo.Id)
|
||||
{
|
||||
|
||||
result.AllowUpload = false;
|
||||
|
|
|
@ -321,34 +321,22 @@ namespace IRaCIS.Core.Application.Services
|
|||
DicomSeriesDTO series = await _repository.Where<DicomSeries>(s => s.Id == inDto.SeriesId).ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||
|
||||
var instanceList = await _repository.Where<DicomInstance>(t => t.SeriesId == inDto.SeriesId)
|
||||
.Select(t => new { t.SeriesId, t.StudyId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath, t.SliceLocation }).ToListAsync();
|
||||
series.InstanceList = instanceList.Where(t => t.SeriesId == series.Id).OrderByDescending(t => t.SliceLocation).ThenBy(t => t.InstanceNumber).Select(k => k.Id).ToList();
|
||||
.Select(t => new { t.SeriesId, t.StudyId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath, t.SliceLocation }).ToListAsync();
|
||||
|
||||
|
||||
series.InstanceHtmlPathList = instanceList.Where(t => t.SeriesId == series.Id && t.HtmlPath != string.Empty).OrderBy(t => t.InstanceNumber).Select(k => k.HtmlPath).ToList();
|
||||
|
||||
//处理多帧
|
||||
series.InstancePathList = instanceList.Where(s => s.SeriesId == series.Id).OrderBy(t => t.InstanceNumber)
|
||||
.SelectMany(u =>
|
||||
{
|
||||
series.InstanceInfoList = instanceList.Where(t => t.SeriesId == series.Id).OrderBy(t => t.InstanceNumber).Select(k =>
|
||||
new InstanceBasicInfo()
|
||||
{
|
||||
Id = k.Id,
|
||||
NumberOfFrames = k.NumberOfFrames,
|
||||
HtmlPath = k.HtmlPath,
|
||||
Path = k.Path,
|
||||
InstanceNumber = k.InstanceNumber,
|
||||
|
||||
if (u.NumberOfFrames > 1)
|
||||
{
|
||||
var pathList = new List<string>();
|
||||
}).ToList();
|
||||
|
||||
for (int i = 1; i <= u.NumberOfFrames; i++)
|
||||
{
|
||||
pathList.Add(u.Path + "?frame=" + (i - 1));
|
||||
}
|
||||
return pathList;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new List<string> { u.Path };
|
||||
|
||||
}
|
||||
})
|
||||
.ToList();
|
||||
|
||||
series.WindowWidth = instanceList.FirstOrDefault()!.WindowWidth;
|
||||
series.WindowCenter = instanceList.FirstOrDefault()!.WindowCenter;
|
||||
|
@ -442,33 +430,20 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
list.ForEach(series =>
|
||||
{
|
||||
series.InstanceList = instanceList.Where(t => t.SeriesId == series.Id).OrderBy(t => t.InstanceNumber).Select(k => k.Id).ToList();
|
||||
|
||||
|
||||
series.InstanceHtmlPathList = instanceList.Where(t => t.SeriesId == series.Id && t.HtmlPath != string.Empty).OrderBy(t => t.InstanceNumber).Select(k => k.HtmlPath).ToList();
|
||||
series.InstanceInfoList = instanceList.Where(t => t.SeriesId == series.Id).OrderBy(t => t.InstanceNumber).Select(k =>
|
||||
new InstanceBasicInfo()
|
||||
{
|
||||
Id = k.Id,
|
||||
NumberOfFrames = k.NumberOfFrames,
|
||||
HtmlPath = k.HtmlPath,
|
||||
Path = k.Path,
|
||||
InstanceNumber = k.InstanceNumber,
|
||||
|
||||
//处理多帧
|
||||
series.InstancePathList = instanceList.Where(s => s.SeriesId == series.Id).OrderBy(t => t.InstanceNumber)
|
||||
.SelectMany(u =>
|
||||
{
|
||||
}).ToList();
|
||||
|
||||
if (u.NumberOfFrames > 1)
|
||||
{
|
||||
var pathList = new List<string>();
|
||||
|
||||
for (int i = 1; i <= u.NumberOfFrames; i++)
|
||||
{
|
||||
pathList.Add(u.Path + "?frame=" + (i - 1));
|
||||
}
|
||||
return pathList;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new List<string> { u.Path };
|
||||
|
||||
}
|
||||
})
|
||||
.ToList();
|
||||
|
||||
series.WindowWidth = instanceList.FirstOrDefault()!.WindowWidth;
|
||||
series.WindowCenter = instanceList.FirstOrDefault()!.WindowCenter;
|
||||
|
|
Loading…
Reference in New Issue