Uat_Study
parent
14194bbb00
commit
8cd6508588
|
@ -4355,7 +4355,7 @@
|
||||||
IR影像阅片
|
IR影像阅片
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</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>
|
||||||
获取下一个阅片任务
|
获取下一个阅片任务
|
||||||
</summary>
|
</summary>
|
||||||
|
|
|
@ -90,7 +90,6 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
await this.AddTrialClinicalDataTrialSet(inDto.TrialId);
|
await this.AddTrialClinicalDataTrialSet(inDto.TrialId);
|
||||||
var trialClinicalDataList= await _clinicalDataTrialSetRepository.AsQueryable()
|
var trialClinicalDataList= await _clinicalDataTrialSetRepository.AsQueryable()
|
||||||
|
|
||||||
.Where(x => x.TrialId == inDto.TrialId)
|
.Where(x => x.TrialId == inDto.TrialId)
|
||||||
.WhereIf(inDto.ClinicalDataLevel!=null,x=>x.ClinicalDataLevel== inDto.ClinicalDataLevel)
|
.WhereIf(inDto.ClinicalDataLevel!=null,x=>x.ClinicalDataLevel== inDto.ClinicalDataLevel)
|
||||||
.WhereIf(inDto.ClinicalUploadType != null, x => x.ClinicalUploadType == inDto.ClinicalUploadType)
|
.WhereIf(inDto.ClinicalUploadType != null, x => x.ClinicalUploadType == inDto.ClinicalUploadType)
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public class GetReadingTaskDto
|
public class GetReadingTaskDto
|
||||||
{
|
{
|
||||||
public Guid VisistTaskId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
public Guid VisistId { get; set; }
|
public Guid VisistId { get; set; }
|
||||||
|
|
||||||
public string TaskBlindName { get; set; }
|
public string TaskBlindName { get; set; }
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="subjectId"></param>
|
/// <param name="subjectId"></param>
|
||||||
/// <param name="trialId"></param>
|
/// <param name="trialId"></param>
|
||||||
/// <returns></returns>
|
/// <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();
|
GetReadingTaskDto? task = new GetReadingTaskDto();
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
task = await _visitTaskRepository.Where(x => x.Id==visistTaskId).Select(x => new GetReadingTaskDto()
|
task = await _visitTaskRepository.Where(x => x.Id==visistTaskId).Select(x => new GetReadingTaskDto()
|
||||||
{
|
{
|
||||||
VisistTaskId = x.Id,
|
VisitTaskId = x.Id,
|
||||||
TaskBlindName = x.TaskBlindName,
|
TaskBlindName = x.TaskBlindName,
|
||||||
SubjectId=x.SubjectId,
|
SubjectId=x.SubjectId,
|
||||||
ReadingCategory = x.ReadingCategory,
|
ReadingCategory = x.ReadingCategory,
|
||||||
|
@ -92,7 +92,6 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
else if (subjectId != null)
|
else if (subjectId != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
var subjectList =await _subjectRepository.Where(t => t.TrialId == trialId)
|
var subjectList =await _subjectRepository.Where(t => t.TrialId == trialId)
|
||||||
.Where(t => t.SubjectDoctorList.Any(t => t.DoctorUserId == _userInfo.Id))
|
.Where(t => t.SubjectDoctorList.Any(t => t.DoctorUserId == _userInfo.Id))
|
||||||
.Select(s => new SubjectTask()
|
.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()
|
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,
|
TaskBlindName=x.TaskBlindName,
|
||||||
ReadingCategory = x.ReadingCategory,
|
ReadingCategory = x.ReadingCategory,
|
||||||
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
|
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()
|
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,
|
TaskBlindName = x.TaskBlindName,
|
||||||
ReadingCategory = x.ReadingCategory,
|
ReadingCategory = x.ReadingCategory,
|
||||||
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
|
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
|
||||||
VisitNum = x.SourceSubjectVisitId != null ? x.SubjectVisit.VisitNum : x.ReadModule.VisitNum,
|
VisitNum = x.SourceSubjectVisitId != null ? x.SubjectVisit.VisitNum : x.ReadModule.VisitNum,
|
||||||
|
SubjectId=x.SubjectId,
|
||||||
|
SubjectCode=x.Subject.Code,
|
||||||
}).FirstOrDefaultAsync();
|
}).FirstOrDefaultAsync();
|
||||||
if (task == null)
|
if (task == null)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("任务都已经完成");
|
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;
|
return task;
|
||||||
|
|
||||||
|
|
||||||
|
@ -163,7 +162,7 @@ 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 GetNextTaskId(inDto.SubjectId, inDto.TrialId,inDto.VisistTaskId);
|
var task=await GetNextTask(inDto.SubjectId, inDto.TrialId,inDto.VisistTaskId);
|
||||||
List<Guid> visitIds = new List<Guid>();
|
List<Guid> visitIds = new List<Guid>();
|
||||||
if (task.ReadingCategory == ReadingCategory.Visit)
|
if (task.ReadingCategory == ReadingCategory.Visit)
|
||||||
{
|
{
|
||||||
|
@ -183,7 +182,7 @@ namespace IRaCIS.Application.Services
|
||||||
x.IsReadingShowSubjectInfo,
|
x.IsReadingShowSubjectInfo,
|
||||||
}).FirstOrDefaultAsync();
|
}).FirstOrDefaultAsync();
|
||||||
return (result, new {
|
return (result, new {
|
||||||
VisitTaskId= task.VisistTaskId,
|
VisitTaskId= task.VisitTaskId,
|
||||||
SubjectId=task.SubjectId,
|
SubjectId=task.SubjectId,
|
||||||
SubjectCode=task.SubjectCode,
|
SubjectCode=task.SubjectCode,
|
||||||
ReadingCategory= task.ReadingCategory,
|
ReadingCategory= task.ReadingCategory,
|
||||||
|
|
Loading…
Reference in New Issue