Uat_Study
parent
ec80fb6429
commit
07a2bcf446
|
@ -13,8 +13,12 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
{
|
||||
public Guid? Id { get; set; }
|
||||
public Guid CriterionId { get; set; }
|
||||
public string NidusType { get; set; }
|
||||
public string NidusTypeCN { get; set; }
|
||||
/// <summary>
|
||||
/// 器官类型
|
||||
/// </summary>
|
||||
public OrganType OrganType { get; set; }
|
||||
|
||||
public LesionType LesionType { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
}
|
||||
|
@ -62,8 +66,6 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public class GetCriterionLesionTypeInDto
|
||||
{
|
||||
public Guid CriterionId { get; set; }
|
||||
|
||||
public bool IsSystem { get; set; }
|
||||
}
|
||||
|
||||
///<summary>CriterionNidusQuery 列表查询参数模型</summary>
|
||||
|
@ -82,6 +84,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
/// 病灶类型
|
||||
/// </summary>
|
||||
public LesionType LesionType { get; set; }
|
||||
/// <summary>
|
||||
/// 器官类型
|
||||
/// </summary>
|
||||
public OrganType OrganType { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
}
|
||||
|
@ -126,9 +132,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public bool IsLymphNodes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 病灶类型
|
||||
/// 器官类型
|
||||
/// </summary>
|
||||
public LesionType LesionType { get; set; }
|
||||
public OrganType OrganType { get; set; }
|
||||
}
|
||||
|
||||
public class GetTrialSelectOrganListInDto
|
||||
|
@ -165,7 +171,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
/// <summary>
|
||||
/// 病灶类型
|
||||
/// </summary>
|
||||
public LesionType? LesionType { get; set; }
|
||||
public OrganType? OrganType { get; set; }
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
}
|
||||
|
@ -187,9 +193,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 病灶类型
|
||||
/// 器官类型
|
||||
/// </summary>
|
||||
public LesionType LesionType { get; set; }
|
||||
public OrganType OrganType { get; set; }
|
||||
|
||||
|
||||
|
||||
|
@ -214,7 +220,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
/// <summary>
|
||||
/// 病灶类型
|
||||
/// </summary>
|
||||
public LesionType? LesionType { get; set; }
|
||||
public OrganType? OrganType { get; set; }
|
||||
|
||||
public Guid SystemCriterionId { get; set; }
|
||||
|
||||
|
@ -244,7 +250,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
/// <summary>
|
||||
/// 病灶类型
|
||||
/// </summary>
|
||||
public LesionType LesionType { get; set; }
|
||||
public OrganType OrganType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准 病灶类型
|
||||
|
|
|
@ -10,6 +10,7 @@ using IRaCIS.Core.Application.Interfaces;
|
|||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
@ -50,14 +51,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<List<OrganDictionary>> GetCriterionLesionType(GetCriterionLesionTypeInDto inDto)
|
||||
{
|
||||
var dicNums = new List<int>();
|
||||
if (inDto.IsSystem)
|
||||
{
|
||||
dicNums = await _organInfoRepository.Where(x => x.SystemCriterionId == inDto.CriterionId).Select(x => (int)x.LesionType).Distinct().ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
dicNums = await _organTrialInfoRepository.Where(x => x.TrialCriterionId == inDto.CriterionId).Select(x => (int)x.LesionType).Distinct().ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
dicNums = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.CriterionId).Select(x => (int)x.LesionType).Distinct().ToListAsync();
|
||||
|
||||
|
||||
|
||||
var dictionaryId = await _dictionaryRepository.Where(x => x.Code == "LesionType").Select(x => x.Id).FirstOrDefaultAsync();
|
||||
|
||||
|
@ -67,7 +65,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取标准病灶列表
|
||||
/// 获取标准病灶器官关系信息
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
|
@ -83,22 +81,26 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改标准病灶列表
|
||||
/// 新增修改标准病灶器官关系信息
|
||||
/// </summary>
|
||||
/// <param name="addOrEditCriterionNidus"></param>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> AddOrUpdateCriterionNidus(CriterionNidusAddOrEdit addOrEditCriterionNidus)
|
||||
public async Task<IResponseOutput> AddOrUpdateCriterionNidus(CriterionNidusAddOrEdit inDto)
|
||||
{
|
||||
|
||||
var entity = await _criterionNidusRepository.InsertOrUpdateAsync(addOrEditCriterionNidus, true);
|
||||
|
||||
if (await _criterionNidusRepository.AnyAsync(x => x.OrganType == inDto.OrganType && x.LesionType == inDto.LesionType && x.CriterionId == inDto.CriterionId && x.Id != inDto.Id))
|
||||
{
|
||||
throw new BusinessValidationFailedException("存在相同的数据,操作失败");
|
||||
}
|
||||
var entity = await _criterionNidusRepository.InsertOrUpdateAsync(inDto, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除病灶列表
|
||||
/// 删除病灶病灶器官关系信息
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
|
@ -120,7 +122,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var organInfoQueryable = _organInfoRepository
|
||||
.Where(x=>x.SystemCriterionId==inQuery.SystemCriterionId)
|
||||
.WhereIf(inQuery.LesionType != null, x => x.LesionType == inQuery.LesionType)
|
||||
.WhereIf(inQuery.OrganType != null, x => x.OrganType == inQuery.OrganType)
|
||||
.ProjectTo<OrganInfoView>(_mapper.ConfigurationProvider);
|
||||
return await organInfoQueryable.ToListAsync();
|
||||
}
|
||||
|
@ -198,7 +200,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<List<GetTrialOrganListOutDto>> GetTrialOrganList(GetTrialOrganListInDto inDto)
|
||||
{
|
||||
var organInfoQueryable = from data in _organInfoRepository.WhereIf(inDto.LesionType != null, x => x.LesionType == inDto.LesionType)
|
||||
var organInfoQueryable = from data in _organInfoRepository.WhereIf(inDto.OrganType != null, x => x.OrganType == inDto.OrganType)
|
||||
join trialData in _organTrialInfoRepository.WhereIf(inDto.IsEnable != null, x => x.IsEnable == inDto.IsEnable)
|
||||
.Where(x => x.TrialId == inDto.TrialId)
|
||||
on data.Id equals trialData.OrganInfoId
|
||||
|
@ -212,7 +214,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IsLymphNodes = data.IsLymphNodes,
|
||||
|
||||
IsEnable= trialData.IsEnable,
|
||||
LesionType= trialData.LesionType,
|
||||
OrganType = trialData.OrganType,
|
||||
};
|
||||
|
||||
|
||||
|
@ -281,6 +283,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CriterionId = trialCriterionId,
|
||||
LesionType = x.LesionType,
|
||||
OriginalId = x.Id,
|
||||
OrganType=x.OrganType,
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
|
@ -291,7 +294,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
var originalIds = criterionNidusList.Select(x => x.OriginalId).Distinct().ToList();
|
||||
List<OrganTrialInfo> organTrialInfoList = await _organInfoRepository.Where(x =>x.SystemCriterionId== inDto.SystemCriterionId).Select(x => new OrganTrialInfo()
|
||||
{
|
||||
LesionType=x.LesionType,
|
||||
OrganType=x.OrganType,
|
||||
Id = x.Id,
|
||||
IsEnable = true,
|
||||
TrialCriterionId= readingQuestionCriterionTrial.Id,
|
||||
|
@ -299,7 +302,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
TrialId = inDto.TrialId,
|
||||
}).ToListAsync();
|
||||
|
||||
criterionNidusList.ForEach(x => x.Id = NewId.NextGuid());
|
||||
organTrialInfoList.ForEach(x => x.Id = NewId.NextGuid());
|
||||
await _organTrialInfoRepository.AddRangeAsync(organTrialInfoList);
|
||||
await _readingQuestionCriterionTrial.UpdatePartialFromQueryAsync(trialCriterionId,x=> new ReadingQuestionCriterionTrial() {
|
||||
SynchronizeOriginalTime=DateTime.Now
|
||||
|
|
|
@ -156,6 +156,26 @@ namespace IRaCIS.Core.Domain.Share
|
|||
}
|
||||
|
||||
public enum LesionType
|
||||
{
|
||||
/// <summary>
|
||||
/// 靶病灶
|
||||
/// </summary>
|
||||
TargetLesion = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 非靶病灶
|
||||
/// </summary>
|
||||
NonTargetLesions = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 新病灶
|
||||
/// </summary>
|
||||
NewLesions = 1,
|
||||
|
||||
}
|
||||
|
||||
|
||||
public enum OrganType
|
||||
{
|
||||
/// <summary>
|
||||
/// 非靶和新病灶
|
||||
|
|
|
@ -35,8 +35,13 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// CreateUserId
|
||||
/// </summary>
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 器官类型
|
||||
/// </summary>
|
||||
public OrganType OrganType { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -44,9 +44,9 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public bool IsLymphNodes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 病灶类型
|
||||
/// 器官类型
|
||||
/// </summary>
|
||||
public LesionType LesionType { get; set; }
|
||||
public OrganType OrganType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准Id
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// <summary>
|
||||
/// 病灶类型
|
||||
/// </summary>
|
||||
public LesionType LesionType { get; set; }
|
||||
public OrganType OrganType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准Id
|
||||
|
|
Loading…
Reference in New Issue