OCT计算以及导入验证修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
cfa38f2318
commit
121d3a3e64
|
|
@ -1,6 +1,10 @@
|
||||||
using DocumentFormat.OpenXml.Drawing.Diagrams;
|
using DocumentFormat.OpenXml.Drawing.Diagrams;
|
||||||
|
using DocumentFormat.OpenXml.Drawing.Spreadsheet;
|
||||||
|
using DocumentFormat.OpenXml.Office.SpreadSheetML.Y2023.MsForms;
|
||||||
|
using DocumentFormat.OpenXml.Office2010.Excel;
|
||||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
|
|
@ -347,7 +351,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
MicrochannelMeasurement =dataTable.Rows[i]["F"].ToString() ?? string.Empty,
|
MicrochannelMeasurement =dataTable.Rows[i]["F"].ToString() ?? string.Empty,
|
||||||
CholesterolCrystalMeasurement = dataTable.Rows[i]["G"].ToString() ?? string.Empty,
|
CholesterolCrystalMeasurement = dataTable.Rows[i]["G"].ToString() ?? string.Empty,
|
||||||
LumenAreaMeasurement = getdecimalEmptyData(dataTable.Rows[i]["H"].ToString() ?? string.Empty),
|
LumenAreaMeasurement = getdecimalEmptyData(dataTable.Rows[i]["H"].ToString() ?? string.Empty),
|
||||||
LipidAngle = getdecimalData(dataTable.Rows[i]["I"].ToString()),
|
LipidAngle = getdecimalEmptyData(dataTable.Rows[i]["I"].ToString() ?? string.Empty),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
|
|
@ -862,8 +866,20 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
// 脂质角度平均值
|
// 脂质角度平均值
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.AvgLipidAngle,GetDecimalNullFun=GetAvgLipidAngle},
|
new ReadingCalculateData (){QuestionType=QuestionType.AvgLipidAngle,GetDecimalNullFun=GetAvgLipidAngle},
|
||||||
|
|
||||||
// 脂质角度最大值
|
// 脂质角度最大值
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.MaxLipidAngle,GetDecimalNullFun=GetMaxLipidAngle},
|
new ReadingCalculateData (){QuestionType=QuestionType.MaxLipidAngle,GetDecimalNullFun=GetMaxLipidAngle},
|
||||||
|
|
||||||
|
//巨噬细胞浸润测量
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.MacrophageInfiltrationMeasurement,GetStringFun=GetMacrophageInfiltration},
|
||||||
|
|
||||||
|
//巨噬细胞浸润角度测量
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.MacrophageInfiltrationAngle,GetStringFun=GetMacrophageExtensionAngle},
|
||||||
|
|
||||||
|
//微通道测量
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.MicrochannelMeasurement,GetStringFun=GetMicrochannels},
|
||||||
|
|
||||||
|
//胆固醇结晶测量
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.CholesterolCrystalMeasurement,GetStringFun=GetCholesterolCrystallization},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1290,6 +1306,76 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task<List<OCTInfo>> GetOCTInfo(ReadingCalculateDto inDto)
|
||||||
|
{
|
||||||
|
var fCTQuestionInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.ROI).FirstOrDefault();
|
||||||
|
List<OCTInfo> oCTFCTInfos = new List<OCTInfo>();
|
||||||
|
foreach (var item in fCTQuestionInfo!.TableRowInfoList)
|
||||||
|
{
|
||||||
|
oCTFCTInfos.Add(new OCTInfo()
|
||||||
|
{
|
||||||
|
|
||||||
|
// Data = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.AvgFCT).Select(x => decimal.Parse(x.Answer)).FirstOrDefault(),
|
||||||
|
MacrophageInfiltrationMeasurement = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.MacrophageInfiltrationMeasurement).Select(x => x.Answer).FirstOrDefault() ?? string.Empty,
|
||||||
|
MacrophageInfiltrationAngle = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.MacrophageInfiltrationAngle).Select(x => x.Answer.IsNullOrEmptyReturnNull()).FirstOrDefault(),
|
||||||
|
MicrochannelMeasurement = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.MicrochannelMeasurement).Select(x => x.Answer).FirstOrDefault() ?? string.Empty,
|
||||||
|
CholesterolCrystalMeasurement = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.CholesterolCrystalMeasurement).Select(x => x.Answer).FirstOrDefault() ?? string.Empty,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return oCTFCTInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取巨噬细胞浸润测量
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> GetMacrophageInfiltration(ReadingCalculateDto inDto)
|
||||||
|
{
|
||||||
|
List<OCTInfo> oCTFCTInfos = await GetOCTInfo(inDto);
|
||||||
|
return oCTFCTInfos.Any(x => x.MacrophageInfiltrationMeasurement != string.Empty) ?
|
||||||
|
oCTFCTInfos.Any(x => x.MacrophageInfiltrationMeasurement.EqEnum(IsPresent.Existence)) ? IsPresent.Existence.GetEnumInt() : IsPresent.NonExistence.GetEnumInt()
|
||||||
|
: IsPresent.NonExistence.GetEnumInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 巨噬细胞浸润角度测量
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> GetMacrophageExtensionAngle(ReadingCalculateDto inDto)
|
||||||
|
{
|
||||||
|
List<OCTInfo> oCTFCTInfos = await GetOCTInfo(inDto);
|
||||||
|
return oCTFCTInfos.Where(x =>x.MacrophageInfiltrationAngle != null).Count() == 0 ? string.Empty : oCTFCTInfos.Max(x => x.MacrophageInfiltrationAngle ?? 0).ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取微通道汇总
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> GetMicrochannels(ReadingCalculateDto inDto)
|
||||||
|
{
|
||||||
|
List<OCTInfo> oCTFCTInfos = await GetOCTInfo(inDto);
|
||||||
|
return oCTFCTInfos.Any(x => x.MicrochannelMeasurement != string.Empty) ?
|
||||||
|
oCTFCTInfos.Any(x => x.MicrochannelMeasurement.EqEnum(IsPresent.Existence)) ? IsPresent.Existence.GetEnumInt() : IsPresent.NonExistence.GetEnumInt()
|
||||||
|
: IsPresent.NonExistence.GetEnumInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取胆固醇结晶汇总
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> GetCholesterolCrystallization(ReadingCalculateDto inDto)
|
||||||
|
{
|
||||||
|
List<OCTInfo> oCTFCTInfos = await GetOCTInfo(inDto);
|
||||||
|
return oCTFCTInfos.Any(x => x.CholesterolCrystalMeasurement != string.Empty) ?
|
||||||
|
oCTFCTInfos.Any(x => x.CholesterolCrystalMeasurement.EqEnum(IsPresent.Existence)) ? IsPresent.Existence.GetEnumInt() : IsPresent.NonExistence.GetEnumInt()
|
||||||
|
: IsPresent.NonExistence.GetEnumInt();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 验证访视提交
|
/// 验证访视提交
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -3030,6 +3030,26 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
/// </summary>
|
/// </summary>
|
||||||
MaxLipidAngle = 1025,
|
MaxLipidAngle = 1025,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 巨噬细胞浸润测量
|
||||||
|
/// </summary>
|
||||||
|
MacrophageInfiltrationMeasurement = 1026,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 巨噬细胞浸润角度测量
|
||||||
|
/// </summary>
|
||||||
|
MacrophageInfiltrationAngle = 1027,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 微通道测量
|
||||||
|
/// </summary>
|
||||||
|
MicrochannelMeasurement = 1028,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 胆固醇结晶测量
|
||||||
|
/// </summary>
|
||||||
|
CholesterolCrystalMeasurement = 1029,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 脂肪分数总平均值
|
/// 脂肪分数总平均值
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue