Uat_Study
he 2022-06-27 10:41:16 +08:00
parent 14194bbb00
commit 8cd6508588
4 changed files with 10 additions and 12 deletions

View File

@ -4355,7 +4355,7 @@
IR影像阅片
</summary>
</member>
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetNextTaskId(System.Nullable{System.Guid},System.Guid,System.Nullable{System.Guid})">
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetNextTask(System.Nullable{System.Guid},System.Guid,System.Nullable{System.Guid})">
<summary>
获取下一个阅片任务
</summary>

View File

@ -90,7 +90,6 @@ namespace IRaCIS.Application.Services
{
await this.AddTrialClinicalDataTrialSet(inDto.TrialId);
var trialClinicalDataList= await _clinicalDataTrialSetRepository.AsQueryable()
.Where(x => x.TrialId == inDto.TrialId)
.WhereIf(inDto.ClinicalDataLevel!=null,x=>x.ClinicalDataLevel== inDto.ClinicalDataLevel)
.WhereIf(inDto.ClinicalUploadType != null, x => x.ClinicalUploadType == inDto.ClinicalUploadType)

View File

@ -27,7 +27,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public class GetReadingTaskDto
{
public Guid VisistTaskId { get; set; }
public Guid VisitTaskId { get; set; }
public Guid VisistId { get; set; }
public string TaskBlindName { get; set; }

View File

@ -72,7 +72,7 @@ namespace IRaCIS.Application.Services
/// <param name="subjectId"></param>
/// <param name="trialId"></param>
/// <returns></returns>
private async Task<GetReadingTaskDto> GetNextTaskId(Guid? subjectId,Guid trialId,Guid? visistTaskId)
private async Task<GetReadingTaskDto> GetNextTask(Guid? subjectId,Guid trialId,Guid? visistTaskId)
{
GetReadingTaskDto? task = new GetReadingTaskDto();
@ -80,7 +80,7 @@ namespace IRaCIS.Application.Services
{
task = await _visitTaskRepository.Where(x => x.Id==visistTaskId).Select(x => new GetReadingTaskDto()
{
VisistTaskId = x.Id,
VisitTaskId = x.Id,
TaskBlindName = x.TaskBlindName,
SubjectId=x.SubjectId,
ReadingCategory = x.ReadingCategory,
@ -92,7 +92,6 @@ namespace IRaCIS.Application.Services
}
else if (subjectId != null)
{
var subjectList =await _subjectRepository.Where(t => t.TrialId == trialId)
.Where(t => t.SubjectDoctorList.Any(t => t.DoctorUserId == _userInfo.Id))
.Select(s => new SubjectTask()
@ -113,7 +112,7 @@ namespace IRaCIS.Application.Services
var taskquery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.SubjectId == newSubjectId && x.DoctorUserId == _userInfo.Id).Select(x => new GetReadingTaskDto()
{
VisistTaskId = x.Id,
VisitTaskId = x.Id,
TaskBlindName=x.TaskBlindName,
ReadingCategory = x.ReadingCategory,
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
@ -133,19 +132,19 @@ namespace IRaCIS.Application.Services
{
task = await _visitTaskRepository.Where(x => x.TrialId == trialId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.Id).Select(x => new GetReadingTaskDto()
{
VisistTaskId = x.Id,
VisitTaskId = x.Id,
TaskBlindName = x.TaskBlindName,
ReadingCategory = x.ReadingCategory,
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
VisitNum = x.SourceSubjectVisitId != null ? x.SubjectVisit.VisitNum : x.ReadModule.VisitNum,
SubjectId=x.SubjectId,
SubjectCode=x.Subject.Code,
}).FirstOrDefaultAsync();
if (task == null)
{
throw new BusinessValidationFailedException("任务都已经完成");
}
task.SubjectId = await _subjectVisitRepository.Where(x => x.Id == task.VisistId).Select(x => x.SubjectId).FirstOrDefaultAsync();
}
task.SubjectCode= await _subjectRepository.Where(x => x.Id == task.SubjectId).Select(x => x.Code).FirstOrDefaultAsync();
return task;
@ -163,7 +162,7 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task<(List<NoneDicomStudyView>,object)> GetReadingImageFile(GetReadingImgInDto inDto)
{
var task=await GetNextTaskId(inDto.SubjectId, inDto.TrialId,inDto.VisistTaskId);
var task=await GetNextTask(inDto.SubjectId, inDto.TrialId,inDto.VisistTaskId);
List<Guid> visitIds = new List<Guid>();
if (task.ReadingCategory == ReadingCategory.Visit)
{
@ -183,7 +182,7 @@ namespace IRaCIS.Application.Services
x.IsReadingShowSubjectInfo,
}).FirstOrDefaultAsync();
return (result, new {
VisitTaskId= task.VisistTaskId,
VisitTaskId= task.VisitTaskId,
SubjectId=task.SubjectId,
SubjectCode=task.SubjectCode,
ReadingCategory= task.ReadingCategory,