Uat_Study
parent
412ca21ba2
commit
035f39f217
|
@ -245,6 +245,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public bool IsUrgent { get; set; }
|
public bool IsUrgent { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string ReadingName { get; set; }
|
public string ReadingName { get; set; }
|
||||||
|
|
||||||
public ReadingCategory ReadingCategory { get; set; }
|
public ReadingCategory ReadingCategory { get; set; }
|
||||||
|
|
|
@ -581,6 +581,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1、设置为不读片,2 设置为读片(取消 先前设置为不读片) 4 设置为删除(数据库记录软删除) 5 恢复为未删除
|
/// 1、设置为不读片,2 设置为读片(取消 先前设置为不读片) 4 设置为删除(数据库记录软删除) 5 恢复为未删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -195,6 +195,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[HttpDelete("{trialId:guid}/{trialQCQuestionConfigureId:guid}")]
|
[HttpDelete("{trialId:guid}/{trialQCQuestionConfigureId:guid}")]
|
||||||
[Authorize(Policy = IRaCISPolicy.IQC)]
|
[Authorize(Policy = IRaCISPolicy.IQC)]
|
||||||
public async Task<IResponseOutput> DeleteTrialQCQuestionConfigure(Guid trialQCQuestionConfigureId, Guid trialId)
|
public async Task<IResponseOutput> DeleteTrialQCQuestionConfigure(Guid trialQCQuestionConfigureId, Guid trialId)
|
||||||
|
|
|
@ -18,5 +18,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
Task<IResponseOutput> ReadClinicalDataSign(ReadingClinicalDataSignIndto inDto);
|
Task<IResponseOutput> ReadClinicalDataSign(ReadingClinicalDataSignIndto inDto);
|
||||||
|
|
||||||
Task<List<GetReadingClinicalDataListOutDto>> GetClinicalDataList(GetReadingOrTaskClinicalDataListInDto inDto);
|
Task<List<GetReadingClinicalDataListOutDto>> GetClinicalDataList(GetReadingOrTaskClinicalDataListInDto inDto);
|
||||||
|
|
||||||
|
|
||||||
|
Task<(List<GetReadingClinicalDataListOutDto>, object)> GetReadingClinicalDataList(GetReadingClinicalDataListIndto inDto);
|
||||||
|
|
||||||
|
Task<List<GetReadingClinicalDataListOutDto>> GetReadingClinicalList(GetReadingClinicalDataListIndto inDto);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -21,5 +21,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
Task<IResponseOutput> SubmitGlobalReadingInfo(SubmitGlobalReadingInfoInDto inDto);
|
Task<IResponseOutput> SubmitGlobalReadingInfo(SubmitGlobalReadingInfoInDto inDto);
|
||||||
|
|
||||||
Task<IResponseOutput> SubmitOncologyReadingInfo(SubmitOncologyReadingInfoInDto inDto);
|
Task<IResponseOutput> SubmitOncologyReadingInfo(SubmitOncologyReadingInfoInDto inDto);
|
||||||
|
|
||||||
|
Task AddOncologyTask(Guid oncologModuleId);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -32,6 +32,7 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<PreviousHistory> _previousHistoryRepository;
|
private readonly IRepository<PreviousHistory> _previousHistoryRepository;
|
||||||
private readonly IRepository<PreviousOther> _previousOtherRepository;
|
private readonly IRepository<PreviousOther> _previousOtherRepository;
|
||||||
private readonly IRepository<PreviousSurgery> _previousSurgeryRepository;
|
private readonly IRepository<PreviousSurgery> _previousSurgeryRepository;
|
||||||
|
private readonly IReadingImageTaskService readingImageTaskService;
|
||||||
private readonly IRepository<Subject> _subjectRepository;
|
private readonly IRepository<Subject> _subjectRepository;
|
||||||
private readonly IRepository<ReadModule> _readModuleRepository;
|
private readonly IRepository<ReadModule> _readModuleRepository;
|
||||||
private readonly IRepository<ReadingClinicalDataPDF> _readingClinicalDataPDFRepository;
|
private readonly IRepository<ReadingClinicalDataPDF> _readingClinicalDataPDFRepository;
|
||||||
|
@ -43,6 +44,7 @@ namespace IRaCIS.Application.Services
|
||||||
IRepository<PreviousHistory> previousHistoryRepository,
|
IRepository<PreviousHistory> previousHistoryRepository,
|
||||||
IRepository<PreviousOther> previousOtherRepository,
|
IRepository<PreviousOther> previousOtherRepository,
|
||||||
IRepository<PreviousSurgery> previousSurgeryRepository,
|
IRepository<PreviousSurgery> previousSurgeryRepository,
|
||||||
|
IReadingImageTaskService readingImageTaskService,
|
||||||
IRepository<Subject> subjectRepository,
|
IRepository<Subject> subjectRepository,
|
||||||
IRepository<ReadModule> readModuleRepository,
|
IRepository<ReadModule> readModuleRepository,
|
||||||
IRepository<ReadingClinicalDataPDF> readingClinicalDataPDFRepository,
|
IRepository<ReadingClinicalDataPDF> readingClinicalDataPDFRepository,
|
||||||
|
@ -55,6 +57,7 @@ namespace IRaCIS.Application.Services
|
||||||
this._previousHistoryRepository = previousHistoryRepository;
|
this._previousHistoryRepository = previousHistoryRepository;
|
||||||
this._previousOtherRepository = previousOtherRepository;
|
this._previousOtherRepository = previousOtherRepository;
|
||||||
this._previousSurgeryRepository = previousSurgeryRepository;
|
this._previousSurgeryRepository = previousSurgeryRepository;
|
||||||
|
this.readingImageTaskService = readingImageTaskService;
|
||||||
this._subjectRepository = subjectRepository;
|
this._subjectRepository = subjectRepository;
|
||||||
this._readModuleRepository = readModuleRepository;
|
this._readModuleRepository = readModuleRepository;
|
||||||
this._readingClinicalDataPDFRepository = readingClinicalDataPDFRepository;
|
this._readingClinicalDataPDFRepository = readingClinicalDataPDFRepository;
|
||||||
|
@ -281,6 +284,11 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var result = await _readingClinicalDataRepository.SaveChangesAsync();
|
var result = await _readingClinicalDataRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
||||||
|
var readingId = await _readingClinicalDataRepository.Where(x => x.Id == inDto.ReadingClinicalDataId).Select(x => x.ReadingId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
await readingImageTaskService.AddOncologyTask(readingId);
|
||||||
|
|
||||||
return ResponseOutput.Result(result);
|
return ResponseOutput.Result(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,31 +404,10 @@ namespace IRaCIS.Application.Services
|
||||||
inDto.UploadRole = UploadRole.CRC;
|
inDto.UploadRole = UploadRole.CRC;
|
||||||
}
|
}
|
||||||
var isBaseLine = await _subjectVisitRepository.AnyAsync(x => x.Id == inDto.ReadingId && x.IsBaseLine);
|
var isBaseLine = await _subjectVisitRepository.AnyAsync(x => x.Id == inDto.ReadingId && x.IsBaseLine);
|
||||||
var resultQuery = _readingClinicalDataRepository.Where(x => x.SubjectId == inDto.SubjectId)
|
|
||||||
.Where(x => x.ReadingId == inDto.ReadingId)
|
|
||||||
.WhereIf(inDto.UploadRole == UploadRole.CRC, x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
|
||||||
.Select(x => new GetReadingClinicalDataListOutDto()
|
|
||||||
{
|
|
||||||
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
|
||||||
SubjectId = x.SubjectId,
|
|
||||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
|
|
||||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSetId,
|
|
||||||
IsSign = x.IsSign,
|
|
||||||
ClinicalUploadType = x.ClinicalDataTrialSet.ClinicalUploadType,
|
|
||||||
Id = x.Id,
|
|
||||||
UploadRole = x.ClinicalDataTrialSet.UploadRole,
|
|
||||||
IsCRCUpload = x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC,
|
|
||||||
FileList = x.ReadingClinicalDataPDFList.Select(y => new GetFileDto()
|
|
||||||
{
|
|
||||||
Id = y.Id,
|
|
||||||
FileName = y.FileName,
|
|
||||||
Path = y.Path,
|
|
||||||
CreateTime = y.CreateTime,
|
|
||||||
}).ToList()
|
|
||||||
});
|
|
||||||
|
|
||||||
var result = await resultQuery.ToListAsync();
|
var result =await this.GetReadingClinicalList(inDto);
|
||||||
result = result.Where(x => !(x.UploadRole == UploadRole.CRC && x.ClinicalUploadType == ClinicalUploadType.PDF && x.FileList.Count() == 0)).ToList();
|
|
||||||
|
|
||||||
var previousHistoryList = await _previousHistoryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
var previousHistoryList = await _previousHistoryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
var previousOtherList = await _previousOtherRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
var previousOtherList = await _previousOtherRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
@ -441,6 +428,40 @@ namespace IRaCIS.Application.Services
|
||||||
}) ;
|
}) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取临床数据集合
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[NonDynamicMethod]
|
||||||
|
public async Task<List<GetReadingClinicalDataListOutDto>> GetReadingClinicalList(GetReadingClinicalDataListIndto inDto)
|
||||||
|
{
|
||||||
|
var resultQuery = _readingClinicalDataRepository.Where(x => x.SubjectId == inDto.SubjectId)
|
||||||
|
.Where(x => x.ReadingId == inDto.ReadingId)
|
||||||
|
.WhereIf(inDto.UploadRole == UploadRole.CRC, x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
||||||
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
|
{
|
||||||
|
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||||
|
SubjectId = x.SubjectId,
|
||||||
|
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||||
|
ClinicalDataTrialSetId = x.ClinicalDataTrialSetId,
|
||||||
|
IsSign = x.IsSign,
|
||||||
|
ClinicalUploadType = x.ClinicalDataTrialSet.ClinicalUploadType,
|
||||||
|
Id = x.Id,
|
||||||
|
UploadRole = x.ClinicalDataTrialSet.UploadRole,
|
||||||
|
IsCRCUpload = x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC,
|
||||||
|
FileList = x.ReadingClinicalDataPDFList.Select(y => new GetFileDto()
|
||||||
|
{
|
||||||
|
Id = y.Id,
|
||||||
|
FileName = y.FileName,
|
||||||
|
Path = y.Path,
|
||||||
|
CreateTime = y.CreateTime,
|
||||||
|
}).ToList()
|
||||||
|
});
|
||||||
|
|
||||||
|
var result = await resultQuery.ToListAsync();
|
||||||
|
result = result.Where(x => !(x.UploadRole == UploadRole.CRC && x.ClinicalUploadType == ClinicalUploadType.PDF && x.FileList.Count() == 0)).ToList();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取单个阅片临床数据的所有文件
|
/// 获取单个阅片临床数据的所有文件
|
||||||
|
|
|
@ -53,6 +53,7 @@ namespace IRaCIS.Application.Services
|
||||||
IRepository<VisitTask> visitTaskRepository,
|
IRepository<VisitTask> visitTaskRepository,
|
||||||
IRepository<Trial> TrialRepository,
|
IRepository<Trial> TrialRepository,
|
||||||
IRepository<ReadingOncologyTaskInfo> ReadingOncologyTaskInfoRepository,
|
IRepository<ReadingOncologyTaskInfo> ReadingOncologyTaskInfoRepository,
|
||||||
|
|
||||||
IVisitTaskHelpeService visitTaskHelpeService,
|
IVisitTaskHelpeService visitTaskHelpeService,
|
||||||
IVisitTaskService visitTaskService,
|
IVisitTaskService visitTaskService,
|
||||||
IReadingClinicalDataService readingClinicalDataService,
|
IReadingClinicalDataService readingClinicalDataService,
|
||||||
|
@ -1214,28 +1215,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var visitId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
|
var visitId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
// 肿瘤学信息
|
var oncologModuleId = await _readModuleRepository.Where(x => x.SubjectVisitId == visitId && x.ModuleType == ModuleTypeEnum.Oncology).Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
List<ReadingGenerataTaskDTO> needReadList = await _readModuleRepository.Where(x => x.SubjectVisitId == visitId && x.ModuleType == ModuleTypeEnum.Oncology)
|
|
||||||
.Select(x => new ReadingGenerataTaskDTO
|
|
||||||
{
|
|
||||||
IsUrgent = x.IsUrgent ?? false,
|
|
||||||
SubjectId = x.SubjectId,
|
|
||||||
ReadingName = x.ModuleName,
|
|
||||||
VisitNum = x.VisitNum,
|
|
||||||
ReadModuleId = x.Id,
|
|
||||||
ReadingCategory = ReadingCategory.Oncology,
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
|
||||||
{
|
|
||||||
|
|
||||||
ReadingCategory = GenerateTaskCategory.Oncology,
|
|
||||||
TrialId = taskInfo.TrialId,
|
|
||||||
ReadingGenerataTaskList = needReadList
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
await AddOncologyTask(oncologModuleId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1384,34 +1366,8 @@ namespace IRaCIS.Application.Services
|
||||||
// 肿瘤学
|
// 肿瘤学
|
||||||
case ReadingCategory.Global:
|
case ReadingCategory.Global:
|
||||||
var subjectVisitId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
|
var subjectVisitId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
|
||||||
needReadList=await _readModuleRepository.Where(x => x.SubjectVisitId == subjectVisitId && x.ModuleType==ModuleTypeEnum.Oncology)
|
var oncologyReadId= await _readModuleRepository.Where(x => x.SubjectVisitId == subjectVisitId && x.ModuleType == ModuleTypeEnum.Oncology).Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
.Select(x => new ReadingGenerataTaskDTO
|
await AddOncologyTask(oncologyReadId);
|
||||||
{
|
|
||||||
IsUrgent = x.IsUrgent ?? false,
|
|
||||||
SubjectId = x.SubjectId,
|
|
||||||
ReadingName = x.ModuleName,
|
|
||||||
VisitNum = x.VisitNum,
|
|
||||||
ReadModuleId = x.Id,
|
|
||||||
ReadingCategory = typeChangeDic[x.ModuleType],
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
var readingType=await _trialRepository.Where(x => x.Id == taskInfo.TrialId).Select(x => x.ReadingType).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
if (taskInfo.JudgeVisitTaskId == null&&(await _visitTaskRepository.Where(x=>x.TaskState==TaskState.Effect&&x.ReadingCategory==ReadingCategory.Global
|
|
||||||
&&x.ReadingTaskState==ReadingTaskState.HaveSigned
|
|
||||||
).CountAsync()== (int)readingType))
|
|
||||||
{
|
|
||||||
// 有裁判要等裁判完成之后才进行添加
|
|
||||||
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
|
||||||
{
|
|
||||||
|
|
||||||
ReadingCategory = GenerateTaskCategory.Oncology,
|
|
||||||
TrialId = taskInfo.TrialId,
|
|
||||||
ReadingGenerataTaskList = needReadList
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//needReadList = needReadList.Where(x => _visitTaskRepository.Where(y => y.SouceReadModuleId == x.ReadModuleId).Count() == 0).ToList();
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1423,39 +1379,88 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加肿瘤学阅片任务
|
/// 添加肿瘤学阅片任务 其实这里无非是要判断临床数据是否签名 但是对于添加新的阅片期 其实没有临床数据 可以走之前的逻辑
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
//public async Task<bool> AddOncologyTask(Guid readModuleId)
|
[NonDynamicMethod]
|
||||||
//{
|
public async Task AddOncologyTask(Guid oncologModuleId)
|
||||||
// var readModuleInfo=await _readModuleRepository.Where(x=>x.Id==readModuleId&& x.ModuleType == ModuleTypeEnum.Oncology).Select(x => new ReadingGenerataTaskDTO
|
{
|
||||||
// {
|
|
||||||
// IsUrgent = x.IsUrgent ?? false,
|
|
||||||
// SubjectId = x.SubjectId,
|
|
||||||
// ReadingName = x.ModuleName,
|
|
||||||
// VisitNum = x.VisitNum,
|
|
||||||
// ReadModuleId = x.Id,
|
|
||||||
// ReadingCategory = ReadingCategory.Oncology,
|
|
||||||
// }).ToListAsync();
|
|
||||||
|
|
||||||
// // 如果当前是肿瘤学
|
// 判断是否读片完成
|
||||||
// if (readModuleInfo.Count != 0)
|
var finishReading = false;
|
||||||
// {
|
|
||||||
// if (taskInfo.JudgeVisitTaskId == null && (await _visitTaskRepository.Where(x => x.TaskState == TaskState.Effect && x.ReadingCategory == ReadingCategory.Global
|
|
||||||
// && x.ReadingTaskState == ReadingTaskState.HaveSigned
|
|
||||||
// ).CountAsync() == (int)readingType))
|
|
||||||
// {
|
|
||||||
// // 有裁判要等裁判完成之后才进行添加
|
|
||||||
// await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
|
||||||
// {
|
|
||||||
|
|
||||||
// ReadingCategory = GenerateTaskCategory.Oncology,
|
|
||||||
// TrialId = taskInfo.TrialId,
|
var readModuleInfo = await _readModuleRepository.Where(x => x.Id == oncologModuleId && x.ModuleType == ModuleTypeEnum.Oncology).FirstOrDefaultAsync();
|
||||||
// ReadingGenerataTaskList = needReadList
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
// 如果当前是肿瘤学
|
||||||
//}
|
if (readModuleInfo != null)
|
||||||
|
{
|
||||||
|
// 先找到对应的全局阅片模块Id
|
||||||
|
var globalreadModuleId = await _readModuleRepository.Where(x => x.SubjectVisitId == readModuleInfo.SubjectVisitId && x.ModuleType == ModuleTypeEnum.Global).Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
// 找到一个全局阅片任务是否有裁判任务
|
||||||
|
|
||||||
|
var judgeVisitTaskId = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModuleId && x.TaskState == TaskState.Effect && x.ReadingCategory == ReadingCategory.Global
|
||||||
|
&& x.ReadingTaskState == ReadingTaskState.HaveSigned).Select(x => x.JudgeVisitTaskId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
// 获取系统配置
|
||||||
|
var readingType = await _trialRepository.Where(x => x.Id == readModuleInfo.TrialId).Select(x => x.ReadingType).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
// 判断阅片是否完成
|
||||||
|
if (judgeVisitTaskId == null && (await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModuleId && x.TaskState == TaskState.Effect && x.ReadingCategory == ReadingCategory.Global
|
||||||
|
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && !x.IsAnalysisCreate
|
||||||
|
).CountAsync() == (int)readingType))
|
||||||
|
{
|
||||||
|
finishReading = true;
|
||||||
|
}
|
||||||
|
else if(judgeVisitTaskId!=null&& (await _visitTaskRepository.AnyAsync(x=>x.Id== judgeVisitTaskId.Value&&x.ReadingTaskState== ReadingTaskState.HaveSigned)))
|
||||||
|
{
|
||||||
|
finishReading = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (finishReading)
|
||||||
|
{
|
||||||
|
// 获取临床数据
|
||||||
|
var clinicalData = await _readingClinicalDataService.GetReadingClinicalList(new GetReadingClinicalDataListIndto()
|
||||||
|
{
|
||||||
|
SubjectId = readModuleInfo.SubjectId,
|
||||||
|
ReadingId = readModuleInfo.Id,
|
||||||
|
TrialId = readModuleInfo.TrialId,
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// 判断是否临床数据都已经签名
|
||||||
|
if (!clinicalData.Any(x => !x.IsSign))
|
||||||
|
{
|
||||||
|
|
||||||
|
List<ReadingGenerataTaskDTO> needReadList = new List<ReadingGenerataTaskDTO>();
|
||||||
|
|
||||||
|
needReadList.Add(new ReadingGenerataTaskDTO()
|
||||||
|
{
|
||||||
|
IsUrgent = readModuleInfo.IsUrgent ?? false,
|
||||||
|
SubjectId = readModuleInfo.SubjectId,
|
||||||
|
ReadingName = readModuleInfo.ModuleName,
|
||||||
|
VisitNum = readModuleInfo.VisitNum,
|
||||||
|
ReadModuleId = readModuleInfo.Id,
|
||||||
|
ReadingCategory = ReadingCategory.Oncology,
|
||||||
|
});
|
||||||
|
|
||||||
|
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
||||||
|
{
|
||||||
|
|
||||||
|
ReadingCategory = GenerateTaskCategory.Oncology,
|
||||||
|
TrialId = readModuleInfo.TrialId,
|
||||||
|
ReadingGenerataTaskList = needReadList
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue