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

IRC_NewDev
he 2024-05-30 14:31:20 +08:00
commit c1d618326b
4 changed files with 46 additions and 69 deletions

View File

@ -5761,6 +5761,11 @@
裁判百分比或绝对值的相差值 裁判百分比或绝对值的相差值
</summary> </summary>
</member> </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"> <member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialCriterionJudgeQuestionListOutDto.JudgeDifferenceType">
<summary> <summary>
裁判百分比或绝对值的相差值匹配规则 裁判百分比或绝对值的相差值匹配规则

View File

@ -42,22 +42,9 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
public bool IsExistMutiFrames => InstanceInfoList.Any(t => t.NumberOfFrames > 1); 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 上面 //存放在instance 上面
public string WindowCenter { get; set; } = string.Empty; public string WindowCenter { get; set; } = string.Empty;
public string WindowWidth { get; set; } = string.Empty; public string WindowWidth { get; set; } = string.Empty;
#endregion
public string ImageResizePath { get; set; } public string ImageResizePath { get; set; }
} }

View File

@ -157,8 +157,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
studyMonitor.UploadFinishedTime = DateTime.Now; studyMonitor.UploadFinishedTime = DateTime.Now;
studyMonitor.ArchiveFinishedTime = DateTime.Now; studyMonitor.ArchiveFinishedTime = DateTime.Now;
studyMonitor.FailedFileCount = incommand.FailedFileCount; studyMonitor.FailedFileCount = incommand.FailedFileCount;
studyMonitor.IsSuccess = incommand.FailedFileCount==0; studyMonitor.IsSuccess = incommand.FailedFileCount == 0;
studyMonitor.RecordPath=incommand.RecordPath; studyMonitor.RecordPath = incommand.RecordPath;
//上传 //上传
if (studyMonitor.IsDicomReUpload == false) if (studyMonitor.IsDicomReUpload == false)
@ -192,6 +192,16 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
study.SubjectId = incommand.SubjectId; study.SubjectId = incommand.SubjectId;
study.SubjectVisitId = incommand.SubjectVisitId; 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()); study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Distinct());
@ -469,7 +479,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
.WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId) .WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
.WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId) .WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
.WhereIf(studyQuery.SiteId != null, t => t.SiteId == studyQuery.SiteId) .WhereIf(studyQuery.SiteId != null, t => t.SiteId == studyQuery.SiteId)
.WhereIf(studyQuery.IsDicom != null, t => t.IsDicom == studyQuery.IsDicom ) .WhereIf(studyQuery.IsDicom != null, t => t.IsDicom == studyQuery.IsDicom)
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.Uploader), t => t.Uploader.UserName.Contains(studyQuery.Uploader)) .WhereIf(!string.IsNullOrWhiteSpace(studyQuery.Uploader), t => t.Uploader.UserName.Contains(studyQuery.Uploader))
.WhereIf(studyQuery.IsSuccess != null, t => t.IsSuccess == studyQuery.IsSuccess) .WhereIf(studyQuery.IsSuccess != null, t => t.IsSuccess == studyQuery.IsSuccess)
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.StudyCode), t => t.StudyCode.Contains(studyQuery.StudyCode)) .WhereIf(!string.IsNullOrWhiteSpace(studyQuery.StudyCode), t => t.StudyCode.Contains(studyQuery.StudyCode))
@ -505,7 +515,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
ArchiveFinishedTime = t.ArchiveFinishedTime, ArchiveFinishedTime = t.ArchiveFinishedTime,
RecordPath=t.RecordPath, RecordPath = t.RecordPath,
IsDicomReUpload = t.IsDicomReUpload, IsDicomReUpload = t.IsDicomReUpload,
StudyId = t.Id, StudyId = t.Id,
@ -732,7 +742,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
Id = t.Id, Id = t.Id,
StudyInstanceUid = t.StudyInstanceUid, 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() { SeriesId = t.Id, SeriesInstanceUid = t.SeriesInstanceUid, SOPInstanceUIDList = t.InstanceList.Select(c => c.SopInstanceUid).ToList() }).ToList()
@ -777,12 +787,12 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
if (findOriginStudy == null) if (findOriginStudy == null)
{ {
throw new BusinessValidationFailedException("该检查不属于该受试者,请核查") ; throw new BusinessValidationFailedException("该检查不属于该受试者,请核查");
} }
else else
{ {
if(findOriginStudy.UploadStudyList.Any(t=>t.StudyInstanceUid == studyInstanceUid)) if (findOriginStudy.UploadStudyList.Any(t => t.StudyInstanceUid == studyInstanceUid))
{ {
result.AllowReUpload = true; result.AllowReUpload = true;
result.AllowUpload = false; result.AllowUpload = false;
@ -897,7 +907,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
var result = new VerifyStudyUploadResult(); 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; result.AllowUpload = false;

View File

@ -322,33 +322,21 @@ namespace IRaCIS.Core.Application.Services
var instanceList = await _repository.Where<DicomInstance>(t => t.SeriesId == inDto.SeriesId) 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(); .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();
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 =>
series.InstancePathList = instanceList.Where(s => s.SeriesId == series.Id).OrderBy(t => t.InstanceNumber) new InstanceBasicInfo()
.SelectMany(u =>
{ {
Id = k.Id,
NumberOfFrames = k.NumberOfFrames,
HtmlPath = k.HtmlPath,
Path = k.Path,
InstanceNumber = k.InstanceNumber,
if (u.NumberOfFrames > 1) }).ToList();
{
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.WindowWidth = instanceList.FirstOrDefault()!.WindowWidth;
series.WindowCenter = instanceList.FirstOrDefault()!.WindowCenter; series.WindowCenter = instanceList.FirstOrDefault()!.WindowCenter;
@ -442,33 +430,20 @@ namespace IRaCIS.Core.Application.Services
{ {
list.ForEach(series => 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()
//处理多帧
series.InstancePathList = instanceList.Where(s => s.SeriesId == series.Id).OrderBy(t => t.InstanceNumber)
.SelectMany(u =>
{ {
Id = k.Id,
NumberOfFrames = k.NumberOfFrames,
HtmlPath = k.HtmlPath,
Path = k.Path,
InstanceNumber = k.InstanceNumber,
if (u.NumberOfFrames > 1) }).ToList();
{
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.WindowWidth = instanceList.FirstOrDefault()!.WindowWidth;
series.WindowCenter = instanceList.FirstOrDefault()!.WindowCenter; series.WindowCenter = instanceList.FirstOrDefault()!.WindowCenter;