修改一致性分析规则

Uat_Study
{872297557@qq.com} 2022-12-26 16:01:48 +08:00
parent 80581584d3
commit 65d3a0ecd9
6 changed files with 96 additions and 29 deletions

View File

@ -149,8 +149,9 @@ namespace IRaCIS.Core.Application.Service
var blindSubjectCode = string.Empty; var blindSubjectCode = string.Empty;
var subjectTask = _visitTaskRepository.Where(t => t.SubjectId == subject.SubjectId && t.TrialReadingCriterionId==trialReadingCriterionId && t.IsSelfAnalysis == true).OrderByDescending(t => t.BlindSubjectCode).FirstOrDefault().IfNullThrowException(); var subjectTask = _visitTaskRepository.Where(t => t.SubjectId == subject.SubjectId && t.TrialReadingCriterionId==trialReadingCriterionId && t.IsSelfAnalysis == true).OrderByDescending(t => t.BlindSubjectCode).FirstOrDefault();
if (subjectTask.BlindSubjectCode != String.Empty)
if (subjectTask!=null && subjectTask.BlindSubjectCode != String.Empty)
{ {
blindSubjectCode = subjectTask.BlindSubjectCode; blindSubjectCode = subjectTask.BlindSubjectCode;
} }
@ -299,8 +300,8 @@ namespace IRaCIS.Core.Application.Service
var blindSubjectCode = string.Empty; var blindSubjectCode = string.Empty;
var subjectTask = _visitTaskRepository.Where(t => t.SubjectId == subject.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsSelfAnalysis==false).OrderByDescending(t => t.BlindSubjectCode).FirstOrDefault().IfNullThrowException(); var subjectTask = _visitTaskRepository.Where(t => t.SubjectId == subject.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsSelfAnalysis==false).OrderByDescending(t => t.BlindSubjectCode).FirstOrDefault();
if (subjectTask.BlindSubjectCode != String.Empty) if (subjectTask != null && subjectTask.BlindSubjectCode != String.Empty)
{ {
blindSubjectCode = subjectTask.BlindSubjectCode; blindSubjectCode = subjectTask.BlindSubjectCode;
} }

View File

@ -2,6 +2,7 @@
using IRaCIS.Core.Application.Helper; using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Domain.Share;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace IRaCIS.Core.Application.Contracts namespace IRaCIS.Core.Application.Contracts
@ -667,9 +668,16 @@ namespace IRaCIS.Core.Application.Contracts
} }
//RECIST1.1评估病灶明细表 //RECIST1.1评估病灶明细表
public class RECIST1Point1DetailedOfEvaluatedLesionExport : RECIST1Point1EvaluationOfTumorEfficacyExport public class RECIST1Point1DetailedOfEvaluatedLesionExport : RECIST1Point1EvaluationOfTumorEfficacyExport
{ {
//EF 查询 需要 最后转成导表需要的展开形式
[JsonIgnore]
public List<RECIST1Point1LessionInfo> LesionList = new List<RECIST1Point1LessionInfo>();
//病灶编号 //病灶编号
public string LessionCode { get; set; } public string LessionCode { get; set; }
@ -694,6 +702,45 @@ namespace IRaCIS.Core.Application.Contracts
public string MeasurementResult { get; set; } public string MeasurementResult { get; set; }
//长径
public string LongDiameter { get; set; }
//短径
public string ShortDiameter { get; set; }
//病灶状态
public string LessionState { get; set; }
}
public class RECIST1Point1LessionInfo
{
//病灶编号
public string LessionCode { get; set; }
//病灶类型
public string LessionType { get; set; }
//所在部位
public string LessionLocation { get; set; }
//所在器官
public string LessionOrgan { get; set; }
//是否淋巴结
public string IsLymph { get; set; }
//部位描述
public string BodyPartDescription { get; set; }
//测量值
public string MeasurementResult { get; set; }
//长径 //长径
public string LongDiameter { get; set; } public string LongDiameter { get; set; }

View File

@ -744,11 +744,33 @@ namespace IRaCIS.Core.Application.Image.QA
if (criterionType == CriterionType.RECIST1Pointt1) if (criterionType == CriterionType.RECIST1Pointt1)
{ {
var list = await query.ProjectTo<RECIST1Point1EvaluationOfTumorEfficacyExport>(_mapper.ConfigurationProvider, new { criterionType = criterionType }).ToListAsync(); var list = await query.ProjectTo<RECIST1Point1DetailedOfEvaluatedLesionExport>(_mapper.ConfigurationProvider, new { criterionType = criterionType }).ToListAsync();
var exportList = list.SelectMany(c =>
{
return c.LesionList.Select(u =>
{
var clone = c.Clone();
clone.LessionCode = u.LessionCode;
clone.LessionType = u.LessionType;
clone.LessionLocation = u.LessionLocation;
clone.LessionOrgan = u.LessionOrgan;
clone.IsLymph = u.IsLymph;
clone.BodyPartDescription = u.BodyPartDescription;
clone.MeasurementResult = u.MeasurementResult;
clone.LongDiameter = u.LongDiameter;
clone.ShortDiameter = u.ShortDiameter;
clone.LessionState = u.LessionState;
return clone;
});
});
exportInfo.List = list; exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialMedicalReviewList_Export, exportInfo, "", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1EvaluationOfTumorEfficacyExport), criterionType); return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialMedicalReviewList_Export, exportInfo, "", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1DetailedOfEvaluatedLesionExport), criterionType);
} }

