Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
066f66b969
|
@ -19,6 +19,7 @@ using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Spire.Doc;
|
using Spire.Doc;
|
||||||
using System.Linq.Dynamic.Core;
|
using System.Linq.Dynamic.Core;
|
||||||
|
@ -1283,9 +1284,24 @@ x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && x.Readi
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CriterionType.PCWG3:
|
case CriterionType.PCWG3:
|
||||||
var questionAnsewer = await _readingGlobalTaskInfoRepository.Where(t => t.TaskId == visitTaskId && t.TrialReadingQuestion.QuestionType == QuestionType.SiteVisitForTumorEvaluation).FirstNotNullAsync();
|
var questionAnsewer = await _readingGlobalTaskInfoRepository.Where(t => t.TaskId == visitTaskId && t.TrialReadingQuestion.QuestionType == QuestionType.SiteVisitForTumorEvaluation).FirstOrDefaultAsync();
|
||||||
|
if (questionAnsewer != null&& questionAnsewer.Answer.IsNotNullOrEmpty())
|
||||||
|
{
|
||||||
|
answer = questionAnsewer.Answer;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var visittaskList=await _visitTaskRepository.Where(t => t.Id == visitTaskId ).Select(x=>x.RelatedVisitTaskIdList).FirstOrDefaultAsync();
|
||||||
|
|
||||||
answer = questionAnsewer.Answer;
|
var task = await _visitTaskRepository.Where(x => visittaskList.Contains(x.Id) && x.ReadingCategory == ReadingCategory.Visit).OrderByDescending(x => x.VisitTaskNum).FirstOrDefaultAsync();
|
||||||
|
if (task != null)
|
||||||
|
{
|
||||||
|
answer= await _readingTaskQuestionAnswerRepository.Where(t => t.VisitTaskId == task.Id && t.ReadingQuestionTrial.QuestionType == QuestionType.SiteVisitForTumorEvaluation)
|
||||||
|
.Select(t => t.Answer).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1215,7 +1215,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 问题Id
|
/// 问题Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid QuestionId { get; set; }
|
public Guid? QuestionId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// InstanceId
|
/// InstanceId
|
||||||
|
|
|
@ -1898,6 +1898,24 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> SaveTaskQuestion(ChangeDicomReadingQuestionAnswerInDto inDto, string param)
|
public async Task<IResponseOutput> SaveTaskQuestion(ChangeDicomReadingQuestionAnswerInDto inDto, string param)
|
||||||
{
|
{
|
||||||
|
// 当 param == -10 时,为自定义标准 需要区分 绑定 更改 标记
|
||||||
|
if (param == "-10")
|
||||||
|
{
|
||||||
|
var questionMarkList = inDto.QuestionMarkInfoList.Select(x => x.QuestionId).ToList();
|
||||||
|
if (!(await _readingTaskQuestionMarkRepository.AnyAsync(x => x.VisitTaskId == inDto.VisitTaskId && questionMarkList.Contains(x.QuestionId))) && inDto.QuestionMarkInfoList.Count() > 0)
|
||||||
|
{
|
||||||
|
_userInfo.AuditIdentification = "AddMark";
|
||||||
|
}
|
||||||
|
else if (await _readingTaskQuestionMarkRepository.AnyAsync(x => x.VisitTaskId == inDto.VisitTaskId && questionMarkList.Contains(x.QuestionId)))
|
||||||
|
{
|
||||||
|
_userInfo.AuditIdentification = "UpdateMark";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_userInfo.AuditIdentification = "DeleteMark";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1994,7 +2012,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
}).ToList();
|
}).ToList();
|
||||||
await _readingTaskQuestionAnswerRepository.AddRangeAsync(needAddAnswer);
|
await _readingTaskQuestionAnswerRepository.AddRangeAsync(needAddAnswer);
|
||||||
|
|
||||||
if (inDto.UpdateMark)
|
if (inDto.UpdateMark)
|
||||||
{
|
{
|
||||||
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => new
|
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => new
|
||||||
|
|
|
@ -6,6 +6,7 @@ using MassTransit;
|
||||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||||
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
|
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Infra.EFCore.Common
|
namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
@ -3093,7 +3094,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//自定义特有标识
|
//自定义特有标识
|
||||||
if (await _dbContext.ReadingQuestionCriterionTrial.AnyAsync(t => t.Id == firstEntity.ReadingQuestionCriterionTrialId && t.CriterionType == CriterionType.SelfDefine))
|
if (await _dbContext.ReadingQuestionCriterionTrial.AnyAsync(t => t.Id == firstEntity.ReadingQuestionCriterionTrialId && t.CriterionType == CriterionType.SelfDefine))
|
||||||
{
|
{
|
||||||
extraIdentification = "/Self";
|
//extraIdentification = "/Self";
|
||||||
|
|
||||||
//还会把病灶问题答案更新
|
//还会把病灶问题答案更新
|
||||||
|
|
||||||
|
@ -3134,6 +3135,19 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var mark = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionMark)).Select(x=>x.Entity as ReadingTaskQuestionMark).FirstOrDefault();
|
||||||
|
|
||||||
|
var markName=string.Empty;
|
||||||
|
if (mark != null && mark.MeasureData.IsNotNullOrEmpty())
|
||||||
|
{
|
||||||
|
// 解析 JSON 字符串
|
||||||
|
JObject jsonObject = JObject.Parse(mark.MeasureData);
|
||||||
|
|
||||||
|
// 提取 label 的值
|
||||||
|
markName = jsonObject["data"]["label"].ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
await InsertInspection<ReadingTaskQuestionAnswer>(cloneEntity, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingTaskQuestionAnswer>(cloneEntity, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
VisitTaskId = x.VisitTaskId,
|
VisitTaskId = x.VisitTaskId,
|
||||||
|
@ -3146,6 +3160,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
|
||||||
|
MarkName= markName,
|
||||||
|
PicturePath= mark!=null?mark.PicturePath:string.Empty,
|
||||||
QuestionAnswerList = taskQuestionAnswerList.Join(quesionList,
|
QuestionAnswerList = taskQuestionAnswerList.Join(quesionList,
|
||||||
t => t.ReadingQuestionTrialId,
|
t => t.ReadingQuestionTrialId,
|
||||||
u => u.QuestionId,
|
u => u.QuestionId,
|
||||||
|
@ -3160,7 +3177,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}).OrderBy(t => t.ShowOrder).ToList()
|
}).OrderBy(t => t.ShowOrder).ToList()
|
||||||
,
|
,
|
||||||
TableQuestionAndAnswerList = tableQuesionAndAnswerList
|
TableQuestionAndAnswerList = tableQuesionAndAnswerList
|
||||||
}
|
}, _userInfo.AuditIdentification
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue