예제 #1
0
        string UpdateStatusAction(string sessionID, string action)
        {
            string result = "";

            try
            {
                //action = approve, deny or hold.
                string         computerName = SecurityUtilities.GetComputerName();
                string         userName     = SecurityUtilities.GetUserName();
                Authentication auth;
                if (Utilities.Auth == null)
                {
                    auth = SecurityUtilities.GetAuthentication(serviceName);
                }
                else
                {
                    auth = Utilities.Auth;
                }
                HttpsClient client      = new HttpsClient();
                Uri         fhirAddress = new Uri(UpdatePendingStatusUri);
                result = client.UpdatePendingStatus(fhirAddress, auth, sessionID, action, computerName, userName);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
예제 #2
0
        //TODO: Update function in JavaScript and C# to postUnknownDOBExistingPatient
        public bool postUnknownDOBExistingpatient(string passedLocalNoID)
        {
            bool result = false;

            try
            {
                Authentication auth;
                if (Utilities.Auth == null)
                {
                    auth = SecurityUtilities.GetAuthentication(serviceName);
                }
                else
                {
                    auth = Utilities.Auth;
                }
                localNoID = passedLocalNoID;
                HttpsClient client         = new HttpsClient();
                Uri         endpoint       = new Uri(IdentityChallengeUri);
                string      resultResponse = client.SendIdentityChallenge(endpoint, auth, passedLocalNoID, "failedchallenge", "", SecurityUtilities.GetComputerName(), ClinicArea);

                if (resultResponse.ToLower() == "yes")
                {
                    result = true;
                }
                else if (resultResponse.ToLower().Contains("error") == true)
                {
                    errorDescription = "Error in PatientBridge::postUnknownDOBExistingPatient: " + resultResponse.Substring(3);
                }
            }
            catch (Exception ex)
            {
                errorDescription = "Error in PatientBridge::postUnknownDOBExistingPatient: " + ex.Message;
            }
            return(result);
        }
예제 #3
0
        private static void SendJSON(Media payload)
        {
            Authentication auth     = SecurityUtilities.GetAuthentication(NoIDServiceName);
            Uri            endpoint = new Uri(SearchBiometricsUri);
            HttpsClient    client   = new HttpsClient();

            client.SendFHIRMediaProfile(endpoint, auth, payload);
            Console.WriteLine(client.ResponseText);
        }
예제 #4
0
        private static void SendJSON(Patient payload)
        {
            Authentication auth     = SecurityUtilities.GetAuthentication(NoIDServiceName);
            Uri            endpoint = new Uri(PatentCheckinUri);
            HttpsClient    client   = new HttpsClient();

            client.SendFHIRPatientProfile(endpoint, auth, payload);
            Console.WriteLine(client.ResponseText);
        }
예제 #5
0
        private static IList <PatientProfile> GetCheckinList()
        {
            IList <PatientProfile> PatientProfiles = null;

            Authentication auth     = SecurityUtilities.GetAuthentication(NoIDServiceName);
            Uri            endpoint = new Uri(PendingPatientsUri);
            HttpsClient    client   = new HttpsClient();

            PatientProfiles = client.RequestPendingQueue(endpoint, auth);
            Console.WriteLine(client.ResponseText);
            return(PatientProfiles);
        }
예제 #6
0
        static IList <PatientProfile> GetCheckinList()
        {
            IList <PatientProfile> PatientProfiles = null;
            Authentication         auth;

            if (Utilities.Auth == null)
            {
                auth = SecurityUtilities.GetAuthentication(NoIDServiceName);
            }
            else
            {
                auth = Utilities.Auth;
            }
            HttpsClient client = new HttpsClient();

            PatientProfiles = client.RequestPendingQueue(PendingPatientsUri, auth);
            return(PatientProfiles);
        }
예제 #7
0
        public bool postConfirmExistingPatient(string passedLocalNoID, string birthYear, string birthMonth, string birthDay)
        {
            bool result = false;

            try
            {
                Authentication auth;
                if (Utilities.Auth == null)
                {
                    auth = SecurityUtilities.GetAuthentication(serviceName);
                }
                else
                {
                    auth = Utilities.Auth;
                }
                HttpsClient client         = new HttpsClient();
                Uri         endpoint       = new Uri(IdentityChallengeUri);
                string      isoBirthDate   = formatDateOfBirth(birthYear, birthMonth, birthDay);
                string      resultResponse = client.SendIdentityChallenge(endpoint, auth, localNoID, "birthdate", isoBirthDate, SecurityUtilities.GetComputerName(), ClinicArea);

                if (resultResponse.ToLower() == "yes")
                {
                    _existingDOBMatch = "match";
                    result            = true;
                }
                else if (resultResponse.ToLower().Contains("error") == true)
                {
                    errorDescription = "Error in PatientBridge::postConfirmExistingPatient: " + resultResponse.Substring(3);
                }
            }
            catch (Exception ex)
            {
                errorDescription = "Error in PatientBridge::postConfirmExistingPatient: " + ex.Message;
            }
            return(result);
        }
예제 #8
0
        //  C# -> Javascript function is NoIDBridge.postDemographics( <params> )
        // Maybe rename to postEnrollment
        // TODO: pass multi birth flag, password, hub selected, gender Q&A to this funtion.
        public bool postDemographics
        (
            string language,
            string firstName,
            string middleName,
            string lastName,
            string gender,
            string birthYear,
            string birthMonth,
            string birthDay,
            string streetAddress,
            string streetAddress2,
            string city,
            string state,
            string postalCode,
            string emailAddress,
            string phoneCell,
            string multipleBirthFlag,
            string genderChangeFlag,
            string password,
            string patientHub,
            string doesLeftBiometricExist,
            string doesRightBiometricExist,
            string missingBiometricReason,
            string secretExAnswer1,
            string secretExAnswer2,
            string selectedsecretQuestion1,
            string selectedsecretQuestion2
        )
        {
            try
            {
                _patientFHIRProfile.Language   = language;
                _patientFHIRProfile.LastName   = lastName;
                _patientFHIRProfile.FirstName  = firstName;
                _patientFHIRProfile.MiddleName = middleName;

                if (gender.ToLower() == "f")
                {
                    _patientFHIRProfile.Gender = "F";
                }
                else if (gender.ToLower() == "m")
                {
                    _patientFHIRProfile.Gender = "M";
                }

                _patientFHIRProfile.BirthDate                       = formatDateOfBirth(birthYear, birthMonth, birthDay);
                _patientFHIRProfile.StreetAddress                   = streetAddress;
                _patientFHIRProfile.StreetAddress2                  = streetAddress2;
                _patientFHIRProfile.City                            = city;
                _patientFHIRProfile.State                           = state;
                _patientFHIRProfile.PostalCode                      = postalCode;
                _patientFHIRProfile.EmailAddress                    = emailAddress;
                _patientFHIRProfile.PhoneCell                       = phoneCell;
                _patientFHIRProfile.ClinicArea                      = ClinicArea;
                _patientFHIRProfile.DevicePhysicalLocation          = DevicePhysicalLocation;
                _patientFHIRProfile.NoIDType                        = "New";
                _patientFHIRProfile.NoIDStatus                      = "Pending";
                _patientFHIRProfile.CheckinDateTime                 = FHIRUtilities.DateTimeToFHIRString(DateTime.UtcNow);
                _patientFHIRProfile.NoIDHubPassword                 = password;
                _patientFHIRProfile.NoIDHubName                     = patientHub;
                _patientFHIRProfile.MultipleBirth                   = multipleBirthFlag;
                _patientFHIRProfile.GenderChangeFlag                = genderChangeFlag;
                _patientFHIRProfile.BiometricExceptionMissingReason = exceptionMissingReason;
                _patientFHIRProfile.SecretQuestion1                 = SecretQuestion1; //TODO: Implement non-fixed questions and get value from HTML
                _patientFHIRProfile.SecretAnswer1                   = secretAnswer1;
                _patientFHIRProfile.SecretQuestion2                 = SecretQuestion2; //TODO: Implement non-fixed questions and get value from HTML
                _patientFHIRProfile.SecretAnswer2                   = secretAnswer2;

                // Send FHIR message
                Authentication auth;
                if (Utilities.Auth == null)
                {
                    auth = SecurityUtilities.GetAuthentication(serviceName);
                }
                else
                {
                    auth = Utilities.Auth;
                }
                HttpsClient client = new HttpsClient();
                Patient     pt     = _patientFHIRProfile.CreateFHIRPatientProfile();

                // TODO: REMOVE THIS LINE!  ONLY FOR TESTING
                //FHIRUtilities.SaveJSONFile(pt, @"C:\JSONTest");

                fhirAddress = new Uri(AddNewPatientUri);
                if (client.SendFHIRPatientProfile(fhirAddress, auth, pt) == false)
                {
                    // Error occured set error description
                    errorDescription = HandleNullString(client.ResponseText);
                    return(false);
                }
                else
                {
                    // No error, return message.
                    _reponseString = HandleNullString(client.ResponseText);
                }
            }
            catch (Exception ex)
            {
                errorDescription = ex.Message;
                return(false);
            }
            return(true);
        }
예제 #9
0
        public bool postDemoForNoBioMatch
        (
            string language,
            string firstName,
            string middleName,
            string lastName,
            string gender,
            string birthYear,
            string birthMonth,
            string birthDay,
            string streetAddress,
            string streetAddress2,
            string city,
            string state,
            string postalCode,
            string emailAddress,
            string phoneCell,
            string selectedExceptionReason,
            string secretExAnswer1,
            string secretExAnswer2,
            string selectedsecretQuestion1,
            string selectedsecretQuestion2
        )
        {
            try
            {
                if (selectedExceptionReason == "")
                {
                    return(true);
                }

                errorDescription               = "";
                _patientFHIRProfile.Language   = language;
                _patientFHIRProfile.LastName   = lastName;
                _patientFHIRProfile.FirstName  = firstName;
                _patientFHIRProfile.MiddleName = middleName;

                if (gender.ToLower() == "f")
                {
                    _patientFHIRProfile.Gender = "F";
                }
                else if (gender.ToLower() == "m")
                {
                    _patientFHIRProfile.Gender = "M";
                }

                _patientFHIRProfile.BirthDate                       = formatDateOfBirth(birthYear, birthMonth, birthDay);
                _patientFHIRProfile.StreetAddress                   = streetAddress;
                _patientFHIRProfile.StreetAddress2                  = streetAddress2;
                _patientFHIRProfile.City                            = city;
                _patientFHIRProfile.State                           = state;
                _patientFHIRProfile.PostalCode                      = postalCode;
                _patientFHIRProfile.EmailAddress                    = emailAddress;
                _patientFHIRProfile.PhoneCell                       = phoneCell;
                _patientFHIRProfile.ClinicArea                      = ClinicArea;
                _patientFHIRProfile.DevicePhysicalLocation          = DevicePhysicalLocation;
                _patientFHIRProfile.NoIDType                        = "Identity";
                _patientFHIRProfile.NoIDStatus                      = "Pending";
                _patientFHIRProfile.CheckinDateTime                 = FHIRUtilities.DateTimeToFHIRString(DateTime.UtcNow);
                _patientFHIRProfile.BiometricExceptionMissingReason = exceptionMissingReason;
                _patientFHIRProfile.SecretQuestion1                 = selectedsecretQuestion1;
                _patientFHIRProfile.SecretAnswer1                   = secretAnswer1;
                _patientFHIRProfile.SecretQuestion2                 = selectedsecretQuestion2;
                _patientFHIRProfile.SecretAnswer2                   = secretAnswer2;

                // Send FHIR message
                Authentication auth;
                if (Utilities.Auth == null)
                {
                    auth = SecurityUtilities.GetAuthentication(serviceName);
                }
                else
                {
                    auth = Utilities.Auth;
                }
                HttpsClient client = new HttpsClient();
                Patient     pt     = _patientFHIRProfile.CreateFHIRPatientProfile();

                // TODO: REMOVE THIS LINE!  ONLY FOR TESTING
                //FHIRUtilities.SaveJSONFile(pt, @"C:\JSONTest");

                fhirAddress = new Uri(AltMatchByDemographicsUri);
                if (client.SendDemographicFHIRSearch(fhirAddress, auth, pt) == false)
                {
                    // Error occured set error description
                    errorDescription = HandleNullString(client.ResponseText);
                    return(false);
                }
                else
                {
                    if (client.ResponseText.ToLower().Contains("noid://") == true)
                    {
                        string localNoID = client.ResponseText;
                        ExecuteJavaScriptAsync("showNoBioIdentity('" + localNoID + "');");
                        return(true);
                    }
                    else if (client.ResponseText.ToLower().Contains("no match") == true)
                    {
                        return(true);
                    }
                    else if (client.ResponseText.ToLower().Contains("error") == true)
                    {
                        errorDescription = "Error in PatientBridge::postDemoForNoBioMatch: " + client.ResponseText;
                        return(false);
                    }
                }
            }
            catch (Exception ex)
            {
                errorDescription = ex.Message;
                return(false);
            }
            return(true);
        }
예제 #10
0
        //TODO: Abstract CaptureResult so it will work with any fingerprint scanner.
        private void OnCaptured(CaptureResult captureResult)
        {
            browser.GetMainFrame().ExecuteJavaScriptAsync("showPleaseWait();");
            //mark schroeder20170703
            if (PatientBridge.cannotCaptureLeftFingerprint == true)
            {
                Laterality = FHIRUtilities.LateralitySnoMedCode.Right;
            }

            if (currentCaptureInProcess == false)
            {
                if ((PatientBridge.hasValidLeftFingerprint == true && Laterality == FHIRUtilities.LateralitySnoMedCode.Left) || (PatientBridge.hasValidRightFingerprint == true && Laterality == FHIRUtilities.LateralitySnoMedCode.Right))
                {
                    //mark schroeder 20170701 do not capture more left fingerprints if left is set. Same for right
                    return;
                }
                else
                {
                    try
                    {
                        //mark schroeder 20170701 use this to stop more capture attempts while processing. Added to below if statememt
                        currentCaptureInProcess    = true;
                        maxFingerprintScanAttempts = Convert.ToInt16(System.Configuration.ConfigurationManager.AppSettings["maxFingerprintScanAttempts"].ToString());
                        fingerprintScanAttempts++;
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                        return;
                    }

                    if (_patientBridge.captureSite != FHIRUtilities.CaptureSiteSnoMedCode.Unknown && _patientBridge.laterality != FHIRUtilities.LateralitySnoMedCode.Unknown)
                    {
                        if (fingerprintScanAttempts <= maxFingerprintScanAttempts)
                        {
#if NAVIGATE
                            DisplayOutput("Captured finger image....");
#endif
                            // Check capture quality and throw an error if poor or incomplete capture.
                            if (!biometricDevice.CheckCaptureResult(captureResult))
                            {
                                return;
                            }

                            Constants.CaptureQuality quality = captureResult.Quality;
                            if ((int)quality != 0)
                            {
                                //call javascript to inform UI that the capture quality was too low to accept.
#if NAVIGATE
                                DisplayOutput("Fingerprint quality was too low to accept. Quality = " + quality.ToString());
#endif
                                return;
                            }

                            Type   captureResultType = captureResult.GetType();
                            string deviceClassName   = captureResultType.ToString();
                            string deviceName        = "";
                            if (deviceClassName == "DPUruNet.CaptureResult")
                            {
                                deviceName = "DigitalPersona U.Are.U 4500";
                            }

                            SourceAFIS.Simple.Person currentCapture = new SourceAFIS.Simple.Person();

                            Fingerprint newFingerPrint = new Fingerprint();
                            foreach (Fid.Fiv fiv in captureResult.Data.Views)
                            {
                                newFingerPrint.AsBitmap = ImageUtilities.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height);
                            }
                            currentCapture.Fingerprints.Add(newFingerPrint);
                            Afis.Extract(currentCapture);
                            Template tmpCurrent = newFingerPrint.GetTemplate();

                            if (_minutiaCaptureController.MatchFound == false)
                            {
                                if (_minutiaCaptureController.AddMinutiaTemplateProbe(tmpCurrent) == true)
                                {
                                    // Good pair found.  Query web service for a match.
                                    FingerPrintMinutias newFingerPrintMinutias = new FingerPrintMinutias
                                                                                     (SessionID, _minutiaCaptureController.BestTemplate1, Laterality, CaptureSite);
                                    PatientBridge.PatientFHIRProfile.AddFingerPrint(newFingerPrintMinutias,
                                                                                    deviceName,
                                                                                    _minutiaCaptureController.BestTemplate1.OriginalDpi,
                                                                                    _minutiaCaptureController.BestTemplate1.OriginalHeight,
                                                                                    _minutiaCaptureController.BestTemplate1.OriginalWidth);

                                    newFingerPrintMinutias = new FingerPrintMinutias
                                                                 (SessionID, _minutiaCaptureController.BestTemplate2, Laterality, CaptureSite);
                                    PatientBridge.PatientFHIRProfile.AddFingerPrint(newFingerPrintMinutias,
                                                                                    deviceName,
                                                                                    _minutiaCaptureController.BestTemplate2.OriginalDpi,
                                                                                    _minutiaCaptureController.BestTemplate2.OriginalHeight,
                                                                                    _minutiaCaptureController.BestTemplate2.OriginalWidth);

                                    Media media = PatientBridge.PatientFHIRProfile.FingerPrintFHIRMedia(newFingerPrintMinutias, deviceName, tmpCurrent.OriginalDpi, tmpCurrent.OriginalHeight, tmpCurrent.OriginalWidth);

                                    // TODO: REMOVE THIS LINE!  ONLY FOR TESTING
                                    //FHIRUtilities.SaveJSONFile(media, @"C:\JSONTest");

                                    HttpsClient    dataTransport = new HttpsClient();
                                    Authentication auth;
                                    if (Utilities.Auth == null)
                                    {
                                        auth = SecurityUtilities.GetAuthentication(NoIDServiceName);
                                    }
                                    else
                                    {
                                        auth = Utilities.Auth;
                                    }
                                    PatientBridge.fhirAddress = new Uri(SearchBiometricsUri);
                                    dataTransport.SendFHIRMediaProfile(PatientBridge.fhirAddress, auth, media);
                                    string lateralityString  = FHIRUtilities.LateralityToString(Laterality);
                                    string captureSiteString = FHIRUtilities.CaptureSiteToString(CaptureSite);
#if NAVIGATE
                                    string output = lateralityString + " " + captureSiteString + " fingerprint accepted. Score = " + _minutiaCaptureController.BestScore + ", Fingerprint sent to server: Response = " + dataTransport.ResponseText;
                                    DisplayOutput(output);
#endif
                                    if (dataTransport.ResponseText.ToLower().Contains("error") == true || dataTransport.ResponseText.ToLower().Contains("index") == true)
                                    {
                                        string message = "Critical Identity Error Occured In Fingerprint Capture method. Please contact your adminstrator: " + dataTransport.ResponseText + " Error code = 909";
                                        MessageBox.Show(message);
                                        browser.GetMainFrame().ExecuteJavaScriptAsync("pageRefresh();");
                                        return;
                                    }
                                    if (dataTransport.ResponseText.ToLower().Contains(@"noid://") == true)
                                    {
                                        // Match found, inform JavaScript that this is an returning patient for Identity.
                                        PatientBridge.PatientFHIRProfile.LocalNoID  = dataTransport.ResponseText;                                         //save the localNoID
                                        PatientBridge.PatientFHIRProfile.NoIDStatus = "Pending";
                                        browser.GetMainFrame().ExecuteJavaScriptAsync("showIdentity('" + PatientBridge.PatientFHIRProfile.LocalNoID + "');");
                                    }
                                    else if (dataTransport.ResponseText.ToLower() == "pending")
                                    {
                                        MessageBox.Show("You are already checked in.  If you believe this is an error, please contact staff");
                                        browser.GetMainFrame().ExecuteJavaScriptAsync("pageRefresh();");
                                        return;
                                    }
                                    else
                                    {
                                        if (PatientBridge.hasValidLeftFingerprint == true)
                                        {
                                            if (MatchLeftAndRight() == true)
                                            {
                                                MessageBox.Show("Both right and left capture sites are the same.  Please start over.");
                                                browser.GetMainFrame().ExecuteJavaScriptAsync("pageRefresh();");
                                                return;
                                            }
                                        }
                                        // Match not found, inform JavaScript the capture pair is complete and the patient can move to the next step.
                                        browser.GetMainFrame().ExecuteJavaScriptAsync("showComplete('" + Laterality.ToString() + "');");
                                        if (Laterality == FHIRUtilities.LateralitySnoMedCode.Left)
                                        {
                                            Laterality  = FHIRUtilities.LateralitySnoMedCode.Right;
                                            CaptureSite = FHIRUtilities.CaptureSiteSnoMedCode.IndexFinger;
                                            _firstMinutiaCaptureController        = _minutiaCaptureController;
                                            _minutiaCaptureController             = new MinutiaCaptureController(_minimumAcceptedMatchScore);
                                            PatientBridge.hasValidLeftFingerprint = true;
                                        }
                                        else if (Laterality == FHIRUtilities.LateralitySnoMedCode.Right)
                                        {
                                            Laterality  = FHIRUtilities.LateralitySnoMedCode.Unknown;
                                            CaptureSite = FHIRUtilities.CaptureSiteSnoMedCode.Unknown;
                                            PatientBridge.hasValidRightFingerprint = true;
                                        }
                                        fingerprintScanAttempts = 0;                                         //reset scan attempt count on successful scan
                                    }
                                }
                                else
                                {
                                    // Good fingerprint pairs not found yet.  inform JavaScript to promt the patient to try again.
                                    browser.GetMainFrame().ExecuteJavaScriptAsync("showFail('" + Laterality.ToString() + "');");
#if NAVIGATE
                                    DisplayOutput("Fingerprint NOT accepted. Score = " + _minutiaCaptureController.BestScore);
#endif
                                    currentCaptureInProcess = false;
                                    return;
                                }
                            }
                        }
                        else
                        {
                            //int testy = CaptureSite.ToString().IndexOf("Thumb");
                            if (CaptureSite.ToString().IndexOf("Thumb") == -1)
                            {
                                browser.GetMainFrame().ExecuteJavaScriptAsync("alert('You have exceeded the maximum allowed scan attempts for your " + Laterality.ToString() + " " + CaptureSite + " Lets try another finger.');");
                            }
                            fingerprintScanAttempts = 0;                             //reset scan attempt count on successful scan
                            //get next laterality and capture site. Order of precedence is left, then right. Index, middle, ring, little, thumb
                            switch (Laterality.ToString() + CaptureSite.ToString())
                            {
                            case "LeftIndexFinger":
                                attemptedScannedFingers.Add(Laterality.ToString() + CaptureSite.ToString());
                                browser.GetMainFrame().ExecuteJavaScriptAsync("setLateralitySite('selectLeftMiddle');");
                                CaptureSite = FHIRUtilities.CaptureSiteSnoMedCode.MiddleFinger;
                                Laterality  = FHIRUtilities.LateralitySnoMedCode.Left;
                                break;

                            case "LeftMiddleFinger":
                                attemptedScannedFingers.Add(Laterality.ToString() + CaptureSite.ToString());
                                browser.GetMainFrame().ExecuteJavaScriptAsync("setLateralitySite('selectLeftRing');");
                                CaptureSite = FHIRUtilities.CaptureSiteSnoMedCode.RingFinger;
                                Laterality  = FHIRUtilities.LateralitySnoMedCode.Left;
                                break;

                            case "LeftRingFinger":
                                attemptedScannedFingers.Add(Laterality.ToString() + CaptureSite.ToString());
                                browser.GetMainFrame().ExecuteJavaScriptAsync("setLateralitySite('selectLeftLittle');");
                                CaptureSite = FHIRUtilities.CaptureSiteSnoMedCode.LittleFinger;
                                Laterality  = FHIRUtilities.LateralitySnoMedCode.Left;
                                break;

                            case "LeftLittleFinger":
                                attemptedScannedFingers.Add(Laterality.ToString() + CaptureSite.ToString());
                                browser.GetMainFrame().ExecuteJavaScriptAsync("setLateralitySite('selectLeftThumb');");
                                CaptureSite = FHIRUtilities.CaptureSiteSnoMedCode.Thumb;
                                Laterality  = FHIRUtilities.LateralitySnoMedCode.Left;
                                break;

                            case "LeftThumb":
                                attemptedScannedFingers.Add(Laterality.ToString() + CaptureSite.ToString());
                                browser.GetMainFrame().ExecuteJavaScriptAsync("moveToRightHandScan();");
                                CaptureSite            = FHIRUtilities.CaptureSiteSnoMedCode.IndexFinger;
                                Laterality             = FHIRUtilities.LateralitySnoMedCode.Right;
                                hasLeftFingerprintScan = false;
                                break;

                            case "RightIndexFinger":
                                hasLeftFingerprintScan = _patientBridge.hasValidLeftFingerprint;
                                attemptedScannedFingers.Add(Laterality.ToString() + CaptureSite.ToString());
                                browser.GetMainFrame().ExecuteJavaScriptAsync("setLateralitySite('selectRightMiddle');");
                                CaptureSite = FHIRUtilities.CaptureSiteSnoMedCode.MiddleFinger;
                                Laterality  = FHIRUtilities.LateralitySnoMedCode.Right;
                                break;

                            case "RightMiddleFinger":
                                attemptedScannedFingers.Add(Laterality.ToString() + CaptureSite.ToString());
                                browser.GetMainFrame().ExecuteJavaScriptAsync("setLateralitySite('selectRightRing');");
                                CaptureSite = FHIRUtilities.CaptureSiteSnoMedCode.RingFinger;
                                Laterality  = FHIRUtilities.LateralitySnoMedCode.Right;
                                break;

                            case "RightRingFinger":
                                attemptedScannedFingers.Add(Laterality.ToString() + CaptureSite.ToString());
                                browser.GetMainFrame().ExecuteJavaScriptAsync("setLateralitySite('selectRightLittle');");
                                CaptureSite = FHIRUtilities.CaptureSiteSnoMedCode.LittleFinger;
                                Laterality  = FHIRUtilities.LateralitySnoMedCode.Right;
                                break;

                            case "RightLittleFinger":
                                attemptedScannedFingers.Add(Laterality.ToString() + CaptureSite.ToString());
                                browser.GetMainFrame().ExecuteJavaScriptAsync("setLateralitySite('selectRightThumb');");
                                CaptureSite = FHIRUtilities.CaptureSiteSnoMedCode.Thumb;
                                Laterality  = FHIRUtilities.LateralitySnoMedCode.Right;
                                break;

                            case "RightThumb":
                                attemptedScannedFingers.Add(Laterality.ToString() + CaptureSite.ToString());
                                hasRightFingerprintScan   = false;
                                _minutiaCaptureController = null;
                                if (hasLeftFingerprintScan == false)
                                {
                                    _firstMinutiaCaptureController = null;
                                }
                                CaptureSite = FHIRUtilities.CaptureSiteSnoMedCode.Unknown;
                                Laterality  = FHIRUtilities.LateralitySnoMedCode.Unknown;
                                browser.GetMainFrame().ExecuteJavaScriptAsync("clickNoRightHandFingerPrint();");
                                break;

                            default:
                                break;
                            }
                            //define walk through fingers and ability to override
                        }
                    }
                    else
                    {
                        if (hasLeftFingerprintScan == true && hasRightFingerprintScan == true)
                        {
                            browser.GetMainFrame().ExecuteJavaScriptAsync("alert('You have successfully completed this step. Please proceed to the next page by clicking the NEXT button below');");
                        }
                        else
                        {
                            browser.GetMainFrame().ExecuteJavaScriptAsync("alert('Must be on the correct page to accept a fingerprint scan. Please follow the instructions on the screen.');");
                        }
#if NAVIGATE
                        DisplayOutput("Must be on the correct page to accept a fingerprint scan.");
#endif
                    }
                    currentCaptureInProcess = false;
                }
            }
            else
            {
                browser.GetMainFrame().ExecuteJavaScriptAsync("alert('Current Scan In Process. Please wait and follow the on screen instructions.');");
            }
        }