Uat 影像阅片初步修改
parent
a80dc14dcc
commit
d61fba9d95
|
@ -16621,6 +16621,16 @@
|
||||||
<param name="state"></param>
|
<param name="state"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.SetInstanceState(System.Guid,System.Guid,System.Guid,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
1、设置为不读片,2 设置为读片(取消 先前设置为不读片) 4 设置为删除(数据库记录软删除) 5 恢复为未删除
|
||||||
|
</summary>
|
||||||
|
<param name="subjectVisitId"></param>
|
||||||
|
<param name="seriesId"></param>
|
||||||
|
<param name="instanceId"></param>
|
||||||
|
<param name="state"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.UpdateModality(IRaCIS.Core.Application.Contracts.DTO.UpdateModalityCommand)">
|
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.UpdateModality(IRaCIS.Core.Application.Contracts.DTO.UpdateModalityCommand)">
|
||||||
<summary>
|
<summary>
|
||||||
type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型
|
type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型
|
||||||
|
|
|
@ -659,6 +659,74 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
return ResponseOutput.Ok(await _dicomStudyRepository.SaveChangesAsync());
|
return ResponseOutput.Ok(await _dicomStudyRepository.SaveChangesAsync());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 1、设置为不读片,2 设置为读片(取消 先前设置为不读片) 4 设置为删除(数据库记录软删除) 5 恢复为未删除
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="subjectVisitId"></param>
|
||||||
|
/// <param name="seriesId"></param>
|
||||||
|
/// <param name="instanceId"></param>
|
||||||
|
/// <param name="state"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{seriesId:guid}/{instanceId:guid}/{state:int}")]
|
||||||
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
|
public async Task<IResponseOutput> SetInstanceState(Guid subjectVisitId, Guid seriesId, Guid instanceId, int state)
|
||||||
|
{
|
||||||
|
|
||||||
|
await VerifyIsCanQCAsync(null, subjectVisitId);
|
||||||
|
|
||||||
|
var instance = (await _dicomInstanceRepository.Where(t => t.Id == instanceId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
|
|
||||||
|
if (state == 1)
|
||||||
|
{
|
||||||
|
instance.IsReading = false;
|
||||||
|
}
|
||||||
|
else if (state == 2)
|
||||||
|
{
|
||||||
|
instance.IsReading = true;
|
||||||
|
}
|
||||||
|
else if (state == 4)
|
||||||
|
{
|
||||||
|
instance.IsDeleted = true;
|
||||||
|
|
||||||
|
var series = (await _dicomSeriesRepository.Where(t => t.Id == seriesId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
|
series.InstanceCount = series.InstanceCount - 1;
|
||||||
|
|
||||||
|
var study = (await _dicomStudyRepository.Where(t => t.Id == series.StudyId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
|
study.InstanceCount = study.InstanceCount - 1;
|
||||||
|
|
||||||
|
////删除到最后一个instance
|
||||||
|
//if (series.InstanceCount == 0)
|
||||||
|
//{
|
||||||
|
// series.IsDeleted = true;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (state == 5)
|
||||||
|
{
|
||||||
|
instance.IsDeleted = false;
|
||||||
|
|
||||||
|
var series = (await _dicomSeriesRepository.Where(t => t.Id == seriesId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
|
series.InstanceCount = series.InstanceCount + 1;
|
||||||
|
|
||||||
|
var study = (await _dicomStudyRepository.Where(t => t.Id == series.StudyId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
|
study.InstanceCount = study.InstanceCount + 1;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(await _dicomStudyRepository.SaveChangesAsync());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型
|
///type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -237,6 +237,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
var studyIds = studyList.Select(t => t.StudyId).ToList();
|
var studyIds = studyList.Select(t => t.StudyId).ToList();
|
||||||
|
|
||||||
var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId))
|
var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId))
|
||||||
|
.WhereIf(isReading == 1, s => s.IsReading)
|
||||||
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.HtmlPath }).ToListAsync();
|
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.HtmlPath }).ToListAsync();
|
||||||
|
|
||||||
foreach (var t in studyList)
|
foreach (var t in studyList)
|
||||||
|
@ -497,8 +498,8 @@ namespace IRaCIS.Core.Application.Services
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
var studyIds = dicomStudyList.Select(t => t.StudyId).ToList();
|
var studyIds = dicomStudyList.Select(t => t.StudyId).ToList();
|
||||||
|
|
||||||
var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId))
|
var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId) && t.IsReading)
|
||||||
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath }).ToListAsync();
|
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath,t.IsReading }).ToListAsync();
|
||||||
|
|
||||||
List<DicomSeriesDTO> seriesLists = await _dicomSeriesRepository.Where(s => studyIds.Contains(s.StudyId))
|
List<DicomSeriesDTO> seriesLists = await _dicomSeriesRepository.Where(s => studyIds.Contains(s.StudyId))
|
||||||
.WhereIf(isManualGenerate == false, t => t.IsReading)
|
.WhereIf(isManualGenerate == false, t => t.IsReading)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[Comment("归档 - Instance表")]
|
[Comment("归档 - Instance表")]
|
||||||
[Table("DicomInstance")]
|
[Table("DicomInstance")]
|
||||||
public class DicomInstance : BaseFullAuditEntity, IEntitySeqId
|
public class DicomInstance : BaseFullDeleteAuditEntity, IEntitySeqId
|
||||||
{
|
{
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
@ -75,4 +75,6 @@ public class DicomInstance : BaseFullAuditEntity, IEntitySeqId
|
||||||
|
|
||||||
|
|
||||||
public string WindowWidth { get; set; } = null!;
|
public string WindowWidth { get; set; } = null!;
|
||||||
|
|
||||||
|
public bool IsReading { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
18581
IRaCIS.Core.Infra.EFCore/Migrations/20250213021502_AddInstanceIsReading.Designer.cs
generated
Normal file
18581
IRaCIS.Core.Infra.EFCore/Migrations/20250213021502_AddInstanceIsReading.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,61 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddInstanceIsReading : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "DeleteUserId",
|
||||||
|
table: "DicomInstance",
|
||||||
|
type: "uniqueidentifier",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "DeletedTime",
|
||||||
|
table: "DicomInstance",
|
||||||
|
type: "datetime2",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsDeleted",
|
||||||
|
table: "DicomInstance",
|
||||||
|
type: "bit",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsReading",
|
||||||
|
table: "DicomInstance",
|
||||||
|
type: "bit",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "DeleteUserId",
|
||||||
|
table: "DicomInstance");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "DeletedTime",
|
||||||
|
table: "DicomInstance");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsDeleted",
|
||||||
|
table: "DicomInstance");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsReading",
|
||||||
|
table: "DicomInstance");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -793,6 +793,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Property<Guid>("CreateUserId")
|
b.Property<Guid>("CreateUserId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleteUserId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletedTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<long?>("FileSize")
|
b.Property<long?>("FileSize")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
@ -826,6 +832,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Property<DateTime?>("InstanceTime")
|
b.Property<DateTime?>("InstanceTime")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("IsReading")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<int>("NumberOfFrames")
|
b.Property<int>("NumberOfFrames")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue