'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated by a tool.
'     Runtime Version:4.0.30319.17929
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict Off
Option Explicit On

Imports System
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Xml.Serialization

'
'This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.17929.
'
Namespace RadiologyResultWebService
    
    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929"),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Web.Services.WebServiceBindingAttribute(Name:="RadiologyResultServicePort", [Namespace]:="http://medplus.com/radiology/result"),  _
     System.Xml.Serialization.SoapIncludeAttribute(GetType(ResponseProperty)),  _
     System.Xml.Serialization.SoapIncludeAttribute(GetType(BaseHubServiceResponse))>  _
    Partial Public Class RadiologyResultService
        Inherits System.Web.Services.Protocols.SoapHttpClientProtocol
        
        Private submitRadiologyResultOperationCompleted As System.Threading.SendOrPostCallback
        
        Private useDefaultCredentialsSetExplicitly As Boolean
        
        '''<remarks/>
        Public Sub New()
            MyBase.New
            Me.Url = "http://localhost:7001/radiology/result/service"
            If (Me.IsLocalFileSystemWebService(Me.Url) = true) Then
                Me.UseDefaultCredentials = true
                Me.useDefaultCredentialsSetExplicitly = false
            Else
                Me.useDefaultCredentialsSetExplicitly = true
            End If
        End Sub
        
        Public Shadows Property Url() As String
            Get
                Return MyBase.Url
            End Get
            Set
                If (((Me.IsLocalFileSystemWebService(MyBase.Url) = true)  _
                            AndAlso (Me.useDefaultCredentialsSetExplicitly = false))  _
                            AndAlso (Me.IsLocalFileSystemWebService(value) = false)) Then
                    MyBase.UseDefaultCredentials = false
                End If
                MyBase.Url = value
            End Set
        End Property
        
        Public Shadows Property UseDefaultCredentials() As Boolean
            Get
                Return MyBase.UseDefaultCredentials
            End Get
            Set
                MyBase.UseDefaultCredentials = value
                Me.useDefaultCredentialsSetExplicitly = true
            End Set
        End Property
        
        '''<remarks/>
        Public Event submitRadiologyResultCompleted As submitRadiologyResultCompletedEventHandler
        
        '''<remarks/>
        <System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace:="http://medplus.com/radiology/result", ResponseNamespace:="http://medplus.com/radiology/result")>  _
        Public Function submitRadiologyResult(ByVal radiologyResult As RadiologyResult) As <System.Xml.Serialization.SoapElementAttribute("result")> RadiologyResultResponse
            Dim results() As Object = Me.Invoke("submitRadiologyResult", New Object() {radiologyResult})
            Return CType(results(0),RadiologyResultResponse)
        End Function
        
        '''<remarks/>
        Public Overloads Sub submitRadiologyResultAsync(ByVal radiologyResult As RadiologyResult)
            Me.submitRadiologyResultAsync(radiologyResult, Nothing)
        End Sub
        
        '''<remarks/>
        Public Overloads Sub submitRadiologyResultAsync(ByVal radiologyResult As RadiologyResult, ByVal userState As Object)
            If (Me.submitRadiologyResultOperationCompleted Is Nothing) Then
                Me.submitRadiologyResultOperationCompleted = AddressOf Me.OnsubmitRadiologyResultOperationCompleted
            End If
            Me.InvokeAsync("submitRadiologyResult", New Object() {radiologyResult}, Me.submitRadiologyResultOperationCompleted, userState)
        End Sub
        
        Private Sub OnsubmitRadiologyResultOperationCompleted(ByVal arg As Object)
            If (Not (Me.submitRadiologyResultCompletedEvent) Is Nothing) Then
                Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
                RaiseEvent submitRadiologyResultCompleted(Me, New submitRadiologyResultCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
            End If
        End Sub
        
        '''<remarks/>
        Public Shadows Sub CancelAsync(ByVal userState As Object)
            MyBase.CancelAsync(userState)
        End Sub
        
        Private Function IsLocalFileSystemWebService(ByVal url As String) As Boolean
            If ((url Is Nothing)  _
                        OrElse (url Is String.Empty)) Then
                Return false
            End If
            Dim wsUri As System.Uri = New System.Uri(url)
            If ((wsUri.Port >= 1024)  _
                        AndAlso (String.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) = 0)) Then
                Return true
            End If
            Return false
        End Function
    End Class
    
    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.SoapTypeAttribute([Namespace]:="java:com.medplus.serviceHub.radiology.webservice")>  _
    Partial Public Class RadiologyResult
        
        Private hl7RadiologyResultField() As Byte
        
        '''<remarks/>
        <System.Xml.Serialization.SoapElementAttribute(DataType:="base64Binary", IsNullable:=true)>  _
        Public Property hl7RadiologyResult() As Byte()
            Get
                Return Me.hl7RadiologyResultField
            End Get
            Set
                Me.hl7RadiologyResultField = value
            End Set
        End Property
    End Class
    
    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.SoapTypeAttribute([Namespace]:="java:com.medplus.serviceHub.framework.webservices")>  _
    Partial Public Class ResponseProperty
        
        Private propertyNameField As String
        
        Private propertyValueField As String
        
        '''<remarks/>
        <System.Xml.Serialization.SoapElementAttribute(IsNullable:=true)>  _
        Public Property propertyName() As String
            Get
                Return Me.propertyNameField
            End Get
            Set
                Me.propertyNameField = value
            End Set
        End Property
        
        '''<remarks/>
        <System.Xml.Serialization.SoapElementAttribute(IsNullable:=true)>  _
        Public Property propertyValue() As String
            Get
                Return Me.propertyValueField
            End Get
            Set
                Me.propertyValueField = value
            End Set
        End Property
    End Class
    
    '''<remarks/>
    <System.Xml.Serialization.SoapIncludeAttribute(GetType(RadiologyResultResponse)),  _
     System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.SoapTypeAttribute([Namespace]:="java:com.medplus.serviceHub.framework.webservices")>  _
    Partial Public Class BaseHubServiceResponse
        
        Private responseCodeField As String
        
        Private responseMsgField As String
        
        Private responsePropertiesField() As ResponseProperty
        
        Private statusField As String
        
        '''<remarks/>
        <System.Xml.Serialization.SoapElementAttribute(IsNullable:=true)>  _
        Public Property responseCode() As String
            Get
                Return Me.responseCodeField
            End Get
            Set
                Me.responseCodeField = value
            End Set
        End Property
        
        '''<remarks/>
        <System.Xml.Serialization.SoapElementAttribute(IsNullable:=true)>  _
        Public Property responseMsg() As String
            Get
                Return Me.responseMsgField
            End Get
            Set
                Me.responseMsgField = value
            End Set
        End Property
        
        '''<remarks/>
        <System.Xml.Serialization.SoapElementAttribute(IsNullable:=true)>  _
        Public Property responseProperties() As ResponseProperty()
            Get
                Return Me.responsePropertiesField
            End Get
            Set
                Me.responsePropertiesField = value
            End Set
        End Property
        
        '''<remarks/>
        <System.Xml.Serialization.SoapElementAttribute(IsNullable:=true)>  _
        Public Property status() As String
            Get
                Return Me.statusField
            End Get
            Set
                Me.statusField = value
            End Set
        End Property
    End Class
    
    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.SoapTypeAttribute([Namespace]:="java:com.medplus.serviceHub.radiology.webservice")>  _
    Partial Public Class RadiologyResultResponse
        Inherits BaseHubServiceResponse
        
        Private messageControlIdField As String
        
        Private validationErrorsField() As String
        
        '''<remarks/>
        <System.Xml.Serialization.SoapElementAttribute(IsNullable:=true)>  _
        Public Property messageControlId() As String
            Get
                Return Me.messageControlIdField
            End Get
            Set
                Me.messageControlIdField = value
            End Set
        End Property
        
        '''<remarks/>
        <System.Xml.Serialization.SoapElementAttribute(IsNullable:=true)>  _
        Public Property validationErrors() As String()
            Get
                Return Me.validationErrorsField
            End Get
            Set
                Me.validationErrorsField = value
            End Set
        End Property
    End Class
    
    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")>  _
    Public Delegate Sub submitRadiologyResultCompletedEventHandler(ByVal sender As Object, ByVal e As submitRadiologyResultCompletedEventArgs)
    
    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929"),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code")>  _
    Partial Public Class submitRadiologyResultCompletedEventArgs
        Inherits System.ComponentModel.AsyncCompletedEventArgs
        
        Private results() As Object
        
        Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object)
            MyBase.New(exception, cancelled, userState)
            Me.results = results
        End Sub
        
        '''<remarks/>
        Public ReadOnly Property Result() As RadiologyResultResponse
            Get
                Me.RaiseExceptionIfNecessary
                Return CType(Me.results(0),RadiologyResultResponse)
            End Get
        End Property
    End Class
End Namespace
