From c376fe1d2299afef90ce7a91865c2d6e1c66aa61 Mon Sep 17 00:00:00 2001
From: he <109787524@qq.com>
Date: Wed, 8 Jan 2025 13:39:39 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 7 +++
.../MRIPDFFCalculateService.cs | 30 ++++++++++++
IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs | 46 +++++++++++++++++--
3 files changed, 79 insertions(+), 4 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 910afcf53..5198fee82 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/ReadingCalculate/MRIPDFFCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs
index b7cd58922..543d25cad 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},
};
@@ -608,6 +611,33 @@ 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" || answer == string.Empty)
+ {
+ return FattyLiverClassification.NE.GetEnumInt();
+ }
+
+ 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();
+ }
+
///
/// 计算平均值
///
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,
}
From e5bf8c4c8c8b5eb4f70d8e39abe580b584e995f4 Mon Sep 17 00:00:00 2001
From: he <109787524@qq.com>
Date: Wed, 8 Jan 2025 13:49:28 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Reading/MedicalAudit/ReadingMedicalReviewService.cs | 2 +-
.../ReadingCalculate/General/GeneralCalculateService.cs | 4 ++--
.../ReadingCalculate/IRECIST1Point1CalculateService.cs | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
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}】");
From 36ea9f526ecca61e4175ad1613daf08e7fe6360c Mon Sep 17 00:00:00 2001
From: he <109787524@qq.com>
Date: Wed, 8 Jan 2025 14:43:10 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/Doctor/DTO/DoctorModel.cs | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
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
From c87c72468510f0cd83052e8cac6ec4e811ac747b Mon Sep 17 00:00:00 2001
From: he <109787524@qq.com>
Date: Wed, 8 Jan 2025 16:02:45 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A1=E7=AE=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ReadingCalculate/MRIPDFFCalculateService.cs | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs
index 543d25cad..4668b088d 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs
@@ -600,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";
@@ -619,10 +623,14 @@ 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" || answer == string.Empty)
+ if (answer == "NE")
{
return FattyLiverClassification.NE.GetEnumInt();
}
+ else if(answer == string.Empty)
+ {
+ return string.Empty;
+ }
if (decimal.TryParse(answer, out var value))
{
@@ -708,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)
{