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.
		
		
		
		
		
			
		
			
				
					
					
						
							110 lines
						
					
					
						
							3.9 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							110 lines
						
					
					
						
							3.9 KiB
						
					
					
				
								using Microsoft.Extensions.Configuration;
							 | 
						|
								using ServiceReferenceHzcyHis;
							 | 
						|
								using System;
							 | 
						|
								using System.Collections.Generic;
							 | 
						|
								using System.Linq;
							 | 
						|
								using System.Text;
							 | 
						|
								using System.Threading.Tasks;
							 | 
						|
								using System.Xml.Serialization;
							 | 
						|
								using static ServiceReferenceHzcyHis.bstjPortTypeClient;
							 | 
						|
								
							 | 
						|
								namespace Shentun.Peis.PlugIns.Gem
							 | 
						|
								{
							 | 
						|
								    public class PatientRegisterPluginsGemHis : PatientRegisterPluginsBase
							 | 
						|
								    {
							 | 
						|
								        private string _endpointAddress = "";
							 | 
						|
								
							 | 
						|
								        public PatientRegisterPluginsGemHis(string parmValue) : base(parmValue)
							 | 
						|
								        {
							 | 
						|
								        
							 | 
						|
								            _endpointAddress = InterfaceConfig.GetSection("Interface").GetSection("EndpointAddress").Value;
							 | 
						|
								        }
							 | 
						|
								
							 | 
						|
								        public async Task<HisPatientQueryOut> PatientQuery(HisPatientQueryInput input)
							 | 
						|
								        {
							 | 
						|
								            using (var client = CreateClient())
							 | 
						|
								            {
							 | 
						|
								                input.SeviceBaseArg.Service = "patientQuery";
							 | 
						|
								                var data = XmlHelper.SerializeToXml(input.Data);
							 | 
						|
								
							 | 
						|
								                var resultStr = (await client.invokeAsync(input.SeviceBaseArg.Service,
							 | 
						|
								                    input.SeviceBaseArg.Urid,
							 | 
						|
								                    input.SeviceBaseArg.Pwd,
							 | 
						|
								                    data)).@return;
							 | 
						|
								                var result = XmlHelper.DeserializeXml<HisPatientQueryOut>(resultStr);
							 | 
						|
								                return result;
							 | 
						|
								            }
							 | 
						|
								        }
							 | 
						|
								
							 | 
						|
								        public async Task<HisMecSaveOut> MecSave(HisMecSaveInput input)
							 | 
						|
								        {
							 | 
						|
								            using (var client = CreateClient())
							 | 
						|
								            {
							 | 
						|
								                input.SeviceBaseArg.Service = "mecSave";
							 | 
						|
								                var data = XmlHelper.SerializeToXml(input.Data);
							 | 
						|
								
							 | 
						|
								                var resultStr = (await client.invokeAsync(input.SeviceBaseArg.Service,
							 | 
						|
								                    input.SeviceBaseArg.Urid,
							 | 
						|
								                    input.SeviceBaseArg.Pwd,
							 | 
						|
								                    data)).@return;
							 | 
						|
								                var result = XmlHelper.DeserializeXml<HisMecSaveOut>(resultStr);
							 | 
						|
								                return result;
							 | 
						|
								            }
							 | 
						|
								        }
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								        public async Task<HisOutBase> CancelQrCode(HisCancelQrCodeInput input)
							 | 
						|
								        {
							 | 
						|
								            using (var client =  CreateClient())
							 | 
						|
								            {
							 | 
						|
								                input.SeviceBaseArg.Service = "cancelQrCode";
							 | 
						|
								                var data = XmlHelper.SerializeToXml(input.Data);
							 | 
						|
								
							 | 
						|
								                var resultStr = (await client.invokeAsync(input.SeviceBaseArg.Service,
							 | 
						|
								                    input.SeviceBaseArg.Urid,
							 | 
						|
								                    input.SeviceBaseArg.Pwd,
							 | 
						|
								                    data)).@return;
							 | 
						|
								                var result = XmlHelper.DeserializeXml<HisOutBase>(resultStr);
							 | 
						|
								                return result;
							 | 
						|
								            }
							 | 
						|
								        }
							 | 
						|
								
							 | 
						|
								        public async Task<HisOutBase> PayStatus(HisPayStatusInput input)
							 | 
						|
								        {
							 | 
						|
								            using (var client = CreateClient())
							 | 
						|
								            {
							 | 
						|
								                input.SeviceBaseArg.Service = "payStatus";
							 | 
						|
								                var data = XmlHelper.SerializeToXml(input.Data);
							 | 
						|
								
							 | 
						|
								                var resultStr = (await client.invokeAsync(input.SeviceBaseArg.Service,
							 | 
						|
								                    input.SeviceBaseArg.Urid,
							 | 
						|
								                    input.SeviceBaseArg.Pwd,
							 | 
						|
								                    data)).@return;
							 | 
						|
								                var result = XmlHelper.DeserializeXml<HisOutBase>(resultStr);
							 | 
						|
								                return result;
							 | 
						|
								            }
							 | 
						|
								        }
							 | 
						|
								
							 | 
						|
								        public async Task<HisOutBase> AgreeRefund(HisAgreeRefundInput input)
							 | 
						|
								        {
							 | 
						|
								            using (var client =  CreateClient())
							 | 
						|
								            {
							 | 
						|
								                input.SeviceBaseArg.Service = "agreeRefund";
							 | 
						|
								                var data = XmlHelper.SerializeToXml(input.Data);
							 | 
						|
								
							 | 
						|
								                var resultStr = (await client.invokeAsync(input.SeviceBaseArg.Service,
							 | 
						|
								                    input.SeviceBaseArg.Urid,
							 | 
						|
								                    input.SeviceBaseArg.Pwd,
							 | 
						|
								                    data)).@return;
							 | 
						|
								                var result = XmlHelper.DeserializeXml<HisOutBase>(resultStr);
							 | 
						|
								                return result;
							 | 
						|
								            }
							 | 
						|
								        }
							 | 
						|
								
							 | 
						|
								        private bstjPortTypeClient CreateClient()
							 | 
						|
								        {
							 | 
						|
								            return new bstjPortTypeClient(EndpointConfiguration.bstjHttpSoap11Endpoint,
							 | 
						|
								                _endpointAddress);
							 | 
						|
								        }
							 | 
						|
								    }
							 | 
						|
								}
							 |