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

Test_IRC_Net10
he 2026-07-20 16:05:21 +08:00
commit 0cd9d666c1
1 changed files with 32 additions and 30 deletions

View File

@ -1979,7 +1979,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
await InsertInspection<Subject>(entity, type, x => new InspectionConvertDTO() await InsertInspection<Subject>(entity, type, x => new InspectionConvertDTO()
{ {
SubjectId = x.Id, SubjectId = x.Id,
Reason= entity.SuspendReason, Reason = entity.SuspendReason,
TrialSiteId = x.TrialSiteId, TrialSiteId = x.TrialSiteId,
//项目的信息 找离的最近的项目稽查信息 //项目的信息 找离的最近的项目稽查信息
@ -2447,6 +2447,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
Reason = reason, Reason = reason,
ExtraIndentification = extraIdentification, ExtraIndentification = extraIdentification,
SubjectVisitId = entity.SourceSubjectVisitId,
ObjectRelationParentId = entity.SourceSubjectVisitId != null ? entity.SourceSubjectVisitId : entity.SouceReadModuleId, ObjectRelationParentId = entity.SourceSubjectVisitId != null ? entity.SourceSubjectVisitId : entity.SouceReadModuleId,
ObjectRelationParentId2 = entity.DoctorUserId, ObjectRelationParentId2 = entity.DoctorUserId,
@ -2477,7 +2479,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
break; break;
case "Study/amendmentPatientInfo": case "Study/amendmentPatientInfo":
reason=entity.Reason; reason = entity.Reason;
break; break;
} }
@ -2578,7 +2580,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
if (entity.VisitTaskId != null) if (entity.VisitTaskId != null)
{ {
extraIdentification = "/VisitTask"; extraIdentification = "/VisitTask";
var obj = await _dbContext.VisitTask.FindAsync( entity.VisitTaskId); var obj = await _dbContext.VisitTask.FindAsync(entity.VisitTaskId);
armEnum = obj?.ArmEnum; armEnum = obj?.ArmEnum;
subjectVisitId = obj.SourceSubjectVisitId; subjectVisitId = obj.SourceSubjectVisitId;
} }
@ -2598,7 +2600,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{ {
SubjectVisitId = subjectVisitId, SubjectVisitId = subjectVisitId,
//SubjectId = noneDicomStudy.SubjectId, //SubjectId = noneDicomStudy.SubjectId,
VisitTaskId= x.VisitTaskId, VisitTaskId = x.VisitTaskId,
ObjectRelationParentId = subjectVisitId, ObjectRelationParentId = subjectVisitId,
ObjectRelationParentId2 = x.NoneDicomStudyId, ObjectRelationParentId2 = x.NoneDicomStudyId,
ObjectRelationParentId3 = x.OriginNoneDicomStudyId, ObjectRelationParentId3 = x.OriginNoneDicomStudyId,
@ -2821,7 +2823,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
SubjectVisitId = x.IsVisit ? x.ReadingId : null, SubjectVisitId = x.IsVisit ? x.ReadingId : null,
ObjectRelationParentId = entity.ClinicalDataTrialSetId, ObjectRelationParentId = entity.ClinicalDataTrialSetId,
AuditIdentification= extraIndentification, AuditIdentification = extraIndentification,
//ObjectRelationParentId2 = x.IsVisit == false?x.ReadingId:null //ObjectRelationParentId2 = x.IsVisit == false?x.ReadingId:null
}, },
@ -3655,7 +3657,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
await InsertInspection<Segment>(entity, type, x => new InspectionConvertDTO() await InsertInspection<Segment>(entity, type, x => new InspectionConvertDTO()
{ {
SubjectId= segmentation != null ? segmentation.SubjectId : null, SubjectId = segmentation != null ? segmentation.SubjectId : null,
SubjectVisitId = segmentation != null ? segmentation.SubjectVisitId : null, SubjectVisitId = segmentation != null ? segmentation.SubjectVisitId : null,
TrialReadingCriterionId = visitTask != null ? visitTask.TrialReadingCriterionId : null, TrialReadingCriterionId = visitTask != null ? visitTask.TrialReadingCriterionId : null,
}); });
@ -3705,7 +3707,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
} }
else else
{ {
var questionAnswer= entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionAnswer)).Select(x => x.Entity as ReadingTaskQuestionAnswer) var questionAnswer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionAnswer)).Select(x => x.Entity as ReadingTaskQuestionAnswer)
.Where(x => x.VisitTaskId == entity.VisitTaskId && x.ReadingQuestionTrialId == entity.QuestionId).FirstOrDefault(); .Where(x => x.VisitTaskId == entity.VisitTaskId && x.ReadingQuestionTrialId == entity.QuestionId).FirstOrDefault();
if (questionAnswer != null) if (questionAnswer != null)
@ -3734,9 +3736,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var segmentation = await _dbContext.Segmentation.Where(x => x.Id == entity.SegmentationId).Include(x=>x.VisitTask).FirstOrDefaultAsync()?? new Segmentation() { }; var segmentation = await _dbContext.Segmentation.Where(x => x.Id == entity.SegmentationId).Include(x => x.VisitTask).FirstOrDefaultAsync() ?? new Segmentation() { };
var segment= await _dbContext.Segment.Where(x => x.Id == entity.SegmentId).FirstOrDefaultAsync()?? new Segment() { }; var segment = await _dbContext.Segment.Where(x => x.Id == entity.SegmentId).FirstOrDefaultAsync() ?? new Segment() { };
var tableQuestionName = await _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync(); var tableQuestionName = await _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
var questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync(); var questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
@ -3745,15 +3747,15 @@ namespace IRaCIS.Core.Infra.EFCore.Common
Guid? trialReadingCriterionId = null; Guid? trialReadingCriterionId = null;
if (segmentation.VisitTask != null) if (segmentation.VisitTask != null)
{ {
trialReadingCriterionId= segmentation.VisitTask.TrialReadingCriterionId; trialReadingCriterionId = segmentation.VisitTask.TrialReadingCriterionId;
} }
await InsertInspection<SegmentBinding>(entity, type, x => new InspectionConvertDTO() await InsertInspection<SegmentBinding>(entity, type, x => new InspectionConvertDTO()
{ {
TrialReadingCriterionId= trialReadingCriterionId, TrialReadingCriterionId = trialReadingCriterionId,
},new }, new
{ {
segmentation.SegmentationName, segmentation.SegmentationName,
segmentation.SEGUrl, segmentation.SEGUrl,
@ -3783,7 +3785,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
await InsertInspection<ReadingNoneDicomMark>(entity, type, x => new InspectionConvertDTO() await InsertInspection<ReadingNoneDicomMark>(entity, type, x => new InspectionConvertDTO()
{ {
SelfDefineIdentification= selfDefineIdentification + type SelfDefineIdentification = selfDefineIdentification + type
}, new }, new
{ {
@ -3799,9 +3801,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var selfDefineIdentification = string.Empty; var selfDefineIdentification = string.Empty;
var answer = string.Empty; var answer = string.Empty;
Guid? questionId=Guid.Empty; Guid? questionId = Guid.Empty;
string tableQuestionName = string.Empty; string tableQuestionName = string.Empty;
var rowMark= string.Empty; var rowMark = string.Empty;
if (entity.TableQuestionId == null) if (entity.TableQuestionId == null)
{ {
switch (type) switch (type)
@ -3835,15 +3837,15 @@ namespace IRaCIS.Core.Infra.EFCore.Common
break; break;
} }
questionId = entity.QuestionId; questionId = entity.QuestionId;
tableQuestionName= _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefault(); tableQuestionName = _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefault();
answer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)).Select(x => x.Entity as ReadingTableQuestionAnswer).Select(x => x.Answer).FirstOrDefault(); answer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)).Select(x => x.Entity as ReadingTableQuestionAnswer).Select(x => x.Answer).FirstOrDefault();
rowMark= _dbContext.ReadingTableAnswerRowInfo.Where(x => x.Id == entity.RowId).Select(x => x.RowMark).FirstOrDefault(); rowMark = _dbContext.ReadingTableAnswerRowInfo.Where(x => x.Id == entity.RowId).Select(x => x.RowMark).FirstOrDefault();
} }
var mark = entitys.Where(x => x.Entity.GetType() == typeof(ReadingNoneDicomMark)).Select(x => x.Entity as ReadingNoneDicomMark).FirstOrDefault(); var mark = entitys.Where(x => x.Entity.GetType() == typeof(ReadingNoneDicomMark)).Select(x => x.Entity as ReadingNoneDicomMark).FirstOrDefault();
if (mark == null) if (mark == null)
{ {
mark = await _dbContext.ReadingNoneDicomMark.Where(x => x.Id == entity.NoneDicomMarkId).FirstOrDefaultAsync(); mark = await _dbContext.ReadingNoneDicomMark.Where(x => x.Id == entity.NoneDicomMarkId).FirstOrDefaultAsync();
@ -3852,7 +3854,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var QuestionName = string.Empty; var QuestionName = string.Empty;
if (answer != null) if (answer != null)
{ {
QuestionName= _dbContext.ReadingQuestionTrial.Where(x => x.Id == questionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefault(); QuestionName = _dbContext.ReadingQuestionTrial.Where(x => x.Id == questionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefault();
} }
await InsertInspection<ReadingNoneDicomMarkBinding>(entity, type, x => new InspectionConvertDTO() await InsertInspection<ReadingNoneDicomMarkBinding>(entity, type, x => new InspectionConvertDTO()
@ -3861,12 +3863,12 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}, new }, new
{ {
RowMark= rowMark, RowMark = rowMark,
TableQuestionName = tableQuestionName, TableQuestionName = tableQuestionName,
MarkName = mark==null|| type== "Deleted" ? string.Empty: mark.OrderMarkName, MarkName = mark == null || type == "Deleted" ? string.Empty : mark.OrderMarkName,
PicturePath= mark == null ? string.Empty : mark.PicturePath, PicturePath = mark == null ? string.Empty : mark.PicturePath,
QuestionName = QuestionName, QuestionName = QuestionName,
QuestinonAnswer= answer QuestinonAnswer = answer
}); });
} }
@ -4152,7 +4154,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//if (_userInfo.RequestUrl == " ReadingImageTask/splitLesion") //if (_userInfo.RequestUrl == " ReadingImageTask/splitLesion")
var originalRowMark = string.Empty; var originalRowMark = string.Empty;
var mergeRowMark = string.Empty; var mergeRowMark = string.Empty;
if (entity.SplitRowId != null) if (entity.SplitRowId != null)
{ {
@ -4203,7 +4205,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}, new }, new
{ {
OriginalRowMark = originalRowMark, OriginalRowMark = originalRowMark,
MergeRowMark= mergeRowMark, MergeRowMark = mergeRowMark,
//TableName = tableName, //TableName = tableName,
QuestionAnswerList = QuestionAnswerList =
@ -4546,7 +4548,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
inspection.EntityName = entityName; inspection.EntityName = entityName;
inspection.RealUrlAndEntity = _userInfo.RequestUrl + "/" + entityName + "/" + type; inspection.RealUrlAndEntity = _userInfo.RequestUrl + "/" + entityName + "/" + type;
inspection.Reason=inspection.Reason==string.Empty&&reason!=string.Empty?reason:inspection.Reason; inspection.Reason = inspection.Reason == string.Empty && reason != string.Empty ? reason : inspection.Reason;
await _dbContext.DataInspection.AddAsync(inspection); await _dbContext.DataInspection.AddAsync(inspection);