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
4ec0441d28
|
|
@ -31,6 +31,8 @@ public class TumorCommonQustionInfo
|
|||
public class TumorLessionInfo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid? OrganInfoId { get; set; }
|
||||
//病灶编号
|
||||
public string LessionCode { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ using IRaCIS.Core.Application.ViewModel;
|
|||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MailKit;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
|
@ -313,6 +314,7 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
|
|||
LesionList = t.LesionList.OrderBy(t => t.RowMark).Select(c => new TumorLessionInfo()
|
||||
{
|
||||
Id = c.Id,
|
||||
OrganInfoId=c.OrganInfoId,
|
||||
LessionType = c.ReadingQuestionTrial.LesionType,
|
||||
LessionCode = c.RowMark,
|
||||
SplitRowId = c.SplitRowId,
|
||||
|
|
@ -344,6 +346,7 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
|
|||
public async Task<IActionResult> GetTumor_CDISC_Export(VisitTaskQuery inQuery,
|
||||
[FromServices] IRepository<VisitTaskReReading> _visitTaskReReadingRepository,
|
||||
[FromServices] IDictionaryService _dictionaryService,
|
||||
[FromServices] IRepository<OrganTrialInfo> _trialOrganRepository,
|
||||
[FromServices] IRepository<ReadingQuestionTrial> _trialReadingQuestionRepository,
|
||||
[FromServices] IRepository<ReadingTableQuestionTrial> _trialReadingTableQuestionRepository,
|
||||
[FromServices] IRepository<Trial> _trialRepository)
|
||||
|
|
@ -386,6 +389,11 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
|
|||
.Union(new List<string>() { "ArmEnum", "ValueUnit", "GlobalAssessType", "ImageQualityIssues" })
|
||||
.Distinct().ToArray();
|
||||
|
||||
var trialOrganDic = _trialOrganRepository.Where(t => t.TrialCriterionId == criterion.Id).Select(t=>new {t.OrganInfoId,t.Part,t.PartEN}).ToDictionary(
|
||||
t => t.OrganInfoId,
|
||||
t => new { t.Part, t.PartEN }
|
||||
);
|
||||
|
||||
//翻译字典
|
||||
var translateDataList = await _dictionaryService.GetBasicDataSelect(dicNameList);
|
||||
|
||||
|
|
@ -512,6 +520,11 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
|
|||
|
||||
var tu = CreatNewTUExport(task, lesion, visitIndexNoDic, translateDataList, isEn_Us);
|
||||
|
||||
if (lesion.OrganInfoId.HasValue)
|
||||
{
|
||||
tu.BodyPart = _userInfo.IsEn_Us ? trialOrganDic[lesion.OrganInfoId.Value].PartEN : trialOrganDic[lesion.OrganInfoId.Value].Part;
|
||||
}
|
||||
|
||||
|
||||
Fill_Resisit_Lugano_TUExport(tu, lesion);
|
||||
|
||||
|
|
@ -980,19 +993,19 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
|
|||
tu.IdentificationMethod = lesion.DicomModality.IsNotNullOrEmpty() ? lesion.DicomModality! : lesion.NoneDicomModality ?? "";
|
||||
|
||||
|
||||
var findBodyPart = lesion.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.Part).FirstOrDefault();
|
||||
//var findBodyPart = lesion.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.Part).FirstOrDefault();
|
||||
|
||||
if (findBodyPart != null)
|
||||
{
|
||||
if (findBodyPart.TranslateDicName.IsNotNullOrEmpty())
|
||||
{
|
||||
tu.BodyPart = translateDataList[findBodyPart.TranslateDicName].Where(t => t.Code.ToLower() == findBodyPart.QuestionValue?.ToLower()).Select(t => isEn_Us ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
tu.BodyPart = findBodyPart.QuestionValue;
|
||||
}
|
||||
}
|
||||
//if (findBodyPart != null)
|
||||
//{
|
||||
// if (findBodyPart.TranslateDicName.IsNotNullOrEmpty())
|
||||
// {
|
||||
// tu.BodyPart = translateDataList[findBodyPart.TranslateDicName].Where(t => t.Code.ToLower() == findBodyPart.QuestionValue?.ToLower()).Select(t => isEn_Us ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// tu.BodyPart = findBodyPart.QuestionValue;
|
||||
// }
|
||||
//}
|
||||
|
||||
var findBodyPartDes = lesion.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.BodyPartDescription).FirstOrDefault();
|
||||
|
||||
|
|
@ -1415,23 +1428,66 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
|
|||
{
|
||||
trValueTypeIndex = 1;
|
||||
|
||||
|
||||
}
|
||||
//淋巴结取短径
|
||||
else if (lessionAnswer.QuestionMark == QuestionMark.ShortAxis && lesion.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.IsLymph && t.QuestionValue == "1"))
|
||||
|
||||
if (lesion.LessionType == LesionType.TargetLesion)
|
||||
{
|
||||
//淋巴 存在 无法评估 消失
|
||||
//短径 空 短径(长短径工具)、0mm(箭头工具)
|
||||
|
||||
if (lessionAnswer.QuestionMark == QuestionMark.ShortAxis
|
||||
&& lesion.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.IsLymph && t.QuestionValue == "1")
|
||||
)
|
||||
{
|
||||
|
||||
trValueTypeIndex = 0;
|
||||
}
|
||||
//非淋巴结 存在 无法评估 消失
|
||||
|
||||
// 长径 空 0mm
|
||||
|
||||
else if (lessionAnswer.QuestionMark == QuestionMark.MajorAxis
|
||||
&& lesion.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.IsLymph && t.QuestionValue == "0"))
|
||||
{
|
||||
trValueTypeIndex = 0;
|
||||
|
||||
}
|
||||
//非淋巴结 并且长径有值
|
||||
|
||||
if (lessionAnswer.QuestionMark == QuestionMark.MajorAxis || lessionAnswer.QuestionMark == QuestionMark.ShortAxis)
|
||||
{
|
||||
//处理消失 空为0mm
|
||||
if (lessionAnswer.QuestionValue.IsNullOrEmpty() && lesion.LessionAnswerList.FirstOrDefault(t => t.QuestionMark == QuestionMark.State)?.QuestionValue == "3")
|
||||
{
|
||||
|
||||
lessionAnswer.QuestionValue = "0";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
//有值 就展示,没值就不展示
|
||||
else if (lesion.LessionType == LesionType.NonTargetLesions || lesion.LessionType == LesionType.NewLesions)
|
||||
{
|
||||
|
||||
//淋巴结取短径 并且短径有值
|
||||
if (lessionAnswer.QuestionMark == QuestionMark.ShortAxis
|
||||
&& lesion.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.IsLymph && t.QuestionValue == "1")
|
||||
&& lesion.LessionAnswerList.FirstOrDefault(t => t.QuestionMark == QuestionMark.ShortAxis)?.QuestionValue.IsNotNullOrEmpty() == true)
|
||||
{
|
||||
trValueTypeIndex = 0;
|
||||
}
|
||||
//非淋巴结取长径 并且长径有值
|
||||
else if (lessionAnswer.QuestionMark == QuestionMark.MajorAxis
|
||||
&& lesion.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.IsLymph && t.QuestionValue == "0")
|
||||
&& lesion.LessionAnswerList.FirstOrDefault(t => t.QuestionMark == QuestionMark.MajorAxis)?.QuestionValue.IsNotNullOrEmpty() == true)
|
||||
{
|
||||
trValueTypeIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return trValueTypeIndex;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue