Uat_Study
parent
c41b6b2eb3
commit
7e47e07747
|
@ -54,6 +54,28 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public string VisitName { get; set; }
|
||||
}
|
||||
|
||||
public class GetCanChangeReadVisitListInDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 受试者ID
|
||||
/// </summary>
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public Guid Id { get; set; }
|
||||
}
|
||||
|
||||
public class ChangeCutOffVisitInDto
|
||||
{
|
||||
|
||||
[NotDefault]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
|
||||
public Guid SubjectVisitIdId { get; set; }
|
||||
}
|
||||
|
||||
public class GetSubjectReadVisitsInDto
|
||||
{
|
||||
|
|
|
@ -66,6 +66,61 @@ namespace IRaCIS.Application.Services
|
|||
this._readModuleRepository = readModuleRepository;
|
||||
}
|
||||
|
||||
#region 获取修改时可选择的阅片期截止访视
|
||||
|
||||
/// <summary>
|
||||
/// 获取修改截止访视下拉
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetSubjectReadVisitsOutDto>> GetCanChangeReadVisitList(GetCanChangeReadVisitListInDto inDto)
|
||||
{
|
||||
//增加标准
|
||||
var mixReadVisitNum = await _visitTaskRepository.Where(x =>
|
||||
x.TrialReadingCriterionId == inDto.TrialReadingCriterionId
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned
|
||||
&& x.ReadingCategory == ReadingCategory.Visit
|
||||
&& x.SubjectId == inDto.SubjectId
|
||||
&& x.TaskState == TaskState.Effect).MaxAsync(x => x.VisitTaskNum);
|
||||
|
||||
|
||||
var visitQuery = _subjectVisitRepository.Where(x => x.SubjectId == inDto.SubjectId && x.LatestScanDate != null && !x.IsLostVisit);
|
||||
var finalVisitNum = await visitQuery.Where(x => x.IsFinalVisit).Select(x => x.VisitNum).FirstOrDefaultAsync();
|
||||
|
||||
//增加标准
|
||||
var readModulequery = _readModuleRepository.AsQueryable().Where(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId);
|
||||
|
||||
var resultlist = await visitQuery.WhereIf(finalVisitNum != null && finalVisitNum != 0, x => x.VisitNum <= finalVisitNum)
|
||||
.Where(x => x.VisitNum > mixReadVisitNum)
|
||||
.Where(x => !x.IsBaseLine) // 排除基线
|
||||
.Where(x => readModulequery.Where(y => y.Id != inDto.Id && y.SubjectVisitId == x.Id && y.TrialReadingCriterionId == inDto.TrialReadingCriterionId && y.ReadingSetType == ReadingSetType.ImageReading).Count() == 0)
|
||||
.Select(x => new GetSubjectReadVisitsOutDto()
|
||||
{
|
||||
SubjectVisitId = x.Id,
|
||||
VisitName = x.VisitName,
|
||||
VisitNum = x.VisitNum,
|
||||
}).OrderBy(x => x.VisitNum).ToListAsync();
|
||||
|
||||
return resultlist;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改全局阅片截止访视
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<bool> ChangeCutOffVisit(ChangeCutOffVisitInDto inDto)
|
||||
{
|
||||
await _readModuleRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new ReadModule() {
|
||||
SubjectVisitId=inDto.SubjectVisitIdId
|
||||
});
|
||||
|
||||
return await _readModuleRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取读片模块 //加了标准参数
|
||||
|
|
|
@ -239,11 +239,15 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
|
||||
|
||||
var index = 0;
|
||||
|
||||
addrowInfo.ForEach(x =>
|
||||
{
|
||||
|
||||
if (needRowIds.Contains(x.Id))
|
||||
{
|
||||
index++;
|
||||
x.RowIndex = index;
|
||||
x.FristAddTaskId = x.FristAddTaskId==beforeConvertedTaskId? visitTaskId: x.FristAddTaskId;
|
||||
x.QuestionId = otherLesionQuestion.Id;
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
|
||||
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
public DateTime? DeletedTime { get; set; }
|
||||
|
|
|
@ -40,6 +40,11 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
public bool? IsUrgent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否可改截止访视
|
||||
/// </summary>
|
||||
public bool IsCanChangeCutOffVisit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 访视ID
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue