Uat_Study
parent
bea0811eb8
commit
422dadad36
|
@ -289,6 +289,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CalculateQuestions { get; set; } = "[]";
|
public string CalculateQuestions { get; set; } = "[]";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制编辑
|
||||||
|
/// </summary>
|
||||||
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数值类型
|
/// 数值类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -863,6 +868,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CalculateQuestions { get; set; }
|
public string CalculateQuestions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制编辑
|
||||||
|
/// </summary>
|
||||||
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数据来源
|
/// 数据来源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1622,7 +1632,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CalculateQuestions { get; set; } = "[]";
|
public string CalculateQuestions { get; set; } = "[]";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制编辑
|
||||||
|
/// </summary>
|
||||||
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
public List<string> ParentTriggerValueList { get; set; }
|
public List<string> ParentTriggerValueList { get; set; }
|
||||||
public List<string> RelevanceValueList { get; set; }
|
public List<string> RelevanceValueList { get; set; }
|
||||||
|
|
|
@ -354,7 +354,7 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(List<DicomReadingQuestionAnswer>, object)> GetDicomReadingQuestionAnswer(GetDicomReadingQuestionAnswerInDto inDto)
|
public async Task<(List<DicomReadingQuestionAnswer>, object)> GetDicomReadingQuestionAnswer(GetDicomReadingQuestionAnswerInDto inDto)
|
||||||
{
|
{
|
||||||
await AddDefaultValueToTask(inDto.VisitTaskId);
|
//await AddDefaultValueToTask(inDto.VisitTaskId);
|
||||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
var result = await GetReadingQuestion(taskInfo.TrialReadingCriterionId, taskInfo.Id);
|
var result = await GetReadingQuestion(taskInfo.TrialReadingCriterionId, taskInfo.Id);
|
||||||
|
|
||||||
|
@ -410,7 +410,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
private void GetDicomReadingAnswer(DicomReadingQuestionAnswer item, List<DicomReadingQuestionAnswer> questions, List<ReadingTaskQuestionAnswer> answers)
|
private void GetDicomReadingAnswer(DicomReadingQuestionAnswer item, List<DicomReadingQuestionAnswer> questions, List<ReadingTaskQuestionAnswer> answers)
|
||||||
{
|
{
|
||||||
item.Answer = answers.Where(x => x.ReadingQuestionTrialId == item.Id).Select(x => x.Answer).FirstIsNullReturnEmpty();
|
var answer= answers.Where(x => x.ReadingQuestionTrialId == item.Id).Select(x => x.Answer).FirstIsNullReturnEmpty();
|
||||||
|
item.Answer = answer.IsNullOrEmpty() ? item.DefaultValue : answer;
|
||||||
|
|
||||||
|
|
||||||
item.Childrens = questions.Where(x => x.ParentId == item.Id || ((item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupName == item.GroupName))).ToList();
|
item.Childrens = questions.Where(x => x.ParentId == item.Id || ((item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupName == item.GroupName))).ToList();
|
||||||
if (item.Childrens != null && item.Childrens.Count > 0)
|
if (item.Childrens != null && item.Childrens.Count > 0)
|
||||||
|
@ -470,7 +472,7 @@ namespace IRaCIS.Application.Services
|
||||||
public async Task<(GetReadingQuestionAndAnswerOutDto, object)> GetReadingQuestionAndAnswer(GetReadingQuestionAndAnswerInDto inDto)
|
public async Task<(GetReadingQuestionAndAnswerOutDto, object)> GetReadingQuestionAndAnswer(GetReadingQuestionAndAnswerInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
await AddDefaultValueToTask(inDto.VisitTaskId);
|
//await AddDefaultValueToTask(inDto.VisitTaskId);
|
||||||
var result = new GetReadingQuestionAndAnswerOutDto();
|
var result = new GetReadingQuestionAndAnswerOutDto();
|
||||||
|
|
||||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
@ -568,7 +570,8 @@ namespace IRaCIS.Application.Services
|
||||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == taskId).ToListAsync();
|
var answers = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == taskId).ToListAsync();
|
||||||
qusetionList.ForEach(x =>
|
qusetionList.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.Answer = answers.Where(y => y.ReadingQuestionTrialId == x.Id).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
|
var answer= answers.Where(y => y.ReadingQuestionTrialId == x.Id).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
|
||||||
|
x.Answer = answer.IsNullOrEmpty() ? x.DefaultValue : answer;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -911,8 +914,17 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
var index = await _readingCalculateService.GetDeleteLesionStatrIndex(inDto);
|
var index = await _readingCalculateService.GetDeleteLesionStatrIndex(inDto);
|
||||||
await _readingTableQuestionAnswerRepository.DeleteFromQueryAsync(x => x.RowId == inDto.RowId);
|
|
||||||
await _readingTableAnswerRowInfoRepository.DeleteFromQueryAsync(x => x.Id == inDto.RowId);
|
|
||||||
|
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.RowId == inDto.RowId, x => new ReadingTableQuestionAnswer()
|
||||||
|
{
|
||||||
|
|
||||||
|
IsDeleted = true
|
||||||
|
});
|
||||||
|
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.RowId,x=>new ReadingTableAnswerRowInfo() {
|
||||||
|
|
||||||
|
IsDeleted=true
|
||||||
|
});
|
||||||
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
||||||
|
@ -1025,7 +1037,9 @@ namespace IRaCIS.Application.Services
|
||||||
public async Task<SubmitTableQuestionOutDto> SubmitTableQuestion(SubmitTableQuestionInDto inDto)
|
public async Task<SubmitTableQuestionOutDto> SubmitTableQuestion(SubmitTableQuestionInDto inDto)
|
||||||
{
|
{
|
||||||
SubmitTableQuestionOutDto result = new SubmitTableQuestionOutDto();
|
SubmitTableQuestionOutDto result = new SubmitTableQuestionOutDto();
|
||||||
|
|
||||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||||
|
var questionInfo = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.QuestionId).FirstNotNullAsync();
|
||||||
var criterionId = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.TrialReadingCriterionId).FirstOrDefaultAsync();
|
var criterionId = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == criterionId).FirstNotNullAsync();
|
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == criterionId).FirstNotNullAsync();
|
||||||
var tableQuestionIds = inDto.AnswerList.Select(x => x.TableQuestionId).ToList();
|
var tableQuestionIds = inDto.AnswerList.Select(x => x.TableQuestionId).ToList();
|
||||||
|
@ -1043,7 +1057,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if (inDto.RowIndex % 1 == 0)
|
if (inDto.RowIndex % 1 == 0)
|
||||||
{
|
{
|
||||||
var questionInfo = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.QuestionId).FirstNotNullAsync();
|
|
||||||
if (questionInfo.MaxQuestionCount != null && questionInfo.MaxQuestionCount != 0)
|
if (questionInfo.MaxQuestionCount != null && questionInfo.MaxQuestionCount != 0)
|
||||||
{
|
{
|
||||||
if (questionInfo.MaxQuestionCount <
|
if (questionInfo.MaxQuestionCount <
|
||||||
|
@ -1116,6 +1130,7 @@ namespace IRaCIS.Application.Services
|
||||||
rowInfo.InstanceId = inDto.InstanceId;
|
rowInfo.InstanceId = inDto.InstanceId;
|
||||||
rowInfo.SeriesId = inDto.SeriesId;
|
rowInfo.SeriesId = inDto.SeriesId;
|
||||||
rowInfo.VisitTaskId = inDto.VisitTaskId;
|
rowInfo.VisitTaskId = inDto.VisitTaskId;
|
||||||
|
rowInfo.OrderMark = questionInfo.OrderMark;
|
||||||
rowInfo.StudyId = inDto.StudyId;
|
rowInfo.StudyId = inDto.StudyId;
|
||||||
rowInfo.IsCanEditPosition = inDto.IsCanEditPosition;
|
rowInfo.IsCanEditPosition = inDto.IsCanEditPosition;
|
||||||
result.RowId = rowInfo.Id;
|
result.RowId = rowInfo.Id;
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
if (inDto.VisitTaskId != null)
|
if (inDto.VisitTaskId != null)
|
||||||
{
|
{
|
||||||
await AddDefaultValueToTask(inDto.VisitTaskId.Value);
|
//await AddDefaultValueToTask(inDto.VisitTaskId.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = new GetTrialReadingQuestionPageDto();
|
var result = new GetTrialReadingQuestionPageDto();
|
||||||
|
|
|
@ -1180,6 +1180,29 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制编辑
|
||||||
|
/// </summary>
|
||||||
|
public enum LimitEdit
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 否
|
||||||
|
/// </summary>
|
||||||
|
None = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 仅基线
|
||||||
|
/// </summary>
|
||||||
|
OnlyBaseLine = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 仅随访
|
||||||
|
/// </summary>
|
||||||
|
OnlyVisit = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否必填
|
/// 是否必填
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -205,6 +205,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制编辑
|
||||||
|
/// </summary>
|
||||||
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自定义计算标记
|
/// 自定义计算标记
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -165,6 +165,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制编辑
|
||||||
|
/// </summary>
|
||||||
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自定义计算标记
|
/// 自定义计算标记
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -7,13 +7,15 @@ using System;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 表格问题答案行数据
|
/// 表格问题答案行数据
|
||||||
///</summary>
|
///</summary>
|
||||||
[Table("ReadingTableAnswerRowInfo")]
|
[Table("ReadingTableAnswerRowInfo")]
|
||||||
public class ReadingTableAnswerRowInfo : Entity, IAuditAdd
|
public class ReadingTableAnswerRowInfo : Entity, IAuditAdd, IAuditUpdate, ISoftDelete
|
||||||
{
|
{
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("InstanceId")]
|
[ForeignKey("InstanceId")]
|
||||||
|
@ -93,6 +95,8 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public string BlindName { get; set; } = string.Empty;
|
public string BlindName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string OrderMark { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 第一次添加的任务ID
|
/// 第一次添加的任务ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -106,6 +110,16 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid CreateUserId { get; set; }
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
||||||
|
public Guid UpdateUserId { get; set; }
|
||||||
|
//string UpdateUserName { get; set; }
|
||||||
|
public DateTime UpdateTime { get; set; }
|
||||||
|
|
||||||
|
public bool IsDeleted { get; set; }
|
||||||
|
|
||||||
|
public DateTime? DeletedTime { get; set; }
|
||||||
|
|
||||||
|
public Guid? DeleteUserId { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("SplitRowId")]
|
[ForeignKey("SplitRowId")]
|
||||||
public ReadingTableAnswerRowInfo SplitRow { get; set; }
|
public ReadingTableAnswerRowInfo SplitRow { get; set; }
|
||||||
|
@ -117,7 +131,53 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public ReadingQuestionTrial ReadingQuestionTrial { get; set; }
|
public ReadingQuestionTrial ReadingQuestionTrial { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string RowMark
|
||||||
|
{
|
||||||
|
|
||||||
|
get
|
||||||
|
{
|
||||||
|
|
||||||
|
Dictionary<int, string> splitLesionDic = new Dictionary<int, string>()
|
||||||
|
{
|
||||||
|
{1, "a" },
|
||||||
|
{2, "b" },
|
||||||
|
{3, "c" },
|
||||||
|
{4, "d" },
|
||||||
|
{5, "e" },
|
||||||
|
{6, "f" },
|
||||||
|
{7, "g" },
|
||||||
|
{8, "h" },
|
||||||
|
{9, "i" },
|
||||||
|
{10, "j" },
|
||||||
|
{11, "k" },
|
||||||
|
{12, "l" },
|
||||||
|
{13, "m" },
|
||||||
|
{14, "n" },
|
||||||
|
{15, "o" },
|
||||||
|
{16, "p" },
|
||||||
|
{17, "q" },
|
||||||
|
{18, "r" },
|
||||||
|
{19, "s" },
|
||||||
|
{20, "t" },
|
||||||
|
{21, "u" },
|
||||||
|
{22, "v" },
|
||||||
|
{23, "w" },
|
||||||
|
{24, "x" },
|
||||||
|
{25, "y" },
|
||||||
|
{26, "z" },
|
||||||
|
|
||||||
|
};
|
||||||
|
if (RowIndex % 1 == 0)
|
||||||
|
{
|
||||||
|
return decimal.ToInt32(RowIndex).ToString().PadLeft(2, '0');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Math.Floor(RowIndex).ToString().PadLeft(2, '0') + splitLesionDic[decimal.ToInt32((RowIndex % 1) * 100)];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
///ReadingTableQuestionAnswer
|
///ReadingTableQuestionAnswer
|
||||||
///</summary>
|
///</summary>
|
||||||
[Table("ReadingTableQuestionAnswer")]
|
[Table("ReadingTableQuestionAnswer")]
|
||||||
public class ReadingTableQuestionAnswer : Entity, IAuditAdd
|
public class ReadingTableQuestionAnswer : Entity, IAuditAdd, IAuditUpdate, ISoftDelete
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 问题Id
|
/// 问题Id
|
||||||
|
@ -63,6 +63,17 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public Guid RowId { get; set; }
|
public Guid RowId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public Guid UpdateUserId { get; set; }
|
||||||
|
//string UpdateUserName { get; set; }
|
||||||
|
public DateTime UpdateTime { get; set; }
|
||||||
|
|
||||||
|
public bool IsDeleted { get; set; }
|
||||||
|
|
||||||
|
public DateTime? DeletedTime { get; set; }
|
||||||
|
|
||||||
|
public Guid? DeleteUserId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("QuestionId")]
|
[ForeignKey("QuestionId")]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue