Test.EIImageViewer
he 2023-02-23 14:51:27 +08:00
commit f5b4a36f25
5 changed files with 318 additions and 59 deletions

View File

@ -460,15 +460,6 @@
<param name="param"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetSubjectReadingPeriod_Export(IRaCIS.Core.Application.Service.Reading.Dto.GetReadModuleDto,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
<summary>
受试者 阅片期 进度表 导出
</summary>
<param name="param"></param>
<param name="_commonDocumentRepository"></param>
<param name="_dictionaryService"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetSubjectProgress_Export(IRaCIS.Core.Application.Contracts.SubjectProgressQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
<summary>
Subject 进展表 --new
@ -479,6 +470,16 @@
<param name="_trialRepository"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetStudyUploadMonitor_Export(IRaCIS.Core.Application.Contracts.StudyQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
<summary>
影像上传监控表
</summary>
<param name="studyQuery"></param>
<param name="_commonDocumentRepository"></param>
<param name="_dictionaryService"></param>
<param name="_trialRepository"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetReadingPeriodList_Export(IRaCIS.Core.Application.Contracts.ReadPeriodQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
<summary>
阅片期信息表

View File

@ -75,7 +75,7 @@ namespace IRaCIS.Core.Application.Service.Common
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialCRCUploadImageList_Export, exportInfo, $"{exportInfo.TrialCode}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CRCVisitExportDTO));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialCRCUploadImageList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CRCVisitExportDTO));
}
@ -120,7 +120,7 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialQCImageChanllengeList_Export, exportInfo, $"{exportInfo.TrialCode}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(QCChanllengeExportDto));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialQCImageChanllengeList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(QCChanllengeExportDto));
}
@ -153,44 +153,44 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectList_Export, exportInfo, $"{exportInfo.TrialCode}", _commonDocumentRepository , _hostEnvironment, _dictionaryService, typeof(SubjectExportDTO));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository , _hostEnvironment, _dictionaryService, typeof(SubjectExportDTO));
}
/// <summary>
/// 受试者 阅片期 进度表 导出
/// </summary>
/// <param name="param"></param>
/// <param name="_commonDocumentRepository"></param>
/// <param name="_dictionaryService"></param>
/// <returns></returns>
[HttpPost]
public async Task<IActionResult> GetSubjectReadingPeriod_Export(GetReadModuleDto dto,
[FromServices] IRepository<CommonDocument> _commonDocumentRepository,
[FromServices] IDictionaryService _dictionaryService,
[FromServices] IRepository<Trial> _trialRepository)
{
///// <summary>
///// 受试者 阅片期 进度表 导出
///// </summary>
///// <param name="param"></param>
///// <param name="_commonDocumentRepository"></param>
///// <param name="_dictionaryService"></param>
///// <returns></returns>
//[HttpPost]
//public async Task<IActionResult> GetSubjectReadingPeriod_Export(GetReadModuleDto dto,
// [FromServices] IRepository<CommonDocument> _commonDocumentRepository,
// [FromServices] IDictionaryService _dictionaryService,
// [FromServices] IRepository<Trial> _trialRepository)
//{
var list = await _repository.Where<Subject>(u => u.TrialId == dto.TrialId)
.WhereIf(dto.SubjectId != null, x => x.Id == dto.SubjectId)
.WhereIf(dto.TrialSiteCode != null && dto.TrialSiteCode != string.Empty, x => x.TrialSite.TrialSiteCode == dto.TrialSiteCode)
.WhereIf(dto.SubjectCode != null && dto.SubjectCode != string.Empty, x => x.Code == dto.SubjectCode)
//.WhereIf(dto.ReadingStatus != null, x => x.ReadingStatus == dto.ReadingStatus)
// var list = await _repository.Where<Subject>(u => u.TrialId == dto.TrialId)
// .WhereIf(dto.SubjectId != null, x => x.Id == dto.SubjectId)
// .WhereIf(dto.TrialSiteCode != null && dto.TrialSiteCode != string.Empty, x => x.TrialSite.TrialSiteCode == dto.TrialSiteCode)
// .WhereIf(dto.SubjectCode != null && dto.SubjectCode != string.Empty, x => x.Code == dto.SubjectCode)
// //.WhereIf(dto.ReadingStatus != null, x => x.ReadingStatus == dto.ReadingStatus)
.ProjectTo<SubjectExportDTO>(_mapper.ConfigurationProvider).ToListAsync();
// .ProjectTo<SubjectExportDTO>(_mapper.ConfigurationProvider).ToListAsync();
list = list.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.Code).ToList();
// list = list.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.Code).ToList();
var exportInfo = (await _trialRepository.Where(t => t.Id == dto.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
// var exportInfo = (await _trialRepository.Where(t => t.Id == dto.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
// exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectList_Export, exportInfo, $"{exportInfo.TrialCode}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SubjectExportDTO));
}
// return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SubjectExportDTO));
//}
@ -237,7 +237,7 @@ namespace IRaCIS.Core.Application.Service.Common
ModuleList = subject.ReadModuleList.Where(t=>t.TrialReadingCriterionId==dto.TrialReadingCriterionId).Select(t => new SubjectProgressDto.MouduleProgress()
{
TaskName = t.ModuleName,
VisitTaskNum = t.ReadingSetType == ReadingSetType.ImageReading ? ReadingCommon.TaskNumDic[ReadingCategory.Global] : ReadingCommon.TaskNumDic[ReadingCategory.Oncology] + t.SubjectVisit.VisitNum,
VisitTaskNum = (t.ReadingSetType == ReadingSetType.ImageReading ? ReadingCommon.TaskNumDic[ReadingCategory.Global] : ReadingCommon.TaskNumDic[ReadingCategory.Oncology]) + t.SubjectVisit.VisitNum,
ReadingSetType = t.ReadingSetType,
ReadingStatus = t.ModuleTaskList.Where(t => t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && (t.ReadingCategory == ReadingCategory.Oncology || t.ReadingCategory == ReadingCategory.Global) && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() == (int)trialReadingCriterion.ReadingType ?
ReadingStatusEnum.ReadCompleted : t.ModuleTaskList.Where(t => t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && (t.ReadingCategory == ReadingCategory.Oncology || t.ReadingCategory == ReadingCategory.Global) && t.TaskAllocationState == TaskAllocationState.Allocated).Count() == (int)trialReadingCriterion.ReadingType ?
@ -328,12 +328,81 @@ namespace IRaCIS.Core.Application.Service.Common
return new FileStreamResult(memoryStream2, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
{
FileDownloadName = $"{exportInfo.TrialCode}_{exportInfo.CriterionName}_{fileName.Substring(startIndex: 0, fileName.LastIndexOf('.'))}_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx"
FileDownloadName = $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}_{fileName.Substring(startIndex: 0, fileName.LastIndexOf('.'))}_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx"
};
}
/// <summary>
/// 影像上传监控表
/// </summary>
/// <param name="studyQuery"></param>
/// <param name="_commonDocumentRepository"></param>
/// <param name="_dictionaryService"></param>
/// <param name="_trialRepository"></param>
/// <returns></returns>
[HttpPost]
public async Task<IActionResult> GetStudyUploadMonitor_Export(StudyQuery studyQuery,
[FromServices] IRepository<CommonDocument> _commonDocumentRepository,
[FromServices] IDictionaryService _dictionaryService,
[FromServices] IRepository<Trial> _trialRepository)
{
var svExpression = QCCommon.GetStudyMonitorSubjectVisitFilter(studyQuery.VisitPlanArray);
var StudyMonitorQuery = _repository.Where<StudyMonitor>(t => t.TrialId == studyQuery.TrialId)
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
.WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
.WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
.WhereIf(studyQuery.SiteId != null, t => t.SiteId == studyQuery.SiteId)
.Select(t => new UnionStudyMonitorExportDto()
{
TrialSiteCode = t.TrialSite.TrialSiteCode,
TrialSiteAliasName = t.TrialSite.TrialSiteAliasName,
SubjectCode = t.Subject.Code,
VisitName = t.SubjectVisit.VisitName,
StudyCode = t.StudyCode,
IsDicom = t.IsDicom,
Uploader = t.Uploader.UserName,
IP = t.IP,
UploadStartTime = t.UploadStartTime,
UploadFinishedTime = t.UploadFinishedTime,
TotalMillisecondsInterval = t.TotalMillisecondsInterval,
UploadTime = t.CreateTime,
FileCount = t.FileCount,
FileSize = t.FileSize,
IsDicomReUpload = t.IsDicomReUpload,
IsSuccess = t.IsSuccess,
Note = t.Note,
});
var list = await StudyMonitorQuery.ToListAsync();
var exportInfo = (await _trialRepository.Where(t => t.Id == studyQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialStudyUploadMonitor_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(UnionStudyMonitorExportDto));
}
/// <summary>
@ -358,7 +427,7 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectReadingPeriodList_Export, exportInfo, $"{exportInfo.TrialCode}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadPeriodExportDto));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectReadingPeriodList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadPeriodExportDto));
}
@ -442,7 +511,7 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialStudyList_Export, exportInfo, $"{exportInfo.TrialCode}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(UnionStudyExportDTO));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialStudyList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(UnionStudyExportDTO));
}
@ -476,7 +545,7 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectVisitCheckList_Export, exportInfo, $"{exportInfo.TrialCode}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PMKCheckEXportDTO));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectVisitCheckList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PMKCheckEXportDTO));
}
@ -523,7 +592,7 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReadingTaskList_Export, exportInfo, $"{exportInfo.TrialCode}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadingTaskExportDto));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReadingTaskList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadingTaskExportDto));
}
@ -570,7 +639,7 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReReadingTaskList_Export, exportInfo, $"{exportInfo.TrialCode}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReReadingTaskExportDto));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReReadingTaskList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReReadingTaskExportDto));
}
@ -608,7 +677,7 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialMedicalReviewList_Export, exportInfo, $"{exportInfo.TrialCode}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TaskMedicalReviewExportDto));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialMedicalReviewList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TaskMedicalReviewExportDto));
}
@ -687,7 +756,7 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.CriterionName = await _repository.Where<ReadingQuestionCriterionTrial>(u => u.TrialId == queryVisitTask.TrialId && u.IsConfirm && u.Id == queryVisitTask.TrialReadingCriterionId).Select(t => t.CriterionName).FirstOrDefaultAsync();
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSelfAnalysisList_Export, exportInfo, $"{exportInfo.TrialCode}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SelftAnalysisExport));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSelfAnalysisList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SelftAnalysisExport));
}
@ -785,7 +854,7 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.CriterionName = await _repository.Where<ReadingQuestionCriterionTrial>(u => u.TrialId == queryVisitTask.TrialId && u.IsConfirm && u.Id == queryVisitTask.TrialReadingCriterionId).Select(t => t.CriterionName).FirstOrDefaultAsync();
exportInfo.List = newList;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialGroupAnalysisList_Export, exportInfo, $"{exportInfo.TrialCode}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(GroupAnalysisExport));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialGroupAnalysisList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(GroupAnalysisExport));
}
@ -831,6 +900,12 @@ namespace IRaCIS.Core.Application.Service.Common
list.Add(new ExportDocumentDes() { Code = StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion });
}
if(criterion.CriterionType == CriterionType.PCWG3)
{
list.Add(new ExportDocumentDes() { Code = StaticData.Export.OverallTumorEvaluation_Export, ExportCatogory = ExportCatogory.OverallTumorEvaluation });
list.Add(new ExportDocumentDes() { Code = StaticData.Export.PCWG3Point1DetailedOfEvaluatedLesion_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion });
}
var result = _repository.Where<CommonDocument>(t => list.Select(c => c.Code).Contains(t.Code)).Select(c => new ExportDocumentDes() { Code = c.Code, FileName = c.Name }).ToList();
foreach (var item in list)
@ -862,7 +937,7 @@ namespace IRaCIS.Core.Application.Service.Common
//每次查询必须是单标准的
var criterion = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == queryVisitTask.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName }).FirstOrDefaultAsync();
if (criterion.CriterionType != CriterionType.RECIST1Pointt1)
if (criterion.CriterionType != CriterionType.RECIST1Pointt1 && criterion.CriterionType != CriterionType.PCWG3)
{
throw new Exception("当前标准导出还未支持");
}
@ -889,15 +964,15 @@ namespace IRaCIS.Core.Application.Service.Common
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
.ProjectTo<OverallTumorEvaluationExport>(_mapper.ConfigurationProvider, new { criterionType = criterion.CriterionType }).ToListAsync();
list= list.OrderBy(t=>t.SubjectCode).ThenBy(t=>t.VisitTaskNum).ToList();
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.CriterionName = await _repository.Where<ReadingQuestionCriterionTrial>(u => u.TrialId == queryVisitTask.TrialId && u.IsConfirm && u.Id == queryVisitTask.TrialReadingCriterionId).Select(t => t.CriterionName).FirstOrDefaultAsync();
exportInfo.CriterionName = criterion.CriterionName;
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.OverallTumorEvaluation_Export, exportInfo, $"{exportInfo.TrialCode}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(OverallTumorEvaluationExport), criterion.CriterionType);
return await ExcelExportHelper.DataExportAsync(StaticData.Export.OverallTumorEvaluation_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(OverallTumorEvaluationExport), criterion.CriterionType);
}
/// <summary>
@ -949,7 +1024,7 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.List = list;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1EvaluationOfTumorEfficacy_Export, exportInfo, $"{exportInfo.TrialCode}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1EvaluationOfTumorEfficacyExport), criterion.CriterionType);
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1EvaluationOfTumorEfficacy_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1EvaluationOfTumorEfficacyExport), criterion.CriterionType);
}
else
@ -1028,11 +1103,41 @@ namespace IRaCIS.Core.Application.Service.Common
return clone;
});
}).ToList();
exportInfo.List = exportList;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.TrialCode}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1DetailedOfEvaluatedLesionExport), criterion.CriterionType);
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1DetailedOfEvaluatedLesionExport), criterion.CriterionType);
}
else if (criterion.CriterionType == CriterionType.PCWG3)
{
var list = await query.ProjectTo<PCWG3DetailedOfEvaluatedLesionExport>(_mapper.ConfigurationProvider, new { criterionType = criterion.CriterionType, isEn_Us = _userInfo.IsEn_Us }).ToListAsync();
var exportList = list.SelectMany(c =>
{
return c.LesionList.Select(u =>
{
var clone = c.Clone();
clone.LessionCode = u.LessionCode;
clone.LessionType = u.LessionType;
clone.LessionOrgan = u.LessionOrgan;
clone.LessionLocation = u.LessionLocation;
clone.BodyPartDescription = u.BodyPartDescription;
clone.LessionState = u.LessionState;
return clone;
});
}).ToList();
exportInfo.List = exportList;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.PCWG3Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PCWG3DetailedOfEvaluatedLesionExport), criterion.CriterionType);
}
else

View File

@ -6,6 +6,7 @@ using MiniExcelLibs.Attributes;
using Newtonsoft.Json;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Application.Contracts
{
@ -382,7 +383,7 @@ namespace IRaCIS.Core.Application.Contracts
public List<MouduleProgress> ModuleList { get; set; }
public List<MouduleProgress> TotalList => VisitList .OrderByDescending(t=>t.Inplan).Union(ModuleList.OrderBy(t=>t.ReadingSetType).ThenBy(t=>t.VisitTaskNum)).ToList();
public List<MouduleProgress> TotalList => VisitList.OrderByDescending(t => t.Inplan).Union(ModuleList.OrderBy(t => t.ReadingSetType).ThenBy(t => t.VisitTaskNum)).ToList();
public class MouduleProgress
@ -392,9 +393,10 @@ namespace IRaCIS.Core.Application.Contracts
public ReadingStatusEnum ReadingStatus { get; set; }
//最终任务
[Column(TypeName = "decimal(18,2)")]
public decimal VisitTaskNum { get; set; }
//访视会有
@ -406,7 +408,7 @@ namespace IRaCIS.Core.Application.Contracts
//阅片期会有
public ReadingSetType? ReadingSetType { get; set; }
}
}
}
@ -438,6 +440,72 @@ namespace IRaCIS.Core.Application.Contracts
}
public class UnionStudyMonitorExportDto
{
public string SubjectCode { get; set; } = String.Empty;
public string VisitName { get; set; } = string.Empty;
public string TrialSiteCode { get; set; } = string.Empty;
public string TrialSiteAliasName { get; set; } = string.Empty;
public string Uploader { get; set; } = string.Empty;
public DateTime UploadTime { get; set; }
public string StudyCode { get; set; }
public bool IsDicom { get; set; }
public string IsDicomStr => IsDicom ? "DICOM" : "Non-DICOM";
public string UploadStartTimeStr => UploadStartTime.ToString("yyyy-MM-dd HH:mm:ss.fff");
public string UploadFinishedTimeStr => UploadFinishedTime.ToString("yyyy-MM-dd HH:mm:ss.fff");
public double TotalMillisecondsInterval { get; set; }
public string TimeInterval
{
get
{
var uploadTimeSpan = UploadFinishedTime - UploadStartTime;
return $" {uploadTimeSpan.Hours}:{uploadTimeSpan.Minutes}:{uploadTimeSpan.Seconds}.{uploadTimeSpan.Milliseconds}";
}
}
public DateTime UploadStartTime { get; set; }
public DateTime UploadFinishedTime { get; set; }
public decimal FileSize { get; set; }
public string FileSizeStr => $"{(FileSize / (decimal)Math.Pow(1024, 2)).ToString("F")}M";
public string IP { get; set; } = String.Empty;
public bool IsDicomReUpload { get; set; }
public int FileCount { get; set; }
[DictionaryTranslateAttribute("YesOrNo")]
public bool IsSuccess { get; set; } = true;
public string Note = string.Empty;
}
public class UnionStudyExportDTO
@ -684,7 +752,7 @@ namespace IRaCIS.Core.Application.Contracts
public string AgainEvaluateResult { get; set; } = String.Empty;
}
public class GroupAnalysisExport: AnalysisExortCommon
public class GroupAnalysisExport : AnalysisExortCommon
{
[DictionaryTranslateAttribute("ArmEnum")]
@ -706,7 +774,7 @@ namespace IRaCIS.Core.Application.Contracts
}
public class SelftAnalysisExport: AnalysisExortCommon
public class SelftAnalysisExport : AnalysisExortCommon
{
//自身一致性分析任务特有
@ -769,8 +837,64 @@ namespace IRaCIS.Core.Application.Contracts
}
public class PCWG3LessionInfo
{
//病灶编号
public string LessionCode { get; set; }
[DictionaryTranslateAttribute("LesionType")]
//病灶类型
public string LessionType { get; set; }
//所在部位
public string LessionLocation { get; set; }
//所在器官
[DictionaryTranslate("OrganType")]
public string LessionOrgan { get; set; }
//部位描述
public string BodyPartDescription { get; set; }
[DictionaryTranslateAttribute("TargetState")]
//病灶状态
public string LessionState { get; set; }
}
public class PCWG3DetailedOfEvaluatedLesionExport : OverallTumorEvaluationExport
{
[JsonIgnore]
public List<PCWG3LessionInfo> LesionList = new List<PCWG3LessionInfo>();
//病灶编号
public string LessionCode { get; set; }
[DictionaryTranslateAttribute("LesionType")]
//病灶类型
public string LessionType { get; set; }
//所在部位
public string LessionLocation { get; set; }
//所在器官
public string LessionOrgan { get; set; }
//部位描述
public string BodyPartDescription { get; set; }
[DictionaryTranslateAttribute("EvaluationOfState")]
//病灶状态
public string LessionState { get; set; }
}
//RECIST1.1评估病灶明细表
@ -799,7 +923,7 @@ namespace IRaCIS.Core.Application.Contracts
//所在器官
[DictionaryTranslate("OrganType")]
public string LessionOrgan { get; set; }
//部位描述
public string BodyPartDescription { get; set; }

