Compare commits
No commits in common. "4417767e355549f4f9c3174cbf19a249d44524ff" and "48f924e64ffb81bcf4e35f04ce8af22913c7621c" have entirely different histories.
4417767e35
...
48f924e64f
|
@ -8399,11 +8399,6 @@
|
||||||
保存表格问题标记
|
保存表格问题标记
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SaveTableQuestionMarkInDto.MarkId">
|
|
||||||
<summary>
|
|
||||||
标记的唯一标识符
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetPreviousOtherPicturePathInDto.QuestionType">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetPreviousOtherPicturePathInDto.QuestionType">
|
||||||
<summary>
|
<summary>
|
||||||
问题类型
|
问题类型
|
||||||
|
@ -8799,11 +8794,6 @@
|
||||||
表格问题标记
|
表格问题标记
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.QuestionMarkInfo.MarkId">
|
|
||||||
<summary>
|
|
||||||
标记的唯一标识符
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingQuestionAndAnswerInDto.QuestionClassify">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingQuestionAndAnswerInDto.QuestionClassify">
|
||||||
<summary>
|
<summary>
|
||||||
问题分类
|
问题分类
|
||||||
|
|
|
@ -505,11 +505,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public int? OtherNumberOfFrames { get; set; }
|
public int? OtherNumberOfFrames { get; set; }
|
||||||
|
|
||||||
public string OtherMeasureData { get; set; } = string.Empty;
|
public string OtherMeasureData { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 标记的唯一标识符
|
|
||||||
/// </summary>
|
|
||||||
public Guid? MarkId { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -680,8 +675,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public bool UpdateMark { get; set; } = false;
|
public bool UpdateMark { get; set; } = false;
|
||||||
|
|
||||||
public string param { get; set; }
|
|
||||||
|
|
||||||
public List<ChangeDicomReadingQuestionAnswerDto> Answers { get; set; }
|
public List<ChangeDicomReadingQuestionAnswerDto> Answers { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
@ -1302,12 +1295,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public Guid? RowId { get; set; }
|
public Guid? RowId { get; set; }
|
||||||
|
|
||||||
public Guid? TableQuestionId { get; set; }
|
public Guid? TableQuestionId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 标记的唯一标识符
|
|
||||||
/// </summary>
|
|
||||||
public Guid? MarkId { get; set; }
|
|
||||||
}
|
}
|
||||||
public class GetReadingQuestionAndAnswerInDto
|
public class GetReadingQuestionAndAnswerInDto
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,6 @@ using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
@ -1916,16 +1915,9 @@ 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)
|
||||||
{
|
{
|
||||||
|
|
||||||
inDto.param= param;
|
|
||||||
|
|
||||||
// 当 param == -10 时,为自定义标准 需要区分 绑定 更改 标记
|
// 当 param == -10 时,为自定义标准 需要区分 绑定 更改 标记
|
||||||
if (param == "-10")
|
if (param == "-10")
|
||||||
{
|
{
|
||||||
// 自定义这边 移除标记 还是会传过来 不过 MeasureData 为空字符串
|
|
||||||
inDto.QuestionMarkInfoList = inDto.QuestionMarkInfoList.Where(x => x.MeasureData.IsNotNullOrEmpty()).ToList();
|
|
||||||
|
|
||||||
|
|
||||||
var questionMarkList = inDto.QuestionMarkInfoList.Select(x => x.QuestionId).ToList();
|
var questionMarkList = inDto.QuestionMarkInfoList.Select(x => x.QuestionId).ToList();
|
||||||
|
|
||||||
var existsMark = await _readingTaskQuestionMarkRepository.AnyAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.MeasureData != string.Empty && questionMarkList.Contains(x.QuestionId));
|
var existsMark = await _readingTaskQuestionMarkRepository.AnyAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.MeasureData != string.Empty && questionMarkList.Contains(x.QuestionId));
|
||||||
|
@ -1992,7 +1984,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x=>x.TrialReadingCriterionId).FirstNotNullAsync();
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
|
||||||
var tumorQuestionId = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.QuestionType == QuestionType.Tumor).Select(x => x.Id).FirstOrDefaultAsync();
|
var tumorQuestionId = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.QuestionType == QuestionType.Tumor).Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
@ -2042,9 +2034,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
if (inDto.UpdateMark)
|
if (inDto.UpdateMark)
|
||||||
{
|
{
|
||||||
var questionList = inDto.Answers.Select(x => x.Id as Guid?).ToList();
|
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => new
|
||||||
|
|
||||||
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId&& questionList.Contains(x.QuestionId)).Select(x => new
|
|
||||||
{
|
{
|
||||||
x.QuestionId,
|
x.QuestionId,
|
||||||
x.FristAddTaskId,
|
x.FristAddTaskId,
|
||||||
|
@ -2055,52 +2045,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
List<Guid?> needDeleteMarkQuestonIds = inDto.Answers.Where(x => x.Answer == string.Empty).Select(x => (Guid?)x.Id).ToList();
|
List<Guid?> needDeleteMarkQuestonIds = inDto.Answers.Where(x => x.Answer == string.Empty).Select(x => (Guid?)x.Id).ToList();
|
||||||
|
|
||||||
switch (taskInfo.TrialReadingCriterion.CriterionType)
|
|
||||||
{
|
|
||||||
|
|
||||||
case CriterionType.SelfDefine:
|
|
||||||
// 先找到需要删除的
|
|
||||||
var needDeleteMarkQuestionIds = questionList.Except(markquestionId).ToList();
|
|
||||||
foreach (var item in needDeleteMarkQuestionIds)
|
|
||||||
{
|
|
||||||
// 对于要删除的标记不能删除 要与问题解绑
|
|
||||||
// 但是对于一个标记绑定多个问题的情况 相当于是要删除掉这条信息
|
|
||||||
var questionMark=await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == item).FirstOrDefaultAsync();
|
|
||||||
if (questionMark != null)
|
|
||||||
{
|
|
||||||
if (questionMark.MarkId == null)
|
|
||||||
{
|
|
||||||
await _readingTaskQuestionMarkRepository.DeleteAsync(questionMark);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (await _readingTaskQuestionMarkRepository.AnyAsync(x => x.MarkId == questionMark.MarkId && x.Id != questionMark.Id))
|
|
||||||
{
|
|
||||||
await _readingTaskQuestionMarkRepository.DeleteAsync(questionMark);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
await _readingTaskQuestionMarkRepository.UpdatePartialFromQueryAsync(x => x.Id == questionMark.Id, x => new ReadingTaskQuestionMark()
|
|
||||||
{
|
|
||||||
QuestionId = null,
|
|
||||||
MeasureData = string.Empty,
|
|
||||||
PicturePath = string.Empty,
|
|
||||||
OtherMeasureData = string.Empty,
|
|
||||||
OtherPicturePath = string.Empty,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增或者修改的标记
|
|
||||||
var otherMark = inDto.QuestionMarkInfoList.Where(x => !needDeleteMarkQuestionIds.Contains(x.QuestionId)).Select(x => x.QuestionId).ToList();
|
|
||||||
|
|
||||||
await addOrEditmark(inDto.QuestionMarkInfoList.Where(x => otherMark.Contains(x.QuestionId)).ToList());
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CriterionType.Lugano2014:
|
|
||||||
|
|
||||||
await _readingTaskQuestionMarkRepository.BatchUpdateNoTrackingAsync(x =>
|
await _readingTaskQuestionMarkRepository.BatchUpdateNoTrackingAsync(x =>
|
||||||
(x.QuestionType == QuestionType.SplenicTopPosition || x.QuestionType == QuestionType.SplenicBottomPosition) &&
|
(x.QuestionType == QuestionType.SplenicTopPosition || x.QuestionType == QuestionType.SplenicBottomPosition) &&
|
||||||
|
@ -2118,28 +2062,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
OtherMeasureData = string.Empty,
|
OtherMeasureData = string.Empty,
|
||||||
});
|
});
|
||||||
|
|
||||||
await addOrEditmark(inDto.QuestionMarkInfoList);
|
|
||||||
|
|
||||||
break;
|
await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && markquestionId.Contains(x.QuestionId));
|
||||||
|
|
||||||
default:
|
|
||||||
await addOrEditmark(inDto.QuestionMarkInfoList);
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
async Task addOrEditmark(List<QuestionMarkInfo> addOrUpdatemarkList)
|
|
||||||
{
|
|
||||||
|
|
||||||
var markQuestionIds= addOrUpdatemarkList.Select(y => (Guid?)y.QuestionId).ToList();
|
|
||||||
|
|
||||||
await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && markQuestionIds.Contains(x.QuestionId));
|
|
||||||
|
|
||||||
var datetime = DateTime.Now;
|
var datetime = DateTime.Now;
|
||||||
|
|
||||||
var markList = _mapper.Map<List<QuestionMarkInfo>, List<ReadingTaskQuestionMark>>(addOrUpdatemarkList);
|
var markList = _mapper.Map<List<QuestionMarkInfo>, List<ReadingTaskQuestionMark>>(inDto.QuestionMarkInfoList);
|
||||||
markList.ForEach(x =>
|
markList.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.Id = NewId.NextGuid();
|
x.Id = NewId.NextGuid();
|
||||||
|
@ -2151,11 +2079,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
|
await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,9 +68,4 @@ public class ReadingTaskQuestionMark : BaseAddAuditEntity
|
||||||
/// 把之前历史的ReadingCustomTag 数据移动到这个表中 这个是历史数据的迁移字段
|
/// 把之前历史的ReadingCustomTag 数据移动到这个表中 这个是历史数据的迁移字段
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? CustomTagId { get; set; }
|
public Guid? CustomTagId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 标记的唯一标识符
|
|
||||||
/// </summary>
|
|
||||||
public Guid? MarkId { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,29 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class markId : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "MarkId",
|
|
||||||
table: "ReadingTaskQuestionMark",
|
|
||||||
type: "uniqueidentifier",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "MarkId",
|
|
||||||
table: "ReadingTaskQuestionMark");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -7273,9 +7273,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Property<Guid?>("InstanceId")
|
b.Property<Guid?>("InstanceId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<Guid?>("MarkId")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<string>("MarkTool")
|
b.Property<string>("MarkTool")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
Loading…
Reference in New Issue