|
|
@ -172,23 +172,21 @@ namespace Shentun.Peis.PrintReports |
|
|
join patientRegister in await _patientRegisterRepository.GetQueryableAsync() |
|
|
join patientRegister in await _patientRegisterRepository.GetQueryableAsync() |
|
|
on patient.Id equals patientRegister.PatientId |
|
|
on patient.Id equals patientRegister.PatientId |
|
|
join sex in await _sexRegisterRepository.GetQueryableAsync() on patientRegister.SexId equals sex.Id |
|
|
join sex in await _sexRegisterRepository.GetQueryableAsync() on patientRegister.SexId equals sex.Id |
|
|
join registerCheckAsbitem in await _registerCheckAsbitemRepository.GetQueryableAsync() on patientRegister.Id equals registerCheckAsbitem.PatientRegisterId into bb |
|
|
|
|
|
from registerCheckAsbitemHaveEmpty in bb.DefaultIfEmpty() |
|
|
|
|
|
join asbitem in await _asbitemRepository.GetQueryableAsync() on registerCheckAsbitemHaveEmpty.AsbitemId equals asbitem.Id into ff |
|
|
|
|
|
from asbitemHaveEmpty in ff.DefaultIfEmpty() |
|
|
|
|
|
join lisRequest in await _lisRequestRepository.GetQueryableAsync() on registerCheckAsbitemHaveEmpty.LisRequestId equals lisRequest.Id |
|
|
|
|
|
|
|
|
join registerCheckAsbitem in await _registerCheckAsbitemRepository.GetQueryableAsync() on patientRegister.Id equals registerCheckAsbitem.PatientRegisterId |
|
|
|
|
|
join asbitem in await _asbitemRepository.GetQueryableAsync() on registerCheckAsbitem.AsbitemId equals asbitem.Id |
|
|
|
|
|
join lisRequest in await _lisRequestRepository.GetQueryableAsync() on registerCheckAsbitem.LisRequestId equals lisRequest.Id |
|
|
join sampleContainer in await _sampleContainerRepository.GetQueryableAsync() on lisRequest.SampleContainerId equals sampleContainer.Id into dd |
|
|
join sampleContainer in await _sampleContainerRepository.GetQueryableAsync() on lisRequest.SampleContainerId equals sampleContainer.Id into dd |
|
|
from sampleContainerHaveEmpty in dd.DefaultIfEmpty() |
|
|
from sampleContainerHaveEmpty in dd.DefaultIfEmpty() |
|
|
join sampleType in await _sampleTypeRepository.GetQueryableAsync() on lisRequest.SampleTypeId equals sampleType.Id into ee |
|
|
join sampleType in await _sampleTypeRepository.GetQueryableAsync() on lisRequest.SampleTypeId equals sampleType.Id into ee |
|
|
from sampleTypeHaveEmpty in ee.DefaultIfEmpty() |
|
|
from sampleTypeHaveEmpty in ee.DefaultIfEmpty() |
|
|
where (patientRegister.Id == input.PatientRegisterId && registerCheckAsbitemHaveEmpty.LisRequestId != null) |
|
|
|
|
|
|
|
|
where (patientRegister.Id == input.PatientRegisterId && registerCheckAsbitem.LisRequestId != null) |
|
|
select new |
|
|
select new |
|
|
{ |
|
|
{ |
|
|
patient, |
|
|
patient, |
|
|
patientRegister, |
|
|
patientRegister, |
|
|
sex, |
|
|
sex, |
|
|
registerCheckAsbitemHaveEmpty, |
|
|
|
|
|
asbitemHaveEmpty, |
|
|
|
|
|
|
|
|
registerCheckAsbitem, |
|
|
|
|
|
asbitem, |
|
|
lisRequest, |
|
|
lisRequest, |
|
|
sampleContainerHaveEmpty, |
|
|
sampleContainerHaveEmpty, |
|
|
sampleTypeHaveEmpty |
|
|
sampleTypeHaveEmpty |
|
|
@ -209,7 +207,7 @@ namespace Shentun.Peis.PrintReports |
|
|
LisRequestId = o.lisRequest.Id, |
|
|
LisRequestId = o.lisRequest.Id, |
|
|
PatientNo = o.patient.PatientNo, |
|
|
PatientNo = o.patient.PatientNo, |
|
|
Age = o.patientRegister.Age, |
|
|
Age = o.patientRegister.Age, |
|
|
AsbitemNames = string.IsNullOrEmpty(o.asbitemHaveEmpty.ShortName) ? o.asbitemHaveEmpty.DisplayName : o.asbitemHaveEmpty.ShortName, |
|
|
|
|
|
|
|
|
AsbitemNames = string.IsNullOrEmpty(o.asbitem.ShortName) ? o.asbitem.DisplayName : o.asbitem.ShortName, |
|
|
LisRequestNo = o.lisRequest.LisRequestNo, |
|
|
LisRequestNo = o.lisRequest.LisRequestNo, |
|
|
PatientName = o.patientRegister.PatientName, |
|
|
PatientName = o.patientRegister.PatientName, |
|
|
PatientRegisterNo = o.patientRegister.PatientRegisterNo, |
|
|
PatientRegisterNo = o.patientRegister.PatientRegisterNo, |
|
|
|