Browse Source

pacs

master
wxd 1 year ago
parent
commit
27f8bdcd17
  1. 11
      src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPacsDicomDataByCheckRequestNo.cs
  2. 2
      src/Shentun.Peis.Application.Contracts/PacsBusiness/ImportPacsDicomDataInputDto.cs
  3. 27
      src/Shentun.Peis.Application.Contracts/PacsBusiness/RegisterCheckPacsDto.cs
  4. 34
      src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs

11
src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPacsDicomDataByCheckRequestNo.cs

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.PacsBusiness
{
public class GetPacsDicomDataByCheckRequestNo
{
public
}
}

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

@ -9,7 +9,7 @@ namespace Shentun.Peis.PacsBusiness
/// <summary>
/// 条码号
/// </summary>
public string RegisterCheckNo { get; set; }
public string CheckRequestNo { get; set; }
/// <summary>
/// 资源集合

27
src/Shentun.Peis.Application.Contracts/PacsBusiness/RegisterCheckPacsDto.cs

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Shentun.Peis.PacsBusiness
{
public class RegisterCheckPacsDto
{
/// <summary>
/// DICOM文件路径
/// </summary>
public string DicomPathName { get; set; }
/// <summary>
/// 本地资源路径
/// </summary>
public string LocalPathName { get; set; }
/// <summary>
/// 显示顺序
/// </summary>
public int DisplayOrder { get; set; }
}
}

34
src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs

@ -1,7 +1,10 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using NPOI.POIFS.Storage;
using Shentun.Peis.Enums;
using Shentun.Peis.Models;
using Shentun.Peis.PatientRegisters;
using Shentun.Peis.PrintReports;
using Shentun.Peis.RegisterCheckPictures;
using System;
using System.Collections.Generic;
@ -141,9 +144,9 @@ namespace Shentun.Peis.PacsBusiness
{
var realPath = _configuration["DicomVirtualPath:RealPath"];
var requestPath = _configuration["DicomVirtualPath:RequestPath"];
if (string.IsNullOrWhiteSpace(input.RegisterCheckNo))
if (string.IsNullOrWhiteSpace(input.CheckRequestNo))
throw new UserFriendlyException("条码号不能为空");
var registerCheckEnt = await _registerCheckRepository.FirstOrDefaultAsync(f => f.CheckRequestNo == input.RegisterCheckNo);
var registerCheckEnt = await _registerCheckRepository.FirstOrDefaultAsync(f => f.CheckRequestNo == input.CheckRequestNo);
if (registerCheckEnt == null)
throw new UserFriendlyException("条码号不正确");
@ -172,5 +175,32 @@ namespace Shentun.Peis.PacsBusiness
}
}
/// <summary>
/// 根据检查条码获取dicom文件
/// </summary>
/// <returns></returns>
[HttpPost("api/app/PacsBusiness/GetPacsDicomDataByCheckRequestNo")]
public async Task<List<RegisterCheckPacsDto>> GetPacsDicomDataByCheckRequestNoAsync(CheckRequestNoInputDto input)
{
if (string.IsNullOrWhiteSpace(input.CheckRequestNo))
throw new UserFriendlyException("检查条码不能为空");
var registerCheckEnt = await _registerCheckRepository.FirstOrDefaultAsync(f => f.CheckRequestNo == input.CheckRequestNo);
if (registerCheckEnt == null)
throw new UserFriendlyException("检查条码不存在");
var registerCheckPacsList = await _registerCheckPacsRepository.GetListAsync(m => m.RegisterCheckId == registerCheckEnt.Id);
var entListDto = registerCheckPacsList.Select(s => new RegisterCheckPacsDto
{
DicomPathName = s.DicomPathName,
DisplayOrder = s.DisplayOrder,
LocalPathName = s.LocalPathName
}).OrderBy(o => o.DisplayOrder).ToList();
return entListDto;
}
}
}
Loading…
Cancel
Save