|
|
|
@ -74,24 +74,27 @@ namespace Shentun.Peis.ThirdPartyPublicInterfaces |
|
|
|
/// <returns></returns>
|
|
|
|
[Authorize(PeisPermissions.Third.Default)] |
|
|
|
[HttpPost("api/Third/ThirdPartyPublicInterface/GetBasicInformationOfMedicalExaminationPersonnel")] |
|
|
|
public async Task<BasicInformationOfMedicalExaminationPersonnelDto> GetBasicInformationOfMedicalExaminationPersonnelAsync(PublicPatientRegisterNoInputDto input) |
|
|
|
public async Task<List<BasicInformationOfMedicalExaminationPersonnelDto>> GetBasicInformationOfMedicalExaminationPersonnelAsync(PublicPatientRegisterNoInputDto input) |
|
|
|
{ |
|
|
|
if (input == null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"请求参数错误"); |
|
|
|
} |
|
|
|
|
|
|
|
if(!input.PatientRegisterNos.Any()) |
|
|
|
if (!input.PatientRegisterNos.Any()) |
|
|
|
throw new UserFriendlyException($"体检编号不能为空"); |
|
|
|
var result = new BasicInformationOfMedicalExaminationPersonnelDto(); |
|
|
|
var listDto = new List<BasicInformationOfMedicalExaminationPersonnelDto>(); |
|
|
|
|
|
|
|
var patientRegisterEnt = (await _patientRegisterRepository.GetQueryableAsync()).Include(x => x.Patient) |
|
|
|
.FirstOrDefault(m => input.PatientRegisterNos.Contains(m.PatientRegisterNo) |
|
|
|
&& m.CompleteFlag == PatientRegisterCompleteFlag.SumCheck); |
|
|
|
if (patientRegisterEnt != null) |
|
|
|
var patientRegisterList = (await _patientRegisterRepository.GetQueryableAsync()).Include(x => x.Patient) |
|
|
|
.Where(m => input.PatientRegisterNos.Contains(m.PatientRegisterNo) |
|
|
|
&& m.CompleteFlag == PatientRegisterCompleteFlag.SumCheck).ToList(); |
|
|
|
if (patientRegisterList.Any()) |
|
|
|
{ |
|
|
|
foreach (var patientRegisterEnt in patientRegisterList) |
|
|
|
{ |
|
|
|
|
|
|
|
//基础信息
|
|
|
|
result = new BasicInformationOfMedicalExaminationPersonnelDto |
|
|
|
var result = new BasicInformationOfMedicalExaminationPersonnelDto |
|
|
|
{ |
|
|
|
BirthDate = patientRegisterEnt.BirthDate != null ? patientRegisterEnt.BirthDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", |
|
|
|
PatientRegisterNo = patientRegisterEnt.PatientRegisterNo, |
|
|
|
@ -187,13 +190,15 @@ namespace Shentun.Peis.ThirdPartyPublicInterfaces |
|
|
|
}).ToList() |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
listDto.Add(result); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"条码号不正确"); |
|
|
|
throw new UserFriendlyException($"体检编号不正确"); |
|
|
|
} |
|
|
|
|
|
|
|
return result; |
|
|
|
return listDto; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|