修改非dicom dicom 质控完修改检查信息
parent
f32a66a89b
commit
7fc643bae1
|
@ -2,6 +2,7 @@
|
|||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.BusinessFilter;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Image.QA;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
|
@ -34,6 +35,31 @@ namespace IRaCIS.Core.API.Controllers
|
|||
) : ControllerBase
|
||||
{
|
||||
|
||||
|
||||
[HttpPost, Route("Inspection/NoneDicomStudy/UpdateNoneDicomStudy")]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
[UnitOfWork]
|
||||
|
||||
public async Task<IResponseOutput> UpdateNoneDicomStudy(DataInspectionDto<NoneDicomEdit> opt, [FromServices] INoneDicomStudyService _noneDicomStudyService)
|
||||
{
|
||||
var singId = await _inspectionService.RecordSing(opt.SignInfo);
|
||||
var result = await _noneDicomStudyService.UpdateNoneDicomStudy(opt.Data);
|
||||
await _inspectionService.CompletedSign(singId, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
[HttpPost, Route("Inspection/QCOperation/UpdateDicomStudyInfo")]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
[UnitOfWork]
|
||||
|
||||
public async Task<IResponseOutput> UpdateDicomStudyInfo(DataInspectionDto<DicomStudyEdit> opt, [FromServices] IQCOperationService _qcOperationService)
|
||||
{
|
||||
var singId = await _inspectionService.RecordSing(opt.SignInfo);
|
||||
var result = await _qcOperationService.UpdateDicomStudyInfo(opt.Data);
|
||||
await _inspectionService.CompletedSign(singId, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
#region 获取稽查数据
|
||||
/// <summary>
|
||||
/// 获取稽查数据
|
||||
|
|
|
@ -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>();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -100,4 +100,6 @@ public class DicomStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
public DateTime? UploadedTime { get; set; }
|
||||
|
||||
public string Uploader { get; set; } = null!;
|
||||
|
||||
public string ModifyReason { get; set; }
|
||||
}
|
||||
|
|
|
@ -52,6 +52,6 @@ public class NoneDicomStudy : BaseFullDeleteAuditEntity
|
|||
|
||||
#endregion
|
||||
|
||||
|
||||
public string ModifyReason { get; set; }
|
||||
}
|
||||
|
||||
|
|
19855
IRaCIS.Core.Infra.EFCore/Migrations/20250731070329_modifyQCStudy.Designer.cs
generated
Normal file
19855
IRaCIS.Core.Infra.EFCore/Migrations/20250731070329_modifyQCStudy.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,42 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class modifyQCStudy : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ModifyReason",
|
||||
table: "NoneDicomStudy",
|
||||
type: "nvarchar(400)",
|
||||
maxLength: 400,
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ModifyReason",
|
||||
table: "DicomStudy",
|
||||
type: "nvarchar(400)",
|
||||
maxLength: 400,
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ModifyReason",
|
||||
table: "NoneDicomStudy");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ModifyReason",
|
||||
table: "DicomStudy");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1247,6 +1247,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<string>("ModifyReason")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<string>("PatientAge")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
|
@ -3246,6 +3251,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<string>("ModifyReason")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<string>("StudyCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
|
|
Loading…
Reference in New Issue