添加上一次
parent
2e9afc2ce8
commit
3ae311bd02
|
@ -469,13 +469,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public int? NumberOfFrames { get; set; }
|
||||
|
||||
public string MeasureData { get; set; } = string.Empty;
|
||||
public Guid FirstAddTaskId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.VisitTaskId;
|
||||
}
|
||||
}
|
||||
public Guid? FirstAddTaskId { get; set; }
|
||||
|
||||
public QuestionType? QuestionType { get; set; }
|
||||
public string OrderMarkName { get; set; } = string.Empty;
|
||||
|
|
|
@ -92,6 +92,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<SaveTableQuestionMarkInDto> SaveTableQuestionMark(SaveTableQuestionMarkInDto inDto)
|
||||
{
|
||||
inDto.FirstAddTaskId=inDto.FirstAddTaskId==null?inDto.VisitTaskId:inDto.FirstAddTaskId;
|
||||
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x =>x.VisitTaskId==inDto.VisitTaskId&&x.QuestionId==inDto.QuestionId&& x.RowId == inDto.RowId.Value && x.TableQuestionId == inDto.TableQuestionId);
|
||||
await _readingTableQuestionAnswerRepository.AddAsync(new ReadingTableQuestionAnswer()
|
||||
|
@ -1008,6 +1009,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
x.IsFirstChangeTask = x.VisitTaskId == inDto.VisitTaskId;
|
||||
});
|
||||
result.AddRange(questionMark);
|
||||
result= result.OrderBy(x=>x.RowIndex).ThenBy(x => x.OrderMarkName).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<TrialClinicalTableQuestion, ClinicalTablePreviewDto>();
|
||||
#endregion
|
||||
|
||||
CreateMap<ReadingTaskQuestionMark, TableMarkInfo>();
|
||||
CreateMap<VisitTask, VisitTaskDto>();
|
||||
CreateMap<SaveTableQuestionMarkInDto, ReadingTaskQuestionMark>();
|
||||
CreateMap<ReadingTaskQuestionMark, TableQuestionMark>();
|
||||
|
|
|
@ -106,6 +106,53 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
}
|
||||
|
||||
public class TableMarkInfo
|
||||
{
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
public Guid? InstanceId { get; set; }
|
||||
|
||||
public Guid? SeriesId { get; set; }
|
||||
public Guid? StudyId { get; set; }
|
||||
|
||||
public string MarkTool { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string PicturePath { get; set; } = string.Empty;
|
||||
|
||||
public int? NumberOfFrames { get; set; }
|
||||
|
||||
public string MeasureData { get; set; } = string.Empty;
|
||||
public Guid? FirstAddTaskId { get; set; }
|
||||
|
||||
public QuestionType? QuestionType { get; set; }
|
||||
public string OrderMarkName { get; set; } = string.Empty;
|
||||
|
||||
public Guid? OtherInstanceId { get; set; }
|
||||
|
||||
public Guid? OtherSeriesId { get; set; }
|
||||
|
||||
public Guid? OtherStudyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表格问题标记
|
||||
/// </summary>
|
||||
public Guid? RowId { get; set; }
|
||||
|
||||
public Guid? TableQuestionId { get; set; }
|
||||
|
||||
public decimal? RowIndex { get; set; }
|
||||
|
||||
public string OtherMarkTool { get; set; } = string.Empty;
|
||||
|
||||
public string OtherPicturePath { get; set; } = string.Empty;
|
||||
public int? OtherNumberOfFrames { get; set; }
|
||||
public string OtherMeasureData { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class AddTaskLesionAnswerFromLastTaskOutDto
|
||||
{
|
||||
public bool IsBaseLine { get; set; }
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<OrganInfo> _organInfoRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<ReadingTaskQuestionMark> _readingTaskQuestionMarkRepository,
|
||||
IRepository<DicomStudy> _dicomStudyRepository,
|
||||
IRepository<NoneDicomStudy> _noneDicomStudyRepository,
|
||||
IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository,
|
||||
|
@ -368,6 +369,18 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var tableQuestion = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.LesionType == LesionType.FatFraction).FirstNotNullAsync();
|
||||
|
||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == tableQuestion.Id).ToListAsync();
|
||||
var LastVisitTaskId = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
|
||||
x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId &&
|
||||
x.IsAnalysisCreate == taskinfo.IsAnalysisCreate &&
|
||||
x.DoctorUserId == taskinfo.DoctorUserId &&
|
||||
x.IsSelfAnalysis == taskinfo.IsSelfAnalysis &&
|
||||
x.SubjectId == taskinfo.SubjectId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.VisitTaskNum < taskinfo.VisitTaskNum && x.TaskState == TaskState.Effect && x.ArmEnum == taskinfo.ArmEnum
|
||||
).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
List<TableMarkInfo> marks = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == LastVisitTaskId && x.RowId != null).ProjectTo<TableMarkInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
||||
|
||||
|
||||
List<ReadingTableAnswerRowInfo> rowlist = new List<ReadingTableAnswerRowInfo>();
|
||||
|
@ -377,6 +390,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
foreach (var item in dictionList)
|
||||
{
|
||||
var guid = NewId.NextGuid();
|
||||
marks.ForEach(x => {
|
||||
x.RowId = x.RowIndex == num ? guid : x.RowId;
|
||||
});
|
||||
rowlist.Add(new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
FristAddTaskId= visitTaskId,
|
||||
|
@ -421,6 +437,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
}
|
||||
await _readingTableAnswerRowInfoRepository.AddRangeAsync(rowlist);
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswerList);
|
||||
|
||||
await _readingTaskQuestionMarkRepository.AddRangeAsync(_mapper.Map<List<ReadingTaskQuestionMark>>(marks));
|
||||
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||
|
||||
return new AddTaskLesionAnswerFromLastTaskOutDto()
|
||||
|
|
Loading…
Reference in New Issue