Merge branch 'Test_HIR_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_HIR_Net8
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-09-03 15:21:05 +08:00
commit 697ac6f57b
2 changed files with 208 additions and 199 deletions

View File

@ -1193,57 +1193,57 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
if (!(await _readingTableQuestionAnswerRepository.AnyAsync(x => x.VisitTaskId == visitTaskId)))
{
// 判断当前任务是否是基线
if (taskinfo.SourceSubjectVisitId != baseLineVisitId)
{
// 判断当前任务是是否有表格问题答案
if (!(await _readingTableQuestionAnswerRepository.AnyAsync(x => x.VisitTaskId == visitTaskId)))
// 判断当前任务是否是基线
if (taskinfo.SourceSubjectVisitId != baseLineVisitId)
{
var LastVisitTaskId = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId &&
x.IsAnalysisCreate == taskinfo.IsAnalysisCreate &&
x.ArmEnum == taskinfo.ArmEnum &&
x.IsSelfAnalysis == taskinfo.IsSelfAnalysis &&
x.SubjectId == taskinfo.SubjectId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.VisitTaskNum < taskinfo.VisitTaskNum && x.TaskState == TaskState.Effect && x.ArmEnum == taskinfo.ArmEnum
).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync();
var copyTableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new CopyTableAnswerDto()
// 判断当前任务是是否有表格问题答案
if (!(await _readingTableQuestionAnswerRepository.AnyAsync(x => x.VisitTaskId == visitTaskId)))
{
Answer = x.Answer,
QuestionId = x.QuestionId,
RowId = x.RowId,
QuestionMark = x.ReadingTableQuestionTrial.QuestionMark,
TableQuestionId = x.TableQuestionId,
RowIndex = x.RowIndex,
TrialId = x.TrialId
}).ToListAsync();
var tableRowAnswers = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == LastVisitTaskId).ProjectTo<CopyTableAnswerRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
var LastVisitTaskId = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId &&
x.IsAnalysisCreate == taskinfo.IsAnalysisCreate &&
x.ArmEnum == taskinfo.ArmEnum &&
x.IsSelfAnalysis == taskinfo.IsSelfAnalysis &&
x.SubjectId == taskinfo.SubjectId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.VisitTaskNum < taskinfo.VisitTaskNum && x.TaskState == TaskState.Effect && x.ArmEnum == taskinfo.ArmEnum
).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync();
tableRowAnswers.ForEach(x =>
{
x.VisitTaskId = visitTaskId;
x.IsCurrentTaskAdd = false;
x.Id = NewId.NextGuid();
x.SeriesId = null;
x.InstanceId = null;
x.MeasureData = string.Empty;
x.PicturePath = string.Empty;
});
tableRowAnswers.ForEach(x =>
{
x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault();
x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault();
var copyTableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new CopyTableAnswerDto()
{
Answer = x.Answer,
QuestionId = x.QuestionId,
RowId = x.RowId,
QuestionMark = x.ReadingTableQuestionTrial.QuestionMark,
TableQuestionId = x.TableQuestionId,
RowIndex = x.RowIndex,
TrialId = x.TrialId
}).ToListAsync();
});
var tableRowAnswers = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == LastVisitTaskId).ProjectTo<CopyTableAnswerRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
List<QuestionMark?> notNeedCopyMarks = new List<QuestionMark?>()
tableRowAnswers.ForEach(x =>
{
x.VisitTaskId = visitTaskId;
x.IsCurrentTaskAdd = false;
x.Id = NewId.NextGuid();
x.SeriesId = null;
x.InstanceId = null;
x.MeasureData = string.Empty;
x.PicturePath = string.Empty;
});
tableRowAnswers.ForEach(x =>
{
x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault();
x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault();
});
List<QuestionMark?> notNeedCopyMarks = new List<QuestionMark?>()
{
QuestionMark.MajorAxis,
QuestionMark.ShortAxis,
@ -1251,169 +1251,170 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
};
var tableAnswers = copyTableAnswers.Select(x => new ReadingTableQuestionAnswer
{
Id = NewId.NextGuid(),
Answer = notNeedCopyMarks.Contains(x.QuestionMark) ? string.Empty : x.Answer,
QuestionId = x.QuestionId,
RowIndex = x.RowIndex,
RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(),
TableQuestionId = x.TableQuestionId,
TrialId = x.TrialId,
VisitTaskId = visitTaskId,
});
var tableAnswers = copyTableAnswers.Select(x => new ReadingTableQuestionAnswer
{
Id = NewId.NextGuid(),
Answer = notNeedCopyMarks.Contains(x.QuestionMark) ? string.Empty : x.Answer,
QuestionId = x.QuestionId,
RowIndex = x.RowIndex,
RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(),
TableQuestionId = x.TableQuestionId,
TrialId = x.TrialId,
VisitTaskId = visitTaskId,
});
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
addList.ForEach(x =>
{
x.MergeRow = null;
x.SplitRow = null;
addList.ForEach(x =>
{
x.MergeRow = null;
x.SplitRow = null;
});
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
});
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
}
}
}
else
{
// 基线任务
// 如果是基线 要把res1.1的病灶复制过来
var recistTask = await _visitTaskRepository.Where(x =>
x.TrialId == taskinfo.TrialId &&
x.TaskState == TaskState.Effect &&
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
x.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Point1 &&
x.SubjectId == taskinfo.SubjectId &&
x.SourceSubjectVisitId == taskinfo.SourceSubjectVisitId
).FirstOrDefaultAsync();
if (recistTask != null)
else
{
_userInfo.AuditIdentification = "HCC";
var trialReadingCriterion=await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskinfo.TrialReadingCriterionId).FirstOrDefaultAsync();
var tableRowAnswers = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == recistTask.Id).ProjectTo<CopyTableAnswerRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == taskinfo.TrialReadingCriterionId).ToListAsync();
foreach (var rowInfo in tableRowAnswers)
// 基线任务
// 如果是基线 要把res1.1的病灶复制过来
var recistTask = await _visitTaskRepository.Where(x =>
x.TrialId == taskinfo.TrialId &&
x.TaskState == TaskState.Effect &&
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
x.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Point1 &&
x.SubjectId == taskinfo.SubjectId &&
x.SourceSubjectVisitId == taskinfo.SourceSubjectVisitId
).FirstOrDefaultAsync();
if (recistTask != null)
{
var question = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.LesionType == rowInfo.LesionType).FirstOrDefaultAsync();
_userInfo.AuditIdentification = "HCC";
var organ = await _organInfoRepository.Where(x => x.Id == rowInfo.OrganInfoId).FirstOrDefaultAsync();
if (organ != null)
var trialReadingCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskinfo.TrialReadingCriterionId).FirstOrDefaultAsync();
var tableRowAnswers = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == recistTask.Id).ProjectTo<CopyTableAnswerRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == taskinfo.TrialReadingCriterionId).ToListAsync();
foreach (var rowInfo in tableRowAnswers)
{
var newOrgan = await _organInfoRepository.Where(x => x.SystemCriterionId == trialReadingCriterion.ReadingQuestionCriterionSystemId &&
x.Classification == organ.Classification &&
x.Part == organ.Part &&
x.TULOC == organ.TULOC &&
x.TULAT == organ.TULAT &&
x.IsLymphNodes == organ.IsLymphNodes
).FirstOrDefaultAsync();
rowInfo.ReportMark = rowInfo.RowMark;
var question = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.LesionType == rowInfo.LesionType).FirstOrDefaultAsync();
if (newOrgan != null)
var organ = await _organInfoRepository.Where(x => x.Id == rowInfo.OrganInfoId).FirstOrDefaultAsync();
if (organ != null)
{
rowInfo.OrganInfoId = newOrgan.Id;
var newOrgan = await _organInfoRepository.Where(x => x.SystemCriterionId == trialReadingCriterion.ReadingQuestionCriterionSystemId &&
x.Classification == organ.Classification &&
x.Part == organ.Part &&
x.TULOC == organ.TULOC &&
x.TULAT == organ.TULAT &&
x.IsLymphNodes == organ.IsLymphNodes
).FirstOrDefaultAsync();
if (newOrgan != null)
{
rowInfo.OrganInfoId = newOrgan.Id;
}
}
}
if(rowInfo.MeasureData!=null)
{
rowInfo.MeasureData = rowInfo.MeasureData.Replace(recistTask.Id.ToString(), taskinfo.Id.ToString());
}
rowInfo.VisitTaskId = visitTaskId;
rowInfo.IsCurrentTaskAdd = true;
rowInfo.Id = NewId.NextGuid();
rowInfo.FristAddTaskId = visitTaskId;
rowInfo.QuestionId = question == null ? default(Guid) : question.Id;
rowInfo.RowMark = question?.OrderMark + rowInfo.RowIndex.GetLesionMark();
}
var recistTableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == recistTask.Id).Select(x => new CopyTableAnswerDto()
{
Answer = x.Answer,
QuestionId = x.QuestionId,
RowId = x.RowId,
QuestionMark = x.ReadingTableQuestionTrial.QuestionMark,
TableQuestionId = x.TableQuestionId,
RowIndex = x.RowIndex,
TrialId = x.TrialId,
}).ToListAsync();
foreach (var item in recistTableAnswers)
{
item.QuestionId = tableRowAnswers.Where(y => y.OriginalId == item.RowId).Select(x => x.QuestionId).FirstOrDefault();
item.TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == item.QuestionId && x.QuestionMark == item.QuestionMark).Select(x => x.Id).FirstOrDefault();
}
recistTableAnswers = recistTableAnswers.Where(x => x.TableQuestionId != default(Guid)).ToList();
List<QuestionMark?> notNeedCopyMarks = new List<QuestionMark?>()
{
};
var tableAnswers = recistTableAnswers.Select(x => new ReadingTableQuestionAnswer
{
Id = NewId.NextGuid(),
Answer = notNeedCopyMarks.Contains(x.QuestionMark) ? string.Empty : x.Answer,
QuestionId = x.QuestionId,
RowIndex = x.RowIndex,
RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(),
TableQuestionId = x.TableQuestionId,
TrialId = x.TrialId,
VisitTaskId = visitTaskId,
}).ToList();
// 添加 典型肝内病灶 默认值
tableRowAnswers.ForEach(x =>
{
var tableQuestion = tableQuestionList.Where(y => y.ReadingQuestionId == x.QuestionId && y.QuestionMark == QuestionMark.TypicalIntrahepaticLesion).FirstOrDefault();
if (tableQuestion != null)
{
tableAnswers.Add(new ReadingTableQuestionAnswer()
if (rowInfo.MeasureData != null)
{
Id = NewId.NextGuid(),
Answer = ((int)(object)ReadingYesOrNo.No).ToString(),
QuestionId = x.QuestionId,
RowIndex = x.RowIndex,
RowId = x.Id,
TableQuestionId = tableQuestion.Id,
TrialId = x.TrialId,
VisitTaskId = visitTaskId,
});
rowInfo.MeasureData = rowInfo.MeasureData.Replace(recistTask.Id.ToString(), taskinfo.Id.ToString());
}
rowInfo.VisitTaskId = visitTaskId;
rowInfo.IsCurrentTaskAdd = true;
rowInfo.Id = NewId.NextGuid();
rowInfo.FristAddTaskId = visitTaskId;
rowInfo.QuestionId = question == null ? default(Guid) : question.Id;
rowInfo.RowMark = question?.OrderMark + rowInfo.RowIndex.GetLesionMark();
}
});
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
var recistTableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == recistTask.Id).Select(x => new CopyTableAnswerDto()
{
Answer = x.Answer,
QuestionId = x.QuestionId,
RowId = x.RowId,
QuestionMark = x.ReadingTableQuestionTrial.QuestionMark,
TableQuestionId = x.TableQuestionId,
RowIndex = x.RowIndex,
TrialId = x.TrialId,
}).ToListAsync();
foreach (var item in recistTableAnswers)
{
item.QuestionId = tableRowAnswers.Where(y => y.OriginalId == item.RowId).Select(x => x.QuestionId).FirstOrDefault();
item.TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == item.QuestionId && x.QuestionMark == item.QuestionMark).Select(x => x.Id).FirstOrDefault();
}
recistTableAnswers = recistTableAnswers.Where(x => x.TableQuestionId != default(Guid)).ToList();
List<QuestionMark?> notNeedCopyMarks = new List<QuestionMark?>()
{
};
var tableAnswers = recistTableAnswers.Select(x => new ReadingTableQuestionAnswer
{
Id = NewId.NextGuid(),
Answer = notNeedCopyMarks.Contains(x.QuestionMark) ? string.Empty : x.Answer,
QuestionId = x.QuestionId,
RowIndex = x.RowIndex,
RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(),
TableQuestionId = x.TableQuestionId,
TrialId = x.TrialId,
VisitTaskId = visitTaskId,
}).ToList();
// 添加 典型肝内病灶 默认值
tableRowAnswers.ForEach(x =>
{
var tableQuestion = tableQuestionList.Where(y => y.ReadingQuestionId == x.QuestionId && y.QuestionMark == QuestionMark.TypicalIntrahepaticLesion).FirstOrDefault();
if (tableQuestion != null)
{
tableAnswers.Add(new ReadingTableQuestionAnswer()
{
Id = NewId.NextGuid(),
Answer = ((int)(object)ReadingYesOrNo.No).ToString(),
QuestionId = x.QuestionId,
RowIndex = x.RowIndex,
RowId = x.Id,
TableQuestionId = tableQuestion.Id,
TrialId = x.TrialId,
VisitTaskId = visitTaskId,
});
}
});
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
addList.ForEach(x =>
{
x.MergeRow = null;
x.SplitRow = null;
});
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
}
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
addList.ForEach(x =>
{
x.MergeRow = null;
x.SplitRow = null;
});
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
}
}
}
return new AddTaskLesionAnswerFromLastTaskOutDto()
{

View File

@ -79,7 +79,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{
return new List<Type>()
{
};
}
}
@ -1733,22 +1733,24 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var entity = item.Entity as SCPStudySubjectVisit;
var sCPStudy=await _dbContext.SCPStudy.Where(x => x.Id == entity.SCPStudyId).FirstOrDefaultAsync();
var sCPStudy = await _dbContext.SCPStudy.Where(x => x.Id == entity.SCPStudyId).FirstOrDefaultAsync();
await InsertInspection<SCPStudySubjectVisit>(item.Entity as SCPStudySubjectVisit, type, x => new InspectionConvertDTO()
{
ObjectRelationParentId = x.SubjectId,
ObjectRelationParentId2=x.SubjectVisitId,
ObjectRelationParentId2 = x.SubjectVisitId,
ObjectRelationParentId3 = x.StudyId,
IsDistinctionInterface=false,
}, new
{
StudyTime = sCPStudy!=null? sCPStudy.StudyTime:null,
StudyTime = sCPStudy != null ? sCPStudy.StudyTime : null,
});
}
@ -1766,6 +1768,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var reason = string.Empty;
if (type == AuditOpt.Add)
{
isDistinctionInterface = false;
}
#region 处理标识
switch (_userInfo.RequestUrl.ToLower())
@ -1860,8 +1867,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
await InsertInspection<TaskStudy>(item.Entity as TaskStudy, type, x => new InspectionConvertDTO()
{
ObjectRelationParentId = x.VisitTaskId,
},new {
ArmEnum= armEnum,
}, new
{
ArmEnum = armEnum,
});
}
@ -1914,7 +1922,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var extraIdentification = string.Empty;
Arm armEnum = Arm.SingleReadingArm;
if (entity.VisitTaskId!=null)
if (entity.VisitTaskId != null)
{
extraIdentification = "/VisitTask";
armEnum = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).Select(x => x.ArmEnum).FirstOrDefaultAsync();
@ -1925,7 +1933,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
await InsertInspection<NoneDicomStudyFile>(item.Entity as NoneDicomStudyFile, type, x => new InspectionConvertDTO()
{
TrialId= trialid,
TrialId = trialid,
ObjectRelationParentId = x.VisitTaskId,
ExtraIndentification = extraIdentification
}, new
@ -3409,7 +3417,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
Guid? subjectVisitId = null;
if (entity.SouceReadModuleId != null)
{
subjectVisitId = await _dbContext.ReadModule.Where(x => x.Id == entity.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
subjectVisitId = await _dbContext.ReadModule.Where(x => x.Id == entity.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
obj.CutOffVisitName = await _dbContext.SubjectVisit.Where(x => x.Id == subjectVisitId).Select(x => x.BlindName).FirstOrDefaultAsync();
@ -3422,9 +3430,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
await InsertInspection<VisitTask>(entity, type, x => new InspectionConvertDTO()
{
VisitTaskId = x.Id,
SubjectVisitId= subjectVisitId,
SubjectVisitId = subjectVisitId,
ExtraIndentification = extraIdentification,
IsDistinctionInterface = type == AuditOpt.Update && isDistinctionInterface ? true : false,
ObjectRelationParentId = entity.SourceSubjectVisitId != null ? entity.SourceSubjectVisitId : entity.SouceReadModuleId,
@ -3587,9 +3595,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
if (inspection.VisitTaskId != null)
{
if (generalData.TrialId == null || generalData.SubjectId == null || generalData.TrialReadingCriterionId == null || generalData.SubjectVisitId == null)
if (generalData.TrialId == null || generalData.SubjectId == null || generalData.TrialReadingCriterionId == null || generalData.SubjectVisitId == null)
{
var info = await _dbContext.VisitTask.Where(x => x.Id == inspection.VisitTaskId).Select(x => new { SubjectCode = x.Subject.Code, SubjectId = x.SubjectId, x.TrialId, x.SourceSubjectVisitId, ReadModuleSubjectVisitId = (Guid?)x.ReadModule.SubjectVisitId, x.TrialReadingCriterionId }).FirstOrDefaultAsync();
var info = await _dbContext.VisitTask.Where(x => x.Id == inspection.VisitTaskId).Select(x => new { SubjectCode = x.Subject.Code, SubjectId = x.SubjectId, x.TrialId, x.SourceSubjectVisitId, ReadModuleSubjectVisitId = (Guid?)x.ReadModule.SubjectVisitId, x.TrialReadingCriterionId }).FirstOrDefaultAsync();
generalData.TrialReadingCriterionId = info?.TrialReadingCriterionId ?? generalData.TrialReadingCriterionId;
generalData.TrialId = info?.TrialId ?? generalData.TrialId;
@ -3616,7 +3624,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
if (inspection.SubjectVisitId != null)
{
if (generalData.TrialId == null || generalData.SubjectId == null)
if (generalData.TrialId == null || generalData.SubjectId == null)
{
var info = await _dbContext.SubjectVisit.Where(x => x.Id == generalData.SubjectVisitId).Select(x =>
new { x.SubjectId, x.TrialSiteId, x.TrialId, SubjectCode = x.Subject.Code }).FirstOrDefaultAsync();
@ -3635,9 +3643,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
if (generalData.SubjectId != null)
{
if (generalData.TrialId == null )
if (generalData.TrialId == null)
{
var info = await _dbContext.Subject.Where(x => x.Id == generalData.SubjectId).Select(x => new { SubjectId = x.Id, x.TrialSiteId, x.TrialId, SubjectCode = x.Code, }).FirstOrDefaultAsync();
var info = await _dbContext.Subject.Where(x => x.Id == generalData.SubjectId).Select(x => new { SubjectId = x.Id, x.TrialSiteId, x.TrialId, SubjectCode = x.Code, }).FirstOrDefaultAsync();
if (info == null)
{
@ -3687,7 +3695,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
if (isSelfDefine)
{
result= $"{_userInfo.RequestUrl}/{entityTypeName}";
result = $"{_userInfo.RequestUrl}/{entityTypeName}";
}
else
{