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
231b3f71c5
|
|
@ -74,4 +74,8 @@
|
|||
<Folder Include="Service\MinimalApiService\CodeTemplate\FrontTemplate\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Service\TrialSiteUser\TrialStatService.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -18825,6 +18825,18 @@
|
|||
<param name="trialExtralConfig"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialStatService.GetTrialVisitFinishedStatList(IRaCIS.Core.Application.ViewModel.VisitFinishedStatQuery)">
|
||||
<summary>
|
||||
访视完成度
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialStatService.GetTrialQuestionStatList(IRaCIS.Core.Application.ViewModel.VisitQuestionStatQuery)">
|
||||
<summary>
|
||||
质疑统计列表 --医学审核不区分标准
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Triggers.ChallengeStateTrigger">
|
||||
<summary>
|
||||
访视 质疑状态 触发修改
|
||||
|
|
|
|||
|
|
@ -33,13 +33,14 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
IRepository<CommonDocument> _commonDocumentRepository,
|
||||
IStringLocalizer _localizer,
|
||||
IWebHostEnvironment _hostEnvironment,
|
||||
IRepository<InspectionFile> _inspectionFileRepository
|
||||
IRepository<InspectionFile> _inspectionFileRepository,
|
||||
IOptionsMonitor<SystemEmailSendConfig> _systemEmailSendConfig
|
||||
) : IConsumer<ConsistenCheckCommand>, IConsumer<ConsistenFullCheckCommand>
|
||||
{
|
||||
|
||||
|
||||
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig;
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig = _systemEmailSendConfig.CurrentValue;
|
||||
|
||||
|
||||
|
||||
|
|
@ -430,23 +431,32 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
});
|
||||
}
|
||||
|
||||
//导到Excel 上传oss 回更记录状态
|
||||
|
||||
var list = fullCheckResultList;
|
||||
|
||||
var exportInfo = new ExcelExportInfo();
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
var fileStreamResult = (FileStreamResult)await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialConsistentFUllCheckList_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(FullCheckResult));
|
||||
|
||||
var ossRelativePath = await _oSSService.UploadToOSSAsync(fileStreamResult.FileStream, $"{trialId.ToString()}/InspectionUpload/DataReconciliation", "DataReconciliation");
|
||||
|
||||
await _inspectionFileRepository.BatchUpdateNoTrackingAsync(t => t.Id == inspectionFileId, u => new InspectionFile() { CheckState = EDCCheckState.Success, ResultPath = ossRelativePath });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//导到Excel 上传oss 回更记录状态
|
||||
|
||||
var list = fullCheckResultList;
|
||||
|
||||
var exportInfo = new ExcelExportInfo();
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
var fileStreamResult = (FileStreamResult)await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialConsistentFUllCheckList_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(FullCheckResult));
|
||||
|
||||
var ossRelativePath = await _oSSService.UploadToOSSAsync(fileStreamResult.FileStream, $"{trialId.ToString()}/InspectionUpload/DataReconciliation", "DataReconciliation");
|
||||
|
||||
|
||||
//var add = await _inspectionFileRepository.FindAsync(inspectionFileId);
|
||||
//add.CheckState = EDCCheckState.Success;
|
||||
//add.ResultPath = ossRelativePath;
|
||||
|
||||
//更新
|
||||
await _inspectionFileRepository.BatchUpdateNoTrackingAsync(t => t.Id == inspectionFileId, u => new InspectionFile() { CheckState = EDCCheckState.Success, ResultPath = ossRelativePath });
|
||||
|
||||
await _subjectVisitRepository.SaveChangesAsync();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,90 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
public class VisitFinishedStatQuery
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class VisitFinishedStatViewModel
|
||||
{
|
||||
public int? UploadedCount { get; set; }
|
||||
|
||||
public int? QCFinishedCount { get; set; }
|
||||
|
||||
public int? CheckFinishedCount { get; set; }
|
||||
|
||||
public List<VisitReadingCriterionInfo> CriterionList { get; set; }
|
||||
}
|
||||
|
||||
public class VisitReadingCriterionInfo
|
||||
{
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public string TrialReadingCriterionName { get; set; }
|
||||
|
||||
public int? ReadingFinishedCount { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class VisitQuestionStatQuery
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class VisitQuestionViewModel
|
||||
{
|
||||
|
||||
public int? QCQuestion_IngCount { get; set; }
|
||||
|
||||
public int? QCQuestion_ClosedCount { get; set; }
|
||||
|
||||
public int? CheckQuestion_ClosedCount { get; set; }
|
||||
|
||||
public int? CheckQuestion_IngCount { get; set; }
|
||||
|
||||
public int? MedicalReviewQuestion_ClosedCount { get; set; }
|
||||
|
||||
public int? MedicalReviewQuestion_IngCount { get; set; }
|
||||
|
||||
|
||||
//public List<MedicalReviewQuestionInfo> CriterionList { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class MedicalReviewQuestionInfo
|
||||
{
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public string TrialReadingCriterionName { get; set; }
|
||||
|
||||
|
||||
public int? MedicalReviewQuestion_ClosedCount { get; set; }
|
||||
|
||||
public int? MedicalReviewQuestion_IngCount { get; set; }
|
||||
}
|
||||
|
||||
public class EfficacyEvaluationQuery
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
public class EfficacyEvaluationStatViewModel
|
||||
{
|
||||
public int OverallTumorEvaluation { get; set; }
|
||||
|
||||
public int SubjectCount { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
using IRaCIS.Core.Application.ViewModel;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application;
|
||||
|
||||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class TrialStatService(
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<TrialDocument> _trialDocumentRepository,
|
||||
IRepository<SystemDocument> _systemDocumentRepository,
|
||||
IRepository<SystemNotice> _systemNoticeRepository,
|
||||
IRepository<SubjectVisitImageBackRecord> _subjectVisitImageBackRecordReposiotry,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 访视完成度
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<VisitFinishedStatViewModel>> GetTrialVisitFinishedStatList(VisitFinishedStatQuery inQuery)
|
||||
{
|
||||
|
||||
|
||||
var list = await _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => new VisitFinishedStatViewModel()
|
||||
{
|
||||
UploadedCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted).Count(),
|
||||
QCFinishedCount = t.SubjectVisitList.Where(t => t.AuditState == AuditStateEnum.QCPassed || t.AuditState == AuditStateEnum.QCFailed).Count(),
|
||||
CheckFinishedCount = t.SubjectVisitList.Where(t => t.CheckState == CheckStateEnum.CVPassed).Count(),
|
||||
|
||||
CriterionList = t.TrialReadingCriterionList.Select(t => new VisitReadingCriterionInfo()
|
||||
{
|
||||
TrialReadingCriterionId = t.Id,
|
||||
TrialReadingCriterionName = t.CriterionName,
|
||||
ReadingFinishedCount = t.VisitTaskList.Where(t => t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit)
|
||||
.GroupBy(t => t.SourceSubjectVisitId)
|
||||
.Where(g => t.ReadingType == ReadingMethod.Double ? g.Count() == 2 : true)
|
||||
.Count()
|
||||
|
||||
}).ToList()
|
||||
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 质疑统计列表 --医学审核不区分标准
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<VisitQuestionViewModel>> GetTrialQuestionStatList(VisitQuestionStatQuery inQuery)
|
||||
{
|
||||
|
||||
|
||||
var list = await _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => new VisitQuestionViewModel()
|
||||
{
|
||||
|
||||
|
||||
QCQuestion_ClosedCount = t.SubjectVisitList.SelectMany(t => t.QCChallengeList).Where(c => c.IsClosed).Count(),
|
||||
|
||||
QCQuestion_IngCount = t.SubjectVisitList.SelectMany(t => t.QCChallengeList).Where(c => c.IsClosed == false).Count(),
|
||||
|
||||
CheckQuestion_ClosedCount = t.SubjectVisitList.Where(t => t.CheckChallengeState == CheckChanllengeTypeEnum.Closed).Count(),
|
||||
CheckQuestion_IngCount = t.SubjectVisitList.Where(t => t.CheckChallengeState != CheckChanllengeTypeEnum.Closed).Count(),
|
||||
|
||||
|
||||
MedicalReviewQuestion_ClosedCount = t.TaskMedicalReviewList.Where(t => t.VisitTask.IsAnalysisCreate == false && t.IsClosedDialog).Count(),
|
||||
|
||||
MedicalReviewQuestion_IngCount = t.TaskMedicalReviewList.Where(t => t.VisitTask.IsAnalysisCreate == false && t.IsClosedDialog == false).Count(),
|
||||
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/////疗效统计表,只针对肿瘤标准 排除基线
|
||||
/////
|
||||
//public async Task<List<EfficacyEvaluationStatViewModel>> GetTrialEfficacyEvaluationStatList(EfficacyEvaluationQuery inQuery)
|
||||
//{
|
||||
|
||||
//}
|
||||
}
|
||||
Loading…
Reference in New Issue