|
|
|
@ -2436,15 +2436,21 @@ namespace Shentun.Peis.PatientRegisters |
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(input.IdNo)) |
|
|
|
{ |
|
|
|
patient = await _patientRepository.FindAsync(o => o.IdNo == input.IdNo); |
|
|
|
if (patient.DisplayName != input.PatientName) |
|
|
|
var patientList = await _patientRepository.GetListAsync(o => o.IdNo == input.IdNo); |
|
|
|
if (patientList.Count > 0) |
|
|
|
{ |
|
|
|
if (patientList.Where(m => m.DisplayName == input.PatientName).Count() == 0) |
|
|
|
throw new UserFriendlyException("系统中已有该身份证号的不同姓名人员"); |
|
|
|
else |
|
|
|
{ |
|
|
|
patient = patientList.FirstOrDefault(f => f.DisplayName == input.PatientName); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (!string.IsNullOrWhiteSpace(input.PatientNo)) |
|
|
|
{ |
|
|
|
patient = await _patientRepository.GetAsync(o => o.PatientNo == input.PatientNo); |
|
|
|
patient = await _patientRepository.FirstOrDefaultAsync(o => o.PatientNo == input.PatientNo); |
|
|
|
if (patient.DisplayName != input.PatientName) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException("系统中已有该档案号的不同姓名人员"); |
|
|
|
|