增加dicom 显示文件大小,以及修改影像下载列表适配 随机阅片
parent
3fc7b72a45
commit
33b02be6ed
|
@ -647,14 +647,35 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
[HttpPost]
|
||||
public async Task<List<TaskNoneDicomStudyDTO>> GetIRUploadTaskNoneDicomStudyList(IRUploadStudyQuery inQuery)
|
||||
{
|
||||
var subjectCode = string.Empty;
|
||||
var subjectId = inQuery.SubjectId;
|
||||
var doctorUserId = _userInfo.Id;
|
||||
|
||||
if (inQuery.VisitTaskId != null)
|
||||
{
|
||||
//考虑到一致性分析,必须要这个编号进行过滤
|
||||
//医学审核查看下载按钮,这个时候需要知道医生
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(t => t.Id == inQuery.VisitTaskId).Select(t => new {
|
||||
SubjectCode = t.IsAnalysisCreate ? t.BlindSubjectCode : t.Subject.Code,
|
||||
SubjectId = t.SubjectId,
|
||||
t.DoctorUserId,
|
||||
t.IsAnalysisCreate
|
||||
}).FirstNotNullAsync();
|
||||
|
||||
subjectId = taskInfo.SubjectId;
|
||||
subjectCode = taskInfo.SubjectCode;
|
||||
doctorUserId = (Guid)taskInfo.DoctorUserId!;
|
||||
}
|
||||
|
||||
var info = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId)
|
||||
.Select(t => new { t.IsImageFilter, t.CriterionModalitys, t.IsReadingTaskViewInOrder }).FirstNotNullAsync();
|
||||
|
||||
var query = from u in _visitTaskRepository.Where(t => t.SubjectId == inQuery.SubjectId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId
|
||||
&& t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect)
|
||||
var query = from u in _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId
|
||||
&& t.SourceSubjectVisitId != null && t.DoctorUserId == doctorUserId && t.TaskState == TaskState.Effect)
|
||||
//满足 有序,或者随机只看到当前任务的dicom 非dicom检查
|
||||
.WhereIf(info.IsReadingTaskViewInOrder != ReadingOrder.SubjectRandom && inQuery.VisitTaskId != null, t => t.Id == inQuery.VisitTaskId)
|
||||
join ns in _noneDicomStudyReposiotry.Where(t => t.SubjectId == inQuery.SubjectId).WhereIf(info.IsImageFilter, t => ("|" + info.CriterionModalitys + "|").Contains("|" + t.Modality + "|"))
|
||||
join ns in _noneDicomStudyReposiotry.Where(t => t.SubjectId == subjectId).WhereIf(info.IsImageFilter, t => ("|" + info.CriterionModalitys + "|").Contains("|" + t.Modality + "|"))
|
||||
on u.SourceSubjectVisitId equals ns.SubjectVisitId
|
||||
|
||||
select new TaskNoneDicomStudyDTO()
|
||||
|
@ -684,7 +705,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
};
|
||||
|
||||
var list = await query.Where(t => t.SubjectCode == inQuery.SubjectCode).SortToListAsync(inQuery);
|
||||
var list = await query.Where(t => t.SubjectCode == subjectCode).SortToListAsync(inQuery);
|
||||
|
||||
var noneDicomStudyTaskIdList = list.Select(t => t.VisitTaskId).ToList();
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid CreateUserId { get; set; }
|
||||
public Guid NoneDicomStudyId { get; set; }
|
||||
|
||||
public long? FileSize { get; set; }
|
||||
|
||||
public string FullFilePath => Path;
|
||||
|
||||
public string FileType { get; set; }
|
||||
|
|
|
@ -1,81 +1,83 @@
|
|||
//using IRaCIS.Core.Domain.Models;
|
||||
//using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
//namespace IRaCIS.Core.Infra.EFCore.EntityConfigration;
|
||||
namespace IRaCIS.Core.Infra.EFCore.EntityConfigration;
|
||||
|
||||
///// <summary>
|
||||
///// 医学影像 数据量大,主键是 SeqId ,Id 是自己算的,也可以作为Id,但是不是有序的,数据量大,会导致性能很差,所以是逻辑主键
|
||||
///// </summary>
|
||||
/// <summary>
|
||||
/// 医学影像 数据量大,主键是 SeqId ,Id 是自己算的,也可以作为Id,但是不是有序的,数据量大,会导致性能很差,所以是逻辑主键
|
||||
/// </summary>
|
||||
|
||||
//public class DicomStudyConfigration : IEntityTypeConfiguration<DicomStudy>
|
||||
//{
|
||||
// public void Configure(EntityTypeBuilder<DicomStudy> builder)
|
||||
// {
|
||||
// builder.HasKey(e => e.SeqId);
|
||||
// }
|
||||
//}
|
||||
public class DicomStudyConfigration : IEntityTypeConfiguration<DicomStudy>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<DicomStudy> builder)
|
||||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
|
||||
//public class DicomSeriesConfigration : IEntityTypeConfiguration<DicomSeries>
|
||||
//{
|
||||
// public void Configure(EntityTypeBuilder<DicomSeries> builder)
|
||||
// {
|
||||
// builder.HasKey(e => e.SeqId);
|
||||
// }
|
||||
//}
|
||||
builder.HasMany(s => s.SeriesList).WithOne(sv => sv.DicomStudy).HasForeignKey(t => t.StudyId).HasPrincipalKey(t=>t.Id);
|
||||
}
|
||||
}
|
||||
|
||||
//public class DicomInstanceConfigration : IEntityTypeConfiguration<DicomInstance>
|
||||
//{
|
||||
// public void Configure(EntityTypeBuilder<DicomInstance> builder)
|
||||
// {
|
||||
// builder.HasKey(e => e.SeqId);
|
||||
// }
|
||||
//}
|
||||
public class DicomSeriesConfigration : IEntityTypeConfiguration<DicomSeries>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<DicomSeries> builder)
|
||||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
}
|
||||
}
|
||||
|
||||
//public class TaskStudyConfigration : IEntityTypeConfiguration<TaskStudy>
|
||||
//{
|
||||
// public void Configure(EntityTypeBuilder<TaskStudy> builder)
|
||||
// {
|
||||
// builder.HasKey(e => e.SeqId);
|
||||
// }
|
||||
//}
|
||||
public class DicomInstanceConfigration : IEntityTypeConfiguration<DicomInstance>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<DicomInstance> builder)
|
||||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
}
|
||||
}
|
||||
|
||||
//public class TaskSeriesConfigration : IEntityTypeConfiguration<TaskSeries>
|
||||
//{
|
||||
// public void Configure(EntityTypeBuilder<TaskSeries> builder)
|
||||
// {
|
||||
// builder.HasKey(e => e.SeqId);
|
||||
// }
|
||||
//}
|
||||
public class TaskStudyConfigration : IEntityTypeConfiguration<TaskStudy>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<TaskStudy> builder)
|
||||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
}
|
||||
}
|
||||
|
||||
//public class TaskInstanceConfigration : IEntityTypeConfiguration<TaskInstance>
|
||||
//{
|
||||
// public void Configure(EntityTypeBuilder<TaskInstance> builder)
|
||||
// {
|
||||
// builder.HasKey(e => e.SeqId);
|
||||
// }
|
||||
//}
|
||||
public class TaskSeriesConfigration : IEntityTypeConfiguration<TaskSeries>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<TaskSeries> builder)
|
||||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
}
|
||||
}
|
||||
|
||||
public class TaskInstanceConfigration : IEntityTypeConfiguration<TaskInstance>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<TaskInstance> builder)
|
||||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//public class SCPStudyConfigration : IEntityTypeConfiguration<SCPStudy>
|
||||
//{
|
||||
// public void Configure(EntityTypeBuilder<SCPStudy> builder)
|
||||
// {
|
||||
// builder.HasKey(e => e.SeqId);
|
||||
// }
|
||||
//}
|
||||
public class SCPStudyConfigration : IEntityTypeConfiguration<SCPStudy>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<SCPStudy> builder)
|
||||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
}
|
||||
}
|
||||
|
||||
//public class SCPSeriesConfigration : IEntityTypeConfiguration<SCPSeries>
|
||||
//{
|
||||
// public void Configure(EntityTypeBuilder<SCPSeries> builder)
|
||||
// {
|
||||
// builder.HasKey(e => e.SeqId);
|
||||
// }
|
||||
//}
|
||||
public class SCPSeriesConfigration : IEntityTypeConfiguration<SCPSeries>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<SCPSeries> builder)
|
||||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
}
|
||||
}
|
||||
|
||||
//public class SCPInstanceConfigration : IEntityTypeConfiguration<SCPInstance>
|
||||
//{
|
||||
// public void Configure(EntityTypeBuilder<SCPInstance> builder)
|
||||
// {
|
||||
// builder.HasKey(e => e.SeqId);
|
||||
// }
|
||||
//}
|
||||
public class SCPInstanceConfigration : IEntityTypeConfiguration<SCPInstance>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<SCPInstance> builder)
|
||||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue