//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//
//     对此文件的更改可能导致不正确的行为，并在以下条件下丢失:
//     代码重新生成。
// </auto-generated>
//------------------------------------------------------------------------------

namespace TCRBAppointmentReference
{
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="http://sino.com.cn", ConfigurationName="TCRBAppointmentReference.RBAppointmentSoap")]
    public interface RBAppointmentSoap
    {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://sino.com.cn/Custom.SINO.WS.CRM.RBAppointment.GetAppointmentsForPatient", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        System.Threading.Tasks.Task<TCRBAppointmentReference.GetAppointmentsForPatientResponse> GetAppointmentsForPatientAsync(string Token, string MRN, string DateFrom, string DateTo, long MaxRows, long StartRow);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://sino.com.cn/Custom.SINO.WS.CRM.RBAppointment.GetCPWithSlotsForDate", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        System.Threading.Tasks.Task<TCRBAppointmentReference.GetCPWithSlotsForDateResponse> GetCPWithSlotsForDateAsync(string Token, string DateFrom, string DateTo, string LocationID, string ServiceID, bool AllowOverbook, string CareProvID, string Res);
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://sino.com.cn")]
    public partial class GetAppointmentsForPatientResponse
    {
        
        private long totalRowsField;
        
        private bool totalRowsFieldSpecified;
        
        private long rowsReturnedField;
        
        private bool rowsReturnedFieldSpecified;
        
        private RBAppointment[] rBAppointmentRowsField;
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=0)]
        public long TotalRows
        {
            get
            {
                return this.totalRowsField;
            }
            set
            {
                this.totalRowsField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool TotalRowsSpecified
        {
            get
            {
                return this.totalRowsFieldSpecified;
            }
            set
            {
                this.totalRowsFieldSpecified = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=1)]
        public long RowsReturned
        {
            get
            {
                return this.rowsReturnedField;
            }
            set
            {
                this.rowsReturnedField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool RowsReturnedSpecified
        {
            get
            {
                return this.rowsReturnedFieldSpecified;
            }
            set
            {
                this.rowsReturnedFieldSpecified = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlArrayAttribute(Order=2)]
        public RBAppointment[] RBAppointmentRows
        {
            get
            {
                return this.rBAppointmentRowsField;
            }
            set
            {
                this.rBAppointmentRowsField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://sino.com.cn")]
    public partial class RBAppointment
    {
        
        private string aPPTAdmNoField;
        
        private string aPPTPAPMINoField;
        
        private string aPPTRBCServField;
        
        private string aPPTReasonForCancelField;
        
        private string aPPTReasonForTransferField;
        
        private string aPPTReasonNotShowField;
        
        private string aPPTStatusField;
        
        private System.DateTime aSDateField;
        
        private bool aSDateFieldSpecified;
        
        private string aSDateLocalField;
        
        private System.DateTime aSSessStartTimeField;
        
        private bool aSSessStartTimeFieldSpecified;
        
        private string aSSessStartTimeLocalField;
        
        private string aSRESLocField;
        
        private string aPPTRemarksField;
        
        private string aPPTCareProviderField;
        
        private string aSRESDescField;
        
        private string aPPTUSRNField;
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=0)]
        public string APPTAdmNo
        {
            get
            {
                return this.aPPTAdmNoField;
            }
            set
            {
                this.aPPTAdmNoField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=1)]
        public string APPTPAPMINo
        {
            get
            {
                return this.aPPTPAPMINoField;
            }
            set
            {
                this.aPPTPAPMINoField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=2)]
        public string APPTRBCServ
        {
            get
            {
                return this.aPPTRBCServField;
            }
            set
            {
                this.aPPTRBCServField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=3)]
        public string APPTReasonForCancel
        {
            get
            {
                return this.aPPTReasonForCancelField;
            }
            set
            {
                this.aPPTReasonForCancelField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=4)]
        public string APPTReasonForTransfer
        {
            get
            {
                return this.aPPTReasonForTransferField;
            }
            set
            {
                this.aPPTReasonForTransferField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=5)]
        public string APPTReasonNotShow
        {
            get
            {
                return this.aPPTReasonNotShowField;
            }
            set
            {
                this.aPPTReasonNotShowField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=6)]
        public string APPTStatus
        {
            get
            {
                return this.aPPTStatusField;
            }
            set
            {
                this.aPPTStatusField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(DataType="date", Order=7)]
        public System.DateTime ASDate
        {
            get
            {
                return this.aSDateField;
            }
            set
            {
                this.aSDateField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool ASDateSpecified
        {
            get
            {
                return this.aSDateFieldSpecified;
            }
            set
            {
                this.aSDateFieldSpecified = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=8)]
        public string ASDateLocal
        {
            get
            {
                return this.aSDateLocalField;
            }
            set
            {
                this.aSDateLocalField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(DataType="time", Order=9)]
        public System.DateTime ASSessStartTime
        {
            get
            {
                return this.aSSessStartTimeField;
            }
            set
            {
                this.aSSessStartTimeField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool ASSessStartTimeSpecified
        {
            get
            {
                return this.aSSessStartTimeFieldSpecified;
            }
            set
            {
                this.aSSessStartTimeFieldSpecified = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=10)]
        public string ASSessStartTimeLocal
        {
            get
            {
                return this.aSSessStartTimeLocalField;
            }
            set
            {
                this.aSSessStartTimeLocalField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=11)]
        public string ASRESLoc
        {
            get
            {
                return this.aSRESLocField;
            }
            set
            {
                this.aSRESLocField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=12)]
        public string APPTRemarks
        {
            get
            {
                return this.aPPTRemarksField;
            }
            set
            {
                this.aPPTRemarksField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=13)]
        public string APPTCareProvider
        {
            get
            {
                return this.aPPTCareProviderField;
            }
            set
            {
                this.aPPTCareProviderField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=14)]
        public string ASRESDesc
        {
            get
            {
                return this.aSRESDescField;
            }
            set
            {
                this.aSRESDescField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=15)]
        public string APPTUSRN
        {
            get
            {
                return this.aPPTUSRNField;
            }
            set
            {
                this.aPPTUSRNField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://sino.com.cn")]
    public partial class Slot
    {
        
        private string uSRNField;
        
        private string startTimeField;
        
        private string endTimeField;
        
        private string rBASIdField;
        
        private string serviceIDField;
        
        private bool isAfternoonField;
        
        private bool isAfternoonFieldSpecified;
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=0)]
        public string USRN
        {
            get
            {
                return this.uSRNField;
            }
            set
            {
                this.uSRNField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=1)]
        public string StartTime
        {
            get
            {
                return this.startTimeField;
            }
            set
            {
                this.startTimeField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=2)]
        public string EndTime
        {
            get
            {
                return this.endTimeField;
            }
            set
            {
                this.endTimeField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=3)]
        public string RBASId
        {
            get
            {
                return this.rBASIdField;
            }
            set
            {
                this.rBASIdField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=4)]
        public string ServiceID
        {
            get
            {
                return this.serviceIDField;
            }
            set
            {
                this.serviceIDField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=5)]
        public bool IsAfternoon
        {
            get
            {
                return this.isAfternoonField;
            }
            set
            {
                this.isAfternoonField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool IsAfternoonSpecified
        {
            get
            {
                return this.isAfternoonFieldSpecified;
            }
            set
            {
                this.isAfternoonFieldSpecified = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://sino.com.cn")]
    public partial class Resource
    {
        
        private string resourceIDField;
        
        private string resourceDescField;
        
        private string careProvDescField;
        
        private string careProvIDField;
        
        private Slot[] slotsField;
        
        private string eQGroupField;
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=0)]
        public string ResourceID
        {
            get
            {
                return this.resourceIDField;
            }
            set
            {
                this.resourceIDField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=1)]
        public string ResourceDesc
        {
            get
            {
                return this.resourceDescField;
            }
            set
            {
                this.resourceDescField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=2)]
        public string CareProvDesc
        {
            get
            {
                return this.careProvDescField;
            }
            set
            {
                this.careProvDescField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=3)]
        public string CareProvID
        {
            get
            {
                return this.careProvIDField;
            }
            set
            {
                this.careProvIDField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlArrayAttribute(Order=4)]
        public Slot[] Slots
        {
            get
            {
                return this.slotsField;
            }
            set
            {
                this.slotsField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=5)]
        public string EQGroup
        {
            get
            {
                return this.eQGroupField;
            }
            set
            {
                this.eQGroupField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://sino.com.cn")]
    public partial class SlotDate
    {
        public SlotDate()
        {
            resourcesField = new Resource[] { };
        }
        private string dateField;
        
        private Resource[] resourcesField;
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=0)]
        public string Date
        {
            get
            {
                return this.dateField;
            }
            set
            {
                this.dateField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlArrayAttribute(Order=1)]
        public Resource[] Resources
        {
            get
            {
                return this.resourcesField;
            }
            set
            {
                this.resourcesField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://sino.com.cn")]
    public partial class GetCPWithSlotsForDateResponse
    {
        public GetCPWithSlotsForDateResponse()
        {
            slotDatesField = new SlotDate[] { };
        }

        private string hospitalField;
        
        private string hospitalCNField;
        
        private string locationField;
        
        private string locationCNField;
        
        private SlotDate[] slotDatesField;
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=0)]
        public string Hospital
        {
            get
            {
                return this.hospitalField;
            }
            set
            {
                this.hospitalField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=1)]
        public string HospitalCN
        {
            get
            {
                return this.hospitalCNField;
            }
            set
            {
                this.hospitalCNField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=2)]
        public string Location
        {
            get
            {
                return this.locationField;
            }
            set
            {
                this.locationField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=3)]
        public string LocationCN
        {
            get
            {
                return this.locationCNField;
            }
            set
            {
                this.locationCNField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlArrayAttribute(Order=4)]
        public SlotDate[] SlotDates
        {
            get
            {
                return this.slotDatesField;
            }
            set
            {
                this.slotDatesField = value;
            }
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    public interface RBAppointmentSoapChannel : TCRBAppointmentReference.RBAppointmentSoap, System.ServiceModel.IClientChannel
    {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    public partial class RBAppointmentSoapClient : System.ServiceModel.ClientBase<TCRBAppointmentReference.RBAppointmentSoap>, TCRBAppointmentReference.RBAppointmentSoap
    {
        
        /// <summary>
        /// 实现此分部方法，配置服务终结点。
        /// </summary>
        /// <param name="serviceEndpoint">要配置的终结点</param>
        /// <param name="clientCredentials">客户端凭据</param>
        static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
        
        public RBAppointmentSoapClient() : 
                base(RBAppointmentSoapClient.GetDefaultBinding(), RBAppointmentSoapClient.GetDefaultEndpointAddress())
        {
            this.Endpoint.Name = EndpointConfiguration.RBAppointmentSoap.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public RBAppointmentSoapClient(EndpointConfiguration endpointConfiguration) : 
                base(RBAppointmentSoapClient.GetBindingForEndpoint(endpointConfiguration), RBAppointmentSoapClient.GetEndpointAddress(endpointConfiguration))
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public RBAppointmentSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : 
                base(RBAppointmentSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public RBAppointmentSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(RBAppointmentSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public RBAppointmentSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress)
        {
        }
        
        public System.Threading.Tasks.Task<TCRBAppointmentReference.GetAppointmentsForPatientResponse> GetAppointmentsForPatientAsync(string Token, string MRN, string DateFrom, string DateTo, long MaxRows, long StartRow)
        {
            return base.Channel.GetAppointmentsForPatientAsync(Token, MRN, DateFrom, DateTo, MaxRows, StartRow);
        }
        
        public System.Threading.Tasks.Task<TCRBAppointmentReference.GetCPWithSlotsForDateResponse> GetCPWithSlotsForDateAsync(string Token, string DateFrom, string DateTo, string LocationID, string ServiceID, bool AllowOverbook, string CareProvID, string Res)
        {
            return base.Channel.GetCPWithSlotsForDateAsync(Token, DateFrom, DateTo, LocationID, ServiceID, AllowOverbook, CareProvID, Res);
        }
        
        public virtual System.Threading.Tasks.Task OpenAsync()
        {
            return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
        }
        
        public virtual System.Threading.Tasks.Task CloseAsync()
        {
            return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
        }
        
        private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
        {
            if ((endpointConfiguration == EndpointConfiguration.RBAppointmentSoap))
            {
                System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
                result.MaxBufferSize = int.MaxValue;
                result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
                result.MaxReceivedMessageSize = int.MaxValue;
                result.AllowCookies = true;
                return result;
            }
            throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
        }
        
        private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
        {
            if ((endpointConfiguration == EndpointConfiguration.RBAppointmentSoap))
            {
                return new System.ServiceModel.EndpointAddress("http://192.168.50.235/trakbase/web/api/Custom.SINO.WS.CRM.RBAppointment.cls");
            }
            throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
        }
        
        private static System.ServiceModel.Channels.Binding GetDefaultBinding()
        {
            return RBAppointmentSoapClient.GetBindingForEndpoint(EndpointConfiguration.RBAppointmentSoap);
        }
        
        private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
        {
            return RBAppointmentSoapClient.GetEndpointAddress(EndpointConfiguration.RBAppointmentSoap);
        }
        
        public enum EndpointConfiguration
        {
            
            RBAppointmentSoap,
        }
    }
}
