Browse Source

pacs人员信息

master
wxd 1 year ago
parent
commit
db1691f835
  1. 51
      src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterWithCheckResultByCheckRequestNo.cs
  2. 79
      src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs

51
src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterWithCheckResultByCheckRequestNo.cs

@ -0,0 +1,51 @@
using Shentun.Peis.PatientRegisters;
using Shentun.Peis.RegisterCheckItems;
using Shentun.Peis.RegisterCheckPictures;
using Shentun.Peis.RegisterChecks;
using Shentun.Peis.RegisterCheckSuggestions;
using Shentun.Peis.RegisterCheckSummarys;
using Shentun.Peis.SumSummaryReports;
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.PacsBusiness
{
public class GetPatientRegisterWithCheckResultByCheckRequestNo
{
/// <summary>
/// 人员信息
/// </summary>
public PatientRegisterOrNoDto PatientRegisterDetail { get; set; }
/// <summary>
/// 检查项目信息
/// </summary>
public RegisterCheckDto RegisterCheckDetail { get; set; }
/// <summary>
/// 明细项目跟结果
/// </summary>
public List<RegisterCheckItemOrItemOrItemResultTemplateDto> RegisterCheckItemDetails { get; set; }
/// <summary>
/// 检查小结
/// </summary>
public List<RegisterCheckSummaryDto> RegisterCheckSummaryDetails { get; set; }
/// <summary>
/// 检查建议
/// </summary>
public List<RegisterCheckSuggestionDto> RegisterCheckSuggestionDetails { get; set; }
/// <summary>
/// 上次结果
/// </summary>
public SumSummaryReportHorizontalComparisonDto LastTimeAsbitemResultDetail { get; set; }
/// <summary>
/// 检查图片
/// </summary>
public List<RegisterCheckPictureDto> registerCheckPictureDetails { get; set; }
}
}

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

@ -5,7 +5,12 @@ using Shentun.Peis.Enums;
using Shentun.Peis.Models;
using Shentun.Peis.PatientRegisters;
using Shentun.Peis.PrintReports;
using Shentun.Peis.RegisterCheckItems;
using Shentun.Peis.RegisterCheckPictures;
using Shentun.Peis.RegisterChecks;
using Shentun.Peis.RegisterCheckSuggestions;
using Shentun.Peis.RegisterCheckSummarys;
using Shentun.Peis.SumSummaryReports;
using System;
using System.Collections.Generic;
using System.Linq;
@ -29,19 +34,39 @@ namespace Shentun.Peis.PacsBusiness
private readonly IRepository<PatientRegister, Guid> _patientRegisterRepository;
private readonly IRepository<RegisterCheckPicture, Guid> _registerCheckPictureRepository;
private readonly IRepository<RegisterCheckPacs, Guid> _registerCheckPacsRepository;
private readonly PatientRegisterAppService _patientRegisterAppService;
private readonly RegisterCheckAppService _registerCheckAppService;
private readonly RegisterCheckItemAppService _registerCheckItemAppService;
private readonly RegisterCheckSummaryAppService _registerCheckSummaryAppService;
private readonly RegisterCheckSuggestionAppService _registerCheckSuggestionAppService;
private readonly SumSummaryReportAppService _sumSummaryReportAppService;
private readonly RegisterCheckPictureAppService _registerCheckPictureAppService;
public PacsBusinessAppService(
IConfiguration configuration,
IRepository<RegisterCheck, Guid> registerCheckRepository,
IRepository<PatientRegister, Guid> patientRegisterRepository,
IRepository<RegisterCheckPicture, Guid> registerCheckPictureRepository,
IRepository<RegisterCheckPacs, Guid> registerCheckPacsRepository)
IRepository<RegisterCheckPacs, Guid> registerCheckPacsRepository,
PatientRegisterAppService patientRegisterAppService,
RegisterCheckAppService registerCheckAppService,
RegisterCheckItemAppService registerCheckItemAppService,
RegisterCheckSummaryAppService registerCheckSummaryAppService,
RegisterCheckSuggestionAppService registerCheckSuggestionAppService,
SumSummaryReportAppService sumSummaryReportAppService,
RegisterCheckPictureAppService registerCheckPictureAppService)
{
_configuration = configuration;
_registerCheckRepository = registerCheckRepository;
_patientRegisterRepository = patientRegisterRepository;
_registerCheckPictureRepository = registerCheckPictureRepository;
_registerCheckPacsRepository = registerCheckPacsRepository;
_patientRegisterAppService = patientRegisterAppService;
_registerCheckAppService = registerCheckAppService;
_registerCheckItemAppService = registerCheckItemAppService;
_registerCheckSummaryAppService = registerCheckSummaryAppService;
_registerCheckSuggestionAppService = registerCheckSuggestionAppService;
_sumSummaryReportAppService = sumSummaryReportAppService;
_registerCheckPictureAppService = registerCheckPictureAppService;
}
@ -202,5 +227,55 @@ namespace Shentun.Peis.PacsBusiness
return entListDto;
}
/// <summary>
/// 获取体检人员信息跟项目结果等信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/PacsBusiness/GetPatientRegisterWithCheckResultByCheckRequestNo")]
public async Task<GetPatientRegisterWithCheckResultByCheckRequestNo> GetPatientRegisterWithCheckResultByCheckRequestNoAsync(CheckRequestNoInputDto input)
{
var resultDto = new GetPatientRegisterWithCheckResultByCheckRequestNo();
var query = (from patientRegister in await _patientRegisterRepository.GetQueryableAsync()
join registerCheck in await _registerCheckRepository.GetQueryableAsync() on patientRegister.Id equals registerCheck.PatientRegisterId
where registerCheck.CheckRequestNo == input.CheckRequestNo
select new
{
patientRegisterNo = patientRegister.PatientRegisterNo,
patientRegisterId = patientRegister.Id,
registerCheckId = registerCheck.Id
}).FirstOrDefault();
if (query == null)
{
throw new UserFriendlyException("条码不存在");
}
resultDto.PatientRegisterDetail = await _patientRegisterAppService.GetAlreadyRegisterPatientRegisterByNoAsync(new PatientRegisterNoInputDto
{
PatientRegisterNo = query.patientRegisterNo
});
resultDto.RegisterCheckDetail = await _registerCheckAppService.GetRegisterCheckAsync(query.registerCheckId);
resultDto.RegisterCheckItemDetails = await _registerCheckItemAppService.GetListInRegisterCheckIdAsync(query.registerCheckId, query.patientRegisterId);
resultDto.RegisterCheckSummaryDetails = await _registerCheckSummaryAppService.GetRegisterCheckSummaryListAsync(query.registerCheckId);
resultDto.RegisterCheckSuggestionDetails = await _registerCheckSuggestionAppService.GetRegisterCheckSuggestionListAsync(query.registerCheckId);
resultDto.LastTimeAsbitemResultDetail = await _sumSummaryReportAppService.GetLastTimeAsbitemResultAsync(new RegisterCheckIdInputDto
{
RegisterCheckId = query.registerCheckId
});
resultDto.registerCheckPictureDetails = await _registerCheckPictureAppService.GetRegisterCheckPictureInRegisterCheckIdAsync(query.registerCheckId);
return resultDto;
}
}
}
Loading…
Cancel
Save