diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index b675978e7..cb6615e03 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -4246,6 +4246,13 @@ + + + 获取脂肪肝分级 + + + + 计算平均值 diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs index 6f3b8d793..42b4248f1 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs @@ -725,6 +725,25 @@ namespace IRaCIS.Application.Contracts /// public string HospitalCN { get; set; } = string.Empty; + /// + /// 大学 + /// + public string UniversityAffiliated { get; set; } = string.Empty; + + /// + /// 大学 + /// + public string UniversityAffiliatedCN { get; set; } = string.Empty; + + /// + /// 医院 + /// + public string HospitalName { get; set; } = string.Empty; + + /// + /// 医院 + /// + public string HospitalNameCN { get; set; } = string.Empty; } #endregion diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs index 98806d5c4..cec81c79f 100644 --- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs @@ -77,7 +77,7 @@ namespace IRaCIS.Core.Application.Service medicalReviewInfo.ArmEnum = taskInfo.ArmEnum; medicalReviewInfo.SubjectCode = taskInfo.IsAnalysisCreate ? taskInfo.BlindSubjectCode : taskInfo.Subject.Code; medicalReviewInfo.TaskBlindName = taskInfo.TaskBlindName; - medicalReviewInfo.ReadingUser = taskInfo.DoctorUser.IdentityUser.FullName; + medicalReviewInfo.ReadingUser = taskInfo.DoctorUser.FullName; medicalReviewInfo.SubjectId = taskInfo.SubjectId; medicalReviewInfo.IsClosedDialog = medicalReviewInfo.MedicalReviewInfo.IsClosedDialog; medicalReviewInfo.AuditState = medicalReviewInfo.MedicalReviewInfo.AuditState; diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs index f6655ca5f..0176f0db8 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs @@ -129,7 +129,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { // 这里是记录日志 不需要国际化 var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Include(x => x.Trial).FirstNotNullAsync(); - var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).Include(x => x.DoctorUser).ThenInclude(t => t.IdentityUser).FirstNotNullAsync(); + var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).Include(x => x.DoctorUser).FirstNotNullAsync(); //错误级别日志:项目、标准、受试者、阅片人、任务。输出其它既往新病灶数据: @@ -141,7 +141,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate builder.AppendLine($"【标准Id】:【{criterionInfo.Id}】"); builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】"); builder.AppendLine($"【受试者Id】:【{taskInfo.Subject.Id}】"); - builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.IdentityUser.FullName}】"); + builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.FullName}】"); builder.AppendLine($"【阅片人Id】:【{taskInfo.DoctorUser.Id}】"); builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】"); builder.AppendLine($"【任务Id】:【{taskInfo.Id}】"); diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs index 289662e66..7e6fb31a3 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs @@ -2698,7 +2698,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate //错误级别日志:项目、标准、受试者、阅片人、任务。输出新病灶数据: // 这里是记录日志 不需要国际化 var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Include(x => x.Trial).FirstNotNullAsync(); - var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).Include(x => x.DoctorUser).ThenInclude(t => t.IdentityUser).FirstNotNullAsync(); + var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).Include(x => x.DoctorUser).FirstNotNullAsync(); StringBuilder builder = new StringBuilder(); builder.AppendLine($""); builder.AppendLine($"【项目】:【{criterionInfo.Trial.TrialCode}】"); @@ -2707,7 +2707,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate builder.AppendLine($"【标准Id】:【{criterionInfo.Id}】"); builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】"); builder.AppendLine($"【受试者Id】:【{taskInfo.Subject.Id}】"); - builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.IdentityUser.FullName}】"); + builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.FullName}】"); builder.AppendLine($"【阅片人Id】:【{taskInfo.DoctorUser.Id}】"); builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】"); builder.AppendLine($"【任务Id】:【{taskInfo.Id}】"); @@ -3091,7 +3091,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate //错误级别日志:项目、标准、受试者、阅片人、任务。输出靶病灶、非靶病灶、新病灶的评估结果: // 这里是记录日志 不需要国际化 var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Include(x => x.Trial).FirstNotNullAsync(); - var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).Include(x => x.DoctorUser).ThenInclude(t=>t.IdentityUser).FirstNotNullAsync(); + var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).Include(x => x.DoctorUser).FirstNotNullAsync(); StringBuilder builder = new StringBuilder(); builder.AppendLine($""); builder.AppendLine($"【项目】:【{criterionInfo.Trial.TrialCode}】"); @@ -3100,7 +3100,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate builder.AppendLine($"【标准Id】:【{criterionInfo.Id}】"); builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】"); builder.AppendLine($"【受试者Id】:【{taskInfo.Subject.Id}】"); - builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.IdentityUser.FullName}】"); + builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.FullName}】"); builder.AppendLine($"【阅片人Id】:【{taskInfo.DoctorUser.Id}】"); builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】"); builder.AppendLine($"【任务Id】:【{taskInfo.Id}】"); diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs index b7cd58922..4668b088d 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs @@ -498,6 +498,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { // 脂肪平均 new ReadingCalculateData (){QuestionType=QuestionType.TotalMeanFraction,GetStringFun=GetFatFractionAvg}, + + // 脂肪分级 + new ReadingCalculateData (){QuestionType=QuestionType.FattyLiverGrading,GetStringFun=GetFattyLiverGrading}, }; @@ -597,8 +600,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var rowInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction) .SelectMany(x => x.TableRowInfoList).ToList(); - var tableQuestionList = rowInfo.Where(x=>x.TableQuestionList.Any(x=>x.QuestionMark== QuestionMark.IsMeasurable&& x.Answer.EqEnum(YesOrNoOrNa.Yes))).SelectMany(x => x.TableQuestionList).ToList(); + var tableQuestionList = rowInfo.Where(x=>x.TableQuestionList.Any(x=>x.QuestionMark== QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.Yes))).SelectMany(x => x.TableQuestionList).ToList(); + if (rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.AverageValue && x.Answer.IsNotNullOrEmpty())).SelectMany(x => x.TableQuestionList).ToList().Count() != 8) + { + return string.Empty; + } if (tableQuestionList.Count() == 0) { return "NE"; @@ -608,6 +615,37 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate } + /// + /// 获取脂肪肝分级 + /// + /// + /// + public async Task GetFattyLiverGrading(ReadingCalculateDto inDto) + { + var answer = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.TotalMeanFraction).Select(x => x.Answer).FirstIsNullReturnEmpty(); + if (answer == "NE") + { + return FattyLiverClassification.NE.GetEnumInt(); + } + else if(answer == string.Empty) + { + return string.Empty; + } + + if (decimal.TryParse(answer, out var value)) + { + return value switch + { + < 5 => FattyLiverClassification.Level0.GetEnumInt(), + < 10 => FattyLiverClassification.Level1.GetEnumInt(), + < 25 => FattyLiverClassification.Level2.GetEnumInt(), + _ => FattyLiverClassification.Level3.GetEnumInt() + }; + } + + return FattyLiverClassification.NE.GetEnumInt(); + } + /// /// 计算平均值 /// @@ -678,7 +716,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction) .SelectMany(x => x.TableRowInfoList).ToList(); - var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.IsMeasurable && x.Answer.IsNotNullOrEmpty())).ToList(); + var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.AverageValue && x.Answer.IsNotNullOrEmpty())).ToList(); if (tableQuestionList.Count() != 8) { diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index 3ff827e07..d7336fbee 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -2309,10 +2309,43 @@ public enum SUVChangeVSBaseline } - /// - /// 影像质量问题 - /// - public enum ImageQualityIssues + /// + /// 脂肪肝分级 + /// + public enum FattyLiverClassification + { + /// + /// NE + /// + NE = 0, + + /// + /// 0级 + /// + Level0=1, + + /// + /// 1级 + /// + Level1=2, + + /// + /// 2级 + /// + Level2=3, + + /// + /// 3级 + /// + Level3=4, + + } + + + /// + /// 影像质量问题 + /// + public enum ImageQualityIssues { /// /// 解剖不完整 @@ -2701,6 +2734,11 @@ public enum SUVChangeVSBaseline /// 脂肪分数总平均值 /// TotalMeanFraction = 1101, + + /// + /// 脂肪肝分级 + /// + FattyLiverGrading = 1102, }