From 839646e4103e66692aff24adc9aab02b1ddec8c4 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Fri, 6 May 2022 14:34:32 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0qc=E6=A8=A1?=
=?UTF-8?q?=E6=9D=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 24 +++----
.../QC/DTO/QCQuestionConfigureViewModel.cs | 2 +-
.../Service/QC/NoneDicomStudyService.cs | 63 ++++++++++---------
.../Service/QC/QCOperationService.cs | 12 ++--
.../Service/Visit/SubjectVisitService.cs | 26 ++++----
5 files changed, 64 insertions(+), 63 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index a030fd170..103aaf8f3 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -814,11 +814,6 @@
-
-
- 上传非Dicom 文件 支持压缩包
-
-
上传非Dicom 文件 支持压缩包
@@ -828,6 +823,11 @@
+
+
+ 上传非Dicom 文件 支持压缩包
+
+
系统QC 问题管理
@@ -1320,13 +1320,6 @@
删除 项目 下某一site
-
-
- 设置受试者访视已执行 也就是将studyUploaded状态置为true 为了那些没有影像 人工设置准备
-
-
-
-
获取访视下的Dicom 检查信息 分所有的, 阅片的 不阅片 isReading : 0 查询所有 1 查询仅仅阅片的
@@ -1336,6 +1329,13 @@
+
+
+ 设置受试者访视已执行 也就是将studyUploaded状态置为true 为了那些没有影像 人工设置准备
+
+
+
+
CRC 访视上传列表
diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs
index 70bd28282..b38368021 100644
--- a/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs
+++ b/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs
@@ -47,7 +47,7 @@ namespace IRaCIS.Core.Application.Contracts
public bool IsEnable { get; set; }
public string Type { get; set; } = String.Empty;
- public string ParentTriggerValue { get; set; }
+ public string ParentTriggerValue { get; set; } = String.Empty;
public Guid? ParentId { get; set; }
diff --git a/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs b/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs
index 6152ad505..c1b77630a 100644
--- a/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs
+++ b/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs
@@ -51,6 +51,19 @@ namespace IRaCIS.Core.Application.Contracts
}
+ private void VerifyIsCanQC(SubjectVisit? subjectVisit, Guid? sujectVisitId = null)
+ {
+ if (sujectVisitId != null)
+ {
+ subjectVisit = _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == sujectVisitId).Result.IfNullThrowException();
+ }
+
+ if (subjectVisit!.CurrentActionUserId != _userInfo.Id)
+ {
+ throw new BusinessValidationFailedException("您不是该质控任务当前领取人,没有操作权限!");
+ }
+ }
+
[HttpGet("{subjectVisitId:guid}")]
public async Task> GetNoneDicomStudyList(Guid subjectVisitId)
{
@@ -61,18 +74,6 @@ namespace IRaCIS.Core.Application.Contracts
return await noneDicomStudyQueryable.ToListAsync();
}
- public void VerifyIsCanQC(SubjectVisit? subjectVisit, Guid? sujectVisitId = null)
- {
- if (sujectVisitId != null)
- {
- subjectVisit = _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == sujectVisitId).Result.IfNullThrowException();
- }
-
- if (subjectVisit!.CurrentActionUserId != _userInfo.Id)
- {
- throw new BusinessValidationFailedException("您不是该质控任务当前领取人,没有操作权限!");
- }
- }
[UnitOfWork]
[TypeFilter(typeof(TrialResourceFilter))]
@@ -165,23 +166,6 @@ namespace IRaCIS.Core.Application.Contracts
return await _repository.Where(t => t.NoneDicomStudy.SubjectVisitId == subjectVisitId).ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken }).ToListAsync();
}
- ///
- /// 上传非Dicom 文件 支持压缩包
- ///
- [HttpPost]
- public async Task NewUploadNoneDicomFile([FromForm] UploadNoneDicomFileDto fileDto)
- {
- var file = this._httpContext.HttpContext?.Request.Form;
- var result = await UploadNoneDicomFile(file, fileDto.subjectVisitId, fileDto.noneDicomStudyId);
- if (result.IsSuccess)
- {
- var data = JsonConvert.DeserializeObject(fileDto.AuditInfo);
- data.GeneralId = fileDto.noneDicomStudyId;
- await _inspectionService.AddInspectionRecordAsync(data);
- }
-
- return result;
- }
///
@@ -301,5 +285,26 @@ namespace IRaCIS.Core.Application.Contracts
await _noneDicomStudyFileRepository.AddAsync(new NoneDicomStudyFile() { FileName = fileName, Path = relativePath, NoneDicomStudyId = noneDicomStudyId });
}
+
+
+ ///
+ /// 上传非Dicom 文件 支持压缩包
+ ///
+ [HttpPost]
+ [Obsolete]
+ public async Task NewUploadNoneDicomFile([FromForm] UploadNoneDicomFileDto fileDto)
+ {
+ var file = this._httpContext.HttpContext?.Request.Form;
+ var result = await UploadNoneDicomFile(file, fileDto.subjectVisitId, fileDto.noneDicomStudyId);
+ if (result.IsSuccess)
+ {
+ var data = JsonConvert.DeserializeObject(fileDto.AuditInfo);
+ data.GeneralId = fileDto.noneDicomStudyId;
+ await _inspectionService.AddInspectionRecordAsync(data);
+ }
+
+ return result;
+ }
+
}
}
diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs
index 9ba84f8fc..1b4d5f20f 100644
--- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs
+++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs
@@ -765,10 +765,9 @@ namespace IRaCIS.Core.Application.Image.QA
await VerifyIsCanQCAsync(null, subjectVisitId);
- var series = await _repository.Where(t => t.Id == seriesId, true).IgnoreQueryFilters().FirstOrDefaultAsync();
-
- if (series == null) return Null404NotFound(series);
+ var series = (await _repository.Where(t => t.Id == seriesId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
+
if (state == 1)
{
series.IsReading = false;
@@ -781,8 +780,7 @@ namespace IRaCIS.Core.Application.Image.QA
{
series.IsDeleted = true;
- var study = await _repository.Where(t => t.Id == studyId, true).IgnoreQueryFilters().FirstOrDefaultAsync();
- if (study == null) return Null404NotFound(study);
+ var study = (await _repository.Where(t => t.Id == studyId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
var instanceIdList = await _repository.Where(t => t.SeriesId == seriesId).Select(t => t.Id).ToListAsync();
@@ -807,9 +805,8 @@ namespace IRaCIS.Core.Application.Image.QA
{
series.IsDeleted = false;
- var study = await _repository.Where(t => t.Id == studyId, true).IgnoreQueryFilters().FirstOrDefaultAsync();
+ var study = (await _repository.Where(t => t.Id == studyId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
- if (study == null) return Null404NotFound(study);
var instanceIdList = await _repository.Where(t => t.SeriesId == seriesId).Select(t => t.Id).ToListAsync();
@@ -985,7 +982,6 @@ namespace IRaCIS.Core.Application.Image.QA
subjectVisit = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == sujectVisitId)).IfNullThrowException();
}
-
if (subjectVisit!.CurrentActionUserId != _userInfo.Id)
{
throw new BusinessValidationFailedException("您不是该质控任务当前领取人,没有操作权限!");
diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs
index e46384504..ed16dcb52 100644
--- a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs
+++ b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs
@@ -141,18 +141,6 @@ namespace IRaCIS.Core.Application.Services
return ResponseOutput.Ok();
}
- ///
- /// 设置受试者访视已执行 也就是将studyUploaded状态置为true 为了那些没有影像 人工设置准备
- ///
- ///
- ///
- [HttpPut("{trialId:guid}/{subjectVisitId:guid}")]
- [TypeFilter(typeof(TrialResourceFilter))]
- public async Task SetSVExecuted(Guid subjectVisitId)
- {
- await _subjectVisitRepository.UpdatePartialFromQueryAsync(subjectVisitId, u => new SubjectVisit() { VisitExecuted = VisitExecutedEnum.Executed }, true);
- return ResponseOutput.Ok();
- }
///
@@ -205,6 +193,18 @@ namespace IRaCIS.Core.Application.Services
-
+ ///
+ /// 设置受试者访视已执行 也就是将studyUploaded状态置为true 为了那些没有影像 人工设置准备
+ ///
+ ///
+ ///
+ [HttpPut("{trialId:guid}/{subjectVisitId:guid}")]
+ [TypeFilter(typeof(TrialResourceFilter))]
+ [Obsolete]
+ public async Task SetSVExecuted(Guid subjectVisitId)
+ {
+ await _subjectVisitRepository.UpdatePartialFromQueryAsync(subjectVisitId, u => new SubjectVisit() { VisitExecuted = VisitExecutedEnum.Executed }, true);
+ return ResponseOutput.Ok();
+ }
}
}