Browse Source

pacs

master
wxd 1 year ago
parent
commit
e56184327f
  1. 64
      src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPacsDicomServiceDataByPatientRegisterIdDto.cs
  2. 15
      src/Shentun.Peis.Application.Contracts/PacsBusiness/ImportPacsDicomServiceDataInputDto.cs
  3. 58
      src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs
  4. 1
      src/Shentun.Peis.Domain/DicomFileDetails/DicomFileDetail.cs
  5. 16049
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20241024093825_update_dicom_file_detail_register_check_id.Designer.cs
  6. 25
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20241024093825_update_dicom_file_detail_register_check_id.cs
  7. 1
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

64
src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPacsDicomServiceDataByPatientRegisterIdDto.cs

@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Shentun.Peis.PacsBusiness
{
public class GetPacsDicomServiceDataByPatientRegisterIdDto
{
/// <summary>
/// 姓名
/// </summary>
public string PatientName { get; set; }
/// <summary>
/// 项目名称
/// </summary>
public string AsbitemName { get; set; }
/// <summary>
/// registerCheck表ID
/// </summary>
public Guid RegisterCheckId { get; set; }
/// <summary>
/// 实例ID
/// </summary>
public Guid InstanceId { get; set; }
/// <summary>
/// 患者ID
/// </summary>
public Guid ParentPatientId { get; set; }
/// <summary>
/// 系列ID
/// </summary>
public Guid ParentSeriesId { get; set; }
/// <summary>
/// 研究ID
/// </summary>
public Guid ParentStudyId { get; set; }
/// <summary>
/// 路径
/// </summary>
public string Path { get; set; }
/// <summary>
/// 文件名称
/// </summary>
public string FileName { get; set; }
/// <summary>
/// 状态
/// </summary>
public string Status { get; set; }
public int DisplayOrder { get; set; }
}
}

15
src/Shentun.Peis.Application.Contracts/PacsBusiness/ImportPacsDicomServiceDataInputDto.cs

@ -47,5 +47,20 @@ namespace Shentun.Peis.PacsBusiness
/// 状态
/// </summary>
public string Status { 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';
}
}

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

@ -14,6 +14,7 @@ using Shentun.Peis.RegisterChecks;
using Shentun.Peis.RegisterCheckSuggestions;
using Shentun.Peis.RegisterCheckSummarys;
using Shentun.Peis.SumSummaryReports;
using Shentun.Peis.ThirdPartyPublicInterfaces;
using System;
using System.Collections.Generic;
using System.Linq;
@ -304,6 +305,7 @@ namespace Shentun.Peis.PacsBusiness
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/PacsBusiness/UpdateRegisterCheckIsPacsCheck")]
[RemoteService(false)]
public async Task UpdateRegisterCheckIsPacsCheckAsync(UpdateRegisterCheckIsPacsCheckInputDto input)
{
var registerCheckEnt = await _registerCheckRepository.FirstOrDefaultAsync(f => f.CheckRequestNo == input.CheckRequestNo);
@ -419,7 +421,7 @@ namespace Shentun.Peis.PacsBusiness
}
/// <summary>
/// 导入pacs dicom服务返回的数据 用作前端导出文件
/// 导入pacs dicom服务返回的数据 用作前端导出文件 修改pacs项目检查状态及日期
/// </summary>
/// <returns></returns>
[HttpPost("api/app/PacsBusiness/ImportPacsDicomServiceData")]
@ -468,6 +470,60 @@ namespace Shentun.Peis.PacsBusiness
await _dicomFileDetailRepository.InsertAsync(dicomFileDetailEnt);
if (registerCheckEnt.IsPacsCheck != 'Y')
{
registerCheckEnt.IsPacsCheck = input.IsPacsCheck;
registerCheckEnt.PacsCheckDate = Convert.ToDateTime(input.PacsCheckDate);
registerCheckEnt.PacsUploadDate = Convert.ToDateTime(input.PacsUploadDate);
await _registerCheckRepository.UpdateAsync(registerCheckEnt);
}
}
/// <summary>
/// 查询人员的dicom数据
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/PacsBusiness/GetPacsDicomServiceDataByPatientRegisterId")]
public async Task<List<GetPacsDicomServiceDataByPatientRegisterIdDto>> GetPacsDicomServiceDataByPatientRegisterIdAsync(PatientRegisterIdInputDto input)
{
var query = (from dicomFileDetail in await _dicomFileDetailRepository.GetQueryableAsync()
join registerCheck in await _registerCheckRepository.GetQueryableAsync() on dicomFileDetail.RegisterCheckId equals registerCheck.Id
join patientRegister in await _patientRegisterRepository.GetQueryableAsync() on registerCheck.PatientRegisterId equals patientRegister.Id
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 patientRegister.Id == input.PatientRegisterId
select new
{
dicomFileDetail,
patientName = patientRegister.PatientName,
asbitemName = asbitem.DisplayName
}).ToList();
var dicomFileDetailGroup = query.GroupBy(g => g.dicomFileDetail);
var entListDto = dicomFileDetailGroup.Select(s => new GetPacsDicomServiceDataByPatientRegisterIdDto
{
AsbitemName = string.Join(",", s.Select(rs => rs.asbitemName).ToList()),
DisplayOrder = s.Key.DisplayOrder,
FileName = s.Key.FileName,
Status = s.Key.Status,
InstanceId = s.Key.InstanceId,
ParentPatientId = s.Key.ParentPatientId,
ParentSeriesId = s.Key.ParentSeriesId,
ParentStudyId = s.Key.ParentStudyId,
Path = s.Key.Path,
PatientName = s.FirstOrDefault().patientName,
RegisterCheckId = s.Key.RegisterCheckId
}).ToList();
return entListDto;
}

1
src/Shentun.Peis.Domain/DicomFileDetails/DicomFileDetail.cs

@ -21,6 +21,7 @@ namespace Shentun.Peis.Models
/// <summary>
/// registerCheck表ID
/// </summary>
[Column("register_check_id")]
public Guid RegisterCheckId { get; set; }
/// <summary>

16049
src/Shentun.Peis.EntityFrameworkCore/Migrations/20241024093825_update_dicom_file_detail_register_check_id.Designer.cs
File diff suppressed because it is too large
View File

25
src/Shentun.Peis.EntityFrameworkCore/Migrations/20241024093825_update_dicom_file_detail_register_check_id.cs

@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class update_dicom_file_detail_register_check_id : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "RegisterCheckId",
table: "dicom_file_detail",
newName: "register_check_id");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "register_check_id",
table: "dicom_file_detail",
newName: "RegisterCheckId");
}
}
}

1
src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

@ -4054,6 +4054,7 @@ namespace Shentun.Peis.Migrations
b.Property<Guid>("RegisterCheckId")
.HasColumnType("uuid")
.HasColumnName("register_check_id")
.HasComment("RegisterCheck表ID");
b.Property<string>("Status")

Loading…
Cancel
Save