Browse Source

查询pacs增加单位,结论过滤正常结论

master
wxd 11 months ago
parent
commit
4b621e9454
  1. 7
      src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs
  2. 1
      src/Shentun.Peis.Application/BigtextResultTemplates/BigtextResultTemplateAppService.cs
  3. 21
      src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs

7
src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs

@ -19,7 +19,7 @@ namespace Shentun.Peis.PacsBusiness
/// <summary>
/// 日期类型 0-检查日期 1-上传日期
/// </summary>
public char DateType { get; set; }
public char DateType { get; set; }
public string StartDate { get; set; }
@ -30,6 +30,11 @@ namespace Shentun.Peis.PacsBusiness
/// </summary>
public char? CheckTypeFlag { get; set; }
/// <summary>
/// 单位id集合 可传多个单位(传顶级单位,要求能查本级所有下级的数据),不传或为空时表示所有单位
/// </summary>
public List<Guid> CustomerOrgIds { get; set; } = new List<Guid>();
public int MaxResultCount { get; set; } = 1000;
public int SkipCount { get; set; } = 0;

1
src/Shentun.Peis.Application/BigtextResultTemplates/BigtextResultTemplateAppService.cs

@ -236,6 +236,7 @@ namespace Shentun.Peis.BigtextResultTemplates
join bigtextResultDescription in await _bigtextResultDescriptionRepository.GetQueryableAsync() on bigtextResultTemplate.Id equals bigtextResultDescription.BigtextResultTemplateId into bigtextResultDescriptionTemp
from bigtextResultDescriptionHaveEmpty in bigtextResultDescriptionTemp.DefaultIfEmpty()
where itemBigtextResultType.ItemId == input.ItemId
&& bigtextResultConclusionHaveEmpty.IsAbnormal == 'Y'
orderby bigtextResultTemplate.DisplayOrder ascending
select new
{

21
src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs

@ -6,6 +6,7 @@ using Microsoft.Extensions.Logging;
using NPOI.POIFS.Storage;
using NPOI.Util;
using NUglify.Helpers;
using Shentun.Peis.CustomerOrgs;
using Shentun.Peis.Enums;
using Shentun.Peis.Models;
using Shentun.Peis.PatientRegisters;
@ -59,6 +60,7 @@ namespace Shentun.Peis.PacsBusiness
private readonly IRepository<DicomFileDetail, Guid> _dicomFileDetailRepository;
private readonly ILogger<PacsBusinessAppService> _logger;
private readonly IRepository<ItemType, Guid> _itemTypeRepository;
private readonly CustomerOrgManager _customerOrgManager;
public PacsBusinessAppService(
IConfiguration configuration,
IRepository<RegisterCheck, Guid> registerCheckRepository,
@ -78,7 +80,8 @@ namespace Shentun.Peis.PacsBusiness
IRepository<UserItemType> userItemTypeRepository,
IRepository<DicomFileDetail, Guid> dicomFileDetailRepository,
ILogger<PacsBusinessAppService> logger,
IRepository<ItemType, Guid> itemTypeRepository)
IRepository<ItemType, Guid> itemTypeRepository,
CustomerOrgManager customerOrgManager)
{
_configuration = configuration;
_registerCheckRepository = registerCheckRepository;
@ -99,6 +102,7 @@ namespace Shentun.Peis.PacsBusiness
_dicomFileDetailRepository = dicomFileDetailRepository;
_logger = logger;
_itemTypeRepository = itemTypeRepository;
_customerOrgManager = customerOrgManager;
}
@ -348,6 +352,7 @@ namespace Shentun.Peis.PacsBusiness
orderby registerCheck.PacsCheckDate descending
select new
{
customerOrgId = patientRegister.CustomerOrgId,
patientName = patientRegister.PatientName,
checkRequestNo = registerCheck.CheckRequestNo,
asbitemName = asbitem.DisplayName,
@ -391,6 +396,20 @@ namespace Shentun.Peis.PacsBusiness
query = query.Where(m => m.checkTypeFlag == input.CheckTypeFlag);
}
if (input.CustomerOrgIds.Any())
{
List<Guid?> customerOrgIds = new List<Guid?>();
foreach (var customerOrgId in input.CustomerOrgIds)
{
var customerOrgIdsTemp = await _customerOrgManager.GetCustomerOrgChildrenId(customerOrgId);
customerOrgIds.AddRange(customerOrgIdsTemp);
}
query = query.Where(m => customerOrgIds.Contains(m.customerOrgId));
}
#region 增加项目类别权限
string AdminId = _configuration.GetValue<string>("AdminId");

Loading…
Cancel
Save