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

Test_IRC_Net8
he 2025-12-02 11:27:15 +08:00
commit 55882aa0ba
4 changed files with 436 additions and 396 deletions

View File

@ -390,9 +390,17 @@ public class IVUS_OCTExportService(IRepository<ReadingQuestionCriterionTrial> _r
{ {
var ivus = _mapper.Map<IvusExportDto>(task); var ivus = _mapper.Map<IvusExportDto>(task);
//靶段
ivus.TARGETV = task.QuestionAnswerList.Where(t => t.QuestionName == "靶段").FirstOrDefault()?.QuestionValue ?? string.Empty;
//靶段
ivus.TARGETV = task.QuestionAnswerList.Where(t => t.QuestionType == QuestionType.TargetSegment).FirstOrDefault()?.QuestionValue ?? string.Empty;
var marks = task.QuestionAnswerList.Where(t => t.QuestionType == QuestionType.TargetSegmentRemarks).FirstOrDefault()?.QuestionValue ?? string.Empty;
if (marks.IsNotNullOrEmpty())
{
ivus.TARGETV = ivus.TARGETV + "_" + marks;
}
//斑块编号 //斑块编号
ivus.PLAQUE = lesion.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.PlaqueNumber).FirstOrDefault()?.QuestionValue ?? string.Empty; ivus.PLAQUE = lesion.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.PlaqueNumber).FirstOrDefault()?.QuestionValue ?? string.Empty;
@ -407,10 +415,10 @@ public class IVUS_OCTExportService(IRepository<ReadingQuestionCriterionTrial> _r
//回撤中的图像帧数 //回撤中的图像帧数
ivus.PFC = task.QuestionAnswerList.Where(t => t.QuestionName == "回撤中的图像帧数").FirstOrDefault()?.QuestionValue ?? string.Empty; ivus.PFC = task.QuestionAnswerList.Where(t => t.QuestionType == QuestionType.PullbackFrameCount).FirstOrDefault()?.QuestionValue ?? string.Empty;
//分析图像帧数 //分析图像帧数
ivus.FC = task.QuestionAnswerList.Where(t => t.QuestionName == "分析图像帧数").FirstOrDefault()?.QuestionValue ?? string.Empty; ivus.FC = task.QuestionAnswerList.Where(t => t.QuestionType == QuestionType.AnalysisFrameCount).FirstOrDefault()?.QuestionValue ?? string.Empty;
var findStatLession = task.LesionList.FirstOrDefault(t => t.LessionType == LesionType.PatchDataStatistics && t.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.PlaqueNumber && t.QuestionValue == ivus.PLAQUE)); var findStatLession = task.LesionList.FirstOrDefault(t => t.LessionType == LesionType.PatchDataStatistics && t.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.PlaqueNumber && t.QuestionValue == ivus.PLAQUE));
var findPAVLession = task.LesionList.FirstOrDefault(t => t.LessionType == LesionType.PAV && t.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.PlaqueNumber && t.QuestionValue == ivus.PLAQUE)); var findPAVLession = task.LesionList.FirstOrDefault(t => t.LessionType == LesionType.PAV && t.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.PlaqueNumber && t.QuestionValue == ivus.PLAQUE));
@ -451,9 +459,9 @@ public class IVUS_OCTExportService(IRepository<ReadingQuestionCriterionTrial> _r
{ {
pNoIndex++; pNoIndex++;
var findFct1= fctLesion?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.FirstFCT).FirstOrDefault(); var findFct1 = fctLesion?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.FirstFCT).FirstOrDefault();
if (findFct1 != null) if (findFct1 != null)
{ {
var oct = CreatOCT(task, pNo); var oct = CreatOCT(task, pNo);
@ -466,7 +474,7 @@ public class IVUS_OCTExportService(IRepository<ReadingQuestionCriterionTrial> _r
oct.TESTCD = "FCTMV1"; oct.TESTCD = "FCTMV1";
// 测量参数值 // 测量参数值
oct.ORRES = findFct1?.QuestionValue??string.Empty; oct.ORRES = findFct1?.QuestionValue ?? string.Empty;
// 测量值单位 // 测量值单位
oct.ORRESU = translateDataList["ValueUnit"].Where(t => t.Code.ToLower() == ((int?)findFct1.Unit)?.ToString().ToLower()).Select(t => isEn_Us ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty; oct.ORRESU = translateDataList["ValueUnit"].Where(t => t.Code.ToLower() == ((int?)findFct1.Unit)?.ToString().ToLower()).Select(t => isEn_Us ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
@ -493,7 +501,7 @@ public class IVUS_OCTExportService(IRepository<ReadingQuestionCriterionTrial> _r
// 测量值单位 // 测量值单位
oct.ORRESU = translateDataList["ValueUnit"].Where(t => t.Code.ToLower() == ((int?)findFct2.Unit)?.ToString().ToLower()).Select(t => isEn_Us ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty; oct.ORRESU = translateDataList["ValueUnit"].Where(t => t.Code.ToLower() == ((int?)findFct2.Unit)?.ToString().ToLower()).Select(t => isEn_Us ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
octList.Add(oct); octList.Add(oct);
} }
@ -632,7 +640,16 @@ public class IVUS_OCTExportService(IRepository<ReadingQuestionCriterionTrial> _r
//靶段 //靶段
oct.TARGETV = task.QuestionAnswerList.Where(t => t.QuestionName == "靶段").FirstOrDefault()?.QuestionValue ?? string.Empty; //靶段
oct.TARGETV = task.QuestionAnswerList.Where(t => t.QuestionType == QuestionType.TargetSegment).FirstOrDefault()?.QuestionValue ?? string.Empty;
var marks = task.QuestionAnswerList.Where(t => t.QuestionType == QuestionType.TargetSegmentRemarks).FirstOrDefault()?.QuestionValue ?? string.Empty;
if (marks.IsNotNullOrEmpty())
{
oct.TARGETV = oct.TARGETV + "_" + marks;
}
//斑块编号 //斑块编号
oct.PLAQUE = pNo; oct.PLAQUE = pNo;

View File

@ -314,7 +314,7 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
LesionList = t.LesionList.OrderBy(t => t.RowMark).Select(c => new TumorLessionInfo() LesionList = t.LesionList.OrderBy(t => t.RowMark).Select(c => new TumorLessionInfo()
{ {
Id = c.Id, Id = c.Id,
OrganInfoId=c.OrganInfoId, OrganInfoId = c.OrganInfoId,
LessionType = c.ReadingQuestionTrial.LesionType, LessionType = c.ReadingQuestionTrial.LesionType,
LessionCode = c.RowMark, LessionCode = c.RowMark,
SplitRowId = c.SplitRowId, SplitRowId = c.SplitRowId,
@ -389,7 +389,7 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
.Union(new List<string>() { "ArmEnum", "ValueUnit", "GlobalAssessType", "ImageQualityIssues" }) .Union(new List<string>() { "ArmEnum", "ValueUnit", "GlobalAssessType", "ImageQualityIssues" })
.Distinct().ToArray(); .Distinct().ToArray();
var trialOrganDic = _trialOrganRepository.Where(t => t.TrialCriterionId == criterion.Id).Select(t=>new {t.OrganInfoId,t.Part,t.PartEN}).ToDictionary( var trialOrganDic = _trialOrganRepository.Where(t => t.TrialCriterionId == criterion.Id).Select(t => new { t.OrganInfoId, t.Part, t.PartEN }).ToDictionary(
t => t.OrganInfoId, t => t.OrganInfoId,
t => new { t.Part, t.PartEN } t => new { t.Part, t.PartEN }
); );
@ -660,7 +660,7 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
} }
else else
{ {
if (questionAnswer.ValueType == ValueOfType.Percentage) if (questionAnswer.ValueType == ValueOfType.Percentage && double.TryParse(questionAnswer.QuestionValue, out _))
{ {
tr.OriginalMeasurements = questionAnswer.QuestionValue + "%"; tr.OriginalMeasurements = questionAnswer.QuestionValue + "%";
@ -699,7 +699,7 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
} }
else if (criterion.CriterionType == CriterionType.Lugano2014) else if (criterion.CriterionType == CriterionType.Lugano2014)
{ {
trValueTypeIndex = Get_Lugano_RS_VisitFixed_Index(task, questionAnswer); rsValueTypeIndex = Get_Lugano_RS_VisitFixed_Index(task, questionAnswer);
rsValueList = Lugano_RSFixed.RSValueList; rsValueList = Lugano_RSFixed.RSValueList;
} }
@ -721,7 +721,9 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
rs.RespondEfficacyAssessment = questionAnswer.QuestionValue; rs.RespondEfficacyAssessment = questionAnswer.QuestionValue;
} }
if (questionAnswer.QuestionType == QuestionType.Tumor) if ((questionAnswer.QuestionType == QuestionType.Tumor && criterion.CriterionType == CriterionType.RECIST1Point1)||
(questionAnswer.QuestionType == QuestionType.ImgOncology && criterion.CriterionType == CriterionType.Lugano2014))
{ {
rs.AssessmentReason = task.VisitNote; rs.AssessmentReason = task.VisitNote;
@ -1277,7 +1279,7 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
case QuestionType.NoTargetLesion: case QuestionType.NoTargetLesion:
rsValueTypeIndex = 1; rsValueTypeIndex = 1;
break; break;
case QuestionType.NewLesions: case QuestionType.NewLesionEvaluation:
rsValueTypeIndex = 2; rsValueTypeIndex = 2;
break; break;
@ -1308,7 +1310,7 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
break; break;
case QuestionType.Tumor: case QuestionType.Tumor:
rsValueTypeIndex = 3; rsValueTypeIndex = 9;
break; break;
} }

File diff suppressed because it is too large Load Diff

View File

@ -76,11 +76,12 @@ namespace IRaCIS.Core.Infrastructure.Extention
foreach (PropertyInfo property in properties) foreach (PropertyInfo property in properties)
{ {
if (typeof(IEnumerable).IsAssignableFrom(property.PropertyType) //质控导出需要集合
&& property.PropertyType != typeof(string)) // if (typeof(IEnumerable).IsAssignableFrom(property.PropertyType)
{ //&& property.PropertyType != typeof(string))
continue; // {
} // continue;
// }
string propertyName = property.Name; string propertyName = property.Name;
object propertyValue = property.GetValue(obj); object propertyValue = property.GetValue(obj);