diff --git a/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs b/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs
index 6bdbad3..2054f5e 100644
--- a/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs
+++ b/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs
@@ -19,7 +19,7 @@ namespace Shentun.Peis.PacsBusiness
///
/// 日期类型 0-检查日期 1-上传日期
///
- public char DateType { get; set; }
+ public char DateType { get; set; }
public string StartDate { get; set; }
@@ -30,6 +30,11 @@ namespace Shentun.Peis.PacsBusiness
///
public char? CheckTypeFlag { get; set; }
+ ///
+ /// 单位id集合 可传多个单位(传顶级单位,要求能查本级所有下级的数据),不传或为空时表示所有单位
+ ///
+ public List CustomerOrgIds { get; set; } = new List();
+
public int MaxResultCount { get; set; } = 1000;
public int SkipCount { get; set; } = 0;
diff --git a/src/Shentun.Peis.Application/BigtextResultTemplates/BigtextResultTemplateAppService.cs b/src/Shentun.Peis.Application/BigtextResultTemplates/BigtextResultTemplateAppService.cs
index b509807..bce4b62 100644
--- a/src/Shentun.Peis.Application/BigtextResultTemplates/BigtextResultTemplateAppService.cs
+++ b/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
{
diff --git a/src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs b/src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs
index 9f3c8e9..7d973af 100644
--- a/src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs
+++ b/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 _dicomFileDetailRepository;
private readonly ILogger _logger;
private readonly IRepository _itemTypeRepository;
+ private readonly CustomerOrgManager _customerOrgManager;
public PacsBusinessAppService(
IConfiguration configuration,
IRepository registerCheckRepository,
@@ -78,7 +80,8 @@ namespace Shentun.Peis.PacsBusiness
IRepository userItemTypeRepository,
IRepository dicomFileDetailRepository,
ILogger logger,
- IRepository itemTypeRepository)
+ IRepository 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 customerOrgIds = new List();
+
+ 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("AdminId");