View File

@ -1280,32 +1280,10 @@ namespace IRaCIS.Core.Application.Image.QA
} }
#region CRC 上传的基线数据签名 已移动
//var subjectVisit =await _subjectVisitRepository.Where(x => cRCRequestToQCCommand.SubjectVisitIds.Contains(x.Id) && x.IsBaseLine).Select(x => new
//{
// x.Id,
// x.IsBaseLine
//}).FirstOrDefaultAsync();
//if (subjectVisit != null)
//{
// await _readingClinicalDataRepository.BatchUpdateNoTrackingAsync(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == subjectVisit.Id, x => new ReadingClinicalData()
// {
// IsSign = true
// });
//}
#endregion
var success = await _repository.SaveChangesAsync(); var success = await _repository.SaveChangesAsync();
return ResponseOutput.Ok(success); return ResponseOutput.Ok(success);

View File

@ -159,6 +159,12 @@ namespace IRaCIS.Core.Application.Service
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)); .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName));
CreateMap<VisitTask, RECIST1Point1DetailedOfEvaluatedLesionExport>().IncludeBase<VisitTask, RECIST1Point1EvaluationOfTumorEfficacyExport>()
.ForMember(o => o.LesionList, t => t.MapFrom(u => u.LesionList)) ;
CreateMap<ReadingTableAnswerRowInfo, RECIST1Point1LessionInfo>();
//.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Subject.Code))
#endregion #endregion

View File

@ -226,10 +226,23 @@ namespace IRaCIS.Core.Domain.Models
public Trial Trial { get; set; } public Trial Trial { get; set; }
//影像质量 等等第一层级问题答案
[JsonIgnore] [JsonIgnore]
public List<ReadingTaskQuestionAnswer> ReadingTaskQuestionAnswerList { get; set; } = new List<ReadingTaskQuestionAnswer>(); public List<ReadingTaskQuestionAnswer> ReadingTaskQuestionAnswerList { get; set; } = new List<ReadingTaskQuestionAnswer>();
//病灶表
[JsonIgnore]
public List<ReadingTableAnswerRowInfo> LesionList { get; set; } = new List<ReadingTableAnswerRowInfo>();
//病灶答案表
[JsonIgnore]
public List<ReadingTableQuestionAnswer> LesionAnswerList { get; set; } = new List<ReadingTableQuestionAnswer>();
//重阅或者退回影像的记录中间表 //重阅或者退回影像的记录中间表
[JsonIgnore] [JsonIgnore]
public List<TaskInfluence> TaskInfluenceList { get; set; } = new List<TaskInfluence>(); public List<TaskInfluence> TaskInfluenceList { get; set; } = new List<TaskInfluence>();