Compare commits

..

No commits in common. "28360861aa5a0f228cf09907ba254f4c4c93c00e" and "2ce8edde80ff1376030be60282cc34d6972f1323" have entirely different histories.

6 changed files with 14 additions and 44 deletions

View File

@ -81,7 +81,7 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
public bool IsReading { get; set; }
public bool IsDeleted { get; set; }
public long? FileSize { get; set; }
public Guid? StudyId { get; set; }

View File

@ -107,13 +107,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
public string Modalities { get; set; }
public string Description { get; set; }
public int SeriesCount { get; set; }
public int InstanceCount { get; set; }
public int ReadingSeriesCount { get; set; }
public int ReadingInstanceCount { get; set; }
}
public class NoneDicomStudyBasicInfo
@ -133,7 +128,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
public string Description { get; set; } = string.Empty;
public int ReadingFileCount { get; set; }
}
}

View File

@ -882,7 +882,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
subjectCode = inQuery.SubjectCode;
}
TaskState? taskState = null;
if (inQuery.VisitTaskId != null)
{
//考虑到一致性分析,必须要这个编号进行过滤
@ -893,25 +892,20 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
SubjectCode = t.IsAnalysisCreate ? t.BlindSubjectCode : t.Subject.Code,
SubjectId = t.SubjectId,
t.DoctorUserId,
t.IsAnalysisCreate,
t.TaskState
t.IsAnalysisCreate
}).FirstNotNullAsync();
subjectId = taskInfo.SubjectId;
subjectCode = taskInfo.SubjectCode;
doctorUserId = (Guid)taskInfo.DoctorUserId!;
isAnalysisCreate = taskInfo.IsAnalysisCreate;
taskState = taskInfo.TaskState;
}
var query = _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId
&& t.SourceSubjectVisitId != null && t.DoctorUserId == doctorUserId)
//满足 有序或者随机只看到当前任务的dicom 非dicom检查
.WhereIf(inQuery.VisitTaskId == null, t => t.TaskState == TaskState.Effect)//从待阅列表进入,要筛选出有效的,任务可能重阅了,也要看到该任务的
.WhereIf(inQuery.VisitTaskId == null, t => t.TaskState == TaskState.Effect)//从待阅列表进入,要筛选出有效的,任务可能重阅了,也要看到该任务的
.WhereIf(criterionInfo.IsReadingTaskViewInOrder != ReadingOrder.SubjectRandom && inQuery.VisitTaskId != null, t => t.Id == inQuery.VisitTaskId)
.WhereIf(taskState == TaskState.Effect || taskState == TaskState.Freeze, t => t.TaskState == TaskState.Effect)//subject 随机可能当前阅片人有退回任务此时传递了任务Id但是要看整个subject得要只留生效的
.WhereIf(taskState != null && taskState != TaskState.Effect && taskState != TaskState.Freeze, t => t.Id == inQuery.VisitTaskId) //非生效只查当前任务
.ProjectTo<SubjectCRCImageUploadedDto>(_mapper.ConfigurationProvider);
//这里过滤是否是一致性分析的
@ -1012,11 +1006,11 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
u.StudyTime,
u.StudyCode,
SeriesList = u.SeriesList.Where(t => t.IsReading).Select(z => new
SeriesList = u.SeriesList.Select(z => new
{
z.Modality,
InstancePathList = z.DicomInstanceList.Where(t => t.IsReading).Select(k => new
InstancePathList = z.DicomInstanceList.Select(k => new
{
k.Path,
k.FileSize
@ -1027,14 +1021,13 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
NoneDicomStudyList = sv.NoneDicomStudyList.Where(t => isQueryNoneDicom ? inQuery.NoneDicomStudyIdList.Contains(t.Id) : false)
.Where(t => info.IsImageFilter ? ("|" + info.CriterionModalitys + "|").Contains("|" + t.Modality + "|") : true)
.Where(t => t.IsReading)
.Select(nd => new
{
nd.Modality,
nd.StudyCode,
nd.ImageDate,
FileList = nd.NoneDicomFileList.Where(t => t.IsReading).Select(file => new
FileList = nd.NoneDicomFileList.Select(file => new
{
file.FileName,
file.Path,

View File

@ -1,6 +1,5 @@
using IRaCIS.Core.Application.Contracts.Dicom.DTO;
using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
@ -20,9 +19,8 @@ namespace IRaCIS.Core.Application.Services
//医生读片那一块有耦合,关键序列 这里暂时留存
/// <summary> 指定资源Id获取Dicom检查所属序列信息列表 </summary>
/// <param name="studyId"> Dicom检查的Id </param>
/// <param name="isReading"></param>
[HttpGet, Route("{studyId:guid}")]
public async Task<IResponseOutput<List<DicomSeriesDTO>>> List(Guid studyId, bool? isReading)
public async Task<IResponseOutput<List<DicomSeriesDTO>>> List(Guid studyId)
{
//质控的时候要标记序列和instance 删除 ,所以要返回全部,但是 质控通过后pm 进去看的时候要看过滤后的
@ -34,16 +32,14 @@ namespace IRaCIS.Core.Application.Services
//断点
var seriesList = await _seriesRepository.Where(s => s.StudyId == studyId).IgnoreQueryFilters()
.WhereIf(isQCFinished, t => t.IsDeleted == false)
.WhereIf(isReading == true, t => t.IsReading == true)
.OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).ThenBy(s => s.CreateTime)
.ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).ToListAsync();
var instanceList = await _instanceRepository.Where(s => s.StudyId == studyId).IgnoreQueryFilters()
.WhereIf(isQCFinished, t => t.IsDeleted == false)
.WhereIf(isReading == true, t => t.IsReading == true)
.OrderBy(t => t.SeriesId).ThenBy(t => t.InstanceNumber)
.ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
.Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath, t.IsReading, t.IsDeleted, t.FileSize }).ToListAsync();//.GroupBy(u => u.SeriesId);
.Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath, t.IsReading, t.IsDeleted }).ToListAsync();//.GroupBy(u => u.SeriesId);
foreach (var series in seriesList)
@ -58,8 +54,7 @@ namespace IRaCIS.Core.Application.Services
Path = k.Path,
InstanceNumber = k.InstanceNumber,
IsReading = k.IsReading,
IsDeleted = k.IsDeleted,
FileSize = k.FileSize
IsDeleted = k.IsDeleted
}).ToList();

View File

@ -130,20 +130,16 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.CriterionModalitys, u => u.MapFrom(s => s.TrialReadingCriterion.CriterionModalitys))
.ForMember(d => d.SubjectCode, u => u.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code));
CreateMap<DicomStudy, DicomStudyBasicInfo>()
.ForMember(d => d.ReadingSeriesCount, u => u.MapFrom(s => s.SeriesList.Where(t => t.IsReading).Count()))
.ForMember(d => d.ReadingInstanceCount, u => u.MapFrom(s => s.InstanceList.Where(t => t.IsReading && t.DicomSerie.IsReading).Count()));
CreateMap<NoneDicomStudy, NoneDicomStudyBasicInfo>()
.ForMember(d => d.ReadingFileCount, u => u.MapFrom(s => s.NoneDicomFileList.Where(t => t.IsReading).Count()));
CreateMap<DicomStudy, DicomStudyBasicInfo>();
CreateMap<NoneDicomStudy, NoneDicomStudyBasicInfo>();
CreateMap<VisitTask, SubjectCRCImageUploadedDto>()
.ForMember(d => d.VisitTaskId, u => u.MapFrom(s => s.Id))
.ForMember(d => d.IsImageFilter, u => u.MapFrom(s => s.TrialReadingCriterion.IsImageFilter))
.ForMember(d => d.CriterionModalitys, u => u.MapFrom(s => s.TrialReadingCriterion.CriterionModalitys))
.ForMember(d => d.SubjectCode, u => u.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code))
.ForMember(d => d.DicomStudyList, u => u.MapFrom(s => s.SourceSubjectVisit.StudyList))
.ForMember(d => d.NoneDicomStudyList, u => u.MapFrom(s => s.SourceSubjectVisit.NoneDicomStudyList.Where(t => t.IsReading)));
.ForMember(d => d.NoneDicomStudyList, u => u.MapFrom(s => s.SourceSubjectVisit.NoneDicomStudyList))
;
CreateMap<TrialImageDownload, TrialImageDownloadView>()
.ForMember(d => d.UserFullName, u => u.MapFrom(s => s.CreateUserRole.FullName))

View File

@ -961,9 +961,6 @@ namespace IRaCIS.Core.Application.Image.QA
var noneDicomStudyFile = (await _noneDicomStudyFileRepository.Where(t => t.Id == noneDicomStudyFileId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
var noneDicomStudy = (await _noneDicomStudyRepository.Where(t => t.Id == noneDicomStudyFile.NoneDicomStudyId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
if (state == 1)
{
noneDicomStudyFile.IsReading = false;
@ -975,15 +972,10 @@ namespace IRaCIS.Core.Application.Image.QA
else if (state == 4)
{
noneDicomStudyFile.IsDeleted = true;
noneDicomStudy.FileCount = noneDicomStudy.FileCount - 1;
}
else if (state == 5)
{
noneDicomStudyFile.IsDeleted = false;
noneDicomStudy.FileCount = noneDicomStudy.FileCount + 1;
}
}