diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 0e87a684..ac8dcabb 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -92,7 +92,7 @@ namespace IRaCIS.Core.Application.Service { //找到一致性核查通过且没有产生任务的访视 var needGenerateVisit = await _subjectVisitRepository.Where(t => t.TrialId == trialId && t.CheckState == CheckStateEnum.CVPassed && - !t.VisitTaskList.Any(u => u.TrialReadingCriterionId == confirmedTrialReadingCriterionId && u.SourceSubjectVisitId == t.Id)).ToListAsync(); + !t.VisitTaskList.Any(u => u.TrialReadingCriterionId == confirmedTrialReadingCriterionId && u.SourceSubjectVisitId == t.Id && u.TaskState==TaskState.Effect && u.IsAnalysisCreate==false)).ToListAsync(); var trialReadingCriterionConfig = await _trialReadingCriterionRepository.Where(t => t.Id == confirmedTrialReadingCriterionId).Select(t => new { TrialReadingCriterionId = t.Id, t.ReadingTool, t.ReadingType, t.IsReadingTaskViewInOrder, t.IsFollowVisitAutoAssign, t.IsFollowGlobalVisitAutoAssign, t.FollowGlobalVisitAutoAssignDefaultState, t.FollowVisitAutoAssignDefaultState, t.TaskAllocateObjEnum, t.CriterionType }).FirstOrDefaultAsync(); diff --git a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs index 73ae4175..13f549d9 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs @@ -785,7 +785,7 @@ namespace IRaCIS.Core.Application.Service ["TrialSiteCode"] = taskInfo.TrialSiteCode, ["SubjectCode"] = taskInfo.SubjectCode, ["VisitName"] = taskInfo.SourceSubjectVisitId != null ? taskInfo.VisitName : taskInfo.ModuleVisitName, - ["EarliestScanDate"] = taskInfo.SourceSubjectVisitId != null ? taskInfo.VisitEarliestScanDate : taskInfo.ModuleEarliestScanDate, + ["EarliestScanDate"] = taskInfo.SourceSubjectVisitId != null ? taskInfo.VisitEarliestScanDate?.ToString("yyyy-MM-DD") : taskInfo.ModuleEarliestScanDate?.ToString("yyyy-MM-DD"), ["SignTime"] = taskInfo.SignTime, ["Result"] = answer diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs index f852be36..9864b1c0 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs @@ -162,21 +162,32 @@ namespace IRaCIS.Core.Application.Services var samplesPerPixel = dataset.GetSingleValueOrDefault(DicomTag.SamplesPerPixel, string.Empty); var photometricInterpretation = dataset.GetSingleValueOrDefault(DicomTag.PhotometricInterpretation, string.Empty); + if (samplesPerPixel == "1" && (photometricInterpretation.ToUpper() == "MONOCHROME2" || photometricInterpretation.ToUpper() == "MONOCHROME1"))//MONOCHROME2 { if (dataset.InternalTransferSyntax.IsEncapsulated) { + //正常保存 不做处理 await dicomFile.SaveAsync(physicalPath); } else - { + { //JPEGLSLossless 保存 await dicomFile.Clone(DicomTransferSyntax.JPEGLSLossless).SaveAsync(physicalPath); } } else { - if (dataset.InternalTransferSyntax.IsEncapsulated) await dicomFile.SaveAsync(physicalPath); - else await dicomFile.Clone(DicomTransferSyntax.RLELossless).SaveAsync(physicalPath); //RLELossless + if (dataset.InternalTransferSyntax.IsEncapsulated) + { + //正常保存 不做处理 + await dicomFile.SaveAsync(physicalPath); + } + else + { + //RLELossless 保存 + await dicomFile.Clone(DicomTransferSyntax.RLELossless).SaveAsync(physicalPath); //RLELossless + + } } return (dicomInstance.StudyId, dicomStudy.StudyCode); } diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs index 647d5a2c..48e5f0fa 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs @@ -151,7 +151,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc public async Task> GetDicomAndNoneDicomStudyMonitorList(StudyQuery studyQuery) { var svExpression = QCCommon.GetStudyMonitorSubjectVisitFilter(studyQuery.VisitPlanArray); - var StudyMonitorQuery = _repository.Where(t => t.TrialId == studyQuery.TrialId) + var StudyMonitorQuery = _repository.Where(t => t.TrialId == studyQuery.TrialId,ignoreQueryFilters:true) .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) //.WhereIf(!string.IsNullOrEmpty(studyQuery.VisitPlanInfo), studyQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.VisitNum.ToString().Contains(".") : t => t.SubjectVisit.VisitNum == decimal.Parse(studyQuery.VisitPlanInfo)) .WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 40b07755..7bc62844 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -792,7 +792,7 @@ namespace IRaCIS.Core.Application.Image.QA var success3 = await _dicomSeriesrepository.BatchDeleteNoTrackingAsync(t => t.StudyId == id); //var success3 = await _dicomSeriesrepository.DeleteFromQueryAsync(t => t.StudyId == id, true); - var success4 = await _repository.BatchDeleteAsync(t => t.StudyId == id); + //var success4 = await _repository.BatchDeleteAsync(t => t.StudyId == id); //删除 物理文件 diff --git a/IRaCIS.Core.Domain/Image/DicomStudyMonitor.cs b/IRaCIS.Core.Domain/Image/DicomStudyMonitor.cs index 9d6a6579..39d94076 100644 --- a/IRaCIS.Core.Domain/Image/DicomStudyMonitor.cs +++ b/IRaCIS.Core.Domain/Image/DicomStudyMonitor.cs @@ -25,15 +25,10 @@ namespace IRaCIS.Core.Domain.Models public Guid CreateUserId { get; set; } - //可能是Dicom 也可能是非Dicom + //可能是Dicom 也可能是非Dicom 该字段废弃 public Guid StudyId { get; set; } - - - //public int TotalMillisecondsInterval { get; set; } - - public DateTime UploadStartTime { get; set; } diff --git a/IRaCIS.Core.Domain/SQLFile/Test.sql b/IRaCIS.Core.Domain/SQLFile/Test.sql index 9de49ae3..e9d8650a 100644 --- a/IRaCIS.Core.Domain/SQLFile/Test.sql +++ b/IRaCIS.Core.Domain/SQLFile/Test.sql @@ -956,4 +956,10 @@ where ReadingQuestionTrial.ReadingQuestionSystemId is not null and ReadingTableQ update CommonDocument set Name='PD进展报告.docx' where Name='PCR_v1.0_Final.docx' update CommonDocument set Name='入组确认报告.docx' where Name='ECR_v1.0_Final.docx' update TrialEmailNoticeConfig set FileName='PD进展报告.docx' where FileName='PCR_v1.0_Final.docx' -update TrialEmailNoticeConfig set FileName='入组确认报告.docx' where FileName='ECR_v1.0_Final.docx' \ No newline at end of file +update TrialEmailNoticeConfig set FileName='入组确认报告.docx' where FileName='ECR_v1.0_Final.docx' + + + +-- 出现质疑未关闭 但是实际所有质疑都关闭了(不存在 未关闭的质疑) +select * from SubjectVisit where ChallengeState=2 and not EXISTS(select * from QCChallenge where SubjectVisitId=SubjectVisit.Id and IsClosed=0) +update SubjectVisit set ChallengeState=1 where ChallengeState=2 and not EXISTS(select * from QCChallenge where SubjectVisitId=SubjectVisit.Id and IsClosed=0) \ No newline at end of file