修改裁判阅片明细表过滤
parent
e46f204204
commit
dca0dfb003
|
@ -2224,12 +2224,6 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
if (inQuery.ReadingExportType == ExportResult.DetailedTableOfAdjudicationResults)
|
||||
{
|
||||
//R1 R2 两个人的访视都阅片完成了才可以,去除只有一个人阅片完成的访视
|
||||
|
||||
//找到只有一个人阅片的受试者 和访视
|
||||
var exceptVisit = list.GroupBy(t => new { t.SubjectCode, t.TaskName }).Where(g => g.Count() == 1).Select(g => new { g.Key.SubjectCode, g.Key.TaskName }).ToList();
|
||||
list = list.Where(t => !exceptVisit.Any(ev => ev.SubjectCode == t.SubjectCode && ev.TaskName == t.TaskName)).ToList();
|
||||
|
||||
//裁判明表
|
||||
export_Template = StaticData.Export.CommonJudgeReadingDetail_Export;
|
||||
}
|
||||
|
@ -2704,12 +2698,23 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
#region 最终导出参数处理
|
||||
|
||||
if (inQuery.ReadingExportType == ExportResult.DetailedTableOfAdjudicationResults)
|
||||
{
|
||||
//R1 R2 两个人的访视都阅片完成了才可以,去除只有一个人阅片完成的访视
|
||||
//找到只有一个人阅片的受试者 和访视
|
||||
var exceptVisit = list.Where(t => t.ReadingCategory == ReadingCategory.Visit)
|
||||
.GroupBy(t => new { t.SubjectCode, t.TaskName}).Where(g => g.Count() == 1).Select(g => new { g.Key.SubjectCode, g.Key.TaskName }).ToList();
|
||||
|
||||
list = list.Where(t => !exceptVisit.Any(ev => ev.SubjectCode == t.SubjectCode && ev.TaskName == t.TaskName)).ToList();
|
||||
|
||||
}
|
||||
|
||||
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum).ToList();
|
||||
|
||||
//处理裁判标记
|
||||
list = DealJudgeMark(criterion.ArbitrationRule, criterion.IsGlobalReading, list);
|
||||
|
||||
|
||||
//裁判阅片明细表
|
||||
if (export_Template == StaticData.Export.CommonJudgeReadingDetail_Export)
|
||||
{
|
||||
//裁判产生标记为空的数据过滤掉
|
||||
|
|
|
@ -4,6 +4,7 @@ using IRaCIS.Core.Application.Filter;
|
|||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.ImageAndDoc;
|
||||
using IRaCIS.Core.Application.Service.OAuth;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.Service.ReadingCalculate.Interface;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
|
@ -101,7 +102,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
await _readingTableQuestionAnswerRepository.DeleteFromQueryAsync(x => x.RowId == mark.RowId && x.TableQuestionId == mark.TableQuestionId);
|
||||
await _readingTaskQuestionMarkRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new ReadingTaskQuestionMark()
|
||||
{
|
||||
InstanceId=null,
|
||||
InstanceId = null,
|
||||
SeriesId = null,
|
||||
StudyId = null,
|
||||
MarkTool = string.Empty,
|
||||
|
@ -117,7 +118,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
OtherNumberOfFrames = null,
|
||||
OtherMeasureData = string.Empty,
|
||||
});
|
||||
var result= await _readingTaskQuestionMarkRepository.SaveChangesAsync();
|
||||
var result = await _readingTaskQuestionMarkRepository.SaveChangesAsync();
|
||||
|
||||
await _readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
||||
{
|
||||
|
@ -145,7 +146,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
SeriesId = null,
|
||||
StudyId = null,
|
||||
MarkTool = string.Empty,
|
||||
// PicturePath = string.Empty, 稽查需要显示截图
|
||||
// PicturePath = string.Empty, 稽查需要显示截图
|
||||
NumberOfFrames = null,
|
||||
MeasureData = string.Empty,
|
||||
OrderMarkName = string.Empty,
|
||||
|
@ -451,7 +452,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task ChangeCalculationAnswer(ChangeCalculationAnswerInDto inDto)
|
||||
{
|
||||
var visitTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
|
@ -527,7 +528,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task ReadClinicalData(ReadClinicalDataInDto inDto)
|
||||
{
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask
|
||||
|
@ -904,7 +905,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
var criterionIdInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == trialReadingCriterionId).FirstNotNullAsync();
|
||||
|
||||
|
||||
var groupIds = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId &&( x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.BasicTable)).Select(x => x.GroupId).Distinct().ToListAsync();
|
||||
var groupIds = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && (x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.BasicTable)).Select(x => x.GroupId).Distinct().ToListAsync();
|
||||
|
||||
var questionIds = await _readingQuestionTrialRepository
|
||||
.Where(x => x.IsShowInDicom)
|
||||
|
@ -1088,7 +1089,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
x.IsFirstChangeTask = x.VisitTaskId == inDto.VisitTaskId;
|
||||
});
|
||||
result.AddRange(questionMark);
|
||||
result= result.OrderBy(x=>x.ShowOrder).ThenBy(x=>x.RowIndex).ThenBy(x => x.OrderMarkName).ToList();
|
||||
result = result.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).ThenBy(x => x.OrderMarkName).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1439,7 +1440,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
item.TableQuestions.Questions = tableQuestionLists.Where(x => x.ReadingQuestionId == item.Id).OrderBy(x => x.ShowOrder).ToList();
|
||||
item.TableQuestions.Questions.ForEach(x =>
|
||||
{
|
||||
x.RelationQuestions= _mapper.Map<List<GetTrialReadingQuestionOutDto>>(tableQuestionLists.Where(z => (z.DependParentId ?? default(Guid)) == x.Id));
|
||||
x.RelationQuestions = _mapper.Map<List<GetTrialReadingQuestionOutDto>>(tableQuestionLists.Where(z => (z.DependParentId ?? default(Guid)) == x.Id));
|
||||
x.RelationQuestions.ForEach(y =>
|
||||
{
|
||||
y.Childrens = new List<GetTrialReadingQuestionOutDto>();
|
||||
|
@ -1449,7 +1450,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
y.LesionType = item.LesionType;
|
||||
y.RelationQuestions = new List<GetTrialReadingQuestionOutDto>();
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList();
|
||||
|
@ -1560,7 +1561,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
FloatParseHandling = FloatParseHandling.Double,
|
||||
};
|
||||
answers.Add("TableQuestionMarkList", rowInfo == null ? "[]" : JsonConvert.SerializeObject(TableQuestionMarkList.Where(x=>x.RowId== rowInfo.Id).ToList(), settings));
|
||||
answers.Add("TableQuestionMarkList", rowInfo == null ? "[]" : JsonConvert.SerializeObject(TableQuestionMarkList.Where(x => x.RowId == rowInfo.Id).ToList(), settings));
|
||||
answers.Add("RowId", rowInfo == null ? string.Empty : rowInfo.Id.ToString());
|
||||
answers.Add("MarkTool", rowInfo.MarkTool);
|
||||
answers.Add("StudyId", rowInfo.StudyId.ToString());
|
||||
|
@ -1609,7 +1610,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task SplitLesion(SplitLesionInDto inDto)
|
||||
{
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
|
@ -1847,7 +1848,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task<IResponseOutput> SaveImageQuality(ChangeDicomReadingQuestionAnswerInDto inDto)
|
||||
{
|
||||
inDto.UpdateMark = true;
|
||||
|
@ -1906,7 +1907,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task<IResponseOutput> ChangeDicomReadingQuestionAnswer(ChangeDicomReadingQuestionAnswerInDto inDto)
|
||||
{
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
|
@ -2023,7 +2024,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task<IResponseOutput> DeleteReadingRowAnswer(DeleteReadingRowAnswerInDto inDto)
|
||||
{
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
|
@ -2212,7 +2213,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("/SubmitTaskRowInfo/{param}")]
|
||||
public async Task<SubmitTableQuestionOutDto> SubmitTaskRowInfo(SubmitTableQuestionInDto inDto,string param)
|
||||
public async Task<SubmitTableQuestionOutDto> SubmitTaskRowInfo(SubmitTableQuestionInDto inDto, string param)
|
||||
{
|
||||
inDto.ComputationTrigger = (ComputationTrigger)int.Parse(param);
|
||||
|
||||
|
@ -2226,7 +2227,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task<SubmitTableQuestionOutDto> SubmitTableQuestion(SubmitTableQuestionInDto inDto)
|
||||
{
|
||||
SubmitTableQuestionOutDto result = new SubmitTableQuestionOutDto();
|
||||
|
@ -2413,7 +2414,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
&& x.QuestionId == inDto.QuestionId
|
||||
).CountAsync()) + 1))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_MaxQuestion", _userInfo.IsEn_Us? questionInfo.QuestionEnName:questionInfo.QuestionName, questionInfo.MaxQuestionCount]);
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_MaxQuestion", _userInfo.IsEn_Us ? questionInfo.QuestionEnName : questionInfo.QuestionName, questionInfo.MaxQuestionCount]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2625,7 +2626,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task<IResponseOutput> SubmitDicomVisitTask(SubmitDicomVisitTaskInDto inDto)
|
||||
{
|
||||
|
||||
|
@ -2710,7 +2711,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var criterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).FirstNotNullAsync();
|
||||
|
||||
var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId&&x.Type != "group")
|
||||
var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.Type != "group")
|
||||
.WhereIf(taskInfo.SourceSubjectVisit.IsBaseLine, x => ((x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show) && (x.LimitEdit == LimitEdit.None || x.LimitEdit == LimitEdit.OnlyBaseLine)))
|
||||
.WhereIf(!taskInfo.SourceSubjectVisit.IsBaseLine, x => ((x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show) && (x.LimitEdit == LimitEdit.None || x.LimitEdit == LimitEdit.OnlyVisit)))
|
||||
.WhereIf(taskInfo.TrialReadingCriterion.CriterionType == CriterionType.PCWG3, x => x.QuestionType != QuestionType.SiteVisitForTumorEvaluation)
|
||||
|
@ -2988,7 +2989,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
List<Guid> remainingItems = taskList.Select(x => x.Id).Except(cacheSkipIds).ToList();
|
||||
|
||||
//受试者随机固定排序
|
||||
taskList = taskList.Where(x => remainingItems.Contains(x.Id)).OrderBy(t=>t.TaskBlindName).ToList();
|
||||
taskList = taskList.Where(x => remainingItems.Contains(x.Id)).OrderBy(t => t.TaskBlindName).ToList();
|
||||
|
||||
// 当前受试者没有就找其他受试者
|
||||
if (taskList.Count() == 0)
|
||||
|
@ -3048,7 +3049,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
var query = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.UserRoleId
|
||||
&& x.TrialReadingCriterionId == trialReadingCriterionId
|
||||
&& x.TaskState == TaskState.Effect)
|
||||
.Where(x=> !cacheSkipIds.Contains(x.Id));
|
||||
.Where(x => !cacheSkipIds.Contains(x.Id));
|
||||
var count = await query.CountAsync();
|
||||
if (count == 0)
|
||||
{
|
||||
|
@ -3273,12 +3274,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<bool> ResetReadingRestTime(Guid? userID)
|
||||
public async Task<bool> ResetReadingRestTime([FromServices] IRepository<UserLog> _userLogRepository)
|
||||
{
|
||||
if (userID == null)
|
||||
{
|
||||
userID = _userInfo.UserRoleId;
|
||||
}
|
||||
|
||||
|
||||
//int readingMinute = 120; // 为60整数
|
||||
int restMinute = 10; //
|
||||
|
@ -3298,6 +3296,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.StartReadingTimeKey(_userInfo.UserRoleId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||
}
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, OptType = UserOptType.WebUnlock }, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3525,7 +3526,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task AddReadingTask(Guid visitTaskId, Guid? trialId = null)
|
||||
{
|
||||
// ****** 先生成阅片期 阅片期任务阅片完成之后生成肿瘤学的 如果没有阅片期 直接生成肿瘤学 *********////
|
||||
|
|
|
@ -50,7 +50,9 @@ public enum UserOptType
|
|||
|
||||
TempLockLogin = 13,
|
||||
|
||||
AddUser = 14
|
||||
AddUser = 14,
|
||||
|
||||
WebUnlock=17
|
||||
}
|
||||
|
||||
[Description("影像下载打包状态")]
|
||||
|
|
Loading…
Reference in New Issue