Browse Source

pacs

master
wxd 1 year ago
parent
commit
ce320102bd
  1. 34
      src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs
  2. 33
      src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckInputDto.cs
  3. 2
      src/Shentun.Peis.Application.Contracts/PacsBusiness/ImportRegisterCheckPictureByCheckRequestNoInputDto.cs
  4. 29
      src/Shentun.Peis.Application.Contracts/PacsBusiness/UpdateRegisterCheckIsPacsCheckInputDto.cs
  5. 15
      src/Shentun.Peis.Application.Contracts/RegisterChecks/RegisterCheckDto.cs
  6. 102
      src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs
  7. 6
      src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
  8. 7
      src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs
  9. 5
      src/Shentun.Peis.Domain/Devices/Device.cs

34
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
{
/// <summary>
/// 姓名
/// </summary>
public string PatientName { get; set; }
/// <summary>
/// 条码号
/// </summary>
public string CheckRequestNo { get; set; }
/// <summary>
/// 组合项目
/// </summary>
public string AsbitemName { get; set; }
/// <summary>
/// 检查日期
/// </summary>
public string PacsCheckDate { get; set; }
/// <summary>
/// 上传日期
/// </summary>
public string PacsUploadDate { get; set; }
}
}

33
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
{
/// <summary>
/// 姓名
/// </summary>
public string PatientName { get; set; }
/// <summary>
/// 条码号
/// </summary>
public string CheckRequestNo { get; set; }
/// <summary>
/// 日期类型 0-检查日期 1-上传日期
/// </summary>
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;
}
}

2
src/Shentun.Peis.Application.Contracts/PacsBusiness/ImportRegisterCheckPictureByCheckRequestNoInputDto.cs

@ -24,6 +24,6 @@ namespace Shentun.Peis.PacsBusiness
/// <summary>
/// 是否打印
/// </summary>
public char IsPrint { get; set } = 'Y';
public char IsPrint { get; set; } = 'Y';
}
}

29
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
{
/// <summary>
/// 条码号
/// </summary>
public string CheckRequestNo { get; set; }
/// <summary>
/// 检查日期
/// </summary>
public string PacsCheckDate { get; set; }
/// <summary>
/// 上传日期
/// </summary>
public string PacsUploadDate { get; set; }
/// <summary>
/// 是否检查 Y N 默认为Y
/// </summary>
public char IsPacsCheck { get; set; } = 'Y';
}
}

15
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; }
/// <summary>
/// 是否pacs检查 dicom上传为准
/// </summary>
public char IsPacsCheck { get; set; }
/// <summary>
/// pacs dicom检查日期
/// </summary>
public string PacsCheckDate { get; set; }
/// <summary>
/// pacs dicom文件上传日期
/// </summary>
public string PacsUploadDate { get; set; }
}
}

102
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<RegisterCheckAsbitem, Guid> _registerCheckAsbitemRepository;
private readonly IRepository<Asbitem, Guid> _asbitemRepository;
public PacsBusinessAppService(
IConfiguration configuration,
IRepository<RegisterCheck, Guid> registerCheckRepository,
@ -53,7 +57,9 @@ namespace Shentun.Peis.PacsBusiness
RegisterCheckSummaryAppService registerCheckSummaryAppService,
RegisterCheckSuggestionAppService registerCheckSuggestionAppService,
SumSummaryReportAppService sumSummaryReportAppService,
RegisterCheckPictureAppService registerCheckPictureAppService)
RegisterCheckPictureAppService registerCheckPictureAppService,
IRepository<RegisterCheckAsbitem, Guid> registerCheckAsbitemRepository,
IRepository<Asbitem, Guid> 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;
}
/// <summary>
/// 修改pacs项目检查状态及日期
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[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);
}
/// <summary>
/// 获取已做pacs检查项目信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/PacsBusiness/GetPatientRegisterPacsCheck")]
public async Task<PagedResultDto<GetPatientRegisterPacsCheckDto>> 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<GetPatientRegisterPacsCheckDto>(totalCount, entListDto); ;
}
}
}

6
src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs

@ -601,9 +601,9 @@ public class PeisApplicationAutoMapperProfile : Profile
CreateMap<SmsSend, SmsSendDto>();
//É蹸
CreateMap<DeviceDto, DeviceDto>();
CreateMap<CreateDeviceDto, DeviceDto>();
CreateMap<UpdateDeviceDto, DeviceDto>();
CreateMap<Device, DeviceDto>();
CreateMap<CreateDeviceDto, Device>();
CreateMap<UpdateDeviceDto, Device>();

7
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
}
}
}

5
src/Shentun.Peis.Domain/Devices/Device.cs

@ -20,6 +20,11 @@ namespace Shentun.Peis.Models
}
public Device()
{
}
/// <summary>
/// 名称
/// </summary>

Loading…
Cancel
Save