View File

@ -205,7 +205,7 @@ namespace IRaCIS.Core.Application.Service
)
.ForMember(o => o.LessionOrgan, t =>
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Organ).FirstOrDefault().Answer)
t.MapFrom(u => isEn_Us ? (int?)u.OrganInfo.OrganType : (int?) u.OrganInfo.OrganType)
t.MapFrom(u => isEn_Us ? u.OrganInfo.TULOCEN : u.OrganInfo.TULOC)
)
.ForMember(o => o.BodyPartDescription, t =>
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Part).FirstOrDefault().Answer)
@ -219,6 +219,31 @@ namespace IRaCIS.Core.Application.Service
.ForMember(o => o.LessionState, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State).FirstOrDefault().Answer));
CreateMap<VisitTask, PCWG3DetailedOfEvaluatedLesionExport>().IncludeBase<VisitTask, OverallTumorEvaluationExport>()
.ForMember(o => o.LesionList, t => t.MapFrom(u => u.LesionList));
CreateMap<ReadingTableAnswerRowInfo, PCWG3LessionInfo>()
.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.RowMark))
.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType))
//位置可能是自己填写的
.ForMember(o => o.LessionLocation, t =>
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault().Answer)
t.MapFrom(u => u.OrganInfo.IsCanEditPosition ?
u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault().Answer : isEn_Us ? u.OrganInfo.TULATEN : u.OrganInfo.TULAT)
)
.ForMember(o => o.LessionOrgan, t =>
t.MapFrom(u => isEn_Us ? u.OrganInfo.TULOCEN : u.OrganInfo.TULOC)
)
.ForMember(o => o.BodyPartDescription, t =>
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Part).FirstOrDefault().Answer)
t.MapFrom(u => isEn_Us ? u.OrganInfo.PartEN : u.OrganInfo.Part)
)
.ForMember(o => o.LessionState, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State).FirstOrDefault().Answer));
#endregion

View File

@ -149,6 +149,8 @@ public static class StaticData
public const string TrialStudyList_Export = "TrialStudyList_Export";
public const string TrialStudyUploadMonitor_Export = "TrialStudyUploadMonitor_Export";
public const string TrialSubjectVisitCheckList_Export = "TrialSubjectVisitCheckList_Export";
public const string TrialReadingTaskList_Export = "TrialReadingTaskList_Export";
@ -175,6 +177,8 @@ public static class StaticData
public const string RECIST1Point1DetailedOfEvaluatedLesion_Export = "RECIST1Point1DetailedOfEvaluatedLesion_Export";
public const string PCWG3Point1DetailedOfEvaluatedLesion_Export = "PCWG3Point1DetailedOfEvaluatedLesion_Export";