| 
					
					
						
							
						
					
					
				 | 
				@ -2009,9 +2009,9 @@ namespace Shentun.Peis.PatientRegisters | 
			
		
		
	
		
			
				 | 
				 | 
				        /// <param name="id"></param>
 | 
				 | 
				 | 
				        /// <param name="id"></param>
 | 
			
		
		
	
		
			
				 | 
				 | 
				        /// <returns></returns>
 | 
				 | 
				 | 
				        /// <returns></returns>
 | 
			
		
		
	
		
			
				 | 
				 | 
				        [HttpPost("api/app/PatientRegister/DeleteById")] | 
				 | 
				 | 
				        [HttpPost("api/app/PatientRegister/DeleteById")] | 
			
		
		
	
		
			
				 | 
				 | 
				        public  async Task DeleteByIdAsync(PatientRegisterIdInputDto input) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        public async Task DeleteByIdAsync(PatientRegisterIdInputDto input) | 
			
		
		
	
		
			
				 | 
				 | 
				        { | 
				 | 
				 | 
				        { | 
			
		
		
	
		
			
				 | 
				 | 
				            if(input == null) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            if (input == null) | 
			
		
		
	
		
			
				 | 
				 | 
				            { | 
				 | 
				 | 
				            { | 
			
		
		
	
		
			
				 | 
				 | 
				                throw new UserFriendlyException("input参数不能为空"); | 
				 | 
				 | 
				                throw new UserFriendlyException("input参数不能为空"); | 
			
		
		
	
		
			
				 | 
				 | 
				            } | 
				 | 
				 | 
				            } | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -2436,15 +2436,21 @@ namespace Shentun.Peis.PatientRegisters | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				            if (!string.IsNullOrWhiteSpace(input.IdNo)) | 
				 | 
				 | 
				            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) | 
			
		
		
	
		
			
				 | 
				 | 
				                { | 
				 | 
				 | 
				                { | 
			
		
		
	
		
			
				 | 
				 | 
				                    throw new UserFriendlyException("系统中已有该身份证号的不同姓名人员"); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                    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)) | 
				 | 
				 | 
				            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) | 
				 | 
				 | 
				                if (patient.DisplayName != input.PatientName) | 
			
		
		
	
		
			
				 | 
				 | 
				                { | 
				 | 
				 | 
				                { | 
			
		
		
	
		
			
				 | 
				 | 
				                    throw new UserFriendlyException("系统中已有该档案号的不同姓名人员"); | 
				 | 
				 | 
				                    throw new UserFriendlyException("系统中已有该档案号的不同姓名人员"); | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -2541,7 +2547,7 @@ namespace Shentun.Peis.PatientRegisters | 
			
		
		
	
		
			
				 | 
				 | 
				                throw new UserFriendlyException("input参数不能为空"); | 
				 | 
				 | 
				                throw new UserFriendlyException("input参数不能为空"); | 
			
		
		
	
		
			
				 | 
				 | 
				            } | 
				 | 
				 | 
				            } | 
			
		
		
	
		
			
				 | 
				 | 
				            var thirdInterfaces = await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType == ThirdInterfaceTypeFlag.ImportPatientRegister); | 
				 | 
				 | 
				            var thirdInterfaces = await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType == ThirdInterfaceTypeFlag.ImportPatientRegister); | 
			
		
		
	
		
			
				 | 
				 | 
				            foreach(var thirdInterface in thirdInterfaces) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            foreach (var thirdInterface in thirdInterfaces) | 
			
		
		
	
		
			
				 | 
				 | 
				            { | 
				 | 
				 | 
				            { | 
			
		
		
	
		
			
				 | 
				 | 
				                if (thirdInterface.IsActive != 'Y') | 
				 | 
				 | 
				                if (thirdInterface.IsActive != 'Y') | 
			
		
		
	
		
			
				 | 
				 | 
				                { | 
				 | 
				 | 
				                { | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -2552,19 +2558,19 @@ namespace Shentun.Peis.PatientRegisters | 
			
		
		
	
		
			
				 | 
				 | 
				                   .AddJsonStream(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(parmValue))); | 
				 | 
				 | 
				                   .AddJsonStream(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(parmValue))); | 
			
		
		
	
		
			
				 | 
				 | 
				                var config = configurationBuilder.Build(); | 
				 | 
				 | 
				                var config = configurationBuilder.Build(); | 
			
		
		
	
		
			
				 | 
				 | 
				                var customerOrgIdStr = config.GetSection("Interface").GetSection("CustomerOrgId").Value; | 
				 | 
				 | 
				                var customerOrgIdStr = config.GetSection("Interface").GetSection("CustomerOrgId").Value; | 
			
		
		
	
		
			
				 | 
				 | 
				                if(!Guid.TryParse(customerOrgIdStr,out var customerOrgId)) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                if (!Guid.TryParse(customerOrgIdStr, out var customerOrgId)) | 
			
		
		
	
		
			
				 | 
				 | 
				                { | 
				 | 
				 | 
				                { | 
			
		
		
	
		
			
				 | 
				 | 
				                    throw new UserFriendlyException("接口配置中的CustomerOrgId无法解析成GUID"); | 
				 | 
				 | 
				                    throw new UserFriendlyException("接口配置中的CustomerOrgId无法解析成GUID"); | 
			
		
		
	
		
			
				 | 
				 | 
				                } | 
				 | 
				 | 
				                } | 
			
		
		
	
		
			
				 | 
				 | 
				                var customerOrgRegister = (await _customerOrgRegisterRepository.GetQueryableAsync()) | 
				 | 
				 | 
				                var customerOrgRegister = (await _customerOrgRegisterRepository.GetQueryableAsync()) | 
			
		
		
	
		
			
				 | 
				 | 
				                    .Where(o => o.Id == input.CustomerOrgRegisterId).First(); | 
				 | 
				 | 
				                    .Where(o => o.Id == input.CustomerOrgRegisterId).First(); | 
			
		
		
	
		
			
				 | 
				 | 
				                if(customerOrgRegister.CustomerOrgId != customerOrgId) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                if (customerOrgRegister.CustomerOrgId != customerOrgId) | 
			
		
		
	
		
			
				 | 
				 | 
				                { | 
				 | 
				 | 
				                { | 
			
		
		
	
		
			
				 | 
				 | 
				                    continue; | 
				 | 
				 | 
				                    continue; | 
			
		
		
	
		
			
				 | 
				 | 
				                } | 
				 | 
				 | 
				                } | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				                object[] objects = [input.CustomerOrgRegisterId]; | 
				 | 
				 | 
				                object[] objects = [input.CustomerOrgRegisterId]; | 
			
		
		
	
		
			
				 | 
				 | 
				                 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				                var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; | 
				 | 
				 | 
				                var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; | 
			
		
		
	
		
			
				 | 
				 | 
				                var className = config.GetSection("Interface").GetSection("ClassName").Value; | 
				 | 
				 | 
				                var className = config.GetSection("Interface").GetSection("ClassName").Value; | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -2573,7 +2579,7 @@ namespace Shentun.Peis.PatientRegisters | 
			
		
		
	
		
			
				 | 
				 | 
				                return pluginsOut; | 
				 | 
				 | 
				                return pluginsOut; | 
			
		
		
	
		
			
				 | 
				 | 
				            } | 
				 | 
				 | 
				            } | 
			
		
		
	
		
			
				 | 
				 | 
				            return null; | 
				 | 
				 | 
				            return null; | 
			
		
		
	
		
			
				 | 
				 | 
				            | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				        } | 
			
		
		
	
		
			
				 | 
				 | 
				        [HttpPost("api/app/patientregister/GetSameNamePatient")] | 
				 | 
				 | 
				        [HttpPost("api/app/patientregister/GetSameNamePatient")] | 
			
		
		
	
		
			
				 | 
				 | 
				        public async Task<List<GetSameNamePatientDto>> GetSameNamePatientAsync(GetSameNamePatientInputDto getSameNamePatientInputDto) | 
				 | 
				 | 
				        public async Task<List<GetSameNamePatientDto>> GetSameNamePatientAsync(GetSameNamePatientInputDto getSameNamePatientInputDto) | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
					
				 | 
				
  |