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
3ef3586bf7
|
|
@ -100,11 +100,11 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
var dicomFile = new DicomFile(dataset);
|
var dicomFile = new DicomFile(dataset);
|
||||||
|
|
||||||
// 文件名递增格式:IM_00001, IM_00002, ...
|
// 文件名递增格式:IM_00001, IM_00002, ...
|
||||||
string filename = $@"IMAGE/IM_{index:D5}"; // :D5 表示补足5位
|
string filename = $@"IMAGE\IM_{index:D5}"; // :D5 表示补足5位
|
||||||
|
|
||||||
mappings.Add($"{filename} => {item.InstanceId}");
|
mappings.Add($"{filename} => {item.InstanceId}");
|
||||||
|
|
||||||
dic.Add(item.InstanceId.ToString(), Path.GetFileName(filename));
|
dic.Add(item.InstanceId.ToString(), filename.TrimEnd('/', '\\').Split('/', '\\').Last());
|
||||||
|
|
||||||
dicomDir.AddFile(dicomFile, filename);
|
dicomDir.AddFile(dicomFile, filename);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1137,6 +1137,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
var dirDic = new Dictionary<string, string>();
|
var dirDic = new Dictionary<string, string>();
|
||||||
#region DIR处理导出文件名,并将对应关系上传到OSS里面存储
|
#region DIR处理导出文件名,并将对应关系上传到OSS里面存储
|
||||||
|
|
||||||
|
var info = await _subjectVisitRepository.Where(t => t.Id == inQuery.SubjectVisitId).Select(t => new { t.Trial.TrialCode }).FirstOrDefaultAsync();
|
||||||
|
|
||||||
//有传输语法值的导出 才生成DIR
|
//有传输语法值的导出 才生成DIR
|
||||||
if (_subjectVisitRepository.Where(t => t.Id == inQuery.SubjectVisitId).SelectMany(t => t.StudyList.SelectMany(t => t.InstanceList)).All(c => c.TransferSytaxUID != string.Empty))
|
if (_subjectVisitRepository.Where(t => t.Id == inQuery.SubjectVisitId).SelectMany(t => t.StudyList.SelectMany(t => t.InstanceList)).All(c => c.TransferSytaxUID != string.Empty))
|
||||||
{
|
{
|
||||||
|
|
@ -1148,7 +1150,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
|
|
||||||
DicomStudyId = t.DicomStudy.Id,
|
DicomStudyId = t.DicomStudy.Id,
|
||||||
|
|
||||||
PatientId = t.DicomStudy.PatientId,
|
PatientId = info.TrialCode + "-" + t.DicomStudy.PatientId,
|
||||||
PatientName = t.DicomStudy.PatientName,
|
PatientName = t.DicomStudy.PatientName,
|
||||||
PatientBirthDate = t.DicomStudy.PatientBirthDate,
|
PatientBirthDate = t.DicomStudy.PatientBirthDate,
|
||||||
PatientSex = t.DicomStudy.PatientSex,
|
PatientSex = t.DicomStudy.PatientSex,
|
||||||
|
|
@ -1508,7 +1510,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
public async Task<IResponseOutput> GetIRReadingDownloadStudyInfo(IRDownloadQuery inQuery)
|
public async Task<IResponseOutput> GetIRReadingDownloadStudyInfo(IRDownloadQuery inQuery)
|
||||||
{
|
{
|
||||||
var info = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId)
|
var info = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId)
|
||||||
.Select(t => new { t.IsImageFilter, t.CriterionModalitys, t.TrialId, t.IsReadingTaskViewInOrder }).FirstNotNullAsync();
|
.Select(t => new { t.IsImageFilter, t.CriterionModalitys, t.TrialId, t.IsReadingTaskViewInOrder, t.Trial.TrialCode }).FirstNotNullAsync();
|
||||||
|
|
||||||
var isQueryDicom = inQuery.DicomStudyIdList.Count > 0;
|
var isQueryDicom = inQuery.DicomStudyIdList.Count > 0;
|
||||||
var isQueryNoneDicom = inQuery.NoneDicomStudyIdList.Count > 0;
|
var isQueryNoneDicom = inQuery.NoneDicomStudyIdList.Count > 0;
|
||||||
|
|
@ -1539,7 +1541,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
|
|
||||||
DicomStudyId = t.DicomStudy.Id,
|
DicomStudyId = t.DicomStudy.Id,
|
||||||
|
|
||||||
PatientId = t.DicomStudy.PatientId,
|
PatientId = info.TrialCode + "-" + t.DicomStudy.PatientId,
|
||||||
PatientName = t.DicomStudy.PatientName,
|
PatientName = t.DicomStudy.PatientName,
|
||||||
PatientBirthDate = t.DicomStudy.PatientBirthDate,
|
PatientBirthDate = t.DicomStudy.PatientBirthDate,
|
||||||
PatientSex = t.DicomStudy.PatientSex,
|
PatientSex = t.DicomStudy.PatientSex,
|
||||||
|
|
@ -1579,7 +1581,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
|
|
||||||
DicomStudyId = t.TaskStudy.Id,
|
DicomStudyId = t.TaskStudy.Id,
|
||||||
|
|
||||||
PatientId = t.TaskStudy.PatientId,
|
PatientId = info.TrialCode + "-" + t.TaskStudy.PatientId,
|
||||||
PatientName = t.TaskStudy.PatientName,
|
PatientName = t.TaskStudy.PatientName,
|
||||||
PatientBirthDate = t.TaskStudy.PatientBirthDate,
|
PatientBirthDate = t.TaskStudy.PatientBirthDate,
|
||||||
PatientSex = t.TaskStudy.PatientSex,
|
PatientSex = t.TaskStudy.PatientSex,
|
||||||
|
|
@ -2248,7 +2250,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
#region 在下载前先处理DIR文件
|
#region 在下载前先处理DIR文件
|
||||||
|
|
||||||
//有传输语法值的导出 才生成DIR
|
//有传输语法值的导出 才生成DIR
|
||||||
|
|
@ -2263,7 +2264,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
|
|
||||||
DicomStudyId = t.DicomStudy.Id,
|
DicomStudyId = t.DicomStudy.Id,
|
||||||
|
|
||||||
PatientId = t.DicomStudy.PatientId,
|
PatientId = t.Trial.TrialCode + "-" + t.DicomStudy.PatientId,
|
||||||
PatientName = t.DicomStudy.PatientName,
|
PatientName = t.DicomStudy.PatientName,
|
||||||
PatientBirthDate = t.DicomStudy.PatientBirthDate,
|
PatientBirthDate = t.DicomStudy.PatientBirthDate,
|
||||||
PatientSex = t.DicomStudy.PatientSex,
|
PatientSex = t.DicomStudy.PatientSex,
|
||||||
|
|
|
||||||
|
|
@ -3780,7 +3780,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
task.ReadingVersionEnum = criterionInfo.ReadingVersionEnum;
|
task.ReadingVersionEnum = criterionInfo.ReadingVersionEnum;
|
||||||
task.ReadingToolList = criterionInfo.ReadingToolList;
|
task.ReadingToolList = criterionInfo.ReadingToolList;
|
||||||
task.IsExistUnprocessedFeedback = await _userFeedBackRepository.AnyAsync(x => x.VisitTaskId == task.VisitTaskId && x.State == 0);
|
task.IsExistUnprocessedFeedback = await _userFeedBackRepository.AnyAsync(x => x.VisitTaskId == task.VisitTaskId && x.State == 0);
|
||||||
task.IsViewStudyPart = visitTaskInfo.ReadingCategory != ReadingCategory.Judge && visitTaskInfo.IsViewStudyPart;
|
task.IsViewStudyPart = visitTaskInfo.IsViewStudyPart;
|
||||||
task.IsReadKeyFile = await _criterionKeyFileReadRepository.AnyAsync(x => x.IdentityUserId == _userInfo.IdentityUserId && x.TrialCriterionId == task.TrialReadingCriterionId);
|
task.IsReadKeyFile = await _criterionKeyFileReadRepository.AnyAsync(x => x.IdentityUserId == _userInfo.IdentityUserId && x.TrialCriterionId == task.TrialReadingCriterionId);
|
||||||
task.IsHaveKeyFile = await _trialCriterionKeyFileRepository.AnyAsync(x => x.TrialCriterionId == task.TrialReadingCriterionId);
|
task.IsHaveKeyFile = await _trialCriterionKeyFileRepository.AnyAsync(x => x.TrialCriterionId == task.TrialReadingCriterionId);
|
||||||
// 添加默认答案
|
// 添加默认答案
|
||||||
|
|
|
||||||
|
|
@ -462,7 +462,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
};
|
};
|
||||||
|
|
||||||
List<IVUSMeasuredValue> measuredValueList = new List<IVUSMeasuredValue>();
|
List<IVUSMeasuredValue> measuredValueList = new List<IVUSMeasuredValue>();
|
||||||
|
var errorRow = new List<int> { };
|
||||||
|
|
||||||
for (int i = 3; i < dataTable.Rows.Count; i++)
|
for (int i = 3; i < dataTable.Rows.Count; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -479,7 +479,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
||||||
throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]);
|
errorRow.Add(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iVUSMeasuredValue.Emm <= iVUSMeasuredValue.Lumen)
|
if (iVUSMeasuredValue.Emm <= iVUSMeasuredValue.Lumen)
|
||||||
|
|
@ -488,6 +488,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
}
|
}
|
||||||
measuredValueList.Add(iVUSMeasuredValue);
|
measuredValueList.Add(iVUSMeasuredValue);
|
||||||
}
|
}
|
||||||
|
if (errorRow.Count() > 0)
|
||||||
|
{
|
||||||
|
var errorRows= string.Join(',', errorRow.Select(i => i.ToString()));
|
||||||
|
throw new BusinessValidationFailedException(_localizer["Service_TemplateException", errorRows]);
|
||||||
|
}
|
||||||
List<int> nums = new List<int>() { 1, 2, 3 };
|
List<int> nums = new List<int>() { 1, 2, 3 };
|
||||||
if (measuredValueList.Any(x => !nums.Contains(x.PlaqueNum)))
|
if (measuredValueList.Any(x => !nums.Contains(x.PlaqueNum)))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -316,10 +316,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
}
|
}
|
||||||
|
|
||||||
List<OCTFCTUploadData> measuredValueList = new List<OCTFCTUploadData>();
|
List<OCTFCTUploadData> measuredValueList = new List<OCTFCTUploadData>();
|
||||||
|
var errorRow = new List<int> { };
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
for (int i = 3; i < dataTable.Rows.Count; i++)
|
for (int i = 3; i < dataTable.Rows.Count; i++)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
measuredValueList.Add(new OCTFCTUploadData()
|
measuredValueList.Add(new OCTFCTUploadData()
|
||||||
{
|
{
|
||||||
|
|
@ -334,13 +335,21 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
LumenAreaMeasurement = dataTable.Rows[i]["I"].ToString() ?? string.Empty,
|
LumenAreaMeasurement = dataTable.Rows[i]["I"].ToString() ?? string.Empty,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
errorRow.Add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (Exception)
|
if (errorRow.Count() > 0)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]);
|
var errorRows = string.Join(',', errorRow.Select(i => i.ToString()));
|
||||||
|
throw new BusinessValidationFailedException(_localizer["Service_TemplateException", errorRows]);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<int> nums = new List<int>() { 1, 2, 3 };
|
List<int> nums = new List<int>() { 1, 2, 3 };
|
||||||
|
|
@ -631,10 +640,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
}
|
}
|
||||||
|
|
||||||
List<OCTFCTUploadData> measuredValueList = new List<OCTFCTUploadData>();
|
List<OCTFCTUploadData> measuredValueList = new List<OCTFCTUploadData>();
|
||||||
|
var errorRow = new List<int> { };
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
for (int i = 3; i < dataTable.Rows.Count; i++)
|
for (int i = 3; i < dataTable.Rows.Count; i++)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
measuredValueList.Add(new OCTFCTUploadData()
|
measuredValueList.Add(new OCTFCTUploadData()
|
||||||
{
|
{
|
||||||
|
|
@ -643,13 +653,20 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
errorRow.Add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||||
|
|
||||||
}
|
if (errorRow.Count() > 0)
|
||||||
catch (Exception)
|
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]);
|
var errorRows = string.Join(',', errorRow.Select(i => i.ToString()));
|
||||||
|
throw new BusinessValidationFailedException(_localizer["Service_TemplateException", errorRows]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ public class DicomInstance : BaseFullDeleteAuditEntity, IEntitySeqId
|
||||||
[ForeignKey("StudyId")]
|
[ForeignKey("StudyId")]
|
||||||
public DicomStudy DicomStudy { get; set; }
|
public DicomStudy DicomStudy { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("TrialId")]
|
||||||
|
public Trial Trial { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<ReadingTableAnswerRowInfo> ReadingTableAnswerRowInfoList { get; set; }
|
public List<ReadingTableAnswerRowInfo> ReadingTableAnswerRowInfoList { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ public class DicomStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
||||||
[ForeignKey("SubjectVisitId")]
|
[ForeignKey("SubjectVisitId")]
|
||||||
public SubjectVisit SubjectVisit { get; set; }
|
public SubjectVisit SubjectVisit { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<ReadingClinicalData> ReadingClinicalDataList { get; set; }
|
public List<ReadingClinicalData> ReadingClinicalDataList { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue