private void ButtonNext_Click(object sender, RoutedEventArgs e)
        {
            if (this.TextBoxMasterAccessionNo.Text.Length >= 1)
            {
                Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(this.TextBoxMasterAccessionNo.Text);
                object textSearchObject = textSearchHandler.GetSearchObject();
                if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo)
                {
                    YellowstonePathology.Business.MasterAccessionNo       masterAccessionNo = (YellowstonePathology.Business.MasterAccessionNo)textSearchObject;
                    YellowstonePathology.Business.Search.ReportSearchList reportSearchList  = YellowstonePathology.Business.Gateway.ReportSearchGateway.GetReportSearchListByMasterAccessionNo(masterAccessionNo.Value);

                    if (reportSearchList.Count > 0)
                    {
                        this.Next(this, new CustomEventArgs.MasterAccessionNoReturnEventArgs(masterAccessionNo.Value));
                    }
                    else
                    {
                        MessageBox.Show("Unable to find the Accession.");
                    }
                }
                else
                {
                    MessageBox.Show("Enter a Master Accession Number.");
                }
            }
            else
            {
                MessageBox.Show("Enter a Master Accession Number.");
            }
        }
        private void TextBoxMasterAccessionNo_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                if (this.TextBoxMasterAccessionNo.Text.Length >= 1)
                {
                    Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(this.TextBoxMasterAccessionNo.Text);
                    object textSearchObject = textSearchHandler.GetSearchObject();
                    if (textSearchObject is YellowstonePathology.Business.ReportNo)
                    {
                        YellowstonePathology.Business.ReportNo reportNo = (YellowstonePathology.Business.ReportNo)textSearchObject;
                        this.m_LoginUI.GetReportSearchListByReportNo(reportNo.Value);
                    }
                    else if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo)
                    {
                        YellowstonePathology.Business.MasterAccessionNo masterAccessionNo = (YellowstonePathology.Business.MasterAccessionNo)textSearchObject;
                        this.m_LoginUI.GetReportSearchListByMasterAccessionNo(masterAccessionNo.Value);
                    }
                    else if (textSearchObject is YellowstonePathology.Business.PatientName)
                    {
                        YellowstonePathology.Business.PatientName patientName = (YellowstonePathology.Business.PatientName)textSearchObject;
                        this.m_LoginUI.GetReportSearchListByPatientName(patientName);
                    }

                    if (this.m_LoginUI.AccessionOrder != null)
                    {
                        YellowstonePathology.Business.Persistence.DocumentGateway.Instance.ReleaseLock(this.m_LoginUI.AccessionOrder, this.m_Writer);
                    }
                }
            }
        }
Example #3
0
        private void TextBoxReportNoSearch_KeyUp(object sender, KeyEventArgs e)
        {
            Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(this.TextBoxReportNoSearch.Text.ToUpper());
            object textSearchObject = textSearchHandler.GetSearchObject();
            string searchText       = string.Empty;

            if (e.Key == Key.Enter)
            {
                searchText = this.TextBoxReportNoSearch.Text.ToUpper();
                if (textSearchObject is YellowstonePathology.Business.ReportNo)
                {
                    searchText = ((YellowstonePathology.Business.ReportNo)textSearchObject).Value;
                }
                else if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo)
                {
                    searchText = ((YellowstonePathology.Business.MasterAccessionNo)textSearchObject).Value;
                    YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(searchText);
                    searchText = orderIdParser.CreateCyotlogyReportNoFromMasterAccessionNo();
                }
            }
            if (e.Key == Key.Up)
            {
                if (textSearchObject is YellowstonePathology.Business.ReportNo)
                {
                    searchText = YellowstonePathology.Business.OrderIdParser.IncrementReportNo(this.TextBoxReportNoSearch.Text, 1);
                }
            }
            if (e.Key == Key.Down)
            {
                if (textSearchObject is YellowstonePathology.Business.ReportNo)
                {
                    searchText = YellowstonePathology.Business.OrderIdParser.IncrementReportNo(this.TextBoxReportNoSearch.Text, -1);
                }
            }

            if (string.IsNullOrEmpty(searchText) == false)
            {
                YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(searchText);
                if (orderIdParser.IsValidCytologyReportNo == true)
                {
                    this.m_CytologyUI.SetAccessionOrderByReportNo(searchText);
                }
                else
                {
                    System.Windows.MessageBox.Show(searchText + " is not a valid Cytology report number.");
                }
            }
        }
Example #4
0
        private string ReportNoFromText(string text)
        {
            string result = string.Empty;

            Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(text);
            object textSearchObject = textSearchHandler.GetSearchObject();

            if (textSearchObject is YellowstonePathology.Business.ReportNo)
            {
                YellowstonePathology.Business.ReportNo reportNo = (YellowstonePathology.Business.ReportNo)textSearchObject;
                result = reportNo.Value;
            }
            else if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo)
            {
                YellowstonePathology.Business.MasterAccessionNo masterAccessionNo = (YellowstonePathology.Business.MasterAccessionNo)textSearchObject;
                result = masterAccessionNo.Value + ".F1";
            }
            return(result);
        }
 private string ReportNoFromText(string text)
 {
     string result = string.Empty;
     Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(text);
     object textSearchObject = textSearchHandler.GetSearchObject();
     if (textSearchObject is YellowstonePathology.Business.ReportNo)
     {
         YellowstonePathology.Business.ReportNo reportNo = (YellowstonePathology.Business.ReportNo)textSearchObject;
         result = reportNo.Value;
     }
     else if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo)
     {
         YellowstonePathology.Business.MasterAccessionNo masterAccessionNo = (YellowstonePathology.Business.MasterAccessionNo)textSearchObject;
         result = masterAccessionNo.Value + ".F1";
     }
     return result;
 }
        private void TextBoxMasterAccessionNo_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                if (this.TextBoxMasterAccessionNo.Text.Length >= 1)
                {
                    Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(this.TextBoxMasterAccessionNo.Text);
                    object textSearchObject = textSearchHandler.GetSearchObject();
                    if (textSearchObject is YellowstonePathology.Business.ReportNo)
                    {
                        YellowstonePathology.Business.ReportNo reportNo = (YellowstonePathology.Business.ReportNo)textSearchObject;
                        this.m_LoginUI.GetReportSearchListByReportNo(reportNo.Value);
                    }
                    else if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo)
                    {
                        YellowstonePathology.Business.MasterAccessionNo masterAccessionNo = (YellowstonePathology.Business.MasterAccessionNo)textSearchObject;
                        this.m_LoginUI.GetReportSearchListByMasterAccessionNo(masterAccessionNo.Value);
                    }
                    else if (textSearchObject is YellowstonePathology.Business.PatientName)
                    {
                        YellowstonePathology.Business.PatientName patientName = (YellowstonePathology.Business.PatientName)textSearchObject;
                        this.m_LoginUI.GetReportSearchListByPatientName(patientName);
                    }

                    if (this.m_LoginUI.AccessionOrder != null)
                    {
                        YellowstonePathology.Business.Persistence.DocumentGateway.Instance.ReleaseLock(this.m_LoginUI.AccessionOrder, this.m_Writer);
                    }
                }
            }
        }
        private void TextBoxReportNoSearch_KeyUp(object sender, KeyEventArgs e)
        {
            Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(this.TextBoxReportNoSearch.Text.ToUpper());
            object textSearchObject = textSearchHandler.GetSearchObject();
            string searchText = string.Empty;
            if (e.Key == Key.Enter)
            {
                searchText = this.TextBoxReportNoSearch.Text.ToUpper();
                if (textSearchObject is YellowstonePathology.Business.ReportNo)
                {
                    searchText = ((YellowstonePathology.Business.ReportNo)textSearchObject).Value;
                }
                else if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo)
                {
                    searchText = ((YellowstonePathology.Business.MasterAccessionNo)textSearchObject).Value;
                    YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(searchText);
                    searchText = orderIdParser.CreateCyotlogyReportNoFromMasterAccessionNo();
                }
            }
            if (e.Key == Key.Up)
            {
                if (textSearchObject is YellowstonePathology.Business.ReportNo)
                {
                    searchText = YellowstonePathology.Business.OrderIdParser.IncrementReportNo(this.TextBoxReportNoSearch.Text, 1);
                }
            }
            if (e.Key == Key.Down)
            {
                if (textSearchObject is YellowstonePathology.Business.ReportNo)
                {
                    searchText = YellowstonePathology.Business.OrderIdParser.IncrementReportNo(this.TextBoxReportNoSearch.Text, -1);
                }
            }

            if (string.IsNullOrEmpty(searchText) == false)
            {
                YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(searchText);
                if (orderIdParser.IsValidCytologyReportNo == true)
                {
                    this.m_CytologyUI.SetAccessionOrderByReportNo(searchText);
                }
                else System.Windows.MessageBox.Show(searchText + " is not a valid Cytology report number.");
            }
        }
