From 34008ef6dbb3ffd718ee5f46a98d01ab5ca36614 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 22 Apr 2026 16:10:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=82=A3=E8=80=85=E6=95=B0=E6=8D=AE=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/QC/DTO/QARecordViewModel.cs | 46 +++++++++++++++++++ .../Service/QC/QCOperationService.cs | 20 +++++++- 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs index cfa4430e9..f1783a48d 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs @@ -415,6 +415,52 @@ namespace IRaCIS.Core.Application.Contracts.DTO public string BodyPartForEditOther { get; set; } + #region 核验 + + /// + /// 性别 + /// + public string PatientSex { get; set; } = null!; + + /// + /// 体重 + /// + public string PatientWeight { get; set; } + + /// + /// 总剂量 + /// + public string RadionuclideTotalDose { get; set; } = null!; + + /// + /// 半衰期 + /// + public string RadionuclideHalfLife { get; set; } = null!; + + /// + /// 注射时间 + /// + public string RadiopharmaceuticalStartTime { get; set; } = null!; + + /// + /// 成像 / 采集时间 + /// + public string AcquisitionTime { get; set; } = null!; + + + #endregion + + + /// + /// 是否存在空字符串字段(PatientSex、PatientWeight、RadionuclideTotalDose、RadionuclideHalfLife、RadiopharmaceuticalStartTime、AcquisitionTime 任意一个为空/空字符串) + /// + public bool IsHasEmptyPatientInfo => + string.IsNullOrWhiteSpace(PatientSex) || + string.IsNullOrWhiteSpace(PatientWeight) || + string.IsNullOrWhiteSpace(RadionuclideTotalDose) || + string.IsNullOrWhiteSpace(RadionuclideHalfLife) || + string.IsNullOrWhiteSpace(RadiopharmaceuticalStartTime) || + string.IsNullOrWhiteSpace(AcquisitionTime); } public class QASeriesInfoDto diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 91b86b93f..4183663c0 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -1,4 +1,5 @@ -using IRaCIS.Core.Application.Contracts; +using DocumentFormat.OpenXml.InkML; +using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.Contracts.DTO; using IRaCIS.Core.Application.Filter; using IRaCIS.Core.Application.Helper; @@ -1108,6 +1109,23 @@ namespace IRaCIS.Core.Application.Image.QA { await VerifyIsCanQCAsync(null, subjectVisitId); + var visit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId); + + var isExistStudyClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(t => t.TrialId == visit.TrialId && t.ClinicalDataLevel == ClinicalLevel.Study&&t.IsConfirm&&t.IsApply); + if(isExistStudyClinicalData) + { + List modalitieTypes = new List() { "PT、CT", "CT、PT", "PET-CT" }; + + var studyList=await _dicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId&& modalitieTypes.Contains(t.Modalities)).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + if (studyList.Any(x => x.IsHasEmptyPatientInfo)) + { + return ResponseOutput.NotOk(_localizer["QCOperation_IsHasEmptyPatientInfo"]); + } + } + + + + if (await _qcChallengeRepository.AnyAsync(t => t.SubjectVisitId == subjectVisitId && t.IsClosed == false)) { //---当前访视有质疑未关闭,不允许该操作