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
continuous-integration/drone/push Build is passing
Details
commit
75b3a60ca6
|
@ -4246,6 +4246,13 @@
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.MRIPDFFCalculateService.GetFattyLiverGrading(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||||
|
<summary>
|
||||||
|
获取脂肪肝分级
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.MRIPDFFCalculateService.CalculateAvg(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.MRIPDFFCalculateService.CalculateAvg(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||||
<summary>
|
<summary>
|
||||||
计算平均值
|
计算平均值
|
||||||
|
|
|
@ -725,6 +725,25 @@ namespace IRaCIS.Application.Contracts
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string HospitalCN { get; set; } = string.Empty;
|
public string HospitalCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 大学
|
||||||
|
/// </summary>
|
||||||
|
public string UniversityAffiliated { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 大学
|
||||||
|
/// </summary>
|
||||||
|
public string UniversityAffiliatedCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 医院
|
||||||
|
/// </summary>
|
||||||
|
public string HospitalName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 医院
|
||||||
|
/// </summary>
|
||||||
|
public string HospitalNameCN { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -77,7 +77,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
medicalReviewInfo.ArmEnum = taskInfo.ArmEnum;
|
medicalReviewInfo.ArmEnum = taskInfo.ArmEnum;
|
||||||
medicalReviewInfo.SubjectCode = taskInfo.IsAnalysisCreate ? taskInfo.BlindSubjectCode : taskInfo.Subject.Code;
|
medicalReviewInfo.SubjectCode = taskInfo.IsAnalysisCreate ? taskInfo.BlindSubjectCode : taskInfo.Subject.Code;
|
||||||
medicalReviewInfo.TaskBlindName = taskInfo.TaskBlindName;
|
medicalReviewInfo.TaskBlindName = taskInfo.TaskBlindName;
|
||||||
medicalReviewInfo.ReadingUser = taskInfo.DoctorUser.IdentityUser.FullName;
|
medicalReviewInfo.ReadingUser = taskInfo.DoctorUser.FullName;
|
||||||
medicalReviewInfo.SubjectId = taskInfo.SubjectId;
|
medicalReviewInfo.SubjectId = taskInfo.SubjectId;
|
||||||
medicalReviewInfo.IsClosedDialog = medicalReviewInfo.MedicalReviewInfo.IsClosedDialog;
|
medicalReviewInfo.IsClosedDialog = medicalReviewInfo.MedicalReviewInfo.IsClosedDialog;
|
||||||
medicalReviewInfo.AuditState = medicalReviewInfo.MedicalReviewInfo.AuditState;
|
medicalReviewInfo.AuditState = medicalReviewInfo.MedicalReviewInfo.AuditState;
|
||||||
|
|
|
@ -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 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($"【标准Id】:【{criterionInfo.Id}】");
|
||||||
builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】");
|
builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】");
|
||||||
builder.AppendLine($"【受试者Id】:【{taskInfo.Subject.Id}】");
|
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($"【阅片人Id】:【{taskInfo.DoctorUser.Id}】");
|
||||||
builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】");
|
builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】");
|
||||||
builder.AppendLine($"【任务Id】:【{taskInfo.Id}】");
|
builder.AppendLine($"【任务Id】:【{taskInfo.Id}】");
|
||||||
|
|
|
@ -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 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();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.AppendLine($"");
|
builder.AppendLine($"");
|
||||||
builder.AppendLine($"【项目】:【{criterionInfo.Trial.TrialCode}】");
|
builder.AppendLine($"【项目】:【{criterionInfo.Trial.TrialCode}】");
|
||||||
|
@ -2707,7 +2707,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
builder.AppendLine($"【标准Id】:【{criterionInfo.Id}】");
|
builder.AppendLine($"【标准Id】:【{criterionInfo.Id}】");
|
||||||
builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】");
|
builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】");
|
||||||
builder.AppendLine($"【受试者Id】:【{taskInfo.Subject.Id}】");
|
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($"【阅片人Id】:【{taskInfo.DoctorUser.Id}】");
|
||||||
builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】");
|
builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】");
|
||||||
builder.AppendLine($"【任务Id】:【{taskInfo.Id}】");
|
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 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();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.AppendLine($"");
|
builder.AppendLine($"");
|
||||||
builder.AppendLine($"【项目】:【{criterionInfo.Trial.TrialCode}】");
|
builder.AppendLine($"【项目】:【{criterionInfo.Trial.TrialCode}】");
|
||||||
|
@ -3100,7 +3100,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
builder.AppendLine($"【标准Id】:【{criterionInfo.Id}】");
|
builder.AppendLine($"【标准Id】:【{criterionInfo.Id}】");
|
||||||
builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】");
|
builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】");
|
||||||
builder.AppendLine($"【受试者Id】:【{taskInfo.Subject.Id}】");
|
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($"【阅片人Id】:【{taskInfo.DoctorUser.Id}】");
|
||||||
builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】");
|
builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】");
|
||||||
builder.AppendLine($"【任务Id】:【{taskInfo.Id}】");
|
builder.AppendLine($"【任务Id】:【{taskInfo.Id}】");
|
||||||
|
|
|
@ -498,6 +498,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
{
|
{
|
||||||
// 脂肪平均
|
// 脂肪平均
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.TotalMeanFraction,GetStringFun=GetFatFractionAvg},
|
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)
|
var rowInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction)
|
||||||
.SelectMany(x => x.TableRowInfoList).ToList();
|
.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)
|
if (tableQuestionList.Count() == 0)
|
||||||
{
|
{
|
||||||
return "NE";
|
return "NE";
|
||||||
|
@ -608,6 +615,37 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取脂肪肝分级
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> 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();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算平均值
|
/// 计算平均值
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -678,7 +716,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction)
|
var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction)
|
||||||
.SelectMany(x => x.TableRowInfoList).ToList();
|
.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)
|
if (tableQuestionList.Count() != 8)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2309,10 +2309,43 @@ public enum SUVChangeVSBaseline
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 影像质量问题
|
/// 脂肪肝分级
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum ImageQualityIssues
|
public enum FattyLiverClassification
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// NE
|
||||||
|
/// </summary>
|
||||||
|
NE = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 0级
|
||||||
|
/// </summary>
|
||||||
|
Level0=1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 1级
|
||||||
|
/// </summary>
|
||||||
|
Level1=2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 2级
|
||||||
|
/// </summary>
|
||||||
|
Level2=3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 3级
|
||||||
|
/// </summary>
|
||||||
|
Level3=4,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 影像质量问题
|
||||||
|
/// </summary>
|
||||||
|
public enum ImageQualityIssues
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 解剖不完整
|
/// 解剖不完整
|
||||||
|
@ -2701,6 +2734,11 @@ public enum SUVChangeVSBaseline
|
||||||
/// 脂肪分数总平均值
|
/// 脂肪分数总平均值
|
||||||
/// </summary>
|
/// </summary>
|
||||||
TotalMeanFraction = 1101,
|
TotalMeanFraction = 1101,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 脂肪肝分级
|
||||||
|
/// </summary>
|
||||||
|
FattyLiverGrading = 1102,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue