diff --git a/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs b/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs
new file mode 100644
index 0000000..df47304
--- /dev/null
+++ b/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shentun.Peis.PacsBusiness
+{
+ public class GetPatientRegisterPacsCheckDto
+ {
+ ///
+ /// 姓名
+ ///
+ public string PatientName { get; set; }
+
+ ///
+ /// 条码号
+ ///
+ public string CheckRequestNo { get; set; }
+
+ ///
+ /// 组合项目
+ ///
+ public string AsbitemName { get; set; }
+
+ ///
+ /// 检查日期
+ ///
+ public string PacsCheckDate { get; set; }
+
+ ///
+ /// 上传日期
+ ///
+ public string PacsUploadDate { get; set; }
+ }
+}
diff --git a/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs b/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs
new file mode 100644
index 0000000..d5f32b7
--- /dev/null
+++ b/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shentun.Peis.PacsBusiness
+{
+ public class GetPatientRegisterPacsCheckInputDto
+ {
+ ///
+ /// 姓名
+ ///
+ public string PatientName { get; set; }
+
+ ///
+ /// 条码号
+ ///
+ public string CheckRequestNo { get; set; }
+
+ ///
+ /// 日期类型 0-检查日期 1-上传日期
+ ///
+ public char DateType { get; set; }
+
+ public string StartDate { get; set; }
+
+ public string EndDate { get; set; }
+
+ public int MaxResultCount { get; set; } = 1000;
+
+ public int SkipCount { get; set; } = 0;
+
+ }
+}
diff --git a/src/Shentun.Peis.Application.Contracts/PacsBusiness/ImportRegisterCheckPictureByCheckRequestNoInputDto.cs b/src/Shentun.Peis.Application.Contracts/PacsBusiness/ImportRegisterCheckPictureByCheckRequestNoInputDto.cs
index 50b7b4e..e3a24a9 100644
--- a/src/Shentun.Peis.Application.Contracts/PacsBusiness/ImportRegisterCheckPictureByCheckRequestNoInputDto.cs
+++ b/src/Shentun.Peis.Application.Contracts/PacsBusiness/ImportRegisterCheckPictureByCheckRequestNoInputDto.cs
@@ -24,6 +24,6 @@ namespace Shentun.Peis.PacsBusiness
///
/// 是否打印
///
- public char IsPrint { get; set } = 'Y';
+ public char IsPrint { get; set; } = 'Y';
}
}
diff --git a/src/Shentun.Peis.Application.Contracts/PacsBusiness/UpdateRegisterCheckIsPacsCheckInputDto.cs b/src/Shentun.Peis.Application.Contracts/PacsBusiness/UpdateRegisterCheckIsPacsCheckInputDto.cs
new file mode 100644
index 0000000..80db0d6
--- /dev/null
+++ b/src/Shentun.Peis.Application.Contracts/PacsBusiness/UpdateRegisterCheckIsPacsCheckInputDto.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shentun.Peis.PacsBusiness
+{
+ public class UpdateRegisterCheckIsPacsCheckInputDto
+ {
+ ///
+ /// 条码号
+ ///
+ public string CheckRequestNo { get; set; }
+
+ ///
+ /// 检查日期
+ ///
+ public string PacsCheckDate { get; set; }
+
+ ///
+ /// 上传日期
+ ///
+ public string PacsUploadDate { get; set; }
+
+ ///
+ /// 是否检查 Y N 默认为Y
+ ///
+ public char IsPacsCheck { get; set; } = 'Y';
+ }
+}
diff --git a/src/Shentun.Peis.Application.Contracts/RegisterChecks/RegisterCheckDto.cs b/src/Shentun.Peis.Application.Contracts/RegisterChecks/RegisterCheckDto.cs
index 0940ef7..fbb94a0 100644
--- a/src/Shentun.Peis.Application.Contracts/RegisterChecks/RegisterCheckDto.cs
+++ b/src/Shentun.Peis.Application.Contracts/RegisterChecks/RegisterCheckDto.cs
@@ -89,5 +89,20 @@ namespace Shentun.Peis.RegisterChecks
//public Guid RegisterAsbitemId { get; set; }
public string AsbitemName { get; set; }
+
+ ///
+ /// 是否pacs检查 dicom上传为准
+ ///
+ public char IsPacsCheck { get; set; }
+
+ ///
+ /// pacs dicom检查日期
+ ///
+ public string PacsCheckDate { get; set; }
+
+ ///
+ /// pacs dicom文件上传日期
+ ///
+ public string PacsUploadDate { get; set; }
}
}
diff --git a/src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs b/src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs
index e77bfe6..86da898 100644
--- a/src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs
+++ b/src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using NPOI.POIFS.Storage;
+using NPOI.Util;
using Shentun.Peis.Enums;
using Shentun.Peis.Models;
using Shentun.Peis.PatientRegisters;
@@ -17,6 +18,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
+using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
@@ -41,6 +43,8 @@ namespace Shentun.Peis.PacsBusiness
private readonly RegisterCheckSuggestionAppService _registerCheckSuggestionAppService;
private readonly SumSummaryReportAppService _sumSummaryReportAppService;
private readonly RegisterCheckPictureAppService _registerCheckPictureAppService;
+ private readonly IRepository _registerCheckAsbitemRepository;
+ private readonly IRepository _asbitemRepository;
public PacsBusinessAppService(
IConfiguration configuration,
IRepository registerCheckRepository,
@@ -53,7 +57,9 @@ namespace Shentun.Peis.PacsBusiness
RegisterCheckSummaryAppService registerCheckSummaryAppService,
RegisterCheckSuggestionAppService registerCheckSuggestionAppService,
SumSummaryReportAppService sumSummaryReportAppService,
- RegisterCheckPictureAppService registerCheckPictureAppService)
+ RegisterCheckPictureAppService registerCheckPictureAppService,
+ IRepository registerCheckAsbitemRepository,
+ IRepository asbitemRepository)
{
_configuration = configuration;
_registerCheckRepository = registerCheckRepository;
@@ -67,6 +73,8 @@ namespace Shentun.Peis.PacsBusiness
_registerCheckSuggestionAppService = registerCheckSuggestionAppService;
_sumSummaryReportAppService = sumSummaryReportAppService;
_registerCheckPictureAppService = registerCheckPictureAppService;
+ _registerCheckAsbitemRepository = registerCheckAsbitemRepository;
+ _asbitemRepository = asbitemRepository;
}
@@ -274,8 +282,98 @@ namespace Shentun.Peis.PacsBusiness
});
resultDto.registerCheckPictureDetails = await _registerCheckPictureAppService.GetRegisterCheckPictureInRegisterCheckIdAsync(query.registerCheckId);
-
+
return resultDto;
}
+
+ ///
+ /// 修改pacs项目检查状态及日期
+ ///
+ ///
+ ///
+ [HttpPost("api/app/PacsBusiness/UpdateRegisterCheckIsPacsCheck")]
+ public async Task UpdateRegisterCheckIsPacsCheckAsync(UpdateRegisterCheckIsPacsCheckInputDto input)
+ {
+ var registerCheckEnt = await _registerCheckRepository.FirstOrDefaultAsync(f => f.CheckRequestNo == input.CheckRequestNo);
+ if (registerCheckEnt == null)
+ {
+ throw new UserFriendlyException("条码号不正确");
+ }
+
+ registerCheckEnt.IsPacsCheck = input.IsPacsCheck;
+ registerCheckEnt.PacsCheckDate = Convert.ToDateTime(input.PacsCheckDate);
+ registerCheckEnt.PacsUploadDate = Convert.ToDateTime(input.PacsUploadDate);
+
+ await _registerCheckRepository.UpdateAsync(registerCheckEnt);
+ }
+
+ ///
+ /// 获取已做pacs检查项目信息
+ ///
+ ///
+ ///
+ [HttpPost("api/app/PacsBusiness/GetPatientRegisterPacsCheck")]
+ public async Task> GetPatientRegisterPacsCheckAsync(GetPatientRegisterPacsCheckInputDto input)
+ {
+ var query = from patientRegister in await _patientRegisterRepository.GetQueryableAsync()
+ join registerCheck in await _registerCheckRepository.GetQueryableAsync() on patientRegister.Id equals registerCheck.PatientRegisterId
+ join registerCheckAsbitem in await _registerCheckAsbitemRepository.GetQueryableAsync() on registerCheck.Id equals registerCheckAsbitem.RegisterCheckId
+ join asbitem in await _asbitemRepository.GetQueryableAsync() on registerCheckAsbitem.AsbitemId equals asbitem.Id
+ where registerCheck.IsPacsCheck == 'Y'
+ orderby registerCheck.PacsCheckDate descending
+ select new
+ {
+ patientName = patientRegister.PatientName,
+ checkRequestNo = registerCheck.CheckRequestNo,
+ asbitemName = asbitem.DisplayName,
+ pacsCheckDate = registerCheck.PacsCheckDate,
+ pacsUploadDate = registerCheck.PacsUploadDate
+ };
+
+ if (!string.IsNullOrWhiteSpace(input.PatientName))
+ {
+ query = query.Where(m => m.patientName == input.PatientName);
+ }
+
+ if (!string.IsNullOrWhiteSpace(input.CheckRequestNo))
+ {
+ query = query.Where(m => m.checkRequestNo == input.CheckRequestNo);
+ }
+
+ if (!string.IsNullOrEmpty(input.StartDate) && !string.IsNullOrEmpty(input.EndDate))
+ {
+ if (input.DateType == '0')
+ {
+ query = query.Where(m => m.pacsCheckDate != null
+ && m.pacsCheckDate >= Convert.ToDateTime(input.StartDate) &&
+ m.pacsCheckDate < Convert.ToDateTime(input.EndDate).AddDays(1));
+ }
+ else if (input.DateType == '1')
+ {
+ query = query.Where(m => m.pacsUploadDate != null
+ && m.pacsUploadDate >= Convert.ToDateTime(input.StartDate) &&
+ m.pacsUploadDate < Convert.ToDateTime(input.EndDate).AddDays(1));
+ }
+
+ }
+
+ var checkRequestNoGroup = query.GroupBy(g => g.checkRequestNo);
+
+ int totalCount = checkRequestNoGroup.Count();
+
+
+ var entListDto = checkRequestNoGroup.Skip(input.SkipCount * input.MaxResultCount).Take(input.MaxResultCount)
+ .Select(s => new GetPatientRegisterPacsCheckDto
+ {
+ CheckRequestNo = s.Key,
+ AsbitemName = s.Key,
+ PatientName = s.FirstOrDefault().patientName,
+ PacsCheckDate = DataHelper.ConversionDateToString(s.FirstOrDefault().pacsCheckDate),
+ PacsUploadDate = DataHelper.ConversionDateToString(s.FirstOrDefault().pacsUploadDate)
+ }).ToList();
+
+ return new PagedResultDto(totalCount, entListDto); ;
+
+ }
}
}
diff --git a/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs b/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
index 290f983..9a9ef5c 100644
--- a/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
+++ b/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
@@ -601,9 +601,9 @@ public class PeisApplicationAutoMapperProfile : Profile
CreateMap();
//豸
- CreateMap();
- CreateMap();
- CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
diff --git a/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs b/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs
index e2acc18..377ddf6 100644
--- a/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs
+++ b/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs
@@ -139,7 +139,10 @@ namespace Shentun.Peis.RegisterChecks
LastModifierName = _cacheService.GetSurnameAsync(registerCheckEntity.LastModifierId).Result,
CreatorName = _cacheService.GetSurnameAsync(registerCheckEntity.CreatorId).Result,
IsCharge = registerCheckEntity.RegisterCheckAsbitems.Where(m => m.PayTypeFlag == PayTypeFlag.PersonPay && m.IsCharge == 'N').Count() > 0 ? 'N' : 'Y',
- AsbitemName = string.Join(",", registerCheckEntity.RegisterCheckAsbitems.Select(rs => rs.Asbitem.DisplayName).ToList())
+ AsbitemName = string.Join(",", registerCheckEntity.RegisterCheckAsbitems.Select(rs => rs.Asbitem.DisplayName).ToList()),
+ IsPacsCheck = registerCheckEntity.IsPacsCheck,
+ PacsUploadDate = DataHelper.ConversionDateToString(registerCheckEntity.PacsUploadDate),
+ PacsCheckDate = DataHelper.ConversionDateToString(registerCheckEntity.PacsCheckDate)
};
return registerCheckDto;
@@ -689,6 +692,8 @@ namespace Shentun.Peis.RegisterChecks
}
}
+
+
}
diff --git a/src/Shentun.Peis.Domain/Devices/Device.cs b/src/Shentun.Peis.Domain/Devices/Device.cs
index 0869ffb..918e003 100644
--- a/src/Shentun.Peis.Domain/Devices/Device.cs
+++ b/src/Shentun.Peis.Domain/Devices/Device.cs
@@ -20,6 +20,11 @@ namespace Shentun.Peis.Models
}
+ public Device()
+ {
+
+ }
+
///
/// 名称
///