Uat_Study
he 2023-07-05 17:50:31 +08:00
parent f7ae01ddc1
commit c958e49118
6 changed files with 84 additions and 12 deletions

View File

@ -462,6 +462,28 @@ namespace IRaCIS.Core.Application.Service
return ResponseOutput.Ok(true);
}
/// <summary>
/// 获取PM待确认列表
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<PageOutput<GetCRCConfirmListOutDto>> GetPMConfirmList(GetPMConfirmListInDto inDto)
{
return await GetCRCConfirmList(new GetCRCConfirmListInDto()
{
TrialId = inDto.TrialId,
IsCRCConfirm = true,
IsPMConfirm = false,
PageIndex = inDto.PageIndex,
PageSize = inDto.PageSize,
Asc = inDto.Asc,
SortField = inDto.SortField,
TrialReadingCriterionId = inDto.TrialReadingCriterionId
});
}
/// <summary>
/// 获取CRC确认列表
/// </summary>
@ -472,6 +494,8 @@ namespace IRaCIS.Core.Application.Service
{
var query = _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
.WhereIf(inDto.ReadModuleId != null, x => x.Id == inDto.ReadModuleId)
.WhereIf(inDto.IsCRCConfirm != null, x => x.IsCRCConfirm == inDto.IsCRCConfirm)
.WhereIf(inDto.IsPMConfirm != null, x => x.IsCRCConfirm == inDto.IsPMConfirm)
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId)
.WhereIf(inDto.SubjectId != null, x => x.SubjectId == inDto.SubjectId)
.Select(x => new GetCRCConfirmListOutDto()

View File

@ -119,9 +119,20 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string Answer { get; set; } = string.Empty;
}
public class GetPMConfirmListInDto: PageInput
{
public Guid TrialId { get; set; }
public Guid TrialReadingCriterionId { get; set; }
}
public class GetCRCConfirmListInDto:PageInput
{
public bool? IsCRCConfirm { get; set; }
public bool? IsPMConfirm { get; set; }
public Guid? TrialReadingCriterionId { get; set; }
public Guid? SubjectId { get; set; }

View File

@ -105,6 +105,10 @@ namespace IRaCIS.Core.Application.Contracts
public int? ToBeApprovalCount { get; set; }
}
public class GetPMClinicalDataToBeDoneListOutDto: TrialBaseInfoDto
{
public int? ToBeApprovalCount { get; set; }
}
public class ReviewerSelectToBeDoneQuery : PageInput
{

View File

@ -293,6 +293,33 @@ namespace IRaCIS.Core.Application
}
/// <summary>
/// 获取PM核对临床数据
/// </summary>
/// <param name="inQuery"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput<PageOutput<GetPMClinicalDataToBeDoneListOutDto>>> GetPMClinicalDataToBeDoneList(ReviewerSelectToBeDoneQuery inQuery)
{
var query = _trialRepository
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
.Select(t => new GetPMClinicalDataToBeDoneListOutDto()
{
TrialId = t.Id,
ResearchProgramNo = t.ResearchProgramNo,
ExperimentName = t.ExperimentName,
TrialCode = t.TrialCode,
ToBeApprovalCount = t.ReadModuleList.Where(u => u.IsCRCConfirm&&!u.IsPMConfirm).Count()
});
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReviewerSelectToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
return ResponseOutput.Ok(result, new { ToBeApprovalCount = query.Sum(x=>x.ToBeApprovalCount) }); ;
}
#endregion

View File

@ -119,6 +119,10 @@ namespace IRaCIS.Core.Domain.Models
[ForeignKey("SubjectVisitId")]
public SubjectVisit SubjectVisit { get; set; }
[JsonIgnore]
[ForeignKey("TrialId")]
public Trial Trial { get; set; }
/// <summary>
/// 阅片配置的类型

View File

@ -53,6 +53,8 @@ namespace IRaCIS.Core.Domain.Models
public List<TrialSite> TrialSiteList { get; set; } = new List<TrialSite>();
[JsonIgnore]
public List<TrialSiteUser> TrialSiteUserList { get; set; } = new List<TrialSiteUser>();
[JsonIgnore]
public List<ReadModule> ReadModuleList { get; set; } = new List<ReadModule>();
public Guid IndicationTypeId { get; set; } = Guid.Empty;