From 95f7c170b579b204278b6561e397ce42e48db838 Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Thu, 21 Nov 2024 15:18:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E8=83=B6=E7=89=87=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Persons/GetIsPacsCheckListDto.cs | 24 +++++++++ .../Persons/PersonAppService.cs | 50 ++++++++++++++++++- .../Models/RegisterCheck.cs | 19 +++++++ .../Configures/RegisterCheckConfigure.cs | 2 + 4 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 src/Shentun.WebPeis.Application.Contracts/Persons/GetIsPacsCheckListDto.cs diff --git a/src/Shentun.WebPeis.Application.Contracts/Persons/GetIsPacsCheckListDto.cs b/src/Shentun.WebPeis.Application.Contracts/Persons/GetIsPacsCheckListDto.cs new file mode 100644 index 0000000..128bcea --- /dev/null +++ b/src/Shentun.WebPeis.Application.Contracts/Persons/GetIsPacsCheckListDto.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Shentun.WebPeis.Persons +{ + public class GetIsPacsCheckListDto + { + /// + /// 项目名字 + /// + public string AsbitemName { get; set; } + + /// + /// 条码号 + /// + public string CheckRequestNo { get; set; } + + /// + /// pacs dicom检查日期 + /// + public string PacsCheckDate { get; set; } + } +} diff --git a/src/Shentun.WebPeis.Application/Persons/PersonAppService.cs b/src/Shentun.WebPeis.Application/Persons/PersonAppService.cs index f607b7a..058f195 100644 --- a/src/Shentun.WebPeis.Application/Persons/PersonAppService.cs +++ b/src/Shentun.WebPeis.Application/Persons/PersonAppService.cs @@ -64,6 +64,9 @@ namespace Shentun.WebPeis.Persons private readonly IHttpContextAccessor _httpContextAccessor; private readonly IRepository _customerOrgRepository; private readonly SysParmValueManager _sysParmValueManager; + private readonly IRepository _registerCheckRepository; + private readonly IRepository _registerCheckAsbitemRepository; + private readonly IRepository _asbitemRepository; public PersonAppService(IRepository repository, IConfiguration configuration, IRepository identityUserRepository, @@ -78,7 +81,10 @@ namespace Shentun.WebPeis.Persons IHttpContextAccessor httpContextAccessor, IRepository customerOrgRepository, IRepository questionRegisterRepository, - SysParmValueManager sysParmValueManager) + SysParmValueManager sysParmValueManager, + IRepository registerCheckRepository, + IRepository registerCheckAsbitemRepository, + IRepository asbitemRepository) { _repository = repository; _configuration = configuration; @@ -95,6 +101,9 @@ namespace Shentun.WebPeis.Persons _customerOrgRepository = customerOrgRepository; _questionRegisterRepository = questionRegisterRepository; _sysParmValueManager = sysParmValueManager; + _registerCheckRepository = registerCheckRepository; + _registerCheckAsbitemRepository = registerCheckAsbitemRepository; + _asbitemRepository = asbitemRepository; } public async Task GetByIdAsync(PersonIdInputDto input) @@ -431,7 +440,7 @@ namespace Shentun.WebPeis.Persons } /// - /// 获取体检次数列表 + /// 获取体检次数列表 显示报告的列表 /// /// /// @@ -460,6 +469,43 @@ namespace Shentun.WebPeis.Persons } + + /// + /// 获取pacs文件检查的项目列表 + /// + /// + /// + [HttpPost("api/app/Person/GetIsPacsCheckList")] + public async Task> GetIsPacsCheckListAsync(PatientRegisterIdInputDto input) + { + var query = (from patientRegister in await _patientRegisterRepository.GetQueryableAsync() + join registerCheck in await _registerCheckRepository.GetQueryableAsync() on patientRegister.PatientRegisterId equals registerCheck.PatientRegisterId + join registerCheckAsbitem in await _registerCheckAsbitemRepository.GetQueryableAsync() on registerCheck.RegisterCheckId equals registerCheckAsbitem.RegisterCheckId + join asbitem in await _asbitemRepository.GetQueryableAsync() on registerCheckAsbitem.AsbitemId equals asbitem.AsbitemId + where patientRegister.PatientRegisterId == input.PatientRegisterId + select new + { + registerCheck.CheckRequestNo, + asbitem.AsbitemName, + registerCheck.PacsCheckDate + }).ToList(); + + + var entListDto = new List(); + + if (query.Count > 0) + { + entListDto = query.GroupBy(g => g.CheckRequestNo).Select(s => new GetIsPacsCheckListDto + { + CheckRequestNo = s.Key, + AsbitemName = string.Join(",", s.Select(ss => ss.AsbitemName).Distinct().ToList()), + PacsCheckDate = DataHelper.ConversionDateToString(s.FirstOrDefault().PacsCheckDate) + }).ToList(); + } + + return entListDto; + } + /// /// 获取本人和亲属列表 /// diff --git a/src/Shentun.WebPeis.Domain/Models/RegisterCheck.cs b/src/Shentun.WebPeis.Domain/Models/RegisterCheck.cs index ccbea3b..66fceb3 100644 --- a/src/Shentun.WebPeis.Domain/Models/RegisterCheck.cs +++ b/src/Shentun.WebPeis.Domain/Models/RegisterCheck.cs @@ -2,6 +2,8 @@ using System.Collections.Generic; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities; +using System.ComponentModel.DataAnnotations.Schema; +using System.ComponentModel.DataAnnotations; namespace Shentun.WebPeis.Models; @@ -95,6 +97,23 @@ public partial class RegisterCheck : AuditedEntity, IHasConcurrencyStamp public Guid? ExecOrganizationUnitId { get; set; } + /// + /// 是否pacs检查 dicom上传为准 + /// + [MaxLength(1)] + public char IsPacsCheck { get; set; } + + /// + /// pacs dicom检查日期 + /// + public DateTime? PacsCheckDate { get; set; } + + /// + /// pacs dicom文件上传日期 + /// + public DateTime? PacsUploadDate { get; set; } + + public virtual ICollection RegisterCheckItems { get; set; } = new List(); public virtual ICollection RegisterCheckPictures { get; set; } = new List(); diff --git a/src/Shentun.WebPeis.EntityFrameworkCore/Configures/RegisterCheckConfigure.cs b/src/Shentun.WebPeis.EntityFrameworkCore/Configures/RegisterCheckConfigure.cs index b3fc6e4..49f2c32 100644 --- a/src/Shentun.WebPeis.EntityFrameworkCore/Configures/RegisterCheckConfigure.cs +++ b/src/Shentun.WebPeis.EntityFrameworkCore/Configures/RegisterCheckConfigure.cs @@ -93,6 +93,8 @@ namespace Shentun.WebPeis.Configures .HasMaxLength(80) .HasComment("第三方信息") .HasColumnName("third_info"); + + entity.Property(e=>e.IsPacsCheck).HasComment("是否pacs检查 dicom上传为准").IsRequired().HasDefaultValueSql("'N'"); } } }