diff --git a/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterWithCheckResultByCheckRequestNo.cs b/src/Shentun.Peis.Application.Contracts/PacsBusiness/GetPatientRegisterWithCheckResultByCheckRequestNo.cs
new file mode 100644
index 0000000..0287409
--- /dev/null
+++ b/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
+ {
+ ///
+ /// 人员信息
+ ///
+ public PatientRegisterOrNoDto PatientRegisterDetail { get; set; }
+
+ ///
+ /// 检查项目信息
+ ///
+ public RegisterCheckDto RegisterCheckDetail { get; set; }
+
+ ///
+ /// 明细项目跟结果
+ ///
+ public List RegisterCheckItemDetails { get; set; }
+
+ ///
+ /// 检查小结
+ ///
+ public List RegisterCheckSummaryDetails { get; set; }
+
+ ///
+ /// 检查建议
+ ///
+ public List RegisterCheckSuggestionDetails { get; set; }
+
+ ///
+ /// 上次结果
+ ///
+ public SumSummaryReportHorizontalComparisonDto LastTimeAsbitemResultDetail { get; set; }
+
+ ///
+ /// 检查图片
+ ///
+ public List registerCheckPictureDetails { get; set; }
+ }
+}
diff --git a/src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs b/src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs
index 728e6ac..e49caa5 100644
--- a/src/Shentun.Peis.Application/PacsBusiness/PacsBusinessAppService.cs
+++ b/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 _patientRegisterRepository;
private readonly IRepository _registerCheckPictureRepository;
private readonly IRepository _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 registerCheckRepository,
IRepository patientRegisterRepository,
IRepository registerCheckPictureRepository,
- IRepository registerCheckPacsRepository)
+ IRepository 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;
}
+
+
+
+ ///
+ /// 获取体检人员信息跟项目结果等信息
+ ///
+ ///
+ ///
+ [HttpPost("api/app/PacsBusiness/GetPatientRegisterWithCheckResultByCheckRequestNo")]
+ public async Task 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;
+ }
}
}