From 4942089b0c161470056cde74400a346afa69edf0 Mon Sep 17 00:00:00 2001 From: "{872297557@qq.com}" <872297557@qq.com> Date: Tue, 29 Nov 2022 17:53:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E7=96=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/DicomArchiveService.cs | 3 ++- .../Service/QC/DTO/QARecordViewModel.cs | 7 ++++++- .../Service/QC/QCOperationService.cs | 14 ++++++++++---- IRaCIS.Core.Application/Service/QC/_MapConfig.cs | 14 ++++++++++++-- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs index efed6d45..00d1f6e5 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs @@ -202,6 +202,7 @@ namespace IRaCIS.Core.Application.Services var dicModalityList = _dictionaryRepository.Where(t => t.Code == "Modality").SelectMany(t => t.ChildList.Select(c => c.Value)).ToList(); + dicomStudy = new DicomStudy { Id = studyId, @@ -209,7 +210,7 @@ namespace IRaCIS.Core.Application.Services /* StudyTime = dataset.GetSingleValueOrDefault(DicomTag.StudyDate, DateTime.Now).Add(dataset.GetSingleValueOrDefault(DicomTag.StudyTime, DateTime.Now).TimeOfDay),*///dataset.GetDateTime(DicomTag.StudyDate, DicomTag.StudyTime), StudyTime = dataset.GetSingleValueOrDefault(DicomTag.StudyDate, string.Empty) == string.Empty ? null : dataset.GetSingleValue(DicomTag.StudyDate).Add(dataset.GetSingleValueOrDefault(DicomTag.StudyTime, string.Empty) == string.Empty ? TimeSpan.Zero : dataset.GetSingleValue(DicomTag.StudyTime).TimeOfDay), Modalities = modality, - ModalityForEdit = dicModalityList.Contains(modality) ? (modality=="MR"?"MRI": modality) : String.Empty, + ModalityForEdit = modality == "MR" ? "MRI": (dicModalityList.Contains(modality) ? modality : String.Empty), Description = dataset.GetSingleValueOrDefault(DicomTag.StudyDescription, string.Empty), InstitutionName = dataset.GetSingleValueOrDefault(DicomTag.InstitutionName, string.Empty), PatientId = dataset.GetSingleValueOrDefault(DicomTag.PatientID, string.Empty), diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs index ddefcce0..d2d184e1 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs @@ -201,6 +201,11 @@ namespace IRaCIS.Core.Application.Contracts.DTO public class QCChallengeWithUser : QCChallengeCommand { + + public string VisitName { get; set; } + public string BlindName { get; set; } = string.Empty; + public string SubjectCode { get; set; } + public Guid? CurrentActionUserId { get; set; } public string CurrentActionUserName { get; set; } = String.Empty; @@ -239,7 +244,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO public class ChallengeAndDialog: QCChallengeWithUser { - + public List DialogList { get; set; } = new List(); } diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 167991d9..27d2a290 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -1329,13 +1329,17 @@ namespace IRaCIS.Core.Application.Image.QA return ResponseOutput.NotOk("您已经被移出项目,没有操作权限。"); } - //判断质疑是否都关闭了 - if (await _repository.AnyAsync(t => t.SubjectVisitId == subjectVisitId && t.IsClosed == false)) + + if(auditState== AuditStateEnum.QCPassed) { - return ResponseOutput.NotOk("当前访视有影像质控质疑未关闭,不能进行此操作。"); + //判断质疑是否都关闭了 + if (await _repository.AnyAsync(t => t.SubjectVisitId == subjectVisitId && t.IsClosed == false)) + { + return ResponseOutput.NotOk("当前访视有影像质控质疑未关闭,不能进行此操作。"); + } } - + var trialConfig = await _trialRepository .Select(t => new { TrialId = t.Id, t.QCProcessEnum, t.IsImageConsistencyVerification }) @@ -1514,6 +1518,8 @@ namespace IRaCIS.Core.Application.Image.QA } + await _qcChallengeRepository.BatchUpdateNoTrackingAsync(t => t.IsClosed == false, u => new QCChallenge() { IsClosed = true, CloseResonEnum = QCChallengeCloseEnum.Unresolvable }); + } dbSubjectVisit.Auditor = _userInfo.Id; diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index d089b7de..a71e2353 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -370,7 +370,11 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.UserName)) .ForMember(d => d.SubjectId, u => u.MapFrom(t => t.SubjectVisit.SubjectId)) - .ForMember(d => d.ChallengeCode, u => u.MapFrom(s => s.ChallengeCode)); + .ForMember(d => d.ChallengeCode, u => u.MapFrom(s => s.ChallengeCode)) + + .ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code)) + .ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName)) + .ForMember(d => d.BlindName, u => u.MapFrom(s => s.SubjectVisit.BlindName)); CreateMap() @@ -381,7 +385,13 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.SubjectId, u => u.MapFrom(t => t.SubjectVisit.SubjectId)) .ForMember(d => d.DialogList, u => u.MapFrom(t => t.DialogList.OrderBy(t => t.CreateTime))) - .ForMember(d => d.ChallengeCode, u => u.MapFrom(s => s.ChallengeCode)); + .ForMember(d => d.ChallengeCode, u => u.MapFrom(s => s.ChallengeCode)) + + .ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code)) + .ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName)) + .ForMember(d => d.BlindName, u => u.MapFrom(s => s.SubjectVisit.BlindName)) + + ; // 一致性核查文件 CreateMap()