【入组增加一致性分析切换按钮】
parent
1aa5e45694
commit
d0c8df1452
|
@ -152,9 +152,20 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public List<ReadingCategory> ReadingCategorys { get; set; }
|
||||
|
||||
public bool IsJoinAnalysis { get; set; } = true;
|
||||
}
|
||||
|
||||
public class SetCriterionJoinJoinAnalysisCommand
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid EnrollId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public bool IsJoinAnalysis { get; set; }
|
||||
}
|
||||
|
||||
public class SetEnrollEnableCommand
|
||||
{
|
||||
|
@ -247,6 +258,10 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
}
|
||||
|
||||
public class DoctorCriterionStatus : SetCriterionJoinJoinAnalysisCommand
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class WorkLoadAndAgreementDTO : WorkLoadAndTrainingDTO
|
||||
{
|
||||
|
@ -270,6 +285,8 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public List<TrialReadingCriterionDto> TrialReadingCriterionList { get; set; }
|
||||
|
||||
public List<DoctorCriterionStatus> DoctorCriterionStatusList { get; set; }
|
||||
|
||||
public List<TrialCriterionReadingCategory> CriterionReadingCategoryList { get; set; }
|
||||
|
||||
//任务阅片状态
|
||||
|
|
|
@ -23,6 +23,9 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<TrialRevenuesPrice> _trialRevenuesPriceRepository;
|
||||
private readonly IRepository<TrialRevenuesPriceVerification> _trialRevenuesPriceVerificationRepository;
|
||||
|
||||
private readonly IRepository<EnrollReadingCriterion> _enrollReadingCriterionRepository;
|
||||
|
||||
|
||||
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
|
||||
public DoctorWorkloadService(IRepository<Trial> clinicalTrialProjectRepository,
|
||||
IRepository<Enroll> intoGroupRepository,
|
||||
|
@ -34,7 +37,7 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<TrialRevenuesPrice> trialRevenuesPriceRepository,
|
||||
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
|
||||
IRepository<TrialRevenuesPriceVerification> trialRevenuesPriceVerificationRepository,
|
||||
IMapper mapper)
|
||||
IRepository<EnrollReadingCriterion> enrollReadingCriterionRepository)
|
||||
{
|
||||
_taskAllocationRuleRepository = taskAllocationRuleRepository;
|
||||
_trialRepository = clinicalTrialProjectRepository;
|
||||
|
@ -46,6 +49,7 @@ namespace IRaCIS.Application.Services
|
|||
_costStatisticsRepository = costStatisticsRepository;
|
||||
_trialRevenuesPriceRepository = trialRevenuesPriceRepository;
|
||||
_trialRevenuesPriceVerificationRepository = trialRevenuesPriceVerificationRepository;
|
||||
_enrollReadingCriterionRepository = enrollReadingCriterionRepository;
|
||||
|
||||
}
|
||||
|
||||
|
@ -105,6 +109,27 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
#endregion
|
||||
|
||||
public async Task<IResponseOutput> BatchSetCriterionJoinJoinAnalysis(List<SetCriterionJoinJoinAnalysisCommand> batchList)
|
||||
{
|
||||
|
||||
foreach (var item in batchList)
|
||||
{
|
||||
if (item.Id == null)
|
||||
{
|
||||
await _enrollReadingCriterionRepository.InsertFromDTOAsync(item);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
await _enrollReadingCriterionRepository.UpdateFromDTOAsync(item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
await _enrollReadingCriterionRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -219,6 +244,14 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
TrialReadingCriterionList = intoGroup.Trial.ReadingQuestionCriterionTrialList.Where(t => t.IsConfirm).Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, TrialReadingCriterionName = t.CriterionName, CriterionType = t.CriterionType, IsOncologyReading = t.IsOncologyReading, IsArbitrationReading = t.IsArbitrationReading, IsGlobalReading = t.IsGlobalReading, ReadingInfoSignTime = t.ReadingInfoSignTime, ReadingType = t.ReadingType }).ToList(),
|
||||
|
||||
DoctorCriterionStatusList= intoGroup.EnrollReadingCriteriaList.Select(t=>new DoctorCriterionStatus()
|
||||
{
|
||||
EnrollId=t.Id,
|
||||
Id=t.Id,
|
||||
IsJoinAnalysis=t.IsJoinAnalysis,
|
||||
TrialReadingCriterionId=t.TrialReadingCriterionId
|
||||
}).ToList(),
|
||||
|
||||
|
||||
|
||||
CriterionReadingCategoryList = intoGroup.EnrollReadingCategoryList.Select(t => new TrialCriterionReadingCategory() { EnrollId = t.EnrollId, ReadingCategory = t.ReadingCategory, TrialReadingCriterionId = t.TrialReadingCriterionId }).ToList(),
|
||||
|
|
|
@ -15,6 +15,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<EnrollCommand, Enroll>();
|
||||
|
||||
CreateMap<SetCriterionJoinJoinAnalysisCommand, EnrollReadingCriterion>().ReverseMap();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,9 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public class EnrollReadingCriterion : Entity, IAuditAdd
|
||||
{
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("EnrollId")]
|
||||
public Enroll Enroll { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// EnrollId
|
||||
|
|
|
@ -69,5 +69,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
[JsonIgnore]
|
||||
public List<EnrollReadingCategory> EnrollReadingCategoryList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<EnrollReadingCriterion> EnrollReadingCriteriaList { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue