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.");
            }
        }
Ejemplo n.º 2
0
        public object GetSearchObject()
        {
            object result = null;

            YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_SearchText);
            if (orderIdParser.IsValidReportNo == true)
            {
                result = new YellowstonePathology.Business.ReportNo(this.m_SearchText);
            }
            else if (orderIdParser.IsValidMasterAccessionNo == true)
            {
                result = YellowstonePathology.Business.MasterAccessionNo.Parse(this.m_SearchText, true);
            }
            else
            {
                YellowstonePathology.Business.MasterAccessionNo masterAccessionNo = null;
                if (YellowstonePathology.Business.MasterAccessionNo.TryParse(this.m_SearchText, false, out masterAccessionNo) == true)
                {
                    result = masterAccessionNo;
                }
                else
                {
                    YellowstonePathology.Business.PatientName patientName = null;
                    if (YellowstonePathology.Business.PatientName.TryParse(this.m_SearchText, out patientName) == true)
                    {
                        result = patientName;
                    }
                }
            }

            return(result);
        }
        public void TextBoxSearchANPN_KeyUp(object sender, KeyEventArgs args)
        {
            if (args.Key == Key.Return)
            {
                if (this.TextBoxSearchANPN.Text.Length >= 1)
                {
                    this.ReleaseLock();
                    this.m_PathologistUI.Save(true);
                    TextSearchHandler textSearchHandler = new TextSearchHandler(this.TextBoxSearchANPN.Text);
                    object            textSearchObject  = textSearchHandler.GetSearchObject();
                    if (textSearchObject is YellowstonePathology.Business.ReportNo)
                    {
                        YellowstonePathology.Business.ReportNo reportNo = (YellowstonePathology.Business.ReportNo)textSearchObject;
                        this.m_PathologistUI.DoReportNoSearch(reportNo.Value);
                    }
                    else if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo)
                    {
                        YellowstonePathology.Business.MasterAccessionNo masterAccessionNo = (YellowstonePathology.Business.MasterAccessionNo)textSearchObject;
                        this.m_PathologistUI.DoMasterAccessionNoSearch(masterAccessionNo.Value);
                    }
                    else if (textSearchObject is YellowstonePathology.Business.PatientName)
                    {
                        YellowstonePathology.Business.PatientName patientName = (YellowstonePathology.Business.PatientName)textSearchObject;
                        this.m_PathologistUI.DoPatientNameSearch(patientName.FirstName, patientName.LastName);
                    }
                }

                if (this.ListViewSearchResults.Items.Count == 1)
                {
                    this.ListViewSearchResults.SelectedIndex = 0;
                }
            }
        }
Ejemplo n.º 4
0
        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);
                    }
                }
            }
        }
Ejemplo n.º 5
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 void TextBoxClientOrderSearch_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         if (this.TextBoxClientOrderSearch.Text.Length >= 1)
         {
             Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(this.TextBoxClientOrderSearch.Text);
             object textSearchObject = textSearchHandler.GetSearchObject();
             if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo)
             {
                 YellowstonePathology.Business.MasterAccessionNo masterAccessionNo = (YellowstonePathology.Business.MasterAccessionNo)textSearchObject;
                 this.m_ClientOrderUI.GetClientOrderListByMasterAccessionNo(masterAccessionNo.Value);
             }
             else if (textSearchObject is YellowstonePathology.Business.PatientName)
             {
                 YellowstonePathology.Business.PatientName patientName = (YellowstonePathology.Business.PatientName)textSearchObject;
                 this.m_ClientOrderUI.GetClientOrderListByPatientName(patientName);
             }
         }
     }
 }