Uat 影像阅片初步修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
a2fc2c5075
commit
7cb8d04ca9
|
@ -16646,6 +16646,16 @@
|
|||
<param name="state"></param>
|
||||
<returns></returns>
|
||||
</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)">
|
||||
<summary>
|
||||
type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型
|
||||
|
|
|
@ -659,6 +659,74 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
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>
|
||||
///type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型
|
||||
/// </summary>
|
||||
|
|
|
@ -237,6 +237,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
var studyIds = studyList.Select(t => t.StudyId).ToList();
|
||||
|
||||
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();
|
||||
|
||||
foreach (var t in studyList)
|
||||
|
@ -497,8 +498,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
}).ToListAsync();
|
||||
var studyIds = dicomStudyList.Select(t => t.StudyId).ToList();
|
||||
|
||||
var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId))
|
||||
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath }).ToListAsync();
|
||||
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,t.IsReading }).ToListAsync();
|
||||
|
||||
List<DicomSeriesDTO> seriesLists = await _dicomSeriesRepository.Where(s => studyIds.Contains(s.StudyId))
|
||||
.WhereIf(isManualGenerate == false, t => t.IsReading)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[Comment("归档 - Instance表")]
|
||||
[Table("DicomInstance")]
|
||||
public class DicomInstance : BaseFullAuditEntity, IEntitySeqId
|
||||
public class DicomInstance : BaseFullDeleteAuditEntity, IEntitySeqId
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
|
@ -75,4 +75,6 @@ public class DicomInstance : BaseFullAuditEntity, IEntitySeqId
|
|||
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -813,6 +813,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("DeleteUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("DeletedTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long?>("FileSize")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
|
@ -846,6 +852,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<DateTime?>("InstanceTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsReading")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("NumberOfFrames")
|
||||
.HasColumnType("int");
|
||||
|
||||
|
|
Loading…
Reference in New Issue