Merge branch 'Uat_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Uat_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
04954a4b25
|
|
@ -1028,8 +1028,6 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
//但是加字段 IsFrontTaskNeedSignButNotSign 那么签名临床数据的时候,要对该subject 该标准的有效的任务 这个字段需要在签名的时候维护 采取这种方式 统计数字灵活
|
||||
//.Where(t => t.Subject.SubjectVisitTaskList.AsQueryable().Where(visitTaskLambda).Any(c => c.IsNeedClinicalDataSign == true && c.IsClinicalDataSign == false && c.VisitTaskNum < t.VisitTaskNum))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => (t.Subject.Code.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate))
|
||||
.WhereIf(critrion.CriterionType == CriterionType.OCT, t => t.ReadingCategory == ReadingCategory.Visit ? t.SourceSubjectVisit.NoneDicomStudyList.SelectMany(t => t.TaskNoneDicomFileList).Any() : true)
|
||||
.WhereIf(critrion.CriterionType == CriterionType.IVUS, t => t.ReadingCategory == ReadingCategory.Visit ? t.SourceSubjectVisit.TaskStudyList.Any() : true)
|
||||
;
|
||||
|
||||
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
||||
|
|
@ -1173,7 +1171,9 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.UserRoleId && x.TaskState == TaskState.Effect)
|
||||
.WhereIf(inQuery.SubjectId != null, x => x.SubjectId == inQuery.SubjectId)
|
||||
.WhereIf(!string.IsNullOrEmpty(subjectCode), t => (t.Subject.Code.Contains(subjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(subjectCode!) && t.IsAnalysisCreate));
|
||||
.WhereIf(!string.IsNullOrEmpty(subjectCode), t => (t.Subject.Code.Contains(subjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(subjectCode!) && t.IsAnalysisCreate))
|
||||
.WhereIf(critrion.CriterionType == CriterionType.OCT, t => t.ReadingCategory == ReadingCategory.Visit ? t.SourceSubjectVisit.NoneDicomStudyList.SelectMany(t => t.ImageLabelNoneDicomFileList).Any() : true)
|
||||
.WhereIf(critrion.CriterionType == CriterionType.IVUS, t => t.ReadingCategory == ReadingCategory.Visit ? t.SourceSubjectVisit.TaskStudyList.Any() : true);
|
||||
|
||||
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
||||
|
||||
|
|
|
|||
|
|
@ -185,16 +185,16 @@ public class OctExportDto : IVUS_OCTBaseDto
|
|||
public string LAMAX { get; set; }
|
||||
|
||||
/// <summary>巨噬细胞浸润</summary>
|
||||
public string MACRI { get; set; }
|
||||
public string PLAMACRI { get; set; }
|
||||
|
||||
/// <summary>巨噬细胞浸润角度</summary>
|
||||
public string MIARC { get; set; }
|
||||
public string PLAMIARC { get; set; }
|
||||
|
||||
/// <summary>微通道</summary>
|
||||
public string MC { get; set; }
|
||||
public string PLAMC { get; set; }
|
||||
|
||||
/// <summary>胆固醇结晶</summary>
|
||||
public string CCS { get; set; }
|
||||
public string PLACCS { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -390,9 +390,17 @@ public class IVUS_OCTExportService(IRepository<ReadingQuestionCriterionTrial> _r
|
|||
{
|
||||
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;
|
||||
|
|
@ -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 findPAVLession = task.LesionList.FirstOrDefault(t => t.LessionType == LesionType.PAV && t.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.PlaqueNumber && t.QuestionValue == ivus.PLAQUE));
|
||||
|
|
@ -451,98 +459,162 @@ public class IVUS_OCTExportService(IRepository<ReadingQuestionCriterionTrial> _r
|
|||
{
|
||||
pNoIndex++;
|
||||
|
||||
var findFct1= fctLesion?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.FirstFCT).FirstOrDefault();
|
||||
foreach (var lessionAnswer in fctLesion?.LessionAnswerList.Where(t => t.QuestionMark != QuestionMark.PlaqueNumber).OrderBy(t=>t.ShowOrder))
|
||||
{
|
||||
var mark = string.Empty;
|
||||
switch (lessionAnswer.QuestionMark)
|
||||
{
|
||||
|
||||
if (findFct1 != null)
|
||||
case QuestionMark.FirstFCT:
|
||||
mark = "FCTMV1";
|
||||
break;
|
||||
case QuestionMark.SecondFCT:
|
||||
mark = "FCTMV2";
|
||||
break;
|
||||
case QuestionMark.ThirdFCT:
|
||||
mark = "FCTMV3";
|
||||
break;
|
||||
case QuestionMark.AvgFCT:
|
||||
mark = "AVGFCT";
|
||||
break;
|
||||
case QuestionMark.MacrophageInfiltration:
|
||||
mark = "MACRI";
|
||||
break;
|
||||
case QuestionMark.MacrophageExtensionAngle:
|
||||
mark = "MIARC";
|
||||
break;
|
||||
case QuestionMark.Microchannels:
|
||||
mark = "MC";
|
||||
break;
|
||||
case QuestionMark.CholesterolCrystallization:
|
||||
mark = "CCS";
|
||||
break;
|
||||
case QuestionMark.LumenArea:
|
||||
mark = "LUMEN";
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (mark.IsNotNullOrEmpty())
|
||||
{
|
||||
var oct = CreatOCT(task, pNo);
|
||||
|
||||
// 测量标识
|
||||
// 测量标识 阅片人_斑块号_表格_行号
|
||||
|
||||
oct.TestID = $"{(task.ArmEnum == Arm.DoubleReadingArm1 ? "R1" : "R2")}_{pNo}_L_{pNoIndex}";
|
||||
|
||||
// 测量参数名称
|
||||
|
||||
oct.TESTCD = "FCTMV1";
|
||||
oct.TESTCD = mark;
|
||||
|
||||
// 测量参数值
|
||||
oct.ORRES = findFct1?.QuestionValue??string.Empty;
|
||||
oct.ORRES = lessionAnswer?.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?)lessionAnswer.Unit)?.ToString().ToLower()).Select(t => isEn_Us ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||
|
||||
octList.Add(oct);
|
||||
}
|
||||
|
||||
var findFct2 = fctLesion?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.SecondFCT).FirstOrDefault();
|
||||
|
||||
if (findFct2 != null)
|
||||
{
|
||||
var oct = CreatOCT(task, pNo);
|
||||
|
||||
// 测量标识
|
||||
|
||||
oct.TestID = $"{(task.ArmEnum == Arm.DoubleReadingArm1 ? "R1" : "R2")}_{pNo}_L_{pNoIndex}";
|
||||
|
||||
// 测量参数名称
|
||||
|
||||
oct.TESTCD = "FCTMV2";
|
||||
|
||||
// 测量参数值
|
||||
oct.ORRES = findFct2?.QuestionValue ?? 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);
|
||||
}
|
||||
|
||||
var findFct3 = fctLesion?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.ThirdFCT).FirstOrDefault();
|
||||
|
||||
if (findFct3 != null)
|
||||
{
|
||||
var oct = CreatOCT(task, pNo);
|
||||
|
||||
// 测量标识
|
||||
|
||||
oct.TestID = $"{(task.ArmEnum == Arm.DoubleReadingArm1 ? "R1" : "R2")}_{pNo}_L_{pNoIndex}";
|
||||
|
||||
// 测量参数名称
|
||||
|
||||
oct.TESTCD = "FCTMV3";
|
||||
|
||||
// 测量参数值
|
||||
oct.ORRES = findFct3?.QuestionValue ?? string.Empty;
|
||||
|
||||
// 测量值单位
|
||||
oct.ORRESU = translateDataList["ValueUnit"].Where(t => t.Code.ToLower() == ((int?)findFct3.Unit)?.ToString().ToLower()).Select(t => isEn_Us ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||
|
||||
octList.Add(oct);
|
||||
}
|
||||
#region 废弃
|
||||
|
||||
|
||||
var avgFct = fctLesion?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.AvgFCT).FirstOrDefault();
|
||||
//var findFct1 = fctLesion?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.FirstFCT).FirstOrDefault();
|
||||
|
||||
if (avgFct != null)
|
||||
{
|
||||
var oct = CreatOCT(task, pNo);
|
||||
//if (findFct1 != null)
|
||||
//{
|
||||
// var oct = CreatOCT(task, pNo);
|
||||
|
||||
// 测量标识
|
||||
// // 测量标识
|
||||
|
||||
oct.TestID = $"{(task.ArmEnum == Arm.DoubleReadingArm1 ? "R1" : "R2")}_{pNo}_L_{pNoIndex}";
|
||||
// oct.TestID = $"{(task.ArmEnum == Arm.DoubleReadingArm1 ? "R1" : "R2")}_{pNo}_L_{pNoIndex}";
|
||||
|
||||
// 测量参数名称
|
||||
// // 测量参数名称
|
||||
|
||||
oct.TESTCD = "AVGFCT";
|
||||
// oct.TESTCD = "FCTMV1";
|
||||
|
||||
// 测量参数值
|
||||
oct.ORRES = avgFct?.QuestionValue ?? string.Empty;
|
||||
// // 测量参数值
|
||||
// oct.ORRES = findFct1?.QuestionValue ?? string.Empty;
|
||||
|
||||
// 测量值单位
|
||||
oct.ORRESU = translateDataList["ValueUnit"].Where(t => t.Code.ToLower() == ((int?)avgFct.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;
|
||||
|
||||
octList.Add(oct);
|
||||
}
|
||||
// octList.Add(oct);
|
||||
//}
|
||||
|
||||
//var findFct2 = fctLesion?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.SecondFCT).FirstOrDefault();
|
||||
|
||||
//if (findFct2 != null)
|
||||
//{
|
||||
// var oct = CreatOCT(task, pNo);
|
||||
|
||||
// // 测量标识
|
||||
|
||||
// oct.TestID = $"{(task.ArmEnum == Arm.DoubleReadingArm1 ? "R1" : "R2")}_{pNo}_L_{pNoIndex}";
|
||||
|
||||
// // 测量参数名称
|
||||
|
||||
// oct.TESTCD = "FCTMV2";
|
||||
|
||||
// // 测量参数值
|
||||
// oct.ORRES = findFct2?.QuestionValue ?? 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);
|
||||
//}
|
||||
|
||||
//var findFct3 = fctLesion?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.ThirdFCT).FirstOrDefault();
|
||||
|
||||
//if (findFct3 != null)
|
||||
//{
|
||||
// var oct = CreatOCT(task, pNo);
|
||||
|
||||
// // 测量标识
|
||||
|
||||
// oct.TestID = $"{(task.ArmEnum == Arm.DoubleReadingArm1 ? "R1" : "R2")}_{pNo}_L_{pNoIndex}";
|
||||
|
||||
// // 测量参数名称
|
||||
|
||||
// oct.TESTCD = "FCTMV3";
|
||||
|
||||
// // 测量参数值
|
||||
// oct.ORRES = findFct3?.QuestionValue ?? string.Empty;
|
||||
|
||||
// // 测量值单位
|
||||
// oct.ORRESU = translateDataList["ValueUnit"].Where(t => t.Code.ToLower() == ((int?)findFct3.Unit)?.ToString().ToLower()).Select(t => isEn_Us ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||
|
||||
// octList.Add(oct);
|
||||
//}
|
||||
|
||||
|
||||
//var avgFct = fctLesion?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.AvgFCT).FirstOrDefault();
|
||||
|
||||
//if (avgFct != null)
|
||||
//{
|
||||
// var oct = CreatOCT(task, pNo);
|
||||
|
||||
// // 测量标识
|
||||
|
||||
// oct.TestID = $"{(task.ArmEnum == Arm.DoubleReadingArm1 ? "R1" : "R2")}_{pNo}_L_{pNoIndex}";
|
||||
|
||||
// // 测量参数名称
|
||||
|
||||
// oct.TESTCD = "AVGFCT";
|
||||
|
||||
// // 测量参数值
|
||||
// oct.ORRES = avgFct?.QuestionValue ?? string.Empty;
|
||||
|
||||
// // 测量值单位
|
||||
// oct.ORRESU = translateDataList["ValueUnit"].Where(t => t.Code.ToLower() == ((int?)avgFct.Unit)?.ToString().ToLower()).Select(t => isEn_Us ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||
|
||||
// octList.Add(oct);
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -632,7 +704,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;
|
||||
|
|
@ -651,13 +732,13 @@ public class IVUS_OCTExportService(IRepository<ReadingQuestionCriterionTrial> _r
|
|||
// 脂质角度最大值
|
||||
oct.LAMAX = findLession?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.MaxAvgLipidAngle).FirstOrDefault()?.QuestionValue ?? string.Empty;
|
||||
// 巨噬细胞浸润
|
||||
oct.MACRI = findLession?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.MacrophageInfiltration).FirstOrDefault()?.QuestionValue ?? string.Empty;
|
||||
oct.PLAMACRI = findLession?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.MacrophageInfiltration).FirstOrDefault()?.QuestionValue ?? string.Empty;
|
||||
// 巨噬细胞浸润角度
|
||||
oct.MIARC = findLession?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.MacrophageExtensionAngle).FirstOrDefault()?.QuestionValue ?? string.Empty;
|
||||
oct.PLAMIARC = findLession?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.MacrophageExtensionAngle).FirstOrDefault()?.QuestionValue ?? string.Empty;
|
||||
// 微通道
|
||||
oct.MC = findLession?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.Microchannels).FirstOrDefault()?.QuestionValue ?? string.Empty;
|
||||
oct.PLAMC = findLession?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.Microchannels).FirstOrDefault()?.QuestionValue ?? string.Empty;
|
||||
// 胆固醇结晶
|
||||
oct.CCS = findLession?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.CholesterolCrystallization).FirstOrDefault()?.QuestionValue ?? string.Empty;
|
||||
oct.PLACCS = findLession?.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.CholesterolCrystallization).FirstOrDefault()?.QuestionValue ?? string.Empty;
|
||||
|
||||
return oct;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -961,7 +961,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
Path = t.Path
|
||||
}).ToList(),
|
||||
|
||||
ReadingFileCount = u.FileCount,
|
||||
ReadingFileCount = u.NoneDicomFileList.Where(t => t.IsReading).Count(),
|
||||
|
||||
}).ToList();
|
||||
|
||||
|
|
@ -1013,7 +1013,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
ImageDate = ns.ImageDate,
|
||||
BodyPart = ns.BodyPart,
|
||||
BodyPartForEditOther = ns.BodyPartForEditOther,
|
||||
FileCount = ns.FileCount,
|
||||
|
||||
Modality = ns.Modality,
|
||||
StudyCode = ns.StudyCode,
|
||||
|
||||
|
|
@ -1027,7 +1027,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
Path = t.Path
|
||||
}).ToList(),
|
||||
|
||||
ReadingFileCount = ns.FileCount,
|
||||
FileCount = (inQuery.IsImageSegmentLabel == false ? ns.ImageLabelNoneDicomFileList : ns.NoneDicomFileList).Count(),
|
||||
ReadingFileCount = (inQuery.IsImageSegmentLabel == false ? ns.ImageLabelNoneDicomFileList : ns.NoneDicomFileList).Where(t => t.IsReading).Count(),
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -264,6 +264,35 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public int ThirdData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润测量
|
||||
/// </summary>
|
||||
public string MacrophageInfiltrationMeasurement { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润角度测量
|
||||
/// </summary>
|
||||
public string MacrophageInfiltrationAngle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 微通道测量
|
||||
/// </summary>
|
||||
public string MicrochannelMeasurement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 胆固醇结晶测量
|
||||
/// </summary>
|
||||
public string CholesterolCrystalMeasurement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 官腔面积测量
|
||||
/// </summary>
|
||||
public string LumenAreaMeasurement { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public decimal Avg { get {
|
||||
|
||||
return ( FirstData*1m + SecondData * 1m + ThirdData * 1m) / 3;
|
||||
|
|
@ -282,6 +311,27 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 值
|
||||
/// </summary>
|
||||
public decimal Data { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润测量
|
||||
/// </summary>
|
||||
public string MacrophageInfiltrationMeasurement { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润角度测量
|
||||
/// </summary>
|
||||
public decimal MacrophageInfiltrationAngle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 微通道测量
|
||||
/// </summary>
|
||||
public string MicrochannelMeasurement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 胆固醇结晶测量
|
||||
/// </summary>
|
||||
public string CholesterolCrystalMeasurement { get; set; }
|
||||
}
|
||||
|
||||
public class FileToDataTableDto
|
||||
|
|
|
|||
|
|
@ -526,6 +526,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
FirstData = int.Parse(dataTable.Rows[i]["B"].ToString()),
|
||||
SecondData = int.Parse(dataTable.Rows[i]["C"].ToString()),
|
||||
ThirdData = int.Parse(dataTable.Rows[i]["D"].ToString()),
|
||||
MacrophageInfiltrationMeasurement= dataTable.Rows[i]["E"].ToString()??string.Empty,
|
||||
MacrophageInfiltrationAngle = dataTable.Rows[i]["F"].ToString() ?? string.Empty,
|
||||
MicrochannelMeasurement = dataTable.Rows[i]["G"].ToString() ?? string.Empty,
|
||||
CholesterolCrystalMeasurement = dataTable.Rows[i]["H"].ToString() ?? string.Empty,
|
||||
LumenAreaMeasurement = dataTable.Rows[i]["I"].ToString() ?? string.Empty,
|
||||
});
|
||||
}
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
|
|
@ -542,6 +547,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
var maxnum = 0;
|
||||
|
||||
Dictionary<string, string> isPresent = new Dictionary<string, string>()
|
||||
{
|
||||
{ "有","1"},
|
||||
{ "无","0"},
|
||||
{ "Existence","1"},
|
||||
{ "Non-existence","0"},
|
||||
};
|
||||
|
||||
foreach (var item in measuredValueList)
|
||||
{
|
||||
|
|
@ -629,6 +641,75 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.AvgFCT).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
// 新加的5个问题
|
||||
// 巨噬细胞浸润测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = isPresent[item.MacrophageInfiltrationMeasurement.ToString()],
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
RowId = newRowId,
|
||||
RowIndex = maxnum,
|
||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.MacrophageInfiltrationMeasurement).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 巨噬细胞浸润角度测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = item.MacrophageInfiltrationAngle.ToString(),
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
RowId = newRowId,
|
||||
RowIndex = maxnum,
|
||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.MacrophageInfiltrationAngle).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 微通道测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = isPresent[item.MicrochannelMeasurement.ToString()],
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
RowId = newRowId,
|
||||
RowIndex = maxnum,
|
||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.MicrochannelMeasurement).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 胆固醇结晶测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = isPresent[item.CholesterolCrystalMeasurement.ToString()],
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
RowId = newRowId,
|
||||
RowIndex = maxnum,
|
||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.CholesterolCrystalMeasurement).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 官腔面积测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = item.LumenAreaMeasurement.ToString(),
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
RowId = newRowId,
|
||||
RowIndex = maxnum,
|
||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.LumenAreaMeasurement).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]);
|
||||
}
|
||||
|
||||
|
||||
// 添加其他问题答案
|
||||
foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
|
||||
|
|
@ -983,6 +1064,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
PlaqueNum = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.PlaqueNumber).Select(x => int.Parse(x.Answer)).FirstOrDefault(),
|
||||
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.IsNullOrEmptyReturn0()).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,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1087,6 +1172,60 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.AvgMinFCT).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 巨噬细胞浸润测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = oCTFCTInfos.Any(x => x.PlaqueNum == item&&x.MacrophageInfiltrationMeasurement.EqEnum(IsPresent.Existence))? IsPresent.Existence.GetEnumInt(): IsPresent.NonExistence.GetEnumInt(),
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = patchDataStatisticsInfo.Id,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.MacrophageInfiltration).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 巨噬细胞浸润角度测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = oCTFCTInfos.Where(x => x.PlaqueNum == item).Count() == 0 ? string.Empty : oCTFCTInfos.Where(x => x.PlaqueNum == item).Max(x=>x.MacrophageInfiltrationAngle).ToString(),
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = patchDataStatisticsInfo.Id,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.MacrophageExtensionAngle).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 微通道
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = oCTFCTInfos.Any(x => x.PlaqueNum == item && x.MicrochannelMeasurement.EqEnum(IsPresent.Existence)) ? IsPresent.Existence.GetEnumInt() : IsPresent.NonExistence.GetEnumInt(),
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = patchDataStatisticsInfo.Id,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.Microchannels).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 胆固醇结晶测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = oCTFCTInfos.Any(x => x.PlaqueNum == item && x.CholesterolCrystalMeasurement.EqEnum(IsPresent.Existence)) ? IsPresent.Existence.GetEnumInt() : IsPresent.NonExistence.GetEnumInt(),
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = patchDataStatisticsInfo.Id,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.CholesterolCrystallization).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
|
||||
|
||||
// 脂质角度平均值
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
|
|
@ -1113,7 +1252,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.MaxAvgLipidAngle).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 待定指标
|
||||
// 斑块类型
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = string.Empty,
|
||||
|
|
|
|||
|
|
@ -502,7 +502,24 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var studyList = new List<VisitStudyDTO>();
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).Select(t => new { t.TrialReadingCriterionId, t.TrialReadingCriterion.CriterionType, t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys, t.ReadingTaskState, TaskStudyCount = t.TaskStudyList.Count }).FirstNotNullAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).Select(t => new
|
||||
{
|
||||
t.TrialReadingCriterionId,
|
||||
t.TrialReadingCriterion.CriterionType,
|
||||
t.TrialReadingCriterion.IsImageFilter,
|
||||
t.TrialReadingCriterion.CriterionModalitys,
|
||||
t.ReadingTaskState,
|
||||
|
||||
//是否有了后处理的dicom检查
|
||||
IsHaveTaskStudy = t.TaskStudyList.Any(),
|
||||
//是否有了后处理的NoneDicom检查
|
||||
IsHaveTaskNoneDicomStudyFile = t.SourceSubjectVisit.NoneDicomStudyList.SelectMany(c => c.TaskNoneDicomFileList.Where(t => t.VisitTaskId == indto.VisitTaskId)).Any(),
|
||||
//是否有了标注的dicom检查
|
||||
IsMarkDicomStudy = t.SourceSubjectVisit.TaskStudyList.Any(),
|
||||
//是否有了标注的NoneDicom检查
|
||||
IsMarkNoneDicomStudy = t.SourceSubjectVisit.NoneDicomStudyList.SelectMany(c => c.ImageLabelNoneDicomFileList).Any()
|
||||
|
||||
}).FirstNotNullAsync();
|
||||
|
||||
|
||||
|
||||
|
|
@ -516,8 +533,22 @@ namespace IRaCIS.Core.Application.Services
|
|||
.WhereIf(taskInfo.IsImageFilter == true, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|"))
|
||||
.WhereIf(isManualGenerate, t => t.SubjectCriteriaEvaluationVisitStudyFilterList.Any(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.IsConfirmed && t.IsReading))
|
||||
//影像后处理 上传了新的影像 还要原始dsa
|
||||
.WhereIf(taskInfo.TaskStudyCount > 0 && (taskInfo.CriterionType == CriterionType.OCT || taskInfo.CriterionType == CriterionType.IVUS), t => t.ModalityForEdit == "XA" /*|| t.ModalityForEdit == "OCT"*/)
|
||||
.WhereIf(taskInfo.TaskStudyCount > 0 && (taskInfo.CriterionType != CriterionType.OCT && taskInfo.CriterionType != CriterionType.IVUS), t => false)
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy
|
||||
&& (taskInfo.CriterionType == CriterionType.OCT || taskInfo.CriterionType == CriterionType.IVUS),
|
||||
t => t.ModalityForEdit == "XA")
|
||||
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy == false && taskInfo.IsMarkDicomStudy && taskInfo.CriterionType == CriterionType.IVUS,
|
||||
t => t.ModalityForEdit == "XA" )
|
||||
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy == false && taskInfo.IsMarkDicomStudy && taskInfo.CriterionType == CriterionType.OCT,
|
||||
t => t.ModalityForEdit == "XA" || t.ModalityForEdit == "OCT")
|
||||
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy == false && taskInfo.IsMarkDicomStudy == false
|
||||
&& (taskInfo.CriterionType == CriterionType.OCT || taskInfo.CriterionType == CriterionType.IVUS),
|
||||
t => t.ModalityForEdit == "XA" || t.ModalityForEdit == "OCT" || t.ModalityForEdit == "IVUS")
|
||||
|
||||
//其他 不应该看原始影像
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy && (taskInfo.CriterionType != CriterionType.OCT && taskInfo.CriterionType != CriterionType.IVUS), t => false)
|
||||
.Select(k => new VisitStudyDTO()
|
||||
{
|
||||
InstanceCount = k.InstanceCount,
|
||||
|
|
@ -580,10 +611,12 @@ namespace IRaCIS.Core.Application.Services
|
|||
}
|
||||
|
||||
//影像后处理 上传了新的影像
|
||||
if (taskInfo.TaskStudyCount > 0)
|
||||
if (taskInfo.IsHaveTaskStudy || taskInfo.IsMarkDicomStudy || taskInfo.IsMarkNoneDicomStudy)
|
||||
{
|
||||
|
||||
var taskStudyList = await _taskStudyRepository.Where(t => t.TrialId == indto.TrialId && t.VisitTaskId == indto.VisitTaskId)
|
||||
var taskStudyList = await _taskStudyRepository.Where(t => t.TrialId == indto.TrialId)
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy, t => t.VisitTaskId == indto.VisitTaskId)
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy == false && (taskInfo.IsMarkDicomStudy || taskInfo.IsMarkNoneDicomStudy), t => t.SubjectVisitId == indto.SujectVisitId)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|"))
|
||||
.ProjectTo<VisitStudyDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
|
@ -743,7 +776,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var noDicomList = await _noneDicomStudyRepository.Where(x => x.TrialId == indto.TrialId && x.SubjectVisitId == indto.SujectVisitId && x.NoneDicomFileList.Any(t => !t.FileType.Contains(StaticData.FileType.Zip)))
|
||||
.Where(t => t.IsReading)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => taskInfo.CriterionModalitys.Contains(t.Modality)).ToListAsync();
|
||||
.WhereIf(taskInfo.IsImageFilter, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.Modality + "|"))
|
||||
.ToListAsync();
|
||||
|
||||
|
||||
List<VisitStudyDTO> noDicomStudyList = noDicomList.Select(x => new VisitStudyDTO()
|
||||
|
|
@ -761,15 +795,17 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
}).ToList();
|
||||
|
||||
var isExistTaskNoneDicomFile = _noneDicomStudyFileRepository.Any(t => t.VisitTaskId == indto.VisitTaskId);
|
||||
//var isExistTaskNoneDicomFile = _noneDicomStudyFileRepository.Any(t => t.VisitTaskId == indto.VisitTaskId);
|
||||
|
||||
foreach (var item in noDicomStudyList)
|
||||
{
|
||||
var nodicom = noDicomList.Where(x => x.Id == item.StudyId).First();
|
||||
|
||||
var instanceCount = await _noneDicomStudyFileRepository.Where(t => t.IsReading)
|
||||
.WhereIf(isExistTaskNoneDicomFile, x => x.OriginNoneDicomStudyId == item.StudyId)
|
||||
.WhereIf(isExistTaskNoneDicomFile == false, x => x.NoneDicomStudyId == item.StudyId).CountAsync();
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile == false && taskInfo.IsMarkNoneDicomStudy == true, x => x.ImageLabelNoneDicomStudyId == item.StudyId)
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile && taskInfo.IsMarkNoneDicomStudy, x => x.OriginNoneDicomStudyId == item.StudyId)
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile == false && taskInfo.IsMarkNoneDicomStudy == false, x => x.NoneDicomStudyId == item.StudyId)
|
||||
.CountAsync();
|
||||
|
||||
if (instanceCount == 0)
|
||||
{
|
||||
|
|
@ -790,8 +826,10 @@ namespace IRaCIS.Core.Application.Services
|
|||
SubjectVisitId=nodicom.SubjectVisitId,
|
||||
SubjectId=nodicom.SubjectId,
|
||||
SeriesNumber=1,
|
||||
NoneDicomFileFirstFile=await _noneDicomStudyFileRepository.WhereIf(isExistTaskNoneDicomFile,x=>x.OriginNoneDicomStudyId== item.StudyId)
|
||||
.WhereIf(isExistTaskNoneDicomFile==false, x=>x.NoneDicomStudyId == item.StudyId)
|
||||
NoneDicomFileFirstFile=await _noneDicomStudyFileRepository
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile == false && taskInfo.IsMarkNoneDicomStudy == true, x => x.ImageLabelNoneDicomStudyId == item.StudyId)
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile && taskInfo.IsMarkNoneDicomStudy, x => x.OriginNoneDicomStudyId == item.StudyId)
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile == false && taskInfo.IsMarkNoneDicomStudy == false, x => x.NoneDicomStudyId == item.StudyId)
|
||||
.Where(x=> !x.FileType.Contains(StaticData.FileType.Zip)).Select(x=>x.Path).FirstOrDefaultAsync(),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ namespace IRaCIS.Core.Domain.Share
|
|||
/// </summary>
|
||||
public enum ClinicalTableQuestionMark
|
||||
{
|
||||
Test=1,
|
||||
Test = 1,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -525,7 +525,7 @@ namespace IRaCIS.Core.Domain.Share
|
|||
//阅片期一致率
|
||||
ReadingPeriodJudgeRatio_Export = 18,
|
||||
|
||||
TumorCDISC_Export=20,
|
||||
TumorCDISC_Export = 20,
|
||||
|
||||
IVUS_CDISC_Export = 21,
|
||||
|
||||
|
|
@ -674,7 +674,7 @@ namespace IRaCIS.Core.Domain.Share
|
|||
/// <summary>
|
||||
/// 分组
|
||||
/// </summary>
|
||||
Group=0,
|
||||
Group = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 问题
|
||||
|
|
@ -907,7 +907,7 @@ namespace IRaCIS.Core.Domain.Share
|
|||
/// <summary>
|
||||
/// 融合过 再之前任务融合了
|
||||
/// </summary>
|
||||
Merged=3,
|
||||
Merged = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 融合主病灶
|
||||
|
|
@ -1038,17 +1038,17 @@ namespace IRaCIS.Core.Domain.Share
|
|||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
Exist=1,
|
||||
Exist = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 疑似
|
||||
/// </summary>
|
||||
Equivocal=2,
|
||||
Equivocal = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 消失
|
||||
/// </summary>
|
||||
Loss =3,
|
||||
Loss = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 无法评估
|
||||
|
|
@ -1286,45 +1286,45 @@ namespace IRaCIS.Core.Domain.Share
|
|||
/// <summary>
|
||||
/// NA
|
||||
/// </summary>
|
||||
NA=-1,
|
||||
NA = -1,
|
||||
|
||||
/// <summary>
|
||||
/// CMR
|
||||
/// </summary>
|
||||
CMR=1,
|
||||
CMR = 1,
|
||||
|
||||
/// <summary>
|
||||
/// PMR
|
||||
/// </summary>
|
||||
PMR=2,
|
||||
PMR = 2,
|
||||
|
||||
/// <summary>
|
||||
/// NMR
|
||||
/// </summary>
|
||||
NMR=3,
|
||||
NMR = 3,
|
||||
|
||||
/// <summary>
|
||||
/// PMD
|
||||
/// </summary>
|
||||
PMD=4,
|
||||
PMD = 4,
|
||||
|
||||
/// <summary>
|
||||
/// NE
|
||||
/// </summary>
|
||||
NE=5,
|
||||
NE = 5,
|
||||
|
||||
/// <summary>
|
||||
/// ND
|
||||
/// </summary>
|
||||
ND=6,
|
||||
ND = 6,
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 与基线相比摄取值变化
|
||||
/// </summary>
|
||||
public enum SUVChangeVSBaseline
|
||||
/// <summary>
|
||||
/// 与基线相比摄取值变化
|
||||
/// </summary>
|
||||
public enum SUVChangeVSBaseline
|
||||
{
|
||||
/// <summary>
|
||||
/// 增大
|
||||
|
|
@ -1346,7 +1346,7 @@ public enum SUVChangeVSBaseline
|
|||
/// </summary>
|
||||
NotEvaluable = 4,
|
||||
|
||||
NA=5,
|
||||
NA = 5,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -1605,15 +1605,15 @@ public enum SUVChangeVSBaseline
|
|||
/// </summary>
|
||||
ND = 5,
|
||||
|
||||
iCR=6,
|
||||
iCR = 6,
|
||||
|
||||
iPR=7,
|
||||
iPR = 7,
|
||||
|
||||
iSD=8,
|
||||
iSD = 8,
|
||||
|
||||
iUPD=9,
|
||||
iUPD = 9,
|
||||
|
||||
iCPD=10,
|
||||
iCPD = 10,
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1828,7 +1828,7 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 不显示
|
||||
/// </summary>
|
||||
NotShow =3,
|
||||
NotShow = 3,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1940,7 +1940,7 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 基线病灶
|
||||
/// </summary>
|
||||
BaselineLesions=4,
|
||||
BaselineLesions = 4,
|
||||
|
||||
/// <summary>
|
||||
/// 新靶病灶
|
||||
|
|
@ -1980,7 +1980,7 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 脂质角度
|
||||
/// </summary>
|
||||
LipidAngle =111,
|
||||
LipidAngle = 111,
|
||||
|
||||
/// <summary>
|
||||
/// FCT
|
||||
|
|
@ -2051,7 +2051,7 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 检查
|
||||
/// </summary>
|
||||
Study=4,
|
||||
Study = 4,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -2089,22 +2089,22 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
Exist=1,
|
||||
Exist = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 消失
|
||||
/// </summary>
|
||||
Loss=2,
|
||||
Loss = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 无法评估
|
||||
/// </summary>
|
||||
NotEvaluable=3,
|
||||
NotEvaluable = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 太小
|
||||
/// </summary>
|
||||
TooSmall=4,
|
||||
TooSmall = 4,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -2204,7 +2204,7 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 病灶数量
|
||||
/// </summary>
|
||||
LesionNumber =11,
|
||||
LesionNumber = 11,
|
||||
|
||||
/// <summary>
|
||||
/// PPD
|
||||
|
|
@ -2330,7 +2330,7 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 平均最小FCT
|
||||
/// </summary>
|
||||
AvgMinFCT=1018,
|
||||
AvgMinFCT = 1018,
|
||||
|
||||
/// <summary>
|
||||
/// 脂质角度平均值
|
||||
|
|
@ -2348,25 +2348,50 @@ public enum SUVChangeVSBaseline
|
|||
Undetermined = 1021,
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润
|
||||
/// 巨噬细胞浸润汇总
|
||||
/// </summary>
|
||||
MacrophageInfiltration = 1022,
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞延伸角度
|
||||
/// 巨噬细胞延伸角度汇总
|
||||
/// </summary>
|
||||
MacrophageExtensionAngle = 1023,
|
||||
|
||||
/// <summary>
|
||||
/// 微通道
|
||||
/// 微通道汇总
|
||||
/// </summary>
|
||||
Microchannels = 1024,
|
||||
|
||||
/// <summary>
|
||||
/// 胆固醇结晶
|
||||
/// 胆固醇结晶汇总
|
||||
/// </summary>
|
||||
CholesterolCrystallization = 1025,
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润测量
|
||||
/// </summary>
|
||||
MacrophageInfiltrationMeasurement = 1026,
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润角度测量
|
||||
/// </summary>
|
||||
MacrophageInfiltrationAngle = 1027,
|
||||
|
||||
/// <summary>
|
||||
/// 微通道测量
|
||||
/// </summary>
|
||||
MicrochannelMeasurement = 1028,
|
||||
|
||||
/// <summary>
|
||||
/// 胆固醇结晶测量
|
||||
/// </summary>
|
||||
CholesterolCrystalMeasurement = 1029,
|
||||
|
||||
/// <summary>
|
||||
/// 官腔面积测量
|
||||
/// </summary>
|
||||
LumenAreaMeasurement = 1030,
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -2401,6 +2426,22 @@ public enum SUVChangeVSBaseline
|
|||
liverSegmentation = 1106,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 有(1)、无(0)
|
||||
/// </summary>
|
||||
public enum IsPresent
|
||||
{
|
||||
/// <summary>
|
||||
/// 无
|
||||
/// </summary>
|
||||
NonExistence = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 有
|
||||
/// </summary>
|
||||
Existence = 1,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 脂肪肝分级
|
||||
|
|
@ -2415,22 +2456,22 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 0级
|
||||
/// </summary>
|
||||
Level0=1,
|
||||
Level0 = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 1级
|
||||
/// </summary>
|
||||
Level1=2,
|
||||
Level1 = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 2级
|
||||
/// </summary>
|
||||
Level2=3,
|
||||
Level2 = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 3级
|
||||
/// </summary>
|
||||
Level3=4,
|
||||
Level3 = 4,
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -2448,7 +2489,7 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 扫描断层丢失
|
||||
/// </summary>
|
||||
MissingScanSlice=2,
|
||||
MissingScanSlice = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 存在运动伪影
|
||||
|
|
@ -2463,7 +2504,7 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 其它(需要备注)
|
||||
/// </summary>
|
||||
OtherIssuesCommentsRequired=5,
|
||||
OtherIssuesCommentsRequired = 5,
|
||||
|
||||
/// <summary>
|
||||
/// PET-CT影像无法融合
|
||||
|
|
@ -2581,7 +2622,7 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 疗效评估分组
|
||||
/// </summary>
|
||||
TherapeuticEffectEvaluationGroup=20,
|
||||
TherapeuticEffectEvaluationGroup = 20,
|
||||
|
||||
/// <summary>
|
||||
/// 访视点肿瘤评估
|
||||
|
|
@ -2696,12 +2737,12 @@ public enum SUVChangeVSBaseline
|
|||
/// <summary>
|
||||
/// 是否脑转移
|
||||
/// </summary>
|
||||
IsBrainMetastasis =43,
|
||||
IsBrainMetastasis = 43,
|
||||
|
||||
/// <summary>
|
||||
/// 影像质量评估
|
||||
/// </summary>
|
||||
ImageQualityAssessment=44,
|
||||
ImageQualityAssessment = 44,
|
||||
|
||||
/// <summary>
|
||||
/// Forrest出血部位
|
||||
|
|
@ -2823,6 +2864,26 @@ public enum SUVChangeVSBaseline
|
|||
/// </summary>
|
||||
Plaque3MinFCT = 1008,
|
||||
|
||||
/// <summary>
|
||||
/// 靶段
|
||||
/// </summary>
|
||||
TargetSegment = 1009,
|
||||
|
||||
/// <summary>
|
||||
/// 回撤中的图像帧数
|
||||
/// </summary>
|
||||
PullbackFrameCount = 1010,
|
||||
|
||||
/// <summary>
|
||||
/// 分析图像帧数
|
||||
/// </summary>
|
||||
AnalysisFrameCount = 1011,
|
||||
|
||||
/// <summary>
|
||||
/// 靶段 备注
|
||||
/// </summary>
|
||||
TargetSegmentRemarks = 1012,
|
||||
|
||||
/// <summary>
|
||||
/// 脂肪分数总平均值
|
||||
/// </summary>
|
||||
|
|
@ -2836,10 +2897,10 @@ public enum SUVChangeVSBaseline
|
|||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PET 5PS 评分
|
||||
/// </summary>
|
||||
public enum PET5PSScore
|
||||
/// <summary>
|
||||
/// PET 5PS 评分
|
||||
/// </summary>
|
||||
public enum PET5PSScore
|
||||
{
|
||||
/// <summary>
|
||||
/// 5分
|
||||
|
|
@ -2956,7 +3017,7 @@ public enum PET5PSScore
|
|||
/// <summary>
|
||||
/// 测量值
|
||||
/// </summary>
|
||||
MeasuredValue =8,
|
||||
MeasuredValue = 8,
|
||||
|
||||
/// <summary>
|
||||
/// 斑块数据统计
|
||||
|
|
@ -2976,7 +3037,7 @@ public enum PET5PSScore
|
|||
/// <summary>
|
||||
/// 保存eCRF
|
||||
/// </summary>
|
||||
SaveEICRFQuestions=12,
|
||||
SaveEICRFQuestions = 12,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
var entity = item.Entity as ReadingImportFile;
|
||||
|
||||
|
||||
var visitTaskInfo = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).Include(x=>x.DoctorUser).FirstOrDefaultAsync();
|
||||
var visitTaskInfo = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).Include(x => x.DoctorUser).FirstOrDefaultAsync();
|
||||
|
||||
await InsertInspection<ReadingImportFile>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
|
|
@ -2533,20 +2533,35 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
var extraIdentification = string.Empty;
|
||||
|
||||
Arm armEnum = Arm.SingleReadingArm;
|
||||
|
||||
Guid? subjectVisitId = null;
|
||||
|
||||
Arm? armEnum = Arm.SingleReadingArm;
|
||||
if (entity.VisitTaskId != null)
|
||||
{
|
||||
extraIdentification = "/VisitTask";
|
||||
armEnum = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).Select(x => x.ArmEnum).FirstOrDefaultAsync();
|
||||
var obj = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).Select(x => new { x.ArmEnum, x.SourceSubjectVisitId }).FirstOrDefaultAsync();
|
||||
armEnum = obj?.ArmEnum;
|
||||
subjectVisitId = obj.SourceSubjectVisitId;
|
||||
}
|
||||
else if (entity.ImageLabelNoneDicomStudyId != null)
|
||||
{
|
||||
//默认R0
|
||||
extraIdentification = "/VisitTask";
|
||||
|
||||
//var noneDicomStudy = await _dbContext.NoneDicomStudy.FindAsync(entity.NoneDicomStudyId);
|
||||
subjectVisitId = await _dbContext.NoneDicomStudy.Where(x => x.Id == entity.ImageLabelNoneDicomStudyId).Select(t => t.SubjectVisitId).FirstOrDefaultAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
subjectVisitId = (await _dbContext.NoneDicomStudy.FindAsync(entity.NoneDicomStudyId))?.SubjectVisitId;
|
||||
}
|
||||
|
||||
await InsertInspection<NoneDicomStudyFile>(item.Entity as NoneDicomStudyFile, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
//SubjectVisitId = noneDicomStudy.SubjectVisitId,
|
||||
SubjectVisitId = subjectVisitId,
|
||||
//SubjectId = noneDicomStudy.SubjectId,
|
||||
ObjectRelationParentId = x.VisitTaskId,
|
||||
VisitTaskId= x.VisitTaskId,
|
||||
ObjectRelationParentId = subjectVisitId,
|
||||
ObjectRelationParentId2 = x.NoneDicomStudyId,
|
||||
ObjectRelationParentId3 = x.OriginNoneDicomStudyId,
|
||||
ExtraIndentification = extraIdentification
|
||||
|
|
@ -3696,7 +3711,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
string questionName = string.Empty;
|
||||
string questionAnswer = string.Empty;
|
||||
if (thisQuestinonAnswer != null&& question!=null)
|
||||
if (thisQuestinonAnswer != null && question != null)
|
||||
{
|
||||
questionName = _userInfo.IsEn_Us ? question.QuestionEnName : question.QuestionName;
|
||||
questionAnswer = Translationunit(question.Type, question.Unit, question.CustomUnit, unitDataList, thisQuestinonAnswer.Answer);
|
||||
|
|
@ -3857,7 +3872,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
entity.OrderMark = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).Select(x => x.OrderMark).FirstOrDefaultAsync();
|
||||
|
||||
entity.RowMark = entity.OrderMark+ entity.RowIndex.GetLesionMark();
|
||||
entity.RowMark = entity.OrderMark + entity.RowIndex.GetLesionMark();
|
||||
|
||||
|
||||
string extraIdentification = string.Empty;
|
||||
|
|
|
|||
|
|
@ -76,11 +76,12 @@ namespace IRaCIS.Core.Infrastructure.Extention
|
|||
|
||||
foreach (PropertyInfo property in properties)
|
||||
{
|
||||
if (typeof(IEnumerable).IsAssignableFrom(property.PropertyType)
|
||||
&& property.PropertyType != typeof(string))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//质控导出需要集合
|
||||
// if (typeof(IEnumerable).IsAssignableFrom(property.PropertyType)
|
||||
//&& property.PropertyType != typeof(string))
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
string propertyName = property.Name;
|
||||
object propertyValue = property.GetValue(obj);
|
||||
|
|
|
|||
Loading…
Reference in New Issue