修改入组和PD逻辑
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
b44c92f291
commit
d9326a1e8e
|
@ -1051,7 +1051,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
private async Task<(string enrollAnswer, bool isEnroll)> DealEnrollAnswer(Guid visitTaskId, Guid subjectVisitId, CriterionType criterionType, Guid trialReadingCriterionId)
|
||||
{
|
||||
|
||||
var enrollAnswer = string.Empty;
|
||||
var enrollAnswer = _userInfo.IsEn_Us ? "No" : "否";
|
||||
var isEnroll = false;
|
||||
|
||||
switch (criterionType)
|
||||
|
@ -1074,6 +1074,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
break;
|
||||
|
||||
case CriterionType.PCWG3:
|
||||
|
||||
var list = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == visitTaskId &&
|
||||
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && x.ReadingQuestionTrial.LesionType == LesionType.BaselineLesions).Select(t => t.Answer).ToListAsync();
|
||||
|
||||
bool exists = list.Any(s => int.TryParse(s, out var n) && n > 100);
|
||||
if (exists)
|
||||
{
|
||||
enrollAnswer = _userInfo.IsEn_Us ? "Yes" : "是";
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case CriterionType.RANO_BM:
|
||||
|
@ -1326,15 +1336,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
if (answer == OverallAssessment.PD.GetEnumInt())
|
||||
{
|
||||
answer = _userInfo.IsEn_Us ? "Yes" : "是";
|
||||
}
|
||||
else if (answer == OverallAssessment.ND.GetEnumInt())
|
||||
{
|
||||
answer = "ND";
|
||||
}
|
||||
else if (answer == OverallAssessment.NE.GetEnumInt())
|
||||
{
|
||||
answer = "NE";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
answer = _userInfo.IsEn_Us ? "No" : "否";
|
||||
|
@ -1347,14 +1349,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
answer = _userInfo.IsEn_Us ? "Yes" : "是";
|
||||
}
|
||||
else if (answer == OverallAssessment.ND.GetEnumInt())
|
||||
{
|
||||
answer = "ND";
|
||||
}
|
||||
else if (answer == OverallAssessment.NE.GetEnumInt())
|
||||
{
|
||||
answer = "NE";
|
||||
}
|
||||
else
|
||||
{
|
||||
answer = _userInfo.IsEn_Us ? "No" : "否";
|
||||
|
@ -1367,14 +1361,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
answer = _userInfo.IsEn_Us ? "Yes" : "是";
|
||||
}
|
||||
else if (answer == CTMRIOverallAssessment.ND.GetEnumInt())
|
||||
{
|
||||
answer = "ND";
|
||||
}
|
||||
else if (answer == CTMRIOverallAssessment.NE.GetEnumInt())
|
||||
{
|
||||
answer = "NE";
|
||||
}
|
||||
else
|
||||
{
|
||||
answer = _userInfo.IsEn_Us ? "No" : "否";
|
||||
|
@ -1387,14 +1373,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
answer = _userInfo.IsEn_Us ? "Yes" : "是";
|
||||
}
|
||||
else if (answer == ImagingOverallAssessment_Lugano.ND.GetEnumInt())
|
||||
{
|
||||
answer = "ND";
|
||||
}
|
||||
else if (answer == ImagingOverallAssessment_Lugano.NE.GetEnumInt())
|
||||
{
|
||||
answer = "NE";
|
||||
}
|
||||
else
|
||||
{
|
||||
answer = _userInfo.IsEn_Us ? "No" : "否";
|
||||
|
@ -1410,14 +1388,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
answer = _userInfo.IsEn_Us ? "Yes" : "是";
|
||||
}
|
||||
else if (answer == VisitTumorEvaluation.ND.GetEnumInt())
|
||||
{
|
||||
answer = "ND";
|
||||
}
|
||||
else if (answer == VisitTumorEvaluation.NE.GetEnumInt())
|
||||
{
|
||||
answer = "NE";
|
||||
}
|
||||
else
|
||||
{
|
||||
answer = _userInfo.IsEn_Us ? "No" : "否";
|
||||
|
|
|
@ -31,6 +31,8 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
|
||||
|
||||
[Comment("受试者退出")]
|
||||
public bool IsSubjectQuit { get; set; }
|
||||
|
||||
|
||||
//public DateTime? OutEnrollmentTime { get; set; }
|
||||
|
@ -58,6 +60,8 @@ namespace IRaCIS.Application.Contracts
|
|||
public string Reason { get; set; } = string.Empty;
|
||||
|
||||
public Guid? FinalSubjectVisitId { get; set; }
|
||||
|
||||
public bool IsSubjectQuit { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -92,4 +92,7 @@ public class Subject : BaseFullDeleteAuditEntity
|
|||
|
||||
[Comment("重阅或者退回影响一致性分析")]
|
||||
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
||||
|
||||
[Comment("受试者退出")]
|
||||
public bool IsSubjectQuit { get; set; }
|
||||
}
|
||||
|
|
19764
IRaCIS.Core.Infra.EFCore/Migrations/20250624012254_subjectQuit.Designer.cs
generated
Normal file
19764
IRaCIS.Core.Infra.EFCore/Migrations/20250624012254_subjectQuit.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,103 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class subjectQuit : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ReadingTaskQuestionMark_ReadingQuestionTrial_QuestionId",
|
||||
table: "ReadingTaskQuestionMark");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CriterionTypeEnum",
|
||||
table: "EmailNoticeConfig");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "TrialReadingCriterionId",
|
||||
table: "TrialEmailNoticeConfig",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true,
|
||||
comment: "下次版本删除",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsSubjectQuit",
|
||||
table: "Subject",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false,
|
||||
comment: "受试者退出");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "QuestionId",
|
||||
table: "ReadingTaskQuestionMark",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ReadingTaskQuestionMark_ReadingQuestionTrial_QuestionId",
|
||||
table: "ReadingTaskQuestionMark",
|
||||
column: "QuestionId",
|
||||
principalTable: "ReadingQuestionTrial",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ReadingTaskQuestionMark_ReadingQuestionTrial_QuestionId",
|
||||
table: "ReadingTaskQuestionMark");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsSubjectQuit",
|
||||
table: "Subject");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "TrialReadingCriterionId",
|
||||
table: "TrialEmailNoticeConfig",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier",
|
||||
oldNullable: true,
|
||||
oldComment: "下次版本删除");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "QuestionId",
|
||||
table: "ReadingTaskQuestionMark",
|
||||
type: "uniqueidentifier",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CriterionTypeEnum",
|
||||
table: "EmailNoticeConfig",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "标准枚举--后续废弃,这里可以选择多个标准");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ReadingTaskQuestionMark_ReadingQuestionTrial_QuestionId",
|
||||
table: "ReadingTaskQuestionMark",
|
||||
column: "QuestionId",
|
||||
principalTable: "ReadingQuestionTrial",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2047,10 +2047,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int?>("CriterionTypeEnum")
|
||||
.HasColumnType("int")
|
||||
.HasComment("标准枚举--后续废弃,这里可以选择多个标准");
|
||||
|
||||
b.Property<string>("CriterionTypeList")
|
||||
.HasColumnType("nvarchar(max)")
|
||||
.HasComment("邮件配置的多个标准");
|
||||
|
@ -7318,7 +7314,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<Guid>("QuestionId")
|
||||
b.Property<Guid?>("QuestionId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int?>("QuestionType")
|
||||
|
@ -8466,6 +8462,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasColumnType("bit")
|
||||
.HasComment("重阅或者退回影响一致性分析");
|
||||
|
||||
b.Property<bool>("IsSubjectQuit")
|
||||
.HasColumnType("bit")
|
||||
.HasComment("受试者退出");
|
||||
|
||||
b.Property<bool>("IsUrgent")
|
||||
.HasColumnType("bit");
|
||||
|
||||
|
@ -12016,7 +12016,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TrialReadingCriterionId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasComment("下次版本删除");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
@ -16782,9 +16783,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial")
|
||||
.WithMany()
|
||||
.HasForeignKey("QuestionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
.HasForeignKey("QuestionId");
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask")
|
||||
.WithMany("ReadingTaskQuestionMarkList")
|
||||
|
|
Loading…
Reference in New Issue