Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
commit
50d9ed7e3c
|
@ -8462,6 +8462,13 @@
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.AddDefaultQuestions(IRaCIS.Core.Application.ViewModel.AddDefaultQuestionsInDto)">
|
||||||
|
<summary>
|
||||||
|
一键添加默认医学审核问题
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.AddTrialDataFromSystem(IRaCIS.Core.Application.ViewModel.AddTrialDataFromSystemInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.AddTrialDataFromSystem(IRaCIS.Core.Application.ViewModel.AddTrialDataFromSystemInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
从系统里面选择问题添加到项目里面
|
从系统里面选择问题添加到项目里面
|
||||||
|
|
|
@ -91,6 +91,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
{
|
{
|
||||||
public Guid SystemQuestionId { get; set; }
|
public Guid SystemQuestionId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class AddDefaultQuestionsInDto
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
[NotDefault]
|
||||||
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class AddTrialDataFromSystemInDto
|
public class AddTrialDataFromSystemInDto
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
|
@ -6,6 +6,8 @@ using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
|
using DocumentFormat.OpenXml.Office2010.Excel;
|
||||||
|
using System.Linq.Dynamic.Core;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
@ -491,6 +493,79 @@ namespace IRaCIS.Core.Application.Service
|
||||||
return ResponseOutput.Result(true);
|
return ResponseOutput.Result(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 一键添加默认医学审核问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> AddDefaultQuestions(AddDefaultQuestionsInDto inDto)
|
||||||
|
{
|
||||||
|
if (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["Medicine_ExistsMedicineQuestion"]);
|
||||||
|
}
|
||||||
|
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
|
||||||
|
List<ReadingCategory> needAddCategory = new List<ReadingCategory>() { ReadingCategory.Visit };
|
||||||
|
if(criterionInfo.IsReadingPeriod)
|
||||||
|
{
|
||||||
|
needAddCategory.Add(ReadingCategory.Global);
|
||||||
|
}
|
||||||
|
if (criterionInfo.IsArbitrationReading)
|
||||||
|
{
|
||||||
|
needAddCategory.Add(ReadingCategory.Judge);
|
||||||
|
}
|
||||||
|
if (criterionInfo.IsOncologyReading)
|
||||||
|
{
|
||||||
|
needAddCategory.Add(ReadingCategory.Oncology);
|
||||||
|
}
|
||||||
|
|
||||||
|
var maxOrder = await _readingMedicineTrialQuestionRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == inDto.TrialReadingCriterionId).OrderByDescending(x => x.ShowOrder).Select(x => x.ShowOrder).FirstOrDefaultAsync();
|
||||||
|
List<TrialDataFromSystem> needList = await _readingMedicineSystemQuestionRepository
|
||||||
|
.WhereIf(_userInfo.IsEn_Us, x => x.LanguageType == LanguageType.English)
|
||||||
|
.WhereIf(!_userInfo.IsEn_Us, x => x.LanguageType == LanguageType.Chinese)
|
||||||
|
.Where(x => x.CriterionTypeEnum == criterionInfo.CriterionType && needAddCategory.Contains(x.ReadingCategory))
|
||||||
|
.Select(x => new TrialDataFromSystem()
|
||||||
|
{
|
||||||
|
Id = NewId.NextGuid(),
|
||||||
|
ShowOrder = x.ShowOrder,
|
||||||
|
IsEnable = x.IsEnable,
|
||||||
|
LanguageType = x.LanguageType,
|
||||||
|
IsRequired = x.IsRequired,
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
||||||
|
Type = x.Type,
|
||||||
|
ParentId = x.ParentId,
|
||||||
|
SystemQuestionId = x.Id,
|
||||||
|
ReadingCategory = x.ReadingCategory,
|
||||||
|
TypeValue = x.TypeValue,
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
needList.ForEach(x => {
|
||||||
|
maxOrder++;
|
||||||
|
x.ShowOrder = maxOrder;
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (var item in needList.Where(x => x.ParentId != null))
|
||||||
|
{
|
||||||
|
var parent = needList.Where(x => x.SystemQuestionId == item.ParentId).FirstOrDefault();
|
||||||
|
if (parent == null)
|
||||||
|
{
|
||||||
|
item.ParentId = null;
|
||||||
|
item.ParentTriggerValue = String.Empty;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item.ParentId = parent.Id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await _readingMedicineTrialQuestionRepository.AddRangeAsync(_mapper.Map<List<ReadingMedicineTrialQuestion>>(needList));
|
||||||
|
var result = await _readingMedicineTrialQuestionRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Result(result);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 从系统里面选择问题添加到项目里面
|
/// 从系统里面选择问题添加到项目里面
|
||||||
|
|
|
@ -1756,7 +1756,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||||
|
|
||||||
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||||
|
|
||||||
var deleteRowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).FirstOrDefaultAsync();
|
var deleteRowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
@ -1903,6 +1903,22 @@ namespace IRaCIS.Application.Services
|
||||||
VisitTaskId = inDto.VisitTaskId,
|
VisitTaskId = inDto.VisitTaskId,
|
||||||
ComputationTrigger=ComputationTrigger.Lesion,
|
ComputationTrigger=ComputationTrigger.Lesion,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
switch (taskinfo.TrialReadingCriterion.CriterionType)
|
||||||
|
{
|
||||||
|
case CriterionType.Lugano2014:
|
||||||
|
if (deleteRowInfo.RowIndex % 1 != 0)
|
||||||
|
{
|
||||||
|
await _luganoCalculateService.CalculateTargetLesionStatus(new CalculateTargetLesionStatusInDto()
|
||||||
|
{
|
||||||
|
QuestionId = inDto.QuestionId,
|
||||||
|
VisitTaskId = inDto.VisitTaskId,
|
||||||
|
RowNumber = deleteRowInfo.RowIndex
|
||||||
|
});
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1094,6 +1094,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue