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
9148651556
|
|
@ -273,6 +273,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
public List<OSSFileDTO> UploadedFileList { get; set; } = new List<OSSFileDTO>();
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
|
||||
public class OSSFileDTO
|
||||
{
|
||||
|
|
@ -521,7 +522,17 @@ namespace IRaCIS.Core.API.Controllers
|
|||
}
|
||||
else
|
||||
{
|
||||
await _noneDicomStudyFileRepository.AddAsync(new NoneDicomStudyFile() { FileName = item.FileName, Path = item.FilePath, NoneDicomStudyId = noneDicomStudyId.Value, FileType = item.FileType, FileSize = item.FileFize });
|
||||
if (incommand.IsImageSegmentLabel == true)
|
||||
{
|
||||
await _noneDicomStudyFileRepository.AddAsync(new NoneDicomStudyFile() { FileName = item.FileName, Path = item.FilePath, ImageLabelNoneDicomStudyId = noneDicomStudyId.Value, FileType = item.FileType, FileSize = item.FileFize });
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
await _noneDicomStudyFileRepository.AddAsync(new NoneDicomStudyFile() { FileName = item.FileName, Path = item.FilePath, NoneDicomStudyId = noneDicomStudyId.Value, FileType = item.FileType, FileSize = item.FileFize });
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
||||
{
|
||||
|
|
@ -27,6 +28,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
|||
|
||||
public List<StudyBasicInfo> UploadStudyList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<StudyBasicInfo> OriginalTaskStudyList { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -116,6 +120,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
|||
public int ReadingSeriesCount { get; set; }
|
||||
|
||||
public int ReadingInstanceCount { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
}
|
||||
|
||||
public class NoneDicomStudyBasicInfo
|
||||
|
|
@ -140,5 +146,10 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
|||
public int ReadingFileCount { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ImageMarkNoneDicomStudyBasicInfo: NoneDicomStudyBasicInfo
|
||||
{
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public int FileCount { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class PreArchiveDicomStudyCommand
|
||||
|
|
@ -237,6 +238,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class TaskStudyArchiveConfirmResult
|
||||
|
|
@ -267,6 +271,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
[NotDefault]
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
}
|
||||
|
||||
public class NewArchiveStudyCommand
|
||||
|
|
@ -492,6 +498,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string? SubjectCode { get; set; }
|
||||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
}
|
||||
|
||||
public class IRTaskUploadedDicomStudyQuery
|
||||
|
|
@ -571,6 +581,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string TaskBlindName { get; set; }
|
||||
|
||||
public string TaskName { get; set; }
|
||||
|
||||
public string VisitName { get; set; }
|
||||
public Guid? SourceSubjectVisitId { get; set; }
|
||||
|
||||
public ReadingTaskState ReadingTaskState { get; set; }
|
||||
|
|
@ -592,6 +604,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid VisitId { get; set; }
|
||||
|
||||
public List<DownloadDicomStudyDto> StudyList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<DownloadDicomStudyDto> TaskStudyList { get; set; }
|
||||
|
||||
public List<DownloadNoneDicomStudyDto> NoneDicomStudyList { get; set; }
|
||||
}
|
||||
|
||||
|
|
@ -661,6 +677,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string? SubjectCode { get; set; }
|
||||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -681,6 +699,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public List<Guid> NoneDicomStudyIdList { get; set; }
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class TrialKeyImageExportDTO
|
||||
|
|
@ -930,4 +950,81 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public Guid TaskId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SubjectVisitMarkQuery
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
|
||||
public string? SubjectCode { get; set; }
|
||||
|
||||
public bool? IsUrgent { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class SubjectVisitMarkDTO
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public bool IsUrgent { get; set; }
|
||||
|
||||
|
||||
public bool SubjectCode { get; set; }
|
||||
|
||||
public int? VisitCount { get; set; }
|
||||
|
||||
|
||||
public int? MarkVisitCount { get; set; }
|
||||
|
||||
|
||||
public int? DicomStudyCount { get; set; }
|
||||
|
||||
public int? MarkDicomStudyCount { get; set; }
|
||||
}
|
||||
|
||||
public class SubjectVisitMarkStudyDto
|
||||
{
|
||||
public bool IsDicom => DicomStudyList.Count() > 0;
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
public string VisitName { get; set; }
|
||||
|
||||
|
||||
public List<DicomStudyBasicInfo> DicomStudyList { get; set; } = new List<DicomStudyBasicInfo>();
|
||||
|
||||
public List<NoneDicomStudyBasicInfo> NoneDicomStudyList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SubjectVisitMarkUploadDto
|
||||
{
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
public Guid TrialSiteId { get; set; }
|
||||
|
||||
public Guid SubejctId { get; set; }
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
public string VisitName { get; set; }
|
||||
|
||||
public Guid? SourceSubjectVisitId => SubjectVisitId;
|
||||
|
||||
|
||||
|
||||
public List<StudyBasicInfo> OrginalStudyList { get; set; }
|
||||
|
||||
public List<StudyBasicInfo> UploadStudyList { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -91,7 +91,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<DicomStudy, DicomStudyDTO>();
|
||||
CreateMap<DicomSeries, DicomSeriesDTO>()
|
||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.SubjectVisit.Subject.Code))
|
||||
.ForMember(o => o.VisitName, t => t.MapFrom(u => u.SubjectVisit.VisitName));
|
||||
.ForMember(o => o.VisitName, t => t.MapFrom(u => u.SubjectVisit.VisitName));
|
||||
CreateMap<SCPSeries, DicomSeriesDTO>();
|
||||
|
||||
|
||||
|
|
@ -136,6 +136,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
.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<TaskStudy, DicomStudyBasicInfo>()
|
||||
//.ForMember(d => d.SubjectVisitId, u => u.MapFrom(s => s.SubjectVisitId))
|
||||
.ForMember(d => d.ReadingSeriesCount, u => u.MapFrom(s => s.SeriesCount))
|
||||
.ForMember(d => d.ReadingInstanceCount, u => u.MapFrom(s => s.InstanceCount));
|
||||
|
||||
CreateMap<NoneDicomStudy, NoneDicomStudyBasicInfo>()
|
||||
.ForMember(d => d.ReadingFileCount, u => u.MapFrom(s => s.NoneDicomFileList.Where(t => t.IsReading).Count()));
|
||||
|
||||
|
|
@ -145,7 +150,7 @@ 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))
|
||||
.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.Where(t => t.IsReading)));
|
||||
|
||||
CreateMap<TrialImageDownload, TrialImageDownloadView>()
|
||||
.ForMember(d => d.UserFullName, u => u.MapFrom(s => s.CreateUserRole.FullName))
|
||||
|
|
@ -158,7 +163,24 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<SCPSeries, DicomSeriesDTO>();
|
||||
|
||||
CreateMap<NoneDicomEdit, NoneDicomStudy>();
|
||||
|
||||
|
||||
|
||||
CreateMap<SubjectVisit, SubjectVisitMarkStudyDto>()
|
||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(u => u.Subject.Code))
|
||||
.ForMember(d => d.DicomStudyList, u => u.MapFrom(s => s.StudyList))
|
||||
.ForMember(d => d.NoneDicomStudyList, u => u.MapFrom(s => s.NoneDicomStudyList.Where(t => t.IsReading)));
|
||||
|
||||
|
||||
|
||||
CreateMap<NoneDicomStudy, ImageMarkNoneDicomStudyBasicInfo>()
|
||||
.ForMember(d => d.SubjectVisitId, u => u.MapFrom(s => s.SubjectVisitId))
|
||||
.ForMember(d => d.FileCount, u => u.MapFrom(s => s.ImageLabelNoneDicomFileList.Count()))
|
||||
.ForMember(d => d.ReadingFileCount, u => u.MapFrom(s => s.ImageLabelNoneDicomFileList.Count()));
|
||||
|
||||
CreateMap<ImageMarkNoneDicomStudyBasicInfo, NoneDicomStudyBasicInfo>();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,11 @@ using IRaCIS.Core.Application.Interfaces;
|
|||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.BouncyCastle.Asn1.Tsp;
|
||||
|
||||
namespace IRaCIS.Core.Application.Services
|
||||
{
|
||||
|
|
@ -19,7 +21,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
IRepository<NoneDicomStudy> _noneDicomStudyRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository,
|
||||
//IRepository<ReadingCustomTag> _readingCustomTagRepository,
|
||||
//IRepository<ReadingCustomTag> _readingCustomTagRepository,
|
||||
IRepository<ReadingTaskQuestionMark> _readingTaskQuestionMark,
|
||||
IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository,
|
||||
IRepository<Subject> _subjectRepository,
|
||||
|
|
@ -288,7 +290,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
|
||||
|
||||
return studyList.Where(x=>x.SeriesList.Count()>0).ToList();
|
||||
return studyList.Where(x => x.SeriesList.Count() > 0).ToList();
|
||||
|
||||
//return ResponseOutput.Ok(studyList.Where(t => t.SeriesList.Count > 0).ToList());
|
||||
|
||||
|
|
@ -468,62 +470,44 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var studyList = new List<VisitStudyDTO>();
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).Select(t => new { t.TrialReadingCriterionId, t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys, t.ReadingTaskState, TaskStudyCount = t.TaskStudyList.Count }).FirstNotNullAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).Select(t => new { t.TrialReadingCriterionId, t.TrialReadingCriterion.CriterionType, t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys, t.ReadingTaskState, TaskStudyCount = t.TaskStudyList.Count }).FirstNotNullAsync();
|
||||
|
||||
//影像后处理 上传了新的影像
|
||||
if (taskInfo.TaskStudyCount > 0)
|
||||
{
|
||||
|
||||
var taskStudyList = await _taskStudyRepository.Where(t => t.TrialId == indto.TrialId && t.VisitTaskId == indto.VisitTaskId)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|"))
|
||||
.ProjectTo<VisitStudyDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
foreach (var study in taskStudyList)
|
||||
#region dicom 检查查询
|
||||
|
||||
//如果是手动生成的标准,需要过滤检查和序列数据
|
||||
|
||||
var isManualGenerate = await _trialReadingCriterionRepository.AnyAsync(t => t.Id == taskInfo.TrialReadingCriterionId && t.IsAutoCreate == false);
|
||||
|
||||
var dicomStudyList = await _dicomStudyRepository.Where(t => t.TrialId == indto.TrialId && t.SubjectVisitId == indto.SujectVisitId)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|"))
|
||||
.WhereIf(isManualGenerate, t => t.SubjectCriteriaEvaluationVisitStudyFilterList.Any(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.IsConfirmed && t.IsReading))
|
||||
//影像后处理 上传了新的影像 还要原始dsa
|
||||
.WhereIf(taskInfo.TaskStudyCount > 0 && (taskInfo.CriterionType == CriterionType.OCT || taskInfo.CriterionType == CriterionType.IVUS), t => t.ModalityForEdit == "XA")
|
||||
.WhereIf(taskInfo.TaskStudyCount > 0 && (taskInfo.CriterionType != CriterionType.OCT || taskInfo.CriterionType != CriterionType.IVUS), t => false)
|
||||
.Select(k => new VisitStudyDTO()
|
||||
{
|
||||
study.SeriesList = study.SeriesList.OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).ToList();
|
||||
InstanceCount = k.InstanceCount,
|
||||
StudyName = k.StudyName,
|
||||
Modalities = k.Modalities,
|
||||
//SeriesCount = k.SeriesCount,
|
||||
StudyCode = k.StudyCode,
|
||||
StudyId = k.Id,
|
||||
|
||||
//foreach (var series in study.SeriesList)
|
||||
//{
|
||||
// series.WindowCenter = series.InstanceInfoList.FirstOrDefault()!.WindowCenter;
|
||||
// series.WindowWidth = series.InstanceInfoList.FirstOrDefault()!.WindowWidth;
|
||||
//}
|
||||
//study.SeriesCount = study.SeriesList.Count;
|
||||
BodyPartForEdit = k.BodyPartForEdit,
|
||||
BodyPartForEditOther = k.BodyPartForEditOther
|
||||
|
||||
study.InstanceCount = study.SeriesList.SelectMany(t => t.InstanceInfoList).Count();
|
||||
}
|
||||
|
||||
studyList.AddRange(taskStudyList);
|
||||
}).ToListAsync();
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
var studyIds = dicomStudyList.Select(t => t.StudyId).ToList();
|
||||
|
||||
if (studyIds.Count > 0)
|
||||
{
|
||||
#region dicom 检查查询
|
||||
|
||||
//如果是手动生成的标准,需要过滤检查和序列数据
|
||||
|
||||
var isManualGenerate = await _trialReadingCriterionRepository.AnyAsync(t => t.Id == taskInfo.TrialReadingCriterionId && t.IsAutoCreate == false);
|
||||
|
||||
var dicomStudyList = await _dicomStudyRepository.Where(t => t.TrialId == indto.TrialId && t.SubjectVisitId == indto.SujectVisitId)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|"))
|
||||
.WhereIf(isManualGenerate, t => t.SubjectCriteriaEvaluationVisitStudyFilterList.Any(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.IsConfirmed && t.IsReading))
|
||||
.Select(k => new VisitStudyDTO()
|
||||
{
|
||||
InstanceCount = k.InstanceCount,
|
||||
StudyName = k.StudyName,
|
||||
Modalities = k.Modalities,
|
||||
//SeriesCount = k.SeriesCount,
|
||||
StudyCode = k.StudyCode,
|
||||
StudyId = k.Id,
|
||||
|
||||
BodyPartForEdit=k.BodyPartForEdit,
|
||||
BodyPartForEditOther=k.BodyPartForEditOther
|
||||
|
||||
|
||||
}).ToListAsync();
|
||||
var studyIds = dicomStudyList.Select(t => t.StudyId).ToList();
|
||||
|
||||
var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId) && t.IsReading)
|
||||
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath, t.IsReading, t.FileSize }).ToListAsync();
|
||||
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath, t.IsReading, t.FileSize }).ToListAsync();
|
||||
|
||||
List<DicomSeriesDTO> seriesLists = await _dicomSeriesRepository.Where(s => studyIds.Contains(s.StudyId))
|
||||
.WhereIf(isManualGenerate == false, t => t.IsReading)
|
||||
|
|
@ -561,150 +545,168 @@ namespace IRaCIS.Core.Application.Services
|
|||
}
|
||||
|
||||
studyList.AddRange(dicomStudyList);
|
||||
}
|
||||
|
||||
#endregion
|
||||
//影像后处理 上传了新的影像
|
||||
if (taskInfo.TaskStudyCount > 0)
|
||||
{
|
||||
|
||||
#region dicom 关键序列处理
|
||||
var taskStudyList = await _taskStudyRepository.Where(t => t.TrialId == indto.TrialId && t.VisitTaskId == indto.VisitTaskId)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|"))
|
||||
.ProjectTo<VisitStudyDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
//已经签名的任务,加关键序列
|
||||
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
foreach (var study in taskStudyList)
|
||||
{
|
||||
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).OrderBy(x => x.ReadingQuestionTrial.ShowOrder).ThenBy(x => x.RowIndex).Select(x => new StudyInstanceInfo()
|
||||
study.SeriesList = study.SeriesList.OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).ToList();
|
||||
|
||||
study.InstanceCount = study.SeriesList.SelectMany(t => t.InstanceInfoList).Count();
|
||||
}
|
||||
|
||||
studyList.AddRange(taskStudyList);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region dicom 关键序列处理
|
||||
|
||||
//已经签名的任务,加关键序列
|
||||
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).OrderBy(x => x.ReadingQuestionTrial.ShowOrder).ThenBy(x => x.RowIndex).Select(x => new StudyInstanceInfo()
|
||||
{
|
||||
ShowOrder = x.ReadingQuestionTrial.ShowOrder,
|
||||
RowIndex = x.RowIndex,
|
||||
SeriesId = x.SeriesId,
|
||||
StudyId = x.StudyId,
|
||||
InstanceId = x.InstanceId,
|
||||
NumberOfFrames = x.NumberOfFrames,
|
||||
CreateTime = x.CreateTime,
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
// 这个表的数据已经移动到 _readingTaskQuestionMark 了
|
||||
//var customoList = await _readingCustomTagRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).Select(x => new StudyInstanceInfo()
|
||||
//{
|
||||
// ShowOrder = 0,
|
||||
// RowIndex = 0m,
|
||||
// SeriesId = x.SeriesId,
|
||||
// StudyId = x.StudyId,
|
||||
// InstanceId = x.InstanceId,
|
||||
// NumberOfFrames = x.NumberOfFrames,
|
||||
// CreateTime = x.CreateTime,
|
||||
//}).ToListAsync();
|
||||
//rowInfoList.AddRange(customoList);
|
||||
|
||||
var questionMarkList = await _readingTaskQuestionMark.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).Select(x => new StudyInstanceInfo()
|
||||
{
|
||||
ShowOrder = x.ReadingQuestionTrial == null ? 0 : x.ReadingQuestionTrial.ShowOrder,
|
||||
RowIndex = 0m,
|
||||
SeriesId = x.SeriesId,
|
||||
StudyId = x.StudyId,
|
||||
InstanceId = x.InstanceId,
|
||||
NumberOfFrames = x.NumberOfFrames,
|
||||
CreateTime = x.CreateTime,
|
||||
}).ToListAsync();
|
||||
rowInfoList.AddRange(questionMarkList);
|
||||
|
||||
var thisStudyIds = rowInfoList.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.StudyId).Distinct().ToList();
|
||||
var thisSeriesIdIds = rowInfoList.Where(x => x.SeriesId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.SeriesId).Distinct().ToList();
|
||||
if (rowInfoList.Count > 0)
|
||||
{
|
||||
var thisVisitTaskStudy = await _dicomStudyRepository.Where(t => thisStudyIds.Contains(t.Id)).Select(k => new VisitStudyDTO()
|
||||
{
|
||||
ShowOrder = x.ReadingQuestionTrial.ShowOrder,
|
||||
RowIndex = x.RowIndex,
|
||||
SeriesId = x.SeriesId,
|
||||
StudyId = x.StudyId,
|
||||
InstanceId = x.InstanceId,
|
||||
NumberOfFrames = x.NumberOfFrames,
|
||||
CreateTime=x.CreateTime,
|
||||
|
||||
}).ToListAsync();
|
||||
InstanceCount = k.InstanceCount,
|
||||
|
||||
//SeriesCount = k.SeriesCount,
|
||||
|
||||
// 这个表的数据已经移动到 _readingTaskQuestionMark 了
|
||||
//var customoList = await _readingCustomTagRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).Select(x => new StudyInstanceInfo()
|
||||
//{
|
||||
// ShowOrder = 0,
|
||||
// RowIndex = 0m,
|
||||
// SeriesId = x.SeriesId,
|
||||
// StudyId = x.StudyId,
|
||||
// InstanceId = x.InstanceId,
|
||||
// NumberOfFrames = x.NumberOfFrames,
|
||||
// CreateTime = x.CreateTime,
|
||||
//}).ToListAsync();
|
||||
//rowInfoList.AddRange(customoList);
|
||||
StudyId = k.Id,
|
||||
IsCriticalSequence = true,
|
||||
|
||||
var questionMarkList = await _readingTaskQuestionMark.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).Select(x => new StudyInstanceInfo()
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
if (thisVisitTaskStudy != null)
|
||||
{
|
||||
ShowOrder = x.ReadingQuestionTrial==null?0: x.ReadingQuestionTrial.ShowOrder,
|
||||
RowIndex = 0m,
|
||||
SeriesId = x.SeriesId,
|
||||
StudyId = x.StudyId,
|
||||
InstanceId = x.InstanceId,
|
||||
NumberOfFrames = x.NumberOfFrames,
|
||||
CreateTime = x.CreateTime,
|
||||
}).ToListAsync();
|
||||
rowInfoList.AddRange(questionMarkList);
|
||||
thisVisitTaskStudy.StudyId = default(Guid);
|
||||
var item = await _dicomSeriesRepository.Where(s => thisSeriesIdIds.Contains(s.Id)).OrderBy(s => s.SeriesNumber).
|
||||
ThenBy(s => s.SeriesTime)
|
||||
.ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
var thisStudyIds = rowInfoList.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.StudyId).Distinct().ToList();
|
||||
var thisSeriesIdIds = rowInfoList.Where(x => x.SeriesId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.SeriesId).Distinct().ToList();
|
||||
if (rowInfoList.Count > 0)
|
||||
{
|
||||
var thisVisitTaskStudy = await _dicomStudyRepository.Where(t => thisStudyIds.Contains(t.Id)).Select(k => new VisitStudyDTO()
|
||||
if (item != null)
|
||||
{
|
||||
InstanceCount = k.InstanceCount,
|
||||
item.SeriesInstanceUid = string.Empty;
|
||||
|
||||
//SeriesCount = k.SeriesCount,
|
||||
var markInstanceIdList = rowInfoList.Where(y => y.InstanceId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(y => y.InstanceId!.Value).Distinct().ToList();
|
||||
|
||||
StudyId = k.Id,
|
||||
IsCriticalSequence = true,
|
||||
item.InstanceInfoList = await _dicomInstanceRepository.Where(t => markInstanceIdList.Contains(t.Id)).OrderBy(s => s.DicomSerie.SeriesNumber).ThenBy(s => s.DicomSerie.SeriesTime).ThenBy(x => x.InstanceTime).Select(k =>
|
||||
new InstanceBasicInfo()
|
||||
{
|
||||
Id = k.Id,
|
||||
NumberOfFrames = k.NumberOfFrames,
|
||||
HtmlPath = k.HtmlPath,
|
||||
Path = k.Path,
|
||||
InstanceNumber = k.InstanceNumber,
|
||||
StudyId = k.StudyId,
|
||||
SeriesId = k.SeriesId,
|
||||
FileSize = k.FileSize
|
||||
}).ToListAsync();
|
||||
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
if (thisVisitTaskStudy != null)
|
||||
{
|
||||
thisVisitTaskStudy.StudyId = default(Guid);
|
||||
var item = await _dicomSeriesRepository.Where(s => thisSeriesIdIds.Contains(s.Id)).OrderBy(s => s.SeriesNumber).
|
||||
ThenBy(s => s.SeriesTime)
|
||||
.ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
if (item != null)
|
||||
item.InstanceInfoList.ForEach(x =>
|
||||
{
|
||||
item.SeriesInstanceUid = string.Empty;
|
||||
x.RowDate = rowInfoList.FirstOrDefault(y => y.InstanceId == x.Id)?.CreateTime ?? DateTime.Now;
|
||||
var keyFramesList = rowInfoList.Where(y => y.InstanceId == x.Id && y.NumberOfFrames != 0 && y.NumberOfFrames != null).Select(y => y.NumberOfFrames).Distinct().ToList();
|
||||
|
||||
var markInstanceIdList = rowInfoList.Where(y => y.InstanceId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(y => y.InstanceId!.Value).Distinct().ToList();
|
||||
|
||||
item.InstanceInfoList = await _dicomInstanceRepository.Where(t => markInstanceIdList.Contains(t.Id)).OrderBy(s => s.DicomSerie.SeriesNumber).ThenBy(s => s.DicomSerie.SeriesTime).ThenBy(x => x.InstanceTime).Select(k =>
|
||||
new InstanceBasicInfo()
|
||||
{
|
||||
Id = k.Id,
|
||||
NumberOfFrames = k.NumberOfFrames,
|
||||
HtmlPath = k.HtmlPath,
|
||||
Path = k.Path,
|
||||
InstanceNumber = k.InstanceNumber,
|
||||
StudyId = k.StudyId,
|
||||
SeriesId = k.SeriesId,
|
||||
FileSize = k.FileSize
|
||||
}).ToListAsync();
|
||||
|
||||
item.InstanceInfoList.ForEach(x =>
|
||||
if (keyFramesList.Count() > 0)
|
||||
{
|
||||
x.RowDate = rowInfoList.FirstOrDefault(y => y.InstanceId == x.Id)?.CreateTime ?? DateTime.Now;
|
||||
var keyFramesList = rowInfoList.Where(y => y.InstanceId == x.Id && y.NumberOfFrames != 0 && y.NumberOfFrames != null).Select(y => y.NumberOfFrames).Distinct().ToList();
|
||||
x.KeyFramesList = keyFramesList;
|
||||
}
|
||||
|
||||
if (keyFramesList.Count() > 0)
|
||||
{
|
||||
x.KeyFramesList = keyFramesList;
|
||||
}
|
||||
var item = rowInfoList.FirstOrDefault(y => y.InstanceId == x.Id);
|
||||
if (item != null)
|
||||
{
|
||||
x.ShowOrder = item.ShowOrder;
|
||||
x.RowIndex = item.RowIndex;
|
||||
}
|
||||
|
||||
var item = rowInfoList.FirstOrDefault(y => y.InstanceId == x.Id);
|
||||
if (item != null)
|
||||
{
|
||||
x.ShowOrder = item.ShowOrder;
|
||||
x.RowIndex = item.RowIndex;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
item.InstanceInfoList = item.InstanceInfoList.OrderBy(x => x.ShowOrder).ThenBy(x=>x.RowIndex).ThenBy(x=>x.RowDate).ToList();
|
||||
item.InstanceInfoList = item.InstanceInfoList.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).ThenBy(x => x.RowDate).ToList();
|
||||
|
||||
|
||||
item.InstanceCount = item.InstanceInfoList.Count;
|
||||
item.InstanceCount = item.InstanceInfoList.Count;
|
||||
|
||||
item.Description = "Key Series";
|
||||
|
||||
var modalityList = await _dicomSeriesRepository.Where(s => thisSeriesIdIds.Contains(s.Id)).OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).Select(x => x.Modality).Distinct().ToListAsync(); ;
|
||||
item.Modality = string.Join(",", modalityList);
|
||||
thisVisitTaskStudy.SeriesList.Add(item);
|
||||
//thisVisitTaskStudy.SeriesCount = thisVisitTaskStudy.SeriesList.Count;
|
||||
}
|
||||
|
||||
|
||||
|
||||
studyList.Insert(0, thisVisitTaskStudy);
|
||||
item.Description = "Key Series";
|
||||
|
||||
var modalityList = await _dicomSeriesRepository.Where(s => thisSeriesIdIds.Contains(s.Id)).OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).Select(x => x.Modality).Distinct().ToListAsync(); ;
|
||||
item.Modality = string.Join(",", modalityList);
|
||||
thisVisitTaskStudy.SeriesList.Add(item);
|
||||
//thisVisitTaskStudy.SeriesCount = thisVisitTaskStudy.SeriesList.Count;
|
||||
}
|
||||
|
||||
|
||||
|
||||
studyList.Insert(0, thisVisitTaskStudy);
|
||||
|
||||
}
|
||||
|
||||
studyList.ForEach(x =>
|
||||
{
|
||||
x.SeriesList.ForEach(y =>
|
||||
{
|
||||
y.IsBeMark = rowInfoList.Any(z => z.SeriesId == y.Id);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
studyList.ForEach(x =>
|
||||
{
|
||||
x.SeriesList.ForEach(y =>
|
||||
{
|
||||
y.IsBeMark = rowInfoList.Any(z => z.SeriesId == y.Id);
|
||||
});
|
||||
|
||||
#endregion
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 非Dicom 检查查询
|
||||
|
||||
var noDicomList = await _noneDicomStudyRepository.Where(x => x.TrialId == indto.TrialId && x.SubjectVisitId == indto.SujectVisitId && x.NoneDicomFileList.Any(t => !t.FileType.Contains(StaticData.FileType.Zip)))
|
||||
|
|
@ -722,8 +724,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
StudyCode = x.StudyCode,
|
||||
IsDicom = false,
|
||||
|
||||
BodyPartForEdit=x.BodyPart,
|
||||
BodyPartForEditOther=x.BodyPartForEditOther
|
||||
BodyPartForEdit = x.BodyPart,
|
||||
BodyPartForEditOther = x.BodyPartForEditOther
|
||||
|
||||
}).ToList();
|
||||
|
||||
|
|
|
|||
|
|
@ -125,7 +125,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<SCPSeries, DicomSeries>();
|
||||
CreateMap<SCPInstance, DicomInstance>();
|
||||
|
||||
|
||||
CreateMap<DicomStudy, VisitStudyDTO>()
|
||||
.ForMember(d => d.StudyId, u => u.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.SeriesList, u => u.MapFrom(s => s.SeriesList));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ public class NoneDicomStudy : BaseFullDeleteAuditEntity
|
|||
[JsonIgnore]
|
||||
public List<NoneDicomStudyFile> TaskNoneDicomFileList { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public List<NoneDicomStudyFile> ImageLabelNoneDicomFileList { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
[JsonIgnore]
|
||||
|
|
|
|||
|
|
@ -14,6 +14,16 @@ public class NoneDicomStudyFile : BaseAddDeleteAuditEntity
|
|||
[ForeignKey("OriginNoneDicomStudyId")]
|
||||
[JsonIgnore]
|
||||
public NoneDicomStudy OriginNoneDicomStudy { get; set; }
|
||||
|
||||
|
||||
[ForeignKey("ImageLabelNoneDicomStudyId")]
|
||||
[JsonIgnore]
|
||||
public NoneDicomStudy ImageMarkNoneDicomStudy { get; set; }
|
||||
|
||||
|
||||
//[ForeignKey("ImageMarkSubjectVisitId")]
|
||||
//[JsonIgnore]
|
||||
//public SubjectVisit ImageMarkSubjectVisit { get; set; }
|
||||
#endregion
|
||||
public Guid NoneDicomStudyId { get; set; }
|
||||
|
||||
|
|
@ -33,5 +43,13 @@ public class NoneDicomStudyFile : BaseAddDeleteAuditEntity
|
|||
[Comment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑")]
|
||||
public Guid? OriginNoneDicomStudyId { get; set; }
|
||||
#endregion
|
||||
|
||||
|
||||
#region 影像预处理访视Id NoneDicomStudyId 为guid空
|
||||
|
||||
//public Guid? ImageMarkSubjectVisitId { get; set; }
|
||||
|
||||
public Guid? ImageLabelNoneDicomStudyId { get; set; }
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ public class TaskInstance : BaseFullAuditEntity, IEntitySeqId
|
|||
[JsonIgnore]
|
||||
[ForeignKey("StudyId")]
|
||||
public TaskStudy TaskStudy { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SubjectVisitId")]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
#endregion
|
||||
|
||||
public Guid SeqId { get; set; }
|
||||
|
|
@ -37,6 +42,8 @@ public class TaskInstance : BaseFullAuditEntity, IEntitySeqId
|
|||
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public bool Anonymize { get; set; }
|
||||
public string Path { get; set; } = string.Empty;
|
||||
|
|
|
|||
|
|
@ -11,9 +11,16 @@ public class TaskSeries : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
|
||||
[JsonIgnore]
|
||||
public List<TaskInstance> InstanceList { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SubjectVisitId")]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
#endregion
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public Guid SeqId { get; set; }
|
||||
public Guid StudyId { get; set; }
|
||||
|
|
|
|||
|
|
@ -19,11 +19,18 @@ public class TaskStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
[JsonIgnore]
|
||||
[ForeignKey("SubjectId")]
|
||||
public Subject Subject { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SubjectVisitId")]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
#endregion
|
||||
|
||||
public Guid SeqId { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public int Code { get; set; } = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ namespace IRaCIS.Core.Domain.Models;
|
|||
public class SubjectVisit : BaseFullDeleteAuditEntity
|
||||
{
|
||||
#region 导航属性
|
||||
|
||||
[JsonIgnore]
|
||||
public List<TaskStudy> TaskStudyList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<TrialQCQuestionAnswer> TrialQCQuestionAnswerList { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
|
|||
//同样一个实体 有两个相同的类型的导航属性,需要手动配置
|
||||
builder.HasMany(t => t.NoneDicomFileList).WithOne(s => s.NoneDicomStudy).HasForeignKey(t => t.NoneDicomStudyId);
|
||||
builder.HasMany(t => t.TaskNoneDicomFileList).WithOne(s => s.OriginNoneDicomStudy).HasForeignKey(t => t.OriginNoneDicomStudyId);
|
||||
|
||||
builder.HasMany(t => t.ImageLabelNoneDicomFileList).WithOne(s => s.ImageMarkNoneDicomStudy).HasForeignKey(t => t.ImageLabelNoneDicomStudyId);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,160 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class octadd : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskStudy",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskSeries",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskInstance",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ImageLabelNoneDicomStudyId",
|
||||
table: "NoneDicomStudyFile",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_TrialCriterionKeyFile_TrialCriterionId",
|
||||
// table: "TrialCriterionKeyFile",
|
||||
// column: "TrialCriterionId");
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_TaskStudy_SubjectVisitId",
|
||||
// table: "TaskStudy",
|
||||
// column: "SubjectVisitId");
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_TaskSeries_SubjectVisitId",
|
||||
// table: "TaskSeries",
|
||||
// column: "SubjectVisitId");
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_TaskInstance_SubjectVisitId",
|
||||
// table: "TaskInstance",
|
||||
// column: "SubjectVisitId");
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_NoneDicomStudyFile_ImageLabelNoneDicomStudyId",
|
||||
// table: "NoneDicomStudyFile",
|
||||
// column: "ImageLabelNoneDicomStudyId");
|
||||
|
||||
//migrationBuilder.AddForeignKey(
|
||||
// name: "FK_NoneDicomStudyFile_NoneDicomStudy_ImageLabelNoneDicomStudyId",
|
||||
// table: "NoneDicomStudyFile",
|
||||
// column: "ImageLabelNoneDicomStudyId",
|
||||
// principalTable: "NoneDicomStudy",
|
||||
// principalColumn: "Id");
|
||||
|
||||
//migrationBuilder.AddForeignKey(
|
||||
// name: "FK_TaskInstance_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskInstance",
|
||||
// column: "SubjectVisitId",
|
||||
// principalTable: "SubjectVisit",
|
||||
// principalColumn: "Id");
|
||||
|
||||
//migrationBuilder.AddForeignKey(
|
||||
// name: "FK_TaskSeries_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskSeries",
|
||||
// column: "SubjectVisitId",
|
||||
// principalTable: "SubjectVisit",
|
||||
// principalColumn: "Id");
|
||||
|
||||
//migrationBuilder.AddForeignKey(
|
||||
// name: "FK_TaskStudy_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskStudy",
|
||||
// column: "SubjectVisitId",
|
||||
// principalTable: "SubjectVisit",
|
||||
// principalColumn: "Id");
|
||||
|
||||
//migrationBuilder.AddForeignKey(
|
||||
// name: "FK_TrialCriterionKeyFile_ReadingQuestionCriterionTrial_TrialCriterionId",
|
||||
// table: "TrialCriterionKeyFile",
|
||||
// column: "TrialCriterionId",
|
||||
// principalTable: "ReadingQuestionCriterionTrial",
|
||||
// principalColumn: "Id",
|
||||
// onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
//migrationBuilder.DropForeignKey(
|
||||
// name: "FK_NoneDicomStudyFile_NoneDicomStudy_ImageLabelNoneDicomStudyId",
|
||||
// table: "NoneDicomStudyFile");
|
||||
|
||||
//migrationBuilder.DropForeignKey(
|
||||
// name: "FK_TaskInstance_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskInstance");
|
||||
|
||||
//migrationBuilder.DropForeignKey(
|
||||
// name: "FK_TaskSeries_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskSeries");
|
||||
|
||||
//migrationBuilder.DropForeignKey(
|
||||
// name: "FK_TaskStudy_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskStudy");
|
||||
|
||||
//migrationBuilder.DropForeignKey(
|
||||
// name: "FK_TrialCriterionKeyFile_ReadingQuestionCriterionTrial_TrialCriterionId",
|
||||
// table: "TrialCriterionKeyFile");
|
||||
|
||||
//migrationBuilder.DropIndex(
|
||||
// name: "IX_TrialCriterionKeyFile_TrialCriterionId",
|
||||
// table: "TrialCriterionKeyFile");
|
||||
|
||||
//migrationBuilder.DropIndex(
|
||||
// name: "IX_TaskStudy_SubjectVisitId",
|
||||
// table: "TaskStudy");
|
||||
|
||||
//migrationBuilder.DropIndex(
|
||||
// name: "IX_TaskSeries_SubjectVisitId",
|
||||
// table: "TaskSeries");
|
||||
|
||||
//migrationBuilder.DropIndex(
|
||||
// name: "IX_TaskInstance_SubjectVisitId",
|
||||
// table: "TaskInstance");
|
||||
|
||||
//migrationBuilder.DropIndex(
|
||||
// name: "IX_NoneDicomStudyFile_ImageLabelNoneDicomStudyId",
|
||||
// table: "NoneDicomStudyFile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskStudy");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskSeries");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskInstance");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ImageLabelNoneDicomStudyId",
|
||||
table: "NoneDicomStudyFile");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3846,6 +3846,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<Guid?>("ImageLabelNoneDicomStudyId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
|
|
@ -3871,6 +3874,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("CreateUserId");
|
||||
|
||||
b.HasIndex("ImageLabelNoneDicomStudyId");
|
||||
|
||||
b.HasIndex("NoneDicomStudyId");
|
||||
|
||||
b.HasIndex("OriginNoneDicomStudyId");
|
||||
|
|
@ -11160,6 +11165,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<Guid>("SubjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("SubjectVisitId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("TransferSytaxUID")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
|
|
@ -11200,6 +11208,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("StudyId");
|
||||
|
||||
b.HasIndex("SubjectVisitId");
|
||||
|
||||
b.ToTable("TaskInstance", t =>
|
||||
{
|
||||
t.HasComment("项目阅片 - 任务后处理Instance");
|
||||
|
|
@ -11532,6 +11542,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<Guid>("SubjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("SubjectVisitId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("TrialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
|
|
@ -11555,6 +11568,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("StudyId");
|
||||
|
||||
b.HasIndex("SubjectVisitId");
|
||||
|
||||
b.ToTable("TaskSeries", t =>
|
||||
{
|
||||
t.HasComment("项目阅片 - 任务后上传序列");
|
||||
|
|
@ -11735,6 +11750,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<Guid>("SubjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("SubjectVisitId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("TrialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
|
|
@ -11758,6 +11776,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("SubjectId");
|
||||
|
||||
b.HasIndex("SubjectVisitId");
|
||||
|
||||
b.HasIndex("VisitTaskId");
|
||||
|
||||
b.ToTable("TaskStudy", t =>
|
||||
|
|
@ -17012,6 +17032,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "ImageMarkNoneDicomStudy")
|
||||
.WithMany("ImageLabelNoneDicomFileList")
|
||||
.HasForeignKey("ImageLabelNoneDicomStudyId");
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy")
|
||||
.WithMany("NoneDicomFileList")
|
||||
.HasForeignKey("NoneDicomStudyId")
|
||||
|
|
@ -17028,6 +17052,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("ImageMarkNoneDicomStudy");
|
||||
|
||||
b.Navigation("NoneDicomStudy");
|
||||
|
||||
b.Navigation("OriginNoneDicomStudy");
|
||||
|
|
@ -19149,8 +19175,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit")
|
||||
.WithMany()
|
||||
.HasForeignKey("SubjectVisitId");
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("SubjectVisit");
|
||||
|
||||
b.Navigation("TaskSeries");
|
||||
|
||||
b.Navigation("TaskStudy");
|
||||
|
|
@ -19229,8 +19261,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit")
|
||||
.WithMany()
|
||||
.HasForeignKey("SubjectVisitId");
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("SubjectVisit");
|
||||
|
||||
b.Navigation("TaskStudy");
|
||||
});
|
||||
|
||||
|
|
@ -19248,6 +19286,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit")
|
||||
.WithMany("TaskStudyList")
|
||||
.HasForeignKey("SubjectVisitId");
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask")
|
||||
.WithMany("TaskStudyList")
|
||||
.HasForeignKey("VisitTaskId")
|
||||
|
|
@ -19258,6 +19300,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.Navigation("Subject");
|
||||
|
||||
b.Navigation("SubjectVisit");
|
||||
|
||||
b.Navigation("VisitTask");
|
||||
});
|
||||
|
||||
|
|
@ -20844,6 +20888,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b =>
|
||||
{
|
||||
b.Navigation("ImageLabelNoneDicomFileList");
|
||||
|
||||
b.Navigation("NoneDicomFileList");
|
||||
|
||||
b.Navigation("TaskNoneDicomFileList");
|
||||
|
|
@ -21002,6 +21048,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.Navigation("SubjectVisitImageBackRecordList");
|
||||
|
||||
b.Navigation("TaskStudyList");
|
||||
|
||||
b.Navigation("TrialQCQuestionAnswerList");
|
||||
|
||||
b.Navigation("VisitTaskList");
|
||||
|
|
|
|||
Loading…
Reference in New Issue