|
|
@ -5,7 +5,12 @@ using Shentun.Peis.Enums; |
|
|
using Shentun.Peis.Models; |
|
|
using Shentun.Peis.Models; |
|
|
using Shentun.Peis.PatientRegisters; |
|
|
using Shentun.Peis.PatientRegisters; |
|
|
using Shentun.Peis.PrintReports; |
|
|
using Shentun.Peis.PrintReports; |
|
|
|
|
|
using Shentun.Peis.RegisterCheckItems; |
|
|
using Shentun.Peis.RegisterCheckPictures; |
|
|
using Shentun.Peis.RegisterCheckPictures; |
|
|
|
|
|
using Shentun.Peis.RegisterChecks; |
|
|
|
|
|
using Shentun.Peis.RegisterCheckSuggestions; |
|
|
|
|
|
using Shentun.Peis.RegisterCheckSummarys; |
|
|
|
|
|
using Shentun.Peis.SumSummaryReports; |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
@ -29,19 +34,39 @@ namespace Shentun.Peis.PacsBusiness |
|
|
private readonly IRepository<PatientRegister, Guid> _patientRegisterRepository; |
|
|
private readonly IRepository<PatientRegister, Guid> _patientRegisterRepository; |
|
|
private readonly IRepository<RegisterCheckPicture, Guid> _registerCheckPictureRepository; |
|
|
private readonly IRepository<RegisterCheckPicture, Guid> _registerCheckPictureRepository; |
|
|
private readonly IRepository<RegisterCheckPacs, Guid> _registerCheckPacsRepository; |
|
|
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( |
|
|
public PacsBusinessAppService( |
|
|
IConfiguration configuration, |
|
|
IConfiguration configuration, |
|
|
IRepository<RegisterCheck, Guid> registerCheckRepository, |
|
|
IRepository<RegisterCheck, Guid> registerCheckRepository, |
|
|
IRepository<PatientRegister, Guid> patientRegisterRepository, |
|
|
IRepository<PatientRegister, Guid> patientRegisterRepository, |
|
|
IRepository<RegisterCheckPicture, Guid> registerCheckPictureRepository, |
|
|
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; |
|
|
_configuration = configuration; |
|
|
_registerCheckRepository = registerCheckRepository; |
|
|
_registerCheckRepository = registerCheckRepository; |
|
|
_patientRegisterRepository = patientRegisterRepository; |
|
|
_patientRegisterRepository = patientRegisterRepository; |
|
|
_registerCheckPictureRepository = registerCheckPictureRepository; |
|
|
_registerCheckPictureRepository = registerCheckPictureRepository; |
|
|
_registerCheckPacsRepository = registerCheckPacsRepository; |
|
|
_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; |
|
|
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; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |