示例#1
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;
                }
            }
        }
示例#3
0
 public void SetFillByPatientName(YellowstonePathology.Business.PatientName patientName)
 {
     this.m_Parameters.Clear();
     this.m_Parameters.Add(patientName.LastName);
     this.m_Parameters.Add(patientName.FirstName);
     this.m_SearchFillEnum = YellowstonePathology.Business.Search.ReportSearchFillEnum.ByPatientName;
 }
示例#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);
                    }
                }
            }
        }
示例#5
0
 public void GetReportSearchListByPatientName(YellowstonePathology.Business.PatientName patientName)
 {
     this.m_ReportSearchList = YellowstonePathology.Business.Gateway.ReportSearchGateway.GetReportSearchListByPatientName(new List <object>()
     {
         patientName.LastName, patientName.FirstName
     });
     this.NotifyPropertyChanged("ReportSearchList");
 }
 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);
             }
         }
     }
 }
示例#7
0
 public void GetClientOrderListByPatientName(YellowstonePathology.Business.PatientName patientName)
 {
     this.m_OrderBrowserListItemCollection = YellowstonePathology.Business.Gateway.ClientOrderGateway.GetOrderBrowserListItemsByPatientName(patientName.LastName, patientName.FirstName);
     this.NotifyPropertyChanged("OrderBrowserListItemCollection");
 }