更新读片状态
parent
77f478c293
commit
3f573d6c11
|
@ -395,7 +395,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <summary>
|
||||
/// 上传阅片临床数据
|
||||
/// </summary>
|
||||
/// <param name="trialId"></param
|
||||
/// <param name="trialId"></param>
|
||||
/// <param name="subjectId"></param>
|
||||
/// <param name="readingId"></param>
|
||||
/// <returns></returns>
|
||||
|
|
|
@ -178,7 +178,15 @@
|
|||
<param name="subjectVisitId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.API.Controllers.StudyController.UploadReadClinicalData(System.Guid,System.Guid,System.Guid)" -->
|
||||
<member name="M:IRaCIS.Core.API.Controllers.StudyController.UploadReadClinicalData(System.Guid,System.Guid,System.Guid)">
|
||||
<summary>
|
||||
上传阅片临床数据
|
||||
</summary>
|
||||
<param name="trialId"></param>
|
||||
<param name="subjectId"></param>
|
||||
<param name="readingId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.StudyController.UploadNoneDicomFile(Microsoft.AspNetCore.Http.IFormCollection,System.Guid,System.Guid)">
|
||||
<summary>
|
||||
上传非Dicom 文件 支持压缩包 多文件上传
|
||||
|
|
|
@ -25,13 +25,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
|
||||
|
||||
private readonly IRepository<Subject> _subjectRepository;
|
||||
private readonly IRepository<SubjectUser> _subjectUserRepository;
|
||||
|
||||
private readonly IRepository<ReadModule> _readModuleRepository;
|
||||
|
||||
|
||||
public VisitTaskService(IRepository<VisitTask> visitTaskRepository, IRepository<Trial> trialRepository, IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<Subject> subjectRepository, IRepository<SubjectUser> subjectUserRepository, IRepository<TaskAllocationRule> taskAllocationRuleRepository
|
||||
IRepository<Subject> subjectRepository, IRepository<SubjectUser> subjectUserRepository, IRepository<TaskAllocationRule> taskAllocationRuleRepository, IRepository<ReadModule> readModuleRepository
|
||||
)
|
||||
{
|
||||
_taskAllocationRuleRepository = taskAllocationRuleRepository;
|
||||
|
@ -40,6 +41,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
_subjectVisitRepository = subjectVisitRepository;
|
||||
_subjectRepository = subjectRepository;
|
||||
_subjectUserRepository = subjectUserRepository;
|
||||
_readModuleRepository = readModuleRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -447,6 +449,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
task.AllocateTime = DateTime.Now;
|
||||
task.TaskState = TaskState.Allocated;
|
||||
|
||||
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == task.SourceSubjectVisitId, u => new SubjectVisit() { ReadingStatus = ReadingStatusEnum.ImageReading });
|
||||
|
||||
await _readModuleRepository.BatchUpdateNoTrackingAsync(t => t.Id == task.SouceReadModuleId, u => new ReadModule() { ReadingStatus = ReadingStatusEnum.ImageReading });
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -798,8 +804,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
doctor1Arm = 1;
|
||||
doctor2Arm = 2;
|
||||
}
|
||||
else if ( (preferredDoctor1Arm == null && preferredDoctor2Arm == 1)||
|
||||
(preferredDoctor1Arm == 2 && preferredDoctor2Arm == 1)||
|
||||
else if ((preferredDoctor1Arm == null && preferredDoctor2Arm == 1) ||
|
||||
(preferredDoctor1Arm == 2 && preferredDoctor2Arm == 1) ||
|
||||
(preferredDoctor1Arm == 2 && preferredDoctor2Arm == null))
|
||||
{
|
||||
doctor1Arm = 2;
|
||||
|
@ -810,7 +816,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
doctor1Arm = 1;
|
||||
doctor2Arm = 2;
|
||||
}
|
||||
}
|
||||
else if (preferredDoctor1Arm == 2 && preferredDoctor2Arm == 2)
|
||||
{
|
||||
doctor1Arm = 2;
|
||||
|
@ -820,27 +826,27 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
//if(!waitAllocationDoctorList.Where(t=>t.DoctorUserId== allocateDoctorList[0].DoctorUserId).SelectMany(u => u.SubjectArmList).Any(t => t.SubjectId == subject.SubjectId))
|
||||
//{
|
||||
await _subjectUserRepository.AddAsync(new SubjectUser() { TrialId = trialId, SubjectId = subject.SubjectId, DoctorUserId = allocateDoctorList[0].DoctorUserId, ArmEnum = doctor1Arm, AssignTime = DateTime.Now });
|
||||
|
||||
waitAllocationDoctorList.FirstOrDefault(t => t.DoctorUserId == allocateDoctorList[0].DoctorUserId).SubjectArmList.Add(new SubjectArm()
|
||||
{
|
||||
SubjectId = subject.SubjectId,
|
||||
ArmEnum = doctor1Arm
|
||||
});
|
||||
await _subjectUserRepository.AddAsync(new SubjectUser() { TrialId = trialId, SubjectId = subject.SubjectId, DoctorUserId = allocateDoctorList[0].DoctorUserId, ArmEnum = doctor1Arm, AssignTime = DateTime.Now });
|
||||
|
||||
waitAllocationDoctorList.FirstOrDefault(t => t.DoctorUserId == allocateDoctorList[0].DoctorUserId).SubjectArmList.Add(new SubjectArm()
|
||||
{
|
||||
SubjectId = subject.SubjectId,
|
||||
ArmEnum = doctor1Arm
|
||||
});
|
||||
//}
|
||||
|
||||
//if (!waitAllocationDoctorList.Where(t => t.DoctorUserId == allocateDoctorList[1].DoctorUserId).SelectMany(u => u.SubjectArmList).Any(t => t.SubjectId == subject.SubjectId))
|
||||
//{
|
||||
await _subjectUserRepository.AddAsync(new SubjectUser() { TrialId = trialId, SubjectId = subject.SubjectId, DoctorUserId = allocateDoctorList[1].DoctorUserId, ArmEnum = doctor2Arm, AssignTime = DateTime.Now });
|
||||
await _subjectUserRepository.AddAsync(new SubjectUser() { TrialId = trialId, SubjectId = subject.SubjectId, DoctorUserId = allocateDoctorList[1].DoctorUserId, ArmEnum = doctor2Arm, AssignTime = DateTime.Now });
|
||||
|
||||
waitAllocationDoctorList.FirstOrDefault(t => t.DoctorUserId == allocateDoctorList[1].DoctorUserId).SubjectArmList.Add(new SubjectArm()
|
||||
{
|
||||
SubjectId = subject.SubjectId,
|
||||
ArmEnum = doctor2Arm
|
||||
});
|
||||
waitAllocationDoctorList.FirstOrDefault(t => t.DoctorUserId == allocateDoctorList[1].DoctorUserId).SubjectArmList.Add(new SubjectArm()
|
||||
{
|
||||
SubjectId = subject.SubjectId,
|
||||
ArmEnum = doctor2Arm
|
||||
});
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ using System;
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
|
|
|
@ -4,7 +4,6 @@ using System;
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
|
|
|
@ -4,7 +4,6 @@ using System;
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
|
|
Loading…
Reference in New Issue