Merge branch 'Uat_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Uat_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
ad4dcd294c
|
@ -211,7 +211,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
{
|
{
|
||||||
public bool? IsSelfAnalysis { get; set; }
|
public bool? IsSelfAnalysis { get; set; }
|
||||||
|
|
||||||
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
public int ConsistentClinicalDataCount { get; set; } = 0;
|
||||||
|
|
||||||
|
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using NPOI.SS.Formula.Functions;
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
@ -32,6 +33,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
private readonly IRepository<TaskConsistentRule> _taskConsistentRuleRepository;
|
private readonly IRepository<TaskConsistentRule> _taskConsistentRuleRepository;
|
||||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
|
private readonly IRepository<ReadingConsistentClinicalData> _readingConsistentClinicalDataRepository;
|
||||||
|
private readonly IReadingClinicalDataService _readingClinicalDataService;
|
||||||
private readonly IRepository<SubjectUser> _subjectUserRepository;
|
private readonly IRepository<SubjectUser> _subjectUserRepository;
|
||||||
private readonly IRepository<Subject> _subjectRepository;
|
private readonly IRepository<Subject> _subjectRepository;
|
||||||
private readonly IRepository<Enroll> _enrollRepository;
|
private readonly IRepository<Enroll> _enrollRepository;
|
||||||
|
@ -44,11 +47,16 @@ namespace IRaCIS.Core.Application.Service
|
||||||
private readonly IVisitTaskHelpeService _visitTaskCommonService;
|
private readonly IVisitTaskHelpeService _visitTaskCommonService;
|
||||||
|
|
||||||
|
|
||||||
public TaskConsistentRuleService(IRepository<VisitTask> visitTaskRepository, IRepository<Enroll> enrollRepository, IRepository<TaskConsistentRule> taskConsistentRuleRepository, IRepository<SubjectUser> subjectUserRepository, IRepository<Subject> subjectRepository, IDistributedLockProvider distributedLockProvider,
|
public TaskConsistentRuleService(IRepository<VisitTask> visitTaskRepository,
|
||||||
|
IRepository<ReadingConsistentClinicalData> readingConsistentClinicalDataRepository,
|
||||||
|
IReadingClinicalDataService readingClinicalDataService,
|
||||||
|
IRepository<Enroll> enrollRepository, IRepository<TaskConsistentRule> taskConsistentRuleRepository, IRepository<SubjectUser> subjectUserRepository, IRepository<Subject> subjectRepository, IDistributedLockProvider distributedLockProvider,
|
||||||
IRepository<Trial> trialRepository, IRepository<TrialSite> trialSiteRepository, IRepository<TrialVirtualSiteCodeUpdate> trialVirtualSiteCodeUpdateRepository, IVisitTaskHelpeService visitTaskCommonService)
|
IRepository<Trial> trialRepository, IRepository<TrialSite> trialSiteRepository, IRepository<TrialVirtualSiteCodeUpdate> trialVirtualSiteCodeUpdateRepository, IVisitTaskHelpeService visitTaskCommonService)
|
||||||
{
|
{
|
||||||
_taskConsistentRuleRepository = taskConsistentRuleRepository;
|
_taskConsistentRuleRepository = taskConsistentRuleRepository;
|
||||||
_visitTaskRepository = visitTaskRepository;
|
_visitTaskRepository = visitTaskRepository;
|
||||||
|
this._readingConsistentClinicalDataRepository = readingConsistentClinicalDataRepository;
|
||||||
|
this._readingClinicalDataService = readingClinicalDataService;
|
||||||
_subjectUserRepository = subjectUserRepository;
|
_subjectUserRepository = subjectUserRepository;
|
||||||
_subjectRepository = subjectRepository;
|
_subjectRepository = subjectRepository;
|
||||||
_enrollRepository = enrollRepository;
|
_enrollRepository = enrollRepository;
|
||||||
|
@ -117,6 +125,20 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId), nameof(VisitTask.VisitTaskNum) };
|
var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId), nameof(VisitTask.VisitTaskNum) };
|
||||||
|
|
||||||
var pageList = await visitTaskQueryable.ToPagedListAsync(queryVisitTask.PageIndex, queryVisitTask.PageSize, queryVisitTask.SortField, queryVisitTask.Asc, string.IsNullOrWhiteSpace(queryVisitTask.SortField), defalutSortArray);
|
var pageList = await visitTaskQueryable.ToPagedListAsync(queryVisitTask.PageIndex, queryVisitTask.PageSize, queryVisitTask.SortField, queryVisitTask.Asc, string.IsNullOrWhiteSpace(queryVisitTask.SortField), defalutSortArray);
|
||||||
|
#region 统计一致性分析临床数据数量
|
||||||
|
|
||||||
|
foreach (var item in pageList.CurrentPageData)
|
||||||
|
{
|
||||||
|
item.ConsistentClinicalDataCount = (await _readingClinicalDataService.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto()
|
||||||
|
{
|
||||||
|
SubjectId = item.SubjectId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
SelectIsSign = false,
|
||||||
|
IsGetAllConsistencyAnalysis = false,
|
||||||
|
VisitTaskId = item.Id,
|
||||||
|
})).Count();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
var trialTaskConfig = _repository.Where<Trial>(t => t.Id == queryVisitTask.TrialId).Select(t => new { IsHaveDoubleReadCriterion = t.TrialReadingCriterionList.Any(t => t.IsSigned && t.IsConfirm && t.ReadingType == ReadingMethod.Double), t.VitrualSiteCode }).FirstOrDefault();
|
var trialTaskConfig = _repository.Where<Trial>(t => t.Id == queryVisitTask.TrialId).Select(t => new { IsHaveDoubleReadCriterion = t.TrialReadingCriterionList.Any(t => t.IsSigned && t.IsConfirm && t.ReadingType == ReadingMethod.Double), t.VitrualSiteCode }).FirstOrDefault();
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using IRaCIS.Core.Domain.Share.Reading;
|
using IRaCIS.Core.Domain.Share.Reading;
|
||||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
@ -26,7 +27,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// 访视读片任务
|
/// 访视读片任务
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ApiExplorerSettings(GroupName = "Trial")]
|
[ApiExplorerSettings(GroupName = "Trial")]
|
||||||
public class VisitTaskHelpeService : IVisitTaskHelpeService
|
public class VisitTaskHelpeService : BaseService, IVisitTaskHelpeService
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
|
@ -450,6 +451,19 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取GetIsClinicalDataSignTest
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="visitTask"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<bool> GetIsClinicalDataSignTest(Guid visitTask)
|
||||||
|
{
|
||||||
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTask).FirstNotNullAsync();
|
||||||
|
var clinicalDataConfirmList = _trialClinicalDataSetRepository.Where(t => t.TrialId == taskinfo.TrialId && t.IsConfirm).Include(t => t.TrialClinicalDataSetCriteriaList).ToList();
|
||||||
|
|
||||||
|
Guid readingid = taskinfo.SourceSubjectVisitId == null ? taskinfo.SouceReadModuleId!.Value : taskinfo.SourceSubjectVisitId.Value;
|
||||||
|
return IsClinicalDataSign(taskinfo.ReadingCategory, taskinfo.VisitTaskNum == 0m, taskinfo.TrialReadingCriterionId, clinicalDataConfirmList, readingid, taskinfo.TrialId); ;
|
||||||
|
}
|
||||||
|
|
||||||
// 有可能在任务生成之前 就签名完了临床数据
|
// 有可能在任务生成之前 就签名完了临床数据
|
||||||
private bool IsClinicalDataSign(ReadingCategory readingCategory, bool isbaseLine, Guid trialReadingCriterionId, List<ClinicalDataTrialSet> trialClinicalDataSetList, Guid readingId, Guid trialId)
|
private bool IsClinicalDataSign(ReadingCategory readingCategory, bool isbaseLine, Guid trialReadingCriterionId, List<ClinicalDataTrialSet> trialClinicalDataSetList, Guid readingId, Guid trialId)
|
||||||
|
@ -468,7 +482,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
//CRC 的自动签名 不用管 只用处理PM的就好
|
//CRC 的自动签名 不用管 只用处理PM的就好
|
||||||
var haveSignedCount = _readingClinicalDataRepository
|
var haveSignedCount = _readingClinicalDataRepository
|
||||||
.Where(t => t.TrialId == trialId && t.IsSign && t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned && t.ReadingId == readingId && t.ClinicalDataTrialSet.UploadRole == UploadRole.PM).Count();
|
.Where(t => t.TrialId == trialId && t.IsSign
|
||||||
|
&& t.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(x=>x.TrialReadingCriterionId== trialReadingCriterionId)
|
||||||
|
&& t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned && t.ReadingId == readingId && t.ClinicalDataTrialSet.UploadRole == UploadRole.PM).Count();
|
||||||
|
|
||||||
|
|
||||||
var readModule = _readModuleRepository.Where(t => t.Id == readingId).FirstOrDefault();
|
var readModule = _readModuleRepository.Where(t => t.Id == readingId).FirstOrDefault();
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
GroupId=gropId,
|
GroupId=gropId,
|
||||||
LimitEdit=LimitEdit.OnlyBaseLine,
|
LimitEdit=LimitEdit.OnlyBaseLine,
|
||||||
DictionaryCode="YesOrNoOrNa",
|
DictionaryCode="YesOrNoOrNE",
|
||||||
IsJudgeQuestion=false,
|
IsJudgeQuestion=false,
|
||||||
IsShowInDicom=false,
|
IsShowInDicom=false,
|
||||||
GlobalReadingShowType=GlobalReadingShowType.NotShow,
|
GlobalReadingShowType=GlobalReadingShowType.NotShow,
|
||||||
|
|
|
@ -3,6 +3,7 @@ using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using Panda.DynamicWebApi.Attributes;
|
using Panda.DynamicWebApi.Attributes;
|
||||||
|
|
||||||
|
@ -58,8 +59,11 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
join usertype in _repository.GetQueryable<UserType>().IgnoreQueryFilters() on leftuser.UserTypeId equals usertype.Id into usertypetemp
|
join usertype in _repository.GetQueryable<UserType>().IgnoreQueryFilters() on leftuser.UserTypeId equals usertype.Id into usertypetemp
|
||||||
from leftusertype in usertypetemp.DefaultIfEmpty()
|
from leftusertype in usertypetemp.DefaultIfEmpty()
|
||||||
|
|
||||||
//join trialCriterion in _repository.GetQueryable<ReadingQuestionCriterionTrial>().IgnoreQueryFilters() on data.TrialReadingCriterionId equals trialCriterion.Id into criterion
|
join visttask in _repository.GetQueryable<VisitTask>().IgnoreQueryFilters() on data.VisitTaskId equals visttask.Id into visttasktemp
|
||||||
//from leftCriterion in criterion.DefaultIfEmpty()
|
from leftvisttask in visttasktemp.DefaultIfEmpty()
|
||||||
|
|
||||||
|
//join trialCriterion in _repository.GetQueryable<ReadingQuestionCriterionTrial>().IgnoreQueryFilters() on data.TrialReadingCriterionId equals trialCriterion.Id into criterion
|
||||||
|
//from leftCriterion in criterion.DefaultIfEmpty()
|
||||||
|
|
||||||
//join moduleTyped in _repository.GetQueryable<Dictionary>().Where(x => x.Code == "ModuleType") on 1 equals 1
|
//join moduleTyped in _repository.GetQueryable<Dictionary>().Where(x => x.Code == "ModuleType") on 1 equals 1
|
||||||
//join moduleTypec in _repository.GetQueryable<Dictionary>() on new { ParentId = moduleTyped.Id, ModuleType = data.ModuleType } equals new { ParentId = moduleTypec.ParentId.Value, ModuleType = moduleTypec.Value } into moduleTypectemp
|
//join moduleTypec in _repository.GetQueryable<Dictionary>() on new { ParentId = moduleTyped.Id, ModuleType = data.ModuleType } equals new { ParentId = moduleTypec.ParentId.Value, ModuleType = moduleTypec.Value } into moduleTypectemp
|
||||||
|
@ -131,7 +135,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
ExperimentName = leftrial.ExperimentName,
|
ExperimentName = leftrial.ExperimentName,
|
||||||
|
|
||||||
|
|
||||||
SubjectCode = leftsubject.Code,
|
SubjectCode = leftvisttask.BlindSubjectCode.IsNullOrEmpty()? leftsubject.Code: leftvisttask.BlindSubjectCode,
|
||||||
SiteCode = lefttrialSite.TrialSiteCode,
|
SiteCode = lefttrialSite.TrialSiteCode,
|
||||||
|
|
||||||
ResearchProgramNo = leftrial.ResearchProgramNo,
|
ResearchProgramNo = leftrial.ResearchProgramNo,
|
||||||
|
|
|
@ -41,6 +41,7 @@ namespace IRaCIS.Application.Contracts
|
||||||
public string RealName { get; set; } = string.Empty;
|
public string RealName { get; set; } = string.Empty;
|
||||||
public int? Sex { get; set; } // 1-男 2-女
|
public int? Sex { get; set; } // 1-男 2-女
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// LastLoginIP
|
/// LastLoginIP
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -255,7 +255,7 @@ namespace IRaCIS.Application.Services
|
||||||
var query = _readingClinicalDataRepository.AsQueryable();
|
var query = _readingClinicalDataRepository.AsQueryable();
|
||||||
if (inDto.StudyId != null)
|
if (inDto.StudyId != null)
|
||||||
{
|
{
|
||||||
query = query.Where(x => x.StudyId == inDto.StudyId.Value);
|
query = query.Where(x => x.StudyId == inDto.StudyId.Value && x.TrialId==inDto.TrialId&&x.SubjectId==inDto.SubjectId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1227,6 +1227,7 @@ namespace IRaCIS.Application.Services
|
||||||
entity.ReadingClinicalDataState = ReadingClinicalDataStatus.HaveUploaded;
|
entity.ReadingClinicalDataState = ReadingClinicalDataStatus.HaveUploaded;
|
||||||
entity.IsSign = false;
|
entity.IsSign = false;
|
||||||
entity.FileCount = fileCount;
|
entity.FileCount = fileCount;
|
||||||
|
entity.CreateTime=DateTime.Now;
|
||||||
var success = await _readingConsistentClinicalDataRepository.SaveChangesAsync();
|
var success = await _readingConsistentClinicalDataRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Ok(entity.Id);
|
return ResponseOutput.Ok(entity.Id);
|
||||||
|
|
||||||
|
|
|
@ -31,5 +31,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
Task DealVisiTaskClinicalDataSignedAsync(Guid trialId, Guid subjectId, Guid readingId, bool isVisit, Guid trialReadingCritrialId);
|
Task DealVisiTaskClinicalDataSignedAsync(Guid trialId, Guid subjectId, Guid readingId, bool isVisit, Guid trialReadingCritrialId);
|
||||||
|
|
||||||
Task<IResponseOutput> SignConsistencyAnalysisReadingClinicalData(SignConsistencyAnalysisReadingClinicalDataInDto inDto);
|
Task<IResponseOutput> SignConsistencyAnalysisReadingClinicalData(SignConsistencyAnalysisReadingClinicalDataInDto inDto);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -158,7 +158,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
t.IsTrialBasicLogicConfirmed,
|
t.IsTrialBasicLogicConfirmed,
|
||||||
t.IsTrialProcessConfirmed,
|
t.IsTrialProcessConfirmed,
|
||||||
t.IsTrialUrgentConfirmed,
|
t.IsTrialUrgentConfirmed,
|
||||||
t.IsConfigureEmail
|
t.IsConfigureEmail,
|
||||||
|
t.IsTrialPACSConfirmed,
|
||||||
}).FirstOrDefaultAsync();
|
}).FirstOrDefaultAsync();
|
||||||
switch (_userInfo.RequestUrl)
|
switch (_userInfo.RequestUrl)
|
||||||
{
|
{
|
||||||
|
@ -172,6 +173,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
case "configTrialBasicInfo/ConfigTrialUrgentInfoConfirm":
|
case "configTrialBasicInfo/ConfigTrialUrgentInfoConfirm":
|
||||||
extraIdentification = $"/{oldentity.IsTrialUrgentConfirmed.ToString()}";
|
extraIdentification = $"/{oldentity.IsTrialUrgentConfirmed.ToString()}";
|
||||||
break;
|
break;
|
||||||
|
case "configTrialBasicInfo/ConfigTrialPACSInfoConfirm":
|
||||||
|
extraIdentification = $"/{oldentity.IsTrialPACSConfirmed.ToString()}";
|
||||||
|
break;
|
||||||
|
|
||||||
case "TrialEmailNoticeConfig/setTrialEmail":
|
case "TrialEmailNoticeConfig/setTrialEmail":
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue