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);
|
||||
|
||||
// 文件名递增格式: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}");
|
||||
|
||||
dic.Add(item.InstanceId.ToString(), Path.GetFileName(filename));
|
||||
dic.Add(item.InstanceId.ToString(), filename.TrimEnd('/', '\\').Split('/', '\\').Last());
|
||||
|
||||
dicomDir.AddFile(dicomFile, filename);
|
||||
|
||||
|
|
|
|||
|
|
@ -1137,6 +1137,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
var dirDic = new Dictionary<string, string>();
|
||||
#region DIR处理导出文件名,并将对应关系上传到OSS里面存储
|
||||
|
||||
var info = await _subjectVisitRepository.Where(t => t.Id == inQuery.SubjectVisitId).Select(t => new { t.Trial.TrialCode }).FirstOrDefaultAsync();
|
||||
|
||||
//有传输语法值的导出 才生成DIR
|
||||
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,
|
||||
|
||||
PatientId = t.DicomStudy.PatientId,
|
||||
PatientId = info.TrialCode + "-" + t.DicomStudy.PatientId,
|
||||
PatientName = t.DicomStudy.PatientName,
|
||||
PatientBirthDate = t.DicomStudy.PatientBirthDate,
|
||||
PatientSex = t.DicomStudy.PatientSex,
|
||||
|
|
@ -1508,7 +1510,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
public async Task<IResponseOutput> GetIRReadingDownloadStudyInfo(IRDownloadQuery inQuery)
|
||||
{
|
||||
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 isQueryNoneDicom = inQuery.NoneDicomStudyIdList.Count > 0;
|
||||
|
|
@ -1539,7 +1541,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
DicomStudyId = t.DicomStudy.Id,
|
||||
|
||||
PatientId = t.DicomStudy.PatientId,
|
||||
PatientId = info.TrialCode + "-" + t.DicomStudy.PatientId,
|
||||
PatientName = t.DicomStudy.PatientName,
|
||||
PatientBirthDate = t.DicomStudy.PatientBirthDate,
|
||||
PatientSex = t.DicomStudy.PatientSex,
|
||||
|
|
@ -1579,7 +1581,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
DicomStudyId = t.TaskStudy.Id,
|
||||
|
||||
PatientId = t.TaskStudy.PatientId,
|
||||
PatientId = info.TrialCode + "-" + t.TaskStudy.PatientId,
|
||||
PatientName = t.TaskStudy.PatientName,
|
||||
PatientBirthDate = t.TaskStudy.PatientBirthDate,
|
||||
PatientSex = t.TaskStudy.PatientSex,
|
||||
|
|
@ -2248,7 +2250,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
#region 在下载前先处理DIR文件
|
||||
|
||||
//有传输语法值的导出 才生成DIR
|
||||
|
|
@ -2263,7 +2264,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
DicomStudyId = t.DicomStudy.Id,
|
||||
|
||||
PatientId = t.DicomStudy.PatientId,
|
||||
PatientId = t.Trial.TrialCode + "-" + t.DicomStudy.PatientId,
|
||||
PatientName = t.DicomStudy.PatientName,
|
||||
PatientBirthDate = t.DicomStudy.PatientBirthDate,
|
||||
PatientSex = t.DicomStudy.PatientSex,
|
||||
|
|
|
|||
|
|
@ -3780,7 +3780,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
task.ReadingVersionEnum = criterionInfo.ReadingVersionEnum;
|
||||
task.ReadingToolList = criterionInfo.ReadingToolList;
|
||||
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.IsHaveKeyFile = await _trialCriterionKeyFileRepository.AnyAsync(x => x.TrialCriterionId == task.TrialReadingCriterionId);
|
||||
// 添加默认答案
|
||||
|
|
|
|||
|
|
@ -462,38 +462,43 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
};
|
||||
|
||||
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++)
|
||||
{
|
||||
IVUSMeasuredValue iVUSMeasuredValue = new IVUSMeasuredValue() { };
|
||||
try
|
||||
{
|
||||
IVUSMeasuredValue iVUSMeasuredValue = new IVUSMeasuredValue() { };
|
||||
try
|
||||
{
|
||||
iVUSMeasuredValue = new IVUSMeasuredValue()
|
||||
{
|
||||
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||
Emm = getdecimalData(dataTable.Rows[i]["B"].ToString()),
|
||||
Lumen = getdecimalData(dataTable.Rows[i]["C"].ToString()),
|
||||
};
|
||||
}
|
||||
catch (Exception)
|
||||
iVUSMeasuredValue = new IVUSMeasuredValue()
|
||||
{
|
||||
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||
Emm = getdecimalData(dataTable.Rows[i]["B"].ToString()),
|
||||
Lumen = getdecimalData(dataTable.Rows[i]["C"].ToString()),
|
||||
};
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]);
|
||||
}
|
||||
|
||||
if (iVUSMeasuredValue.Emm <= iVUSMeasuredValue.Lumen)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_EmmBiggerThenLumen"]);
|
||||
}
|
||||
measuredValueList.Add(iVUSMeasuredValue);
|
||||
errorRow.Add(i);
|
||||
}
|
||||
List<int> nums=new List<int>() { 1,2,3};
|
||||
if(measuredValueList.Any(x=> !nums.Contains(x.PlaqueNum)))
|
||||
|
||||
if (iVUSMeasuredValue.Emm <= iVUSMeasuredValue.Lumen)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUSOCT_PlaqueNum123"]);
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_EmmBiggerThenLumen"]);
|
||||
}
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
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 };
|
||||
if (measuredValueList.Any(x => !nums.Contains(x.PlaqueNum)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUSOCT_PlaqueNum123"]);
|
||||
}
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
|
||||
|
||||
var questionInfo = await _readingQuestionTrialRepository.Where(x =>x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId&& x.LesionType == LesionType.MatchValues).FirstNotNullAsync();
|
||||
|
|
|
|||
|
|
@ -316,10 +316,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
}
|
||||
|
||||
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()
|
||||
{
|
||||
|
|
@ -327,20 +328,28 @@ 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,
|
||||
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();
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
errorRow.Add(i);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
|
||||
|
||||
|
||||
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 };
|
||||
|
|
@ -631,25 +640,33 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
}
|
||||
|
||||
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()
|
||||
{
|
||||
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||
FirstData = int.Parse(dataTable.Rows[i]["B"].ToString()),
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
errorRow.Add(i);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
|
||||
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]);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ public class DicomInstance : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
[ForeignKey("StudyId")]
|
||||
public DicomStudy DicomStudy { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("TrialId")]
|
||||
public Trial Trial { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<ReadingTableAnswerRowInfo> ReadingTableAnswerRowInfoList { get; set; }
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ public class DicomStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
[ForeignKey("SubjectVisitId")]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public List<ReadingClinicalData> ReadingClinicalDataList { get; set; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue