修改非dicom dicom 质控完修改检查信息
This commit is contained in:
@@ -50,10 +50,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
//质控过程中,需要忽略过滤质控设置删除的检查,以及设置删除的文件,质控通过后才
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId, ignoreQueryFilters: isViewDelete)
|
||||
.WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId)
|
||||
.WhereIf(isReading, t => t.IsReading && t.IsDeleted==false)
|
||||
.WhereIf(isReading, t => t.IsReading && t.IsDeleted == false)
|
||||
|
||||
|
||||
.ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, isReading= isReading });
|
||||
.ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, isReading = isReading });
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -75,6 +75,19 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
}
|
||||
|
||||
|
||||
[HttpPut]
|
||||
public async Task<IResponseOutput> UpdateNoneDicomStudy(NoneDicomEdit noneDicomEdit)
|
||||
{
|
||||
if (_subjectVisitRepository.Any(t => t.Id == noneDicomEdit.Id && (t.PreliminaryAuditUserId == _userInfo.UserRoleId || t.ReviewAuditUserId == _userInfo.UserRoleId)))
|
||||
{
|
||||
await _noneDicomStudyRepository.UpdateFromDTOAsync(noneDicomEdit);
|
||||
await _noneDicomStudyRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
[UnitOfWork]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task<IResponseOutput<NoneDicomStudyAddReturnDto>> AddOrUpdateNoneDicomStudy(NoneDicomStudyAddOrEdit addOrEditNoneDicomStudy)
|
||||
@@ -137,7 +150,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
await _qCCommon.VerifyIsCRCSubmmitAsync(_subjectVisitRepository, _userInfo, subjectVisitId);
|
||||
|
||||
await _noneDicomStudyRepository.DeleteFromQueryAsync(noneDicomStudyId,ignoreQueryFilter:true);
|
||||
await _noneDicomStudyRepository.DeleteFromQueryAsync(noneDicomStudyId, ignoreQueryFilter: true);
|
||||
|
||||
await _noneDicomStudyFileRepository.DeleteFromQueryAsync(t => t.NoneDicomStudyId == noneDicomStudyId, ignoreQueryFilter: true);
|
||||
|
||||
@@ -159,11 +172,11 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
var noneDicomStudyFile = await _noneDicomStudyFileRepository.FirstOrDefaultAsync(t => t.Id == noneDicomStudyFileId, true);
|
||||
|
||||
var success = await _noneDicomStudyFileRepository.DeleteAsync(noneDicomStudyFile,true);
|
||||
var success = await _noneDicomStudyFileRepository.DeleteAsync(noneDicomStudyFile, true);
|
||||
|
||||
//维护文件数量数字
|
||||
var noneDicomStudy = await _noneDicomStudyRepository.FirstOrDefaultAsync(t => t.Id == noneDicomStudyFile.NoneDicomStudyId,true);
|
||||
noneDicomStudy.FileCount = await _noneDicomStudyFileRepository.CountAsync(t => t.NoneDicomStudyId == noneDicomStudyFile.NoneDicomStudyId,true);
|
||||
var noneDicomStudy = await _noneDicomStudyRepository.FirstOrDefaultAsync(t => t.Id == noneDicomStudyFile.NoneDicomStudyId, true);
|
||||
noneDicomStudy.FileCount = await _noneDicomStudyFileRepository.CountAsync(t => t.NoneDicomStudyId == noneDicomStudyFile.NoneDicomStudyId, true);
|
||||
await _noneDicomStudyRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
@@ -157,8 +157,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
CreateMap<SCPStudy, DicomStudyDTO>();
|
||||
CreateMap<SCPSeries, DicomSeriesDTO>();
|
||||
|
||||
|
||||
|
||||
CreateMap<NoneDicomEdit, NoneDicomStudy>();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// 生成时间 2021-12-06 10:56:50
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
/// <summary> NoneDicomStudyView 列表视图模型 </summary>
|
||||
@@ -43,6 +45,18 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
}
|
||||
|
||||
public class NoneDicomEdit
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
public string StudyName { get; set; }
|
||||
public string BodyPart { get; set; } = string.Empty;
|
||||
public string Modality { get; set; } = string.Empty;
|
||||
public DateTime ImageDate { get; set; }
|
||||
public string ModifyReason { get; set; }
|
||||
}
|
||||
|
||||
///<summary> NoneDicomStudyAddOrEdit 列表查询参数模型</summary>
|
||||
public class NoneDicomStudyAddOrEdit
|
||||
{
|
||||
@@ -66,6 +80,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public DateTime? UploadVideoTime { get; set; }
|
||||
|
||||
public string VideoUrl { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,27 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts.DTO
|
||||
{
|
||||
|
||||
|
||||
|
||||
public class DicomStudyEdit
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public string StudyName { get; set; } = String.Empty;
|
||||
|
||||
public string Modality { get; set; } = String.Empty;
|
||||
|
||||
public string BodyPart { get; set; } = String.Empty;
|
||||
|
||||
public string ModifyReason { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
//Task<IResponseOutput> UploadNoneDicomFile(IFormCollection formCollection, Guid subjectVisitId, Guid noneDicomStudyId);
|
||||
|
||||
|
||||
|
||||
Task<IResponseOutput> UpdateNoneDicomStudy(NoneDicomEdit noneDicomEdit);
|
||||
}
|
||||
}
|
||||
@@ -38,5 +38,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
|
||||
//Task<IResponseOutput> ForwardSVDicomImage(Guid[] subjectVisitIdList);
|
||||
|
||||
Task<IResponseOutput> UpdateDicomStudyInfo(DicomStudyEdit dicomEdit);
|
||||
}
|
||||
}
|
||||
@@ -1020,6 +1020,18 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
[HttpPut]
|
||||
public async Task<IResponseOutput> UpdateDicomStudyInfo(DicomStudyEdit dicomEdit)
|
||||
{
|
||||
if (_subjectVisitRepository.Any(t => t.Id == dicomEdit.Id && (t.PreliminaryAuditUserId == _userInfo.UserRoleId || t.ReviewAuditUserId == _userInfo.UserRoleId)))
|
||||
{
|
||||
await _dicomStudyRepository.UpdateFromDTOAsync(dicomEdit);
|
||||
await _dicomStudyRepository.SaveChangesAsync();
|
||||
}
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型
|
||||
/// </summary>
|
||||
|
||||
@@ -767,6 +767,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUserRole.UserName))
|
||||
.ForMember(d => d.CreateUserFullName, u => u.MapFrom(s => s.CreateUserRole.FullName));
|
||||
|
||||
CreateMap<DicomStudyEdit, DicomStudy>();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user