Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
3c1ecf8e43
|
@ -50,6 +50,10 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
|
||||||
public string? WindowWidth => InstanceInfoList.FirstOrDefault()?.WindowWidth;
|
public string? WindowWidth => InstanceInfoList.FirstOrDefault()?.WindowWidth;
|
||||||
|
|
||||||
public string ImageResizePath { get; set; }
|
public string ImageResizePath { get; set; }
|
||||||
|
|
||||||
|
public string VisitName { get; set; }
|
||||||
|
|
||||||
|
public string SubjectCode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class StudyInstanceInfo
|
public class StudyInstanceInfo
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
[ApiExplorerSettings(GroupName = "Image")]
|
[ApiExplorerSettings(GroupName = "Image")]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public class InstanceService(IRepository<DicomInstance> _instanceRepository,
|
public class InstanceService(IRepository<DicomInstance> _instanceRepository,
|
||||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IWebHostEnvironment _hostEnvironment) : BaseService, IInstanceService
|
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IWebHostEnvironment _hostEnvironment) : BaseService, IInstanceService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -29,7 +29,14 @@ namespace IRaCIS.Core.Application.Services
|
||||||
.OrderBy(s => s.InstanceNumber).ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
.OrderBy(s => s.InstanceNumber).ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
||||||
.ProjectTo<DicomInstanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<DicomInstanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
var seriesInfo = await _instanceRepository.Where(s => s.SeriesId == seriesId).Select(t => new { t.DicomSerie.ImageResizePath,t.DicomSerie.IsDeleted,t.DicomSerie.IsReading }).FirstOrDefaultAsync();
|
var seriesInfo = await _instanceRepository.Where(s => s.SeriesId == seriesId).Select(t => new
|
||||||
|
{
|
||||||
|
t.DicomSerie.ImageResizePath,
|
||||||
|
t.DicomSerie.IsDeleted,
|
||||||
|
t.DicomSerie.IsReading,
|
||||||
|
SubjectCode = t.DicomSerie.SubjectVisit.Subject.Code,
|
||||||
|
t.DicomSerie.SubjectVisit.VisitName
|
||||||
|
}).FirstOrDefaultAsync();
|
||||||
|
|
||||||
return ResponseOutput.Ok(list, seriesInfo);
|
return ResponseOutput.Ok(list, seriesInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
CreateMap<DicomInstance, DicomInstanceDTO>()
|
CreateMap<DicomInstance, DicomInstanceDTO>()
|
||||||
.ForMember(o => o.SliceThickness, t => t.MapFrom(u => u.DicomSerie.SliceThickness));
|
.ForMember(o => o.SliceThickness, t => t.MapFrom(u => u.DicomSerie.SliceThickness));
|
||||||
CreateMap<DicomStudy, DicomStudyDTO>();
|
CreateMap<DicomStudy, DicomStudyDTO>();
|
||||||
CreateMap<DicomSeries, DicomSeriesDTO>();
|
CreateMap<DicomSeries, DicomSeriesDTO>()
|
||||||
|
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.SubjectVisit.Subject.Code))
|
||||||
|
.ForMember(o => o.VisitName, t => t.MapFrom(u => u.SubjectVisit.VisitName));
|
||||||
CreateMap<SCPSeries, DicomSeriesDTO>();
|
CreateMap<SCPSeries, DicomSeriesDTO>();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -146,11 +146,17 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
var dbQCChallenge = (await _qcChallengeRepository.FirstOrDefaultAsync(t => t.Id == input.qcChallengeId)).IfNullThrowException();
|
var dbQCChallenge = (await _qcChallengeRepository.FirstOrDefaultAsync(t => t.Id == input.qcChallengeId)).IfNullThrowException();
|
||||||
|
|
||||||
|
//复核的时候允许关闭
|
||||||
|
|
||||||
if (dbQCChallenge.ReuploadEnum == QCChanllengeReuploadEnum.CRCRequestReupload || dbQCChallenge.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload)
|
if (!_subjectVisitRepository.Any(t => t.Id == input.subjectVisitId && t.SecondReviewState == SecondReviewState.WaitAudit))
|
||||||
{
|
{
|
||||||
//---CRC已申请重传或者QC同意重传,不允许关闭该质疑。请在QC拒绝重传申请或者CRC设置重传影像后,再关闭质疑。
|
|
||||||
throw new BusinessValidationFailedException(_localizer["QCOperation_QuestionCannotClose"]);
|
if (dbQCChallenge.ReuploadEnum == QCChanllengeReuploadEnum.CRCRequestReupload || dbQCChallenge.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload)
|
||||||
|
{
|
||||||
|
//---CRC已申请重传或者QC同意重传,不允许关闭该质疑。请在QC拒绝重传申请或者CRC设置重传影像后,再关闭质疑。
|
||||||
|
throw new BusinessValidationFailedException(_localizer["QCOperation_QuestionCannotClose"]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2233,6 +2239,11 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
return ResponseOutput.NotOk(_localizer["QCOperation_CannotAgreeResend"]);
|
return ResponseOutput.NotOk(_localizer["QCOperation_CannotAgreeResend"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_subjectVisitRepository.Any(t => t.Id == qcChallenge.SubjectVisitId && t.VisitTaskList.Any(u => u.TaskState == TaskState.Effect)))
|
||||||
|
{
|
||||||
|
//当前访视已生成阅片任务,无法同意重传。
|
||||||
|
throw new BusinessValidationFailedException(_localizer["QCOperation_ImageBackShouldBeforeHaveTask"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
qcChallenge.ReuploadEnum = QCChanllengeReuploadEnum.QCAgreeUpload;
|
qcChallenge.ReuploadEnum = QCChanllengeReuploadEnum.QCAgreeUpload;
|
||||||
|
@ -2283,6 +2294,12 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (await _qcChallengeRepository.AnyAsync(t => t.Id == qcChallengeId && t.SubjectVisit.SecondReviewState == SecondReviewState.WaitAudit))
|
||||||
|
{
|
||||||
|
//复核时 删除qc 所做的答案
|
||||||
|
|
||||||
|
await _trialQCQuestionAnswerRepository.BatchDeleteNoTrackingAsync(t => t.SubjectVisitId == qcChallenge.SubjectVisitId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public List<StudyName> StudyNameList { get; set; }
|
public List<StudyName> StudyNameList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public bool IsIQCAutoNextTask { get; set; }
|
||||||
|
|
||||||
|
public bool IsIQCAutoTaskDistinguishType { get; set; }
|
||||||
|
|
||||||
public List<TrialObjectNameConfig> TrialObjectNameList { get; set; }
|
public List<TrialObjectNameConfig> TrialObjectNameList { get; set; }
|
||||||
|
|
||||||
|
@ -1120,6 +1122,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public List<string> StudyUseStudyNameList { get; set; }
|
public List<string> StudyUseStudyNameList { get; set; }
|
||||||
|
|
||||||
|
public bool IsIQCAutoNextTask { get; set; }
|
||||||
|
|
||||||
|
public bool IsIQCAutoTaskDistinguishType { get; set; }
|
||||||
|
|
||||||
//public bool IsTrialStart { get; set; } = false;
|
//public bool IsTrialStart { get; set; } = false;
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
public class DicomSeries : BaseFullDeleteAuditEntity, IEntitySeqId
|
public class DicomSeries : BaseFullDeleteAuditEntity, IEntitySeqId
|
||||||
{
|
{
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("SubjectVisitId")]
|
||||||
|
public SubjectVisit SubjectVisit { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("StudyId")]
|
[ForeignKey("StudyId")]
|
||||||
public DicomStudy DicomStudy { get; set; }
|
public DicomStudy DicomStudy { get; set; }
|
||||||
|
|
|
@ -301,6 +301,13 @@ public partial class Trial : BaseFullDeleteAuditEntity
|
||||||
[Comment("阅片任务产生之前 采集影像")]
|
[Comment("阅片任务产生之前 采集影像")]
|
||||||
public CollectImagesType CollectImagesEnum { get; set; }
|
public CollectImagesType CollectImagesEnum { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IQC自动下一个任务
|
||||||
|
/// </summary>
|
||||||
|
public bool IsIQCAutoNextTask { get; set; }
|
||||||
|
|
||||||
|
public bool IsIQCAutoTaskDistinguishType { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum CollectImagesType
|
public enum CollectImagesType
|
||||||
|
|
19842
IRaCIS.Core.Infra.EFCore/Migrations/20250724070617_iqcNextTask.Designer.cs
generated
Normal file
19842
IRaCIS.Core.Infra.EFCore/Migrations/20250724070617_iqcNextTask.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,61 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class iqcNextTask : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsIQCAutoNextTask",
|
||||||
|
table: "Trial",
|
||||||
|
type: "bit",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsIQCAutoTaskDistinguishType",
|
||||||
|
table: "Trial",
|
||||||
|
type: "bit",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_DicomSeries_SubjectVisitId",
|
||||||
|
table: "DicomSeries",
|
||||||
|
column: "SubjectVisitId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_DicomSeries_SubjectVisit_SubjectVisitId",
|
||||||
|
table: "DicomSeries",
|
||||||
|
column: "SubjectVisitId",
|
||||||
|
principalTable: "SubjectVisit",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_DicomSeries_SubjectVisit_SubjectVisitId",
|
||||||
|
table: "DicomSeries");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_DicomSeries_SubjectVisitId",
|
||||||
|
table: "DicomSeries");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsIQCAutoNextTask",
|
||||||
|
table: "Trial");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsIQCAutoTaskDistinguishType",
|
||||||
|
table: "Trial");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1157,6 +1157,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
|
||||||
b.HasIndex("StudyId");
|
b.HasIndex("StudyId");
|
||||||
|
|
||||||
|
b.HasIndex("SubjectVisitId");
|
||||||
|
|
||||||
b.ToTable("DicomSeries", t =>
|
b.ToTable("DicomSeries", t =>
|
||||||
{
|
{
|
||||||
t.HasComment("归档 - 序列表");
|
t.HasComment("归档 - 序列表");
|
||||||
|
@ -10904,6 +10906,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
.HasColumnType("bit")
|
.HasColumnType("bit")
|
||||||
.HasComment("是否有 受试者年龄");
|
.HasComment("是否有 受试者年龄");
|
||||||
|
|
||||||
|
b.Property<bool>("IsIQCAutoNextTask")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("IsIQCAutoTaskDistinguishType")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<bool>("IsImageConsistencyVerification")
|
b.Property<bool>("IsImageConsistencyVerification")
|
||||||
.HasColumnType("bit")
|
.HasColumnType("bit")
|
||||||
.HasComment("影像一致性核查");
|
.HasComment("影像一致性核查");
|
||||||
|
@ -15276,9 +15284,17 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("SubjectVisitId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
b.Navigation("CreateUserRole");
|
b.Navigation("CreateUserRole");
|
||||||
|
|
||||||
b.Navigation("DicomStudy");
|
b.Navigation("DicomStudy");
|
||||||
|
|
||||||
|
b.Navigation("SubjectVisit");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b =>
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b =>
|
||||||
|
@ -18659,7 +18675,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit")
|
b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit")
|
||||||
.WithMany()
|
.WithMany("TrialQCQuestionAnswerList")
|
||||||
.HasForeignKey("SubjectVisitId")
|
.HasForeignKey("SubjectVisitId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
@ -19611,6 +19627,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
|
||||||
b.Navigation("SubjectVisitImageBackRecordList");
|
b.Navigation("SubjectVisitImageBackRecordList");
|
||||||
|
|
||||||
|
b.Navigation("TrialQCQuestionAnswerList");
|
||||||
|
|
||||||
b.Navigation("VisitTaskList");
|
b.Navigation("VisitTaskList");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue