diff --git a/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs b/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs index 8ce32a4..aa17340 100644 --- a/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs +++ b/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs @@ -45,5 +45,20 @@ namespace Shentun.Pacs.PacsBusiness /// 项目描述 /// public string PacsDesc { get; set; } + + /// + /// 检查医生id + /// + public string CheckDoctorId { get; set; } + + /// + /// 检查医生名字 + /// + public string CheckDoctorName { get; set; } + + /// + /// 体检类型名称 + /// + public string MedicalTypeName { get; set; } } } diff --git a/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs b/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs index 3e4eeec..4b2f673 100644 --- a/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs +++ b/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs @@ -54,5 +54,10 @@ namespace Shentun.Pacs.PacsBusiness public int SkipCount { get; set; } = 0; + /// + /// 检查医生 + /// + public string CheckDoctorId { get; set; } + } } diff --git a/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs b/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs index 61e8c50..e36386e 100644 --- a/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs +++ b/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs @@ -466,7 +466,8 @@ namespace Shentun.Pacs.PacsBusiness deviceId = patientRegister.DeviceId, medicalTypeId = patientRegister.MedicalTypeId, encodingFlag = deviceHaveEmpty == null ? '0' : deviceHaveEmpty.EncodingFlag, - isFilmRelease = asbitem.IsFilmRelease + isFilmRelease = asbitem.IsFilmRelease, + checkDoctorId = registerCheck.CheckDoctorId }; if (!string.IsNullOrWhiteSpace(input.PatientName)) @@ -536,6 +537,11 @@ namespace Shentun.Pacs.PacsBusiness query = query.Where(m => m.medicalTypeId == input.MedicalTypeId); } + + if (!string.IsNullOrWhiteSpace(input.CheckDoctorId)) + { + query = query.Where(m => m.checkDoctorId == input.CheckDoctorId); + } //#region 增加项目类别权限 //string AdminId = _configuration.GetValue("AdminId"); @@ -596,7 +602,10 @@ namespace Shentun.Pacs.PacsBusiness PacsUploadDate = DataHelper.ConversionDateToString(fisrtItem.pacsUploadDate), RegisterCheckId = item.Key, CompleteFlag = fisrtItem.registerCheckCompleteFlag, - PacsDesc = pacsDesc + PacsDesc = pacsDesc, + MedicalTypeName = _cacheService.GetMedicalTypeNameAsync(fisrtItem.medicalTypeId).GetAwaiter().GetResult(), + CheckDoctorId = fisrtItem.checkDoctorId, + CheckDoctorName = _cacheService.GetSurnameAsync(fisrtItem.checkDoctorId).GetAwaiter().GetResult() }); } @@ -1889,7 +1898,7 @@ namespace Shentun.Pacs.PacsBusiness } #endregion - + /// /// 转换老系统性别 diff --git a/src/Shentun.Pacs.Domain/CacheService.cs b/src/Shentun.Pacs.Domain/CacheService.cs index 07b41c5..4f7c4f9 100644 --- a/src/Shentun.Pacs.Domain/CacheService.cs +++ b/src/Shentun.Pacs.Domain/CacheService.cs @@ -1,6 +1,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Caching.Distributed; using Microsoft.Extensions.Caching.Memory; +using NPOI.HPSF; using NPOI.SS.Formula.Functions; using Shentun.Pacs.Enums; using Shentun.Pacs.Models; @@ -191,6 +192,21 @@ namespace Shentun.Pacs return ""; } + public async Task GetSurnameAsync(string id) + { + Guid newId; + + if (string.IsNullOrWhiteSpace(id) || !Guid.TryParse(id, out newId)) + { + return ""; + } + var entity = await GetUserAsync(newId); + if (entity != null) + return entity.Surname; + else + return ""; + } + public async Task GetUserSignAsync(Guid? id) { if (id == null || id == default(Guid) || !id.HasValue)