Example #8
0
        private void DoSearch()
        {
            if (radioButtonSearchAccessionNo.IsChecked == true)
            {
                if (this.textBoxSearchReportNo.Text.Length > 4)
                {
                    this.m_LabUI.SearchEngine.SetFillByReportNo(this.textBoxSearchReportNo.Text);
                    this.m_LabUI.FillCaseList();

                    this.ListViewCaseList.Focus();
                    SetListViewToTop();
                }
                else
                {
                    MessageBox.Show("This search option requires an Accession Number.",	"Enter an accession number", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                }
            }
            if (radioButtonSearchNotDistributed.IsChecked == true)
            {
                this.m_LabUI.SearchEngine.SetFillByNotDistributed(0);
                this.m_LabUI.FillCaseList();
                this.ListViewCaseList.Focus();
                SetListViewToTop();
            }
            else if (radioButtonSearchNotFinal.IsChecked.Value)
            {
                this.m_LabUI.SearchEngine.SetFillByNotFinal(0);
                this.m_LabUI.FillCaseList();
                this.ListViewCaseList.Focus();
                SetListViewToTop();
            }
            else if (radioButtonSearchInHouseMolecularNotFinal.IsChecked.Value)
            {
                this.m_LabUI.SearchEngine.SetFillByInHouseMolecularPending();
                this.m_LabUI.FillCaseList();
                this.ListViewCaseList.Focus();
                SetListViewToTop();
            }
            else if (radioButtonSearchPatientName.IsChecked.Value)
            {
                if (textBoxSearchPatientName.Text.Length > 0)
                {
                    Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(this.textBoxSearchPatientName.Text);
                    object textSearchObject = textSearchHandler.GetSearchObject();
                    if (textSearchObject is YellowstonePathology.Business.PatientName)
                    {
                        YellowstonePathology.Business.PatientName patientName = (YellowstonePathology.Business.PatientName)textSearchObject;
                        this.m_LabUI.SearchEngine.SetFillByPatientName(patientName);
                        this.m_LabUI.FillCaseList();
                        ListViewCaseList.Focus();
                        SetListViewToTop();
                    }
                }
                else
                {
                    MessageBox.Show("This search option requires at least part of a patient name.",	"Enter Patient Name", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                }
            }
            else if (this.radioButtonSearchThisMonth.IsChecked.Value == true)
            {
                this.m_LabUI.SearchEngine.SetFillByThisMonth(0);
                this.m_LabUI.FillCaseList();
                this.ListViewCaseList.Focus();
                this.SetListViewToTop();
            }
            else if (this.radioButtonSearchLastMonth.IsChecked.Value == true)
            {
                this.m_LabUI.SearchEngine.SetFillByLastMonth(0);
                this.m_LabUI.FillCaseList();
                this.ListViewCaseList.Focus();
                this.SetListViewToTop();
            }
            else if (this.radioButtonSearchToday.IsChecked.Value == true)
            {
                this.m_LabUI.SearchEngine.SetFillByToday(0);
                this.m_LabUI.FillCaseList();
                this.ListViewCaseList.Focus();
                this.SetListViewToTop();
            }
            else if (this.radioButtonSearchYesterday.IsChecked.Value == true)
            {
                this.m_LabUI.SearchEngine.SetFillByYesterday(0);
                this.m_LabUI.FillCaseList();
                this.ListViewCaseList.Focus();
                this.SetListViewToTop();
            }
            else if (this.radioButtonSearchNotAudited.IsChecked.Value == true)
            {
                if (this.comboBoxAuditType.SelectedItem != null)
                {
                    string caseType = ((YellowstonePathology.Business.PanelSet.Model.PanelSetCaseType)this.comboBoxAuditType.SelectedItem).CaseType;
                    this.m_LabUI.SearchEngine.SetFillByNotAudited(caseType);
                    this.m_LabUI.FillCaseList();
                    this.ListViewCaseList.Focus();
                    this.SetListViewToTop();
                }
                else
                {
                    MessageBox.Show("This search option requires a Case Type selection.",
                        "Select a Case Type",
                    MessageBoxButton.OK, MessageBoxImage.Exclamation);
                }
            }
            else if (this.radioButtonSearchMasterAccessionNo.IsChecked.Value == true)
            {
                if (textBoxSearchMasterAccessionNo.Text.Length > 0)
                {
                    string masterAccessionNo = textBoxSearchMasterAccessionNo.Text;
                    this.m_LabUI.SearchEngine.SetFillByMasterAccessionNo(masterAccessionNo);
                    this.m_LabUI.FillCaseList();
                    ListViewCaseList.Focus();
                    SetListViewToTop();
                }
                else
                {
                    MessageBox.Show("This search option requires a Master Accession No.",
                        "Enter Master Accession No",
                    MessageBoxButton.OK, MessageBoxImage.Exclamation);
                }
            }
        }
Example #9
0
 private void TextBoxSearch_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         if (this.TextBoxSearch.Text.Length >= 1)
         {
             Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(this.TextBoxSearch.Text);
             object textSearchObject = textSearchHandler.GetSearchObject();
             if (textSearchObject is YellowstonePathology.Business.ReportNo)
             {
                 YellowstonePathology.Business.ReportNo reportNo = (YellowstonePathology.Business.ReportNo)textSearchObject;
                 this.m_LabUI.SearchEngine.SetFillByReportNo(reportNo.Value);
             }
             else if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo)
             {
                 YellowstonePathology.Business.MasterAccessionNo masterAccessionNo = (YellowstonePathology.Business.MasterAccessionNo)textSearchObject;
                 this.m_LabUI.SearchEngine.SetFillByMasterAccessionNo(masterAccessionNo.Value);
             }
             else if (textSearchObject is YellowstonePathology.Business.PatientName)
             {
                 YellowstonePathology.Business.PatientName patientName = (YellowstonePathology.Business.PatientName)textSearchObject;
                 this.m_LabUI.SearchEngine.SetFillByPatientName(patientName);
             }
             this.m_LabUI.FillCaseList();
             ListViewCaseList.Focus();
             SetListViewToTop();
         }
     }
 }
        private void ButtonNext_Click(object sender, RoutedEventArgs e)
        {
            if (this.TextBoxMasterAccessionNo.Text.Length >= 1)
            {
                Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(this.TextBoxMasterAccessionNo.Text);
                object textSearchObject = textSearchHandler.GetSearchObject();
                if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo)
                {
                    YellowstonePathology.Business.MasterAccessionNo masterAccessionNo = (YellowstonePathology.Business.MasterAccessionNo)textSearchObject;
                    YellowstonePathology.Business.Search.ReportSearchList reportSearchList = YellowstonePathology.Business.Gateway.ReportSearchGateway.GetReportSearchListByMasterAccessionNo(masterAccessionNo.Value);

                    if (reportSearchList.Count > 0)
                    {
                        this.Next(this, new CustomEventArgs.MasterAccessionNoReturnEventArgs(masterAccessionNo.Value));
                    }
                    else
                    {
                        MessageBox.Show("Unable to find the Accession.");
                    }
                }
                else
                {
                    MessageBox.Show("Enter a Master Accession Number.");
                }
            }
            else
            {
                MessageBox.Show("Enter a Master Accession Number.");
            }
        }