修改肿瘤CDISC 部位
parent
008906d245
commit
1b6ba91240
|
|
@ -2691,6 +2691,12 @@
|
||||||
<param name="inCommand"></param>
|
<param name="inCommand"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.GetTrialSubjectVisitMarkList(IRaCIS.Core.Application.Contracts.SubjectVisitMarkQuery)">
|
||||||
|
<summary>
|
||||||
|
获取受试者级别 访视标注列表
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.GetSubejectOrVisitZipInfo(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Application.Contracts.SubejctZipInfoQuery)">
|
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.GetSubejectOrVisitZipInfo(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Application.Contracts.SubejctZipInfoQuery)">
|
||||||
<summary>
|
<summary>
|
||||||
受试者级别所有的影像
|
受试者级别所有的影像
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ public class TumorCommonQustionInfo
|
||||||
public class TumorLessionInfo
|
public class TumorLessionInfo
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
public Guid? OrganInfoId { get; set; }
|
||||||
//病灶编号
|
//病灶编号
|
||||||
public string LessionCode { 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.Models;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
|
using MailKit;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Hosting;
|
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()
|
LesionList = t.LesionList.OrderBy(t => t.RowMark).Select(c => new TumorLessionInfo()
|
||||||
{
|
{
|
||||||
Id = c.Id,
|
Id = c.Id,
|
||||||
|
OrganInfoId=c.OrganInfoId,
|
||||||
LessionType = c.ReadingQuestionTrial.LesionType,
|
LessionType = c.ReadingQuestionTrial.LesionType,
|
||||||
LessionCode = c.RowMark,
|
LessionCode = c.RowMark,
|
||||||
SplitRowId = c.SplitRowId,
|
SplitRowId = c.SplitRowId,
|
||||||
|
|
@ -344,6 +346,7 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
|
||||||
public async Task<IActionResult> GetTumor_CDISC_Export(VisitTaskQuery inQuery,
|
public async Task<IActionResult> GetTumor_CDISC_Export(VisitTaskQuery inQuery,
|
||||||
[FromServices] IRepository<VisitTaskReReading> _visitTaskReReadingRepository,
|
[FromServices] IRepository<VisitTaskReReading> _visitTaskReReadingRepository,
|
||||||
[FromServices] IDictionaryService _dictionaryService,
|
[FromServices] IDictionaryService _dictionaryService,
|
||||||
|
[FromServices] IRepository<OrganTrialInfo> _trialOrganRepository,
|
||||||
[FromServices] IRepository<ReadingQuestionTrial> _trialReadingQuestionRepository,
|
[FromServices] IRepository<ReadingQuestionTrial> _trialReadingQuestionRepository,
|
||||||
[FromServices] IRepository<ReadingTableQuestionTrial> _trialReadingTableQuestionRepository,
|
[FromServices] IRepository<ReadingTableQuestionTrial> _trialReadingTableQuestionRepository,
|
||||||
[FromServices] IRepository<Trial> _trialRepository)
|
[FromServices] IRepository<Trial> _trialRepository)
|
||||||
|
|
@ -386,6 +389,11 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
|
||||||
.Union(new List<string>() { "ArmEnum", "ValueUnit", "GlobalAssessType", "ImageQualityIssues" })
|
.Union(new List<string>() { "ArmEnum", "ValueUnit", "GlobalAssessType", "ImageQualityIssues" })
|
||||||
.Distinct().ToArray();
|
.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);
|
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);
|
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);
|
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 ?? "";
|
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 != null)
|
||||||
{
|
//{
|
||||||
if (findBodyPart.TranslateDicName.IsNotNullOrEmpty())
|
// 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;
|
// 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
|
// else
|
||||||
{
|
// {
|
||||||
tu.BodyPart = findBodyPart.QuestionValue;
|
// tu.BodyPart = findBodyPart.QuestionValue;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
var findBodyPartDes = lesion.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.BodyPartDescription).FirstOrDefault();
|
var findBodyPartDes = lesion.LessionAnswerList.Where(t => t.QuestionMark == QuestionMark.BodyPartDescription).FirstOrDefault();
|
||||||
|
|
||||||
|
|
@ -1415,24 +1428,67 @@ public class Tumor_CDISC_ExportService(IRepository<ReadingQuestionCriterionTrial
|
||||||
{
|
{
|
||||||
trValueTypeIndex = 1;
|
trValueTypeIndex = 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 (lessionAnswer.QuestionMark == QuestionMark.ShortAxis && lesion.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.IsLymph && t.QuestionValue == "1"))
|
else if (lesion.LessionType == LesionType.NonTargetLesions || lesion.LessionType == LesionType.NewLesions)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//淋巴结取短径 并且短径有值
|
||||||
trValueTypeIndex = 0;
|
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)
|
||||||
//非淋巴结 并且长径有值
|
{
|
||||||
else if (lessionAnswer.QuestionMark == QuestionMark.MajorAxis
|
trValueTypeIndex = 0;
|
||||||
&& lesion.LessionAnswerList.Any(t => t.QuestionMark == QuestionMark.IsLymph && t.QuestionValue == "0")
|
}
|
||||||
&& lesion.LessionAnswerList.FirstOrDefault(t => t.QuestionMark == QuestionMark.MajorAxis)?.QuestionValue.IsNotNullOrEmpty() == true)
|
//非淋巴结取长径 并且长径有值
|
||||||
{
|
else if (lessionAnswer.QuestionMark == QuestionMark.MajorAxis
|
||||||
trValueTypeIndex = 0;
|
&& 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;
|
return trValueTypeIndex;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue