修改一版
This commit is contained in:
@@ -107,6 +107,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 系统标准Id
|
||||
/// </summary>
|
||||
@@ -172,6 +177,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
@@ -278,6 +288,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public bool IsJudgeQuestion { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public class GetTrialGroupNameListInDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 标准ID
|
||||
/// </summary>
|
||||
public Guid CriterionId { get; set; }
|
||||
}
|
||||
|
||||
public class GetTrialCriterionOtherQuestionInDto
|
||||
{
|
||||
[NotDefault]
|
||||
@@ -313,7 +334,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 问题名称
|
||||
/// </summary>
|
||||
@@ -322,6 +342,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public class AddOrUpdateReadingQuestionSystemInDto
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 分组
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// </summary>
|
||||
@@ -408,6 +434,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string Remark { get; set; } = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 分组
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
|
||||
@@ -28,12 +28,14 @@ namespace IRaCIS.Application.Services
|
||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||
private readonly IRepository<ReadingClinicalDataView> _readingClinicalDataViewRepository;
|
||||
private readonly IRepository<PreviousPDF> _previousPDFRepository;
|
||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<ReadingClinicalDataPDF> _readingClinicalDataPDFRepository;
|
||||
|
||||
public ReadingClinicalDataService(IRepository<ReadingClinicalData> readingClinicalDataRepository,
|
||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
|
||||
IRepository<ReadingClinicalDataView> readingClinicalDataViewRepository,
|
||||
IRepository<PreviousPDF> previousPDFRepository,
|
||||
IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<ReadingClinicalDataPDF> readingClinicalDataPDFRepository
|
||||
)
|
||||
{
|
||||
@@ -41,6 +43,7 @@ namespace IRaCIS.Application.Services
|
||||
this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
|
||||
this._readingClinicalDataViewRepository = readingClinicalDataViewRepository;
|
||||
this._previousPDFRepository = previousPDFRepository;
|
||||
this._subjectVisitRepository = subjectVisitRepository;
|
||||
this._readingClinicalDataPDFRepository = readingClinicalDataPDFRepository;
|
||||
}
|
||||
|
||||
@@ -191,11 +194,11 @@ namespace IRaCIS.Application.Services
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<GetReadingClinicalDataListOutDto>> GetReadingClinicalDataList(GetReadingClinicalDataListIndto inDto)
|
||||
{
|
||||
var isBaseLine = await _subjectVisitRepository.AnyAsync(x => x.Id == inDto.ReadingId && x.VisitNum == 0);
|
||||
var result = await _readingClinicalDataViewRepository.Where(x=>x.SubjectId==inDto.SubjectId)
|
||||
.Where(x=>x.ReadingId==inDto.ReadingId||x.ReadingId==null).ProjectTo<GetReadingClinicalDataListOutDto>(_mapper.ConfigurationProvider).ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(GetReadingClinicalDataListOutDto.ClinicalDataSetName) : inDto.SortField,
|
||||
.Where(x=>x.ReadingId==inDto.ReadingId||x.ReadingId==null)
|
||||
.WhereIf(!isBaseLine,x=>x.IsCRCUpload==false).ProjectTo<GetReadingClinicalDataListOutDto>(_mapper.ConfigurationProvider).ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(GetReadingClinicalDataListOutDto.ClinicalDataSetName) : inDto.SortField,
|
||||
inDto.Asc);
|
||||
|
||||
|
||||
foreach (var item in result.CurrentPageData)
|
||||
{
|
||||
item.ClinicalDataLevelName = item.ClinicalDataLevel.GetDisplayName();
|
||||
|
||||
@@ -510,5 +510,35 @@ namespace IRaCIS.Application.Services
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目问题分组
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<string>> GetTrialGroupNameList(GetTrialGroupNameListInDto inDto)
|
||||
{
|
||||
var result = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.CriterionId && x.Type == "group")
|
||||
.Select(x => x.GroupName).ToListAsync();
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取系统问题分组
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<string>> GetSystemGroupNameList(GetTrialGroupNameListInDto inDto)
|
||||
{
|
||||
var result = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.CriterionId && x.Type == "group")
|
||||
.Select(x => x.GroupName).ToListAsync();
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user