Imports Leadtools
Imports Leadtools.Examples
Imports Leadtools.Medical.WebViewer.ExternalControl
Private Sub MedicalWebViewerExternalController_FindPatient()
    Dim applicationName As String
    Dim version As String
    Dim externalControlPort As Integer = 500
    Const jonesPatientId As String = "12341234"
    Dim firstName As String
    Dim lastName As String
    Dim username As String = "bob"
    Dim password As String = "bob"
    Dim viewerUrl As String = "http://localhost/MedicalViewer/"
    Dim controller As New MedicalWebViewerExternalController(viewerUrl)
    applicationName = String.Empty
    version = String.Empty
    controller.InitApplication(applicationName, version, externalControlPort)
    controller.SelectedBrowser = MedicalWebViewerBrowser.GoogleChrome
    ' Login and display a patient, then logout
    controller.UserLogin(username, password)
    firstName = String.Empty
    lastName = String.Empty
    controller.FindPatient(jonesPatientId, firstName, lastName)
    Dim sMsg As String = String.Format("PatientID[{0}]: FirstName[{1}] LastName[{2}])", jonesPatientId, firstName, lastName)
    MessageBox.Show(sMsg)
    controller.CloseApplication()
    ' Shutdown the command queue
    controller.Shutdown()
End Sub
             
   
     
            using Leadtools;
using Leadtools.Examples;
using Leadtools.Medical.WebViewer.ExternalControl;
private void MedicalWebViewerExternalController_FindPatient()
{
   string applicationName;
   string version;
   int externalControlPort = 500;
   const string jonesPatientId = "12341234";
   string firstName;
   string lastName;
   string username = "bob";
   string password = "bob";
   string viewerUrl = "http://localhost/MedicalViewer/";
   MedicalWebViewerExternalController controller = new MedicalWebViewerExternalController(viewerUrl);
   controller.InitApplication(out applicationName, out version, externalControlPort);
   controller.SelectedBrowser = MedicalWebViewerBrowser.GoogleChrome;
   // Login and display a patient, then logout
   controller.UserLogin(username, password);
   controller.FindPatient(jonesPatientId, out firstName, out lastName);
   string sMsg = string.Format("PatientID[{0}]: FirstName[{1}] LastName[{2}])", jonesPatientId, firstName, lastName);
   MessageBox.Show(sMsg);
   controller.CloseApplication();
   // Shutdown the command queue
   controller.Shutdown();
}