Uat_Study
parent
5b32340594
commit
2f403394f0
|
@ -147,8 +147,6 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public ReadingMethod ReadingType { get; set; }
|
public ReadingMethod ReadingType { get; set; }
|
||||||
|
|
||||||
[NotDefault]
|
|
||||||
public Guid EnrollId { get; set; }
|
|
||||||
|
|
||||||
public Guid? DoctorUserId { get; set; }
|
public Guid? DoctorUserId { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
var verifyExp1 = new EntityVerifyExp<TaskAllocationRule>()
|
var verifyExp1 = new EntityVerifyExp<TaskAllocationRule>()
|
||||||
{
|
{
|
||||||
VerifyExp = t => t.EnrollId == addOrEditTaskAllocationRule.EnrollId && t.TrialId == addOrEditTaskAllocationRule.TrialId,
|
VerifyExp = t => t.EnrollId == addOrEditTaskAllocationRule.DoctorUserId && t.TrialId == addOrEditTaskAllocationRule.TrialId,
|
||||||
VerifyMsg = "已有该医生配置,不允许继续增加"
|
VerifyMsg = "已有该医生配置,不允许继续增加"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -127,7 +127,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
TrialId = enroll.TrialId,
|
TrialId = enroll.TrialId,
|
||||||
ReadingType = enroll.Trial.ReadingType,
|
ReadingType = enroll.Trial.ReadingType,
|
||||||
EnrollId =enroll.Id,
|
|
||||||
DoctorUserId = user.Id,
|
DoctorUserId = user.Id,
|
||||||
FullName = user.FullName,
|
FullName = user.FullName,
|
||||||
UserCode = user.UserCode,
|
UserCode = user.UserCode,
|
||||||
|
@ -142,14 +141,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<TrialDoctorUserSelectView>> GetDoctorSelectList(DoctorSelectQuery selectQuery, [FromServices] IRepository<Enroll> _enrollRepository)
|
public async Task<List<TrialDoctorUserSelectView>> GetDoctorSelectList(DoctorSelectQuery selectQuery, [FromServices] IRepository<Enroll> _enrollRepository)
|
||||||
{
|
{
|
||||||
var query = from enroll in _enrollRepository.Where(t => t.TrialId == selectQuery.TrialId && t.EnrollStatus >= (int)EnrollStatus.ConfirmIntoGroup && t.DoctorUserId !=null)
|
var query = from allocationRule in _taskAllocationRuleRepository.Where(t => t.TrialId == selectQuery.TrialId && t.IsEnable)
|
||||||
.WhereIf(selectQuery.ReadingCategory !=null,t=>t.EnrollReadingCategoryList.Any(u=>u.ReadingCategory==selectQuery.ReadingCategory))
|
join user in _userRepository.AsQueryable() on allocationRule.DoctorUserId equals user.Id
|
||||||
join user in _userRepository.AsQueryable() on enroll.DoctorId equals user.DoctorId
|
|
||||||
select new TrialDoctorUserSelectView()
|
select new TrialDoctorUserSelectView()
|
||||||
{
|
{
|
||||||
TrialId = enroll.TrialId,
|
TrialId = allocationRule.TrialId,
|
||||||
ReadingType = enroll.Trial.ReadingType,
|
ReadingType = allocationRule.Trial.ReadingType,
|
||||||
EnrollId = enroll.Id,
|
|
||||||
DoctorUserId = user.Id,
|
DoctorUserId = user.Id,
|
||||||
FullName = user.FullName,
|
FullName = user.FullName,
|
||||||
UserCode = user.UserCode,
|
UserCode = user.UserCode,
|
||||||
|
|
|
@ -154,18 +154,18 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable && t.IsJudgeDoctor == false).Count() < 2)
|
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable && t.IsJudgeDoctor == false).Count() < 2)
|
||||||
{
|
{
|
||||||
//throw new BusinessValidationFailedException("能参与读片的医生数量必须>=2,自动分配任务中止");
|
throw new BusinessValidationFailedException("能参与读片的医生数量必须>=2,自动分配任务中止");
|
||||||
|
|
||||||
break;
|
//break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!(assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm1) && allocateSubjectArmList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2)))
|
if (!(assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm1) && allocateSubjectArmList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2)))
|
||||||
{
|
{
|
||||||
//throw new BusinessValidationFailedException("该受试者阅片医生未配置完成");
|
throw new BusinessValidationFailedException("该受试者阅片医生未配置完成");
|
||||||
|
|
||||||
break;
|
//break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -398,9 +398,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable).Count() < 2)
|
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable).Count() < 2)
|
||||||
{
|
{
|
||||||
//throw new BusinessValidationFailedException("能参与读片的医生数量必须>=2,自动分配任务中止");
|
throw new BusinessValidationFailedException("能参与读片的医生数量必须>=2,自动分配任务中止");
|
||||||
|
|
||||||
break;
|
//break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//配置了医生
|
//配置了医生
|
||||||
|
|
Loading…
Reference in New Issue