修改一版
parent
5fbaef17ee
commit
396c8ca2df
|
@ -27,6 +27,7 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<VisitStage> _visitstageRepository;
|
||||
private readonly IRepository<User> _userRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||
private readonly IRepository<ReadModuleView> _readModuleViewRepository;
|
||||
private readonly IRepository<DicomInstance> _dicomInstanceRepository;
|
||||
|
@ -40,6 +41,7 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<VisitStage> visitstageRepository,
|
||||
IRepository<User> UserRepository,
|
||||
IRepository<Trial> trialRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
|
||||
IRepository<ReadModuleView> readModuleViewRepository,
|
||||
IRepository<DicomInstance> dicomInstanceRepository,
|
||||
|
@ -53,6 +55,7 @@ namespace IRaCIS.Application.Services
|
|||
this._visitstageRepository = visitstageRepository;
|
||||
this._userRepository = UserRepository;
|
||||
this._trialRepository = trialRepository;
|
||||
this._visitTaskRepository = visitTaskRepository;
|
||||
this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
|
||||
this._readModuleViewRepository = readModuleViewRepository;
|
||||
this._dicomInstanceRepository = dicomInstanceRepository;
|
||||
|
@ -187,10 +190,12 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
maxcount = maxcount < x.Data.Count ? x.Data.Count : maxcount;
|
||||
});
|
||||
var trialinfo = await _trialRepository.Where(x => x.Id == dto.TrialId).FirstNotNullAsync();
|
||||
return (pageOutput, new
|
||||
{
|
||||
MaxLength = maxcount,
|
||||
IsClinicalReading = await _trialRepository.Where(x => x.Id == dto.TrialId).Select(x => x.IsClinicalReading).FirstOrDefaultAsync(),
|
||||
IsReadingTaskViewInOrder=trialinfo.IsReadingTaskViewInOrder,
|
||||
IsClinicalReading = trialinfo.IsClinicalReading,
|
||||
OnlyExistsMedicalHistory = !(await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId && x.ClinicalDataSetName != "既往局部治疗史" && x.IsConfirm)),
|
||||
IsExistsSubjectClinicalData= await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId&&x.ClinicalDataLevel== ClinicalLevel.Subject && x.IsConfirm),
|
||||
IsExistsVisitClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId && x.ClinicalDataLevel == ClinicalLevel.SubjectVisit && x.IsConfirm),
|
||||
|
@ -261,6 +266,14 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
stakeholderIds.Add(subjectVisit.CheckUserId.Value);
|
||||
}
|
||||
break;
|
||||
case ReadingStatusEnum.ImageReading:
|
||||
|
||||
|
||||
var doctorUserId = await _visitTaskRepository.Where(x => x.SouceReadModuleId == dto.Id || x.SourceSubjectVisitId == dto.Id)
|
||||
.Where(x => x.DoctorUserId != null).Select(x => x.DoctorUserId.Value).ToListAsync();
|
||||
|
||||
stakeholderIds.AddRange(doctorUserId);
|
||||
|
||||
break;
|
||||
};
|
||||
|
|
|
@ -100,10 +100,10 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
var trialId = subjectVisit.TrialId;
|
||||
var subjectVisitId= subjectVisit.Id;
|
||||
// 是否全局阅片
|
||||
var isGlobalReading = await _repository.Where<Trial>(x => x.Id == trialId).Select(x => x.IsGlobalReading).FirstOrDefaultAsync();
|
||||
var trial = await _repository.Where<Trial>(x => x.Id == trialId).FirstNotNullAsync();
|
||||
|
||||
|
||||
if (isGlobalReading)
|
||||
if (trial.IsGlobalReading&&trial.IsReadingTaskViewInOrder)
|
||||
{
|
||||
|
||||
ReadingPeriodSet? readingPeriodSet =await _readingPeriodSetRepository.FirstOrDefaultNoTrackingAsync(x => x.TrialId == trialId && x.IsGlobal);
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
//public class ReadingClinicalDataView : Entity
|
||||
//{
|
||||
|
||||
// /// <summary>
|
||||
// /// 项目ID
|
||||
// /// </summary>
|
||||
// public Guid TrialId { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 受试者ID
|
||||
// /// </summary>
|
||||
// public Guid SubjectId { get; set; }
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// 阅片
|
||||
// /// </summary>
|
||||
// public Guid? ReadingId { get; set; }
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// 项目配置临床类型ID
|
||||
// /// </summary>
|
||||
// public Guid ClinicalDataTrialSetId { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 项目配置临床类型Name
|
||||
// /// </summary>
|
||||
// public string ClinicalDataSetName { get; set; }
|
||||
|
||||
|
||||
// public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// 临床数据级别
|
||||
// /// </summary>
|
||||
// public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 是否为CRC上传
|
||||
// /// </summary>
|
||||
// public bool IsCRCUpload { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 是否签名
|
||||
// /// </summary>
|
||||
// public bool IsSign { get; set; }
|
||||
|
||||
//}
|
||||
}
|
|
@ -9,7 +9,7 @@ namespace IRaCIS.Core.Infrastructure.Extention
|
|||
public static class IQueryableExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取第一条 null提示
|
||||
/// 获取第一条 为null提示
|
||||
/// </summary>
|
||||
/// <typeparam name="TSource"></typeparam>
|
||||
/// <param name="source"></param>
|
||||
|
|
Loading…
Reference in New Issue