You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							53 lines
						
					
					
						
							1.5 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							53 lines
						
					
					
						
							1.5 KiB
						
					
					
				
								using ServiceReference1;
							 | 
						|
								using Xunit;
							 | 
						|
								using Xunit.Abstractions;
							 | 
						|
								using static ServiceReference1.bstjPortTypeClient;
							 | 
						|
								namespace Shentun.Peis.PlugIns.Gem.Test
							 | 
						|
								{
							 | 
						|
								    public class HisTest
							 | 
						|
								    {
							 | 
						|
								        private readonly ITestOutputHelper _output;
							 | 
						|
								        public HisTest(ITestOutputHelper testOutputHelper)
							 | 
						|
								        {
							 | 
						|
								            _output = testOutputHelper;
							 | 
						|
								
							 | 
						|
								        }
							 | 
						|
								        [Fact]
							 | 
						|
								        public void GetPatientQuery()
							 | 
						|
								        {
							 | 
						|
								            //var binding = new BasicHttpBinding();
							 | 
						|
								            //var endpoint = new EndpointAddress("http://www.yourwebservice.com/Service");
							 | 
						|
								
							 | 
						|
								            //using (var channelFactory = new ChannelFactory<IService>(binding, endpoint))
							 | 
						|
								            //{
							 | 
						|
								            //    var client = channelFactory.CreateChannel();
							 | 
						|
								            //    var result = await client.YourOperationAsync(yourParameters);
							 | 
						|
								            //    Console.WriteLine(result);
							 | 
						|
								            //}
							 | 
						|
								            var client = new bstjPortTypeClient(EndpointConfiguration.bstjHttpSoap11Endpoint);
							 | 
						|
								
							 | 
						|
								            string xml = @"<BSXml>
							 | 
						|
								<MsgHeader>
							 | 
						|
								<Sender>HIS</Sender>
							 | 
						|
								<MsgType>PAT_0103</MsgType>
							 | 
						|
								<MsgVersion>3.1</MsgVersion>
							 | 
						|
								</MsgHeader>
							 | 
						|
								<Patient>
							 | 
						|
								<IdCard>110101202404238836</IdCard>
							 | 
						|
								<IdCardCode>01</IdCardCode>
							 | 
						|
								<Name>体检调试一</Name>
							 | 
						|
								<Sex>1</Sex>
							 | 
						|
								<BirthDate>2024-04-23</BirthDate>
							 | 
						|
								<PatientPhone>13700000001</PatientPhone>
							 | 
						|
								<EthnicGroupCode>01</EthnicGroupCode>
							 | 
						|
								<WorkUnit>测试单位</WorkUnit>
							 | 
						|
								<Address>测试地址</Address>
							 | 
						|
								</Patient>
							 | 
						|
								</BSXml>
							 | 
						|
								";
							 | 
						|
								            var result = client.invokeAsync("patientQuery", "", "", xml).Result;
							 | 
						|
								            _output.WriteLine(result.ToString());
							 | 
						|
								
							 | 
						|
								        }
							 | 
						|
								    }
							 | 
						|
								}
							 |