Uat_Study
parent
88bdeff571
commit
9ae1cb5fe1
|
@ -40,7 +40,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
public Guid? QuestionId { get; set; }
|
public Guid? QuestionId { get; set; }
|
||||||
|
|
||||||
public Guid visitTaskId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
public string Answer { get; set; }
|
public string Answer { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,7 @@ namespace IRaCIS.Application.Services
|
||||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 全局阅片相关
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取全局阅片历史记录
|
/// 获取全局阅片历史记录
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -115,7 +116,7 @@ namespace IRaCIS.Application.Services
|
||||||
QuestionId = x.QuestionId,
|
QuestionId = x.QuestionId,
|
||||||
SubjectId = inDto.SubjectId,
|
SubjectId = inDto.SubjectId,
|
||||||
GlobalTaskId = inDto.GlobalTaskId,
|
GlobalTaskId = inDto.GlobalTaskId,
|
||||||
TaskId=x.visitTaskId,
|
TaskId = x.VisitTaskId,
|
||||||
TrialId = inDto.TrialId,
|
TrialId = inDto.TrialId,
|
||||||
}).ToList());
|
}).ToList());
|
||||||
|
|
||||||
|
@ -138,7 +139,8 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前任务不是全局阅片任务");
|
throw new BusinessValidationFailedException("当前任务不是全局阅片任务");
|
||||||
}
|
}
|
||||||
GetGlobalReadingInfoOutDto result = new GetGlobalReadingInfoOutDto() {
|
GetGlobalReadingInfoOutDto result = new GetGlobalReadingInfoOutDto()
|
||||||
|
{
|
||||||
GlobalTaskId = inDto.VisitTaskId,
|
GlobalTaskId = inDto.VisitTaskId,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -195,8 +197,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取下一个阅片任务
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取下一个阅片任务
|
/// 获取下一个阅片任务
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -289,7 +292,9 @@ namespace IRaCIS.Application.Services
|
||||||
await _visitTaskRepository.SaveChangesAsync();
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取阅片非Dicom文件
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取阅片非Dicom文件
|
/// 获取阅片非Dicom文件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -298,7 +303,8 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(List<NoneDicomStudyView>, object)> GetReadingImageFile(GetReadingImgInDto inDto)
|
public async Task<(List<NoneDicomStudyView>, object)> GetReadingImageFile(GetReadingImgInDto inDto)
|
||||||
{
|
{
|
||||||
var task=await GetNextTask( new GetNextTaskInDto() {
|
var task = await GetNextTask(new GetNextTaskInDto()
|
||||||
|
{
|
||||||
TrialId = inDto.TrialId,
|
TrialId = inDto.TrialId,
|
||||||
SubjectId = inDto.SubjectId,
|
SubjectId = inDto.SubjectId,
|
||||||
VisistTaskId = inDto.VisistTaskId,
|
VisistTaskId = inDto.VisistTaskId,
|
||||||
|
@ -341,7 +347,8 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (result, new {
|
return (result, new
|
||||||
|
{
|
||||||
VisitTaskId = task.VisitTaskId,
|
VisitTaskId = task.VisitTaskId,
|
||||||
SubjectId = task.SubjectId,
|
SubjectId = task.SubjectId,
|
||||||
SubjectCode = task.SubjectCode,
|
SubjectCode = task.SubjectCode,
|
||||||
|
@ -352,7 +359,9 @@ namespace IRaCIS.Application.Services
|
||||||
IsExistsClinicalData = isExistsClinicalData,
|
IsExistsClinicalData = isExistsClinicalData,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取项目已确认的标准
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取项目已确认的标准
|
/// 获取项目已确认的标准
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -369,6 +378,9 @@ namespace IRaCIS.Application.Services
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 配置裁判问题相关
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取项目标准的裁判问题
|
/// 获取项目标准的裁判问题
|
||||||
|
@ -422,7 +434,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取项目的阅片问题
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取项目的阅片问题
|
/// 获取项目的阅片问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -540,7 +554,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
}); ;
|
}); ;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取阅片任务和答案
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取阅片任务和答案
|
/// 获取阅片任务和答案
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -573,7 +589,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
return groupList;
|
return groupList;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取裁判阅片任务信息
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取裁判阅片任务信息
|
/// 获取裁判阅片任务信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -607,7 +625,8 @@ namespace IRaCIS.Application.Services
|
||||||
judgeInfo.VisitTaskInfoList.Add(
|
judgeInfo.VisitTaskInfoList.Add(
|
||||||
new JudgeReadingInfoDto()
|
new JudgeReadingInfoDto()
|
||||||
{
|
{
|
||||||
JudgeQuestionAnswerInfoList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == item.Id&&x.ReadingQuestionTrial.IsJudgeQuestion).Select(x => new JudgeQuestionAnswerInfo {
|
JudgeQuestionAnswerInfoList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == item.Id && x.ReadingQuestionTrial.IsJudgeQuestion).Select(x => new JudgeQuestionAnswerInfo
|
||||||
|
{
|
||||||
Answer = x.Answer,
|
Answer = x.Answer,
|
||||||
QuestionName = x.ReadingQuestionTrial.QuestionName,
|
QuestionName = x.ReadingQuestionTrial.QuestionName,
|
||||||
}).ToListAsync(),
|
}).ToListAsync(),
|
||||||
|
@ -618,7 +637,9 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
return judgeInfo;
|
return judgeInfo;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存裁判问题
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存裁判问题
|
/// 保存裁判问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -637,27 +658,9 @@ namespace IRaCIS.Application.Services
|
||||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
#region 获取既往结果
|
||||||
/// 提交裁判问题
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[NonDynamicMethod]
|
|
||||||
public async Task<IResponseOutput> SubmitJudgeVisitTaskResult(SaveJudgeVisitTaskResult inDto)
|
|
||||||
{
|
|
||||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
|
||||||
{
|
|
||||||
JudgeResultTaskId = inDto.JudgeResultTaskId,
|
|
||||||
ReadingTaskState = ReadingTaskState.HaveSigned,
|
|
||||||
JudgeResultRemark = inDto.JudgeResultRemark,
|
|
||||||
SignTime = DateTime.Now,
|
|
||||||
JudgeResultImagePath=inDto.JudgeResultImagePath,
|
|
||||||
});
|
|
||||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
|
||||||
return ResponseOutput.Ok(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取既往结果
|
/// 获取既往结果
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -669,7 +672,9 @@ namespace IRaCIS.Application.Services
|
||||||
&& x.Id != inDto.VisitTaskId && x.ReadingTaskState == ReadingTaskState.HaveSigned).ProjectTo<GetReadingPastResultListOutDto>(_mapper.ConfigurationProvider).ToListAsync();
|
&& x.Id != inDto.VisitTaskId && x.ReadingTaskState == ReadingTaskState.HaveSigned).ProjectTo<GetReadingPastResultListOutDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
return readingPastResultList;
|
return readingPastResultList;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 找子问题
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 找子问题
|
/// 找子问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -687,7 +692,9 @@ namespace IRaCIS.Application.Services
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存任务问题
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存任务问题
|
/// 保存任务问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -718,11 +725,13 @@ namespace IRaCIS.Application.Services
|
||||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 提交问题
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 提交问题
|
/// 提交访视阅片问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -735,6 +744,7 @@ namespace IRaCIS.Application.Services
|
||||||
ReadingTaskState = ReadingTaskState.HaveSigned,
|
ReadingTaskState = ReadingTaskState.HaveSigned,
|
||||||
SignTime = DateTime.Now,
|
SignTime = DateTime.Now,
|
||||||
});
|
});
|
||||||
|
|
||||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||||
// 触裁判任务
|
// 触裁判任务
|
||||||
await this.TriggerJudgeQuestion(inDto.VisitTaskId);
|
await this.TriggerJudgeQuestion(inDto.VisitTaskId);
|
||||||
|
@ -745,6 +755,53 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 提交裁判问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[NonDynamicMethod]
|
||||||
|
public async Task<IResponseOutput> SubmitJudgeVisitTaskResult(SaveJudgeVisitTaskResult inDto)
|
||||||
|
{
|
||||||
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
||||||
|
{
|
||||||
|
JudgeResultTaskId = inDto.JudgeResultTaskId,
|
||||||
|
ReadingTaskState = ReadingTaskState.HaveSigned,
|
||||||
|
JudgeResultRemark = inDto.JudgeResultRemark,
|
||||||
|
SignTime = DateTime.Now,
|
||||||
|
JudgeResultImagePath = inDto.JudgeResultImagePath,
|
||||||
|
});
|
||||||
|
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 提交全局阅片结果
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[NonDynamicMethod]
|
||||||
|
public async Task<IResponseOutput> SubmitGlobalReadingInfo(SaveGlobalReadingInfoInDto inDto)
|
||||||
|
{
|
||||||
|
var result = await this.SaveGlobalReadingInfo(inDto);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//public async Task<IResponseOutput> SubmitTaskChangeState()
|
||||||
|
//{
|
||||||
|
|
||||||
|
//}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 完成阅片修改状态
|
/// 完成阅片修改状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -267,7 +267,7 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<GetReadingVisitListOutDto>> GetReadingVisitList(GetReadingVisitListInDto inDto)
|
public async Task<List<GetReadingVisitListOutDto>> GetReadingVisitList(GetReadingVisitListInDto inDto)
|
||||||
{
|
{
|
||||||
var maxVisitNum = await _readingPeriodSetRepository.Where(x => x.TrialId == inDto.TrialId && x.ReadingSetType == inDto.ReadingSetType&&(x.IsTakeEffect== ReadingPeriodStatus.TakeEffect||x.IsTakeEffect==ReadingPeriodStatus.Revocation)).MaxAsync(x => x.ExpirationVisitNum)??0;
|
var maxVisitNum = await _readingPeriodSetRepository.Where(x => x.TrialId == inDto.TrialId && x.ReadingSetType == inDto.ReadingSetType&&x.IsTakeEffect== ReadingPeriodStatus.TakeEffect).MaxAsync(x => x.ExpirationVisitNum)??0;
|
||||||
var thisVisitNum = await _readingPeriodSetRepository.Where(x => x.Id == inDto.ReadingPeriodSetId).Select(x => x.ExpirationVisitNum).FirstOrDefaultAsync() ?? -1;
|
var thisVisitNum = await _readingPeriodSetRepository.Where(x => x.Id == inDto.ReadingPeriodSetId).Select(x => x.ExpirationVisitNum).FirstOrDefaultAsync() ?? -1;
|
||||||
List <GetReadingVisitListOutDto> result = await _visitStageRepository.Where(x => x.TrialId == inDto.TrialId ).Where(x=>x.VisitNum== thisVisitNum || x.VisitNum >= maxVisitNum).Select(x => new GetReadingVisitListOutDto()
|
List <GetReadingVisitListOutDto> result = await _visitStageRepository.Where(x => x.TrialId == inDto.TrialId ).Where(x=>x.VisitNum== thisVisitNum || x.VisitNum >= maxVisitNum).Select(x => new GetReadingVisitListOutDto()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue