예제 #1
0
        public YellowstonePathology.Business.Test.Model.TestOrderCollection GetBillableSinglePlexIHCTestOrders()
        {
            List <string> exclusions = new List <string>();

            exclusions.Add("360"); //Kappa ISH
            exclusions.Add("361"); //Lambda ISH

            YellowstonePathology.Business.Test.Model.TestOrderCollection result            = new TestOrderCollection();
            YellowstonePathology.Business.Test.Model.TestCollection      ihcTestCollection = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetIHCTests();

            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this)
            {
                if (testOrder.OrderedAsDual == false)
                {
                    if (testOrder.NoCharge == false)
                    {
                        if (!exclusions.Contains(testOrder.TestId))
                        {
                            if (ihcTestCollection.Exists(testOrder.TestId) == true)
                            {
                                result.Add(testOrder);
                            }
                        }
                    }
                }
            }

            return(result);
        }
예제 #2
0
        public int GetBillableGradeStainCount(bool includeOrderedAsDual)
        {
            int result = 0;

            YellowstonePathology.Business.Test.Model.TestCollection gradedTestCollection = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetGradedTests();

            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this)
            {
                if (testOrder.NoCharge == false)
                {
                    if (gradedTestCollection.Exists(testOrder.TestId) == true)
                    {
                        if (includeOrderedAsDual == true)
                        {
                            result += 1;
                        }
                        else if (includeOrderedAsDual == false)
                        {
                            if (testOrder.OrderedAsDual == false)
                            {
                                result += 1;
                            }
                        }
                    }
                }
            }

            return(result);
        }
예제 #3
0
        public override int GetBillableIHCTestOrderCount()
        {
            int result = 0;

            YellowstonePathology.Business.Test.Model.TestCollection ihcTestCollection = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetIHCTests();

            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this.m_TestOrderCollection)
            {
                if (testOrder.NoCharge == false)
                {
                    if (ihcTestCollection.Exists(testOrder.TestId) == true)
                    {
                        if (this.m_StainResultCollection.TestOrderExists(testOrder.TestOrderId) == true)
                        {
                            YellowstonePathology.Business.SpecialStain.StainResultItem stainResult = this.m_StainResultCollection.GetStainResult(testOrder.TestOrderId);
                            if (stainResult.IsGraded == false)
                            {
                                result += 1;
                            }
                        }
                    }
                }
            }
            return(result);
        }
예제 #4
0
        public BillableObjectStains(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, string reportNo)
            : base(accessionOrder, reportNo)
        {
            this.m_StainSpecimenCollection = StainSpecimenCollection.GetCollection(accessionOrder, reportNo);

            this.m_IhcTestCollection          = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetIHCTests();
            this.m_GradedTestCollection       = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetGradedTests();
            this.m_CytochemicalTestCollection = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetCytochemicalTests();
            this.m_CytochemicalForMicroorganismsTestCollection = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetCytochemicalForMicroorganismsTests();
        }
예제 #5
0
        public BillableObjectStains(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, string reportNo)
            : base(accessionOrder, reportNo)
        {
            this.m_StainSpecimenCollection = StainSpecimenCollection.GetCollection(accessionOrder, reportNo);

            this.m_IhcTestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetIHCTests();
            this.m_GradedTestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetGradedTests();
            this.m_CytochemicalTestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetCytochemicalTests();
            this.m_CytochemicalForMicroorganismsTestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetCytochemicalForMicroorganismsTests();
        }
예제 #6
0
        public Accept()
        {
            this.m_TestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            this.m_Rule           = new YellowstonePathology.Business.Rules.Rule();

            this.m_Rule.ActionList.Add(DoesUserHavePermission);
            this.m_Rule.ActionList.Add(HaltIfPanelOrderIsAccepted);
            this.m_Rule.ActionList.Add(HaltIfPanelSetOrderIsFinal);
            this.m_Rule.ActionList.Add(HaltIfAnyResultsAreEmpty);
            this.m_Rule.ActionList.Add(PatientIsLinked);
        }
예제 #7
0
        public Accept()
        {
            this.m_TestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            this.m_Rule = new YellowstonePathology.Business.Rules.Rule();

            this.m_Rule.ActionList.Add(DoesUserHavePermission);
            this.m_Rule.ActionList.Add(HaltIfPanelOrderIsAccepted);
            this.m_Rule.ActionList.Add(HaltIfPanelSetOrderIsFinal);
            this.m_Rule.ActionList.Add(HaltIfAnyResultsAreEmpty);
            this.m_Rule.ActionList.Add(PatientIsLinked);
        }
예제 #8
0
        private bool HandleRecutComment(YellowstonePathology.Business.Test.Model.TestCollection selectedTests)
        {
            bool result = true;

            if (selectedTests.Exists("150") == true)
            {
                if (string.IsNullOrEmpty(this.m_PanelOrderComment) == true)
                {
                    result = false;
                    MessageBox.Show("To better track the reason for recuts a comment is required. Click on the Recut Comment link to the right of the text box for canned comments.");
                }
            }
            return(result);
        }
예제 #9
0
        public YellowstonePathology.Business.Test.Model.TestOrderCollection GetBillableGradeStains(bool includeOrderedAsDual)
        {
            YellowstonePathology.Business.Test.Model.TestOrderCollection result = new TestOrderCollection();
            YellowstonePathology.Business.Test.Model.TestCollection      gradedTestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetGradedTests();

            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this)
            {
                if (gradedTestCollection.Exists(testOrder.TestId) == true && testOrder.OrderedAsDual == includeOrderedAsDual)
                {
                    result.Add(testOrder);
                }
            }

            return(result);
        }
예제 #10
0
        public YellowstonePathology.Business.Test.Model.TestOrderCollection GetBillableCytochemicalStainsForMicroorganisms(bool includeOrderedAsDual)
        {
            YellowstonePathology.Business.Test.Model.TestOrderCollection result = new TestOrderCollection();
            YellowstonePathology.Business.Test.Model.TestCollection      resultTestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetCytochemicalForMicroorganismsTests();

            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this)
            {
                if (resultTestCollection.Exists(testOrder.TestId) == true && testOrder.OrderedAsDual == includeOrderedAsDual)
                {
                    result.Add(testOrder);
                }
            }

            return(result);
        }
        public StainResultItemCollection GetGradedStains(YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection)
        {
            StainResultItemCollection result = new StainResultItemCollection();

            YellowstonePathology.Business.Test.Model.TestCollection allTests = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            foreach (StainResultItem stainresult in this)
            {
                YellowstonePathology.Business.Test.Model.TestOrder  testOrder  = testOrderCollection.Get(stainresult.TestOrderId);
                YellowstonePathology.Business.Test.Model.GradedTest gradedTest = allTests.GetTest(testOrder.TestId) as YellowstonePathology.Business.Test.Model.GradedTest;
                if (gradedTest != null)
                {
                    result.Add(stainresult);
                }
            }
            return(result);
        }
예제 #12
0
        public bool HasTestRequiringAcknowledgement()
        {
            bool result = false;

            YellowstonePathology.Business.Test.Model.TestCollection testCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            foreach (TestOrder testOrder in this)
            {
                YellowstonePathology.Business.Test.Model.Test test = testCollection.GetTest(testOrder.TestId);
                if (test.NeedsAcknowledgement == true)
                {
                    result = true;
                    break;
                }
            }
            return(result);
        }
예제 #13
0
        public int GetBillableGradedDualStainCount()
        {
            int result = 0;

            YellowstonePathology.Business.Test.Model.TestCollection gradedTestCollection = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetGradedTests();

            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this)
            {
                if (gradedTestCollection.Exists(testOrder.TestId) == true && testOrder.OrderedAsDual == true)
                {
                    result += 1;
                }
            }

            return(result);
        }
예제 #14
0
        public override int GetBillableGradeStainCount(bool includeOrderedAsDual)
        {
            int result = 0;

            YellowstonePathology.Business.Test.Model.TestCollection gradedTestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetGradedTests();

            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this.m_TestOrderCollection)
            {
                if (testOrder.NoCharge == false)
                {
                    if (gradedTestCollection.Exists(testOrder.TestId) == true)
                    {
                        if (includeOrderedAsDual == true)
                        {
                            result += 1;
                        }
                        else if (includeOrderedAsDual == false)
                        {
                            if (testOrder.OrderedAsDual == false)
                            {
                                result += 1;
                            }
                        }
                    }
                    else if (this.m_StainResultCollection.Exists(testOrder.TestOrderId) == true)
                    {
                        YellowstonePathology.Business.SpecialStain.StainResultItem stainResult = this.m_StainResultCollection.GetStainResult(testOrder.TestOrderId);
                        if (stainResult.IsGraded == true)
                        {
                            if (includeOrderedAsDual == true)
                            {
                                result += 1;
                            }
                            else if (includeOrderedAsDual == false)
                            {
                                if (testOrder.OrderedAsDual == false)
                                {
                                    result += 1;
                                }
                            }
                        }
                    }
                }
            }

            return(result);
        }
예제 #15
0
        public int GetCytochemicalForMicroorganismsStainCount()
        {
            int result = 0;

            YellowstonePathology.Business.Test.Model.TestCollection cytochemicalForMicroorganismsTestCollection = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetCytochemicalForMicroorganismsTests();
            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this)
            {
                if (testOrder.NoCharge == false)
                {
                    if (cytochemicalForMicroorganismsTestCollection.Exists(testOrder.TestId) == true)
                    {
                        result += 1;
                    }
                }
            }
            return(result);
        }
예제 #16
0
        public int GetOrderedAsDualCount()
        {
            int result = 0;

            YellowstonePathology.Business.Test.Model.TestCollection ihcTestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetIHCTests();

            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this)
            {
                if (testOrder.NoCharge == false)
                {
                    if (testOrder.OrderedAsDual == true)
                    {
                        result += 1;
                    }
                }
            }
            return(result);
        }
예제 #17
0
        public int GetChargeableIHCTestOrderCount()
        {
            int result = 0;

            YellowstonePathology.Business.Test.Model.TestCollection ihcTestCollection = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetIHCTests();

            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this)
            {
                if (testOrder.NoCharge == false)
                {
                    if (ihcTestCollection.Exists(testOrder.TestId) == true)
                    {
                        result += 1;
                    }
                }
            }
            return(result);
        }
        public void SetTestOrdersCancelledComment()
        {
            YellowstonePathology.Business.Test.Model.TestCollection allTests = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            StringBuilder taskOrderDetailDescription = new StringBuilder();

            taskOrderDetailDescription.AppendLine("The following stains have been cancelled:");

            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this.m_CancelledTestOrderCollection)
            {
                YellowstonePathology.Business.Test.Model.Test test = allTests.GetTest(testOrder.TestId);
                if (test.NeedsAcknowledgement == true)
                {
                    taskOrderDetailDescription.AppendLine(testOrder.DisplayString);
                }
            }
            this.m_TaskOrderDetailCancelledTestOrders.Description = taskOrderDetailDescription.ToString().Trim();
            this.m_TaskOrderDetailCancelledTestOrders.Comment     = this.m_TaskOrderDetailComment;
        }
예제 #19
0
 public YellowstonePathology.Business.Test.Model.TestCollection GetSelectedTests()
 {
     YellowstonePathology.Business.Test.Model.TestCollection result = new YellowstonePathology.Business.Test.Model.TestCollection();
     foreach (XElement element in this.m_OrderItemElementList)
     {
         if (element.Element("ItemType").Value != "Group")
         {
             if (element.Element("Order").Value == "True")
             {
                 string testId = element.Element("Id").Value;
                 YellowstonePathology.Business.Test.Model.Test test = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone(testId);
                 string testOrderComment = element.Element("Comment").Value;
                 test.OrderComment = testOrderComment;
                 result.Add(test);
             }
         }
     }
     return(result);
 }
예제 #20
0
        private void ButtonOrder_Click(object sender, RoutedEventArgs e)
        {
            Business.Stain.Model.StainCollection stainsToOrder = this.GetStainsToOrder();

            ((MainWindow)Application.Current.MainWindow).MoveKeyboardInputToNext();

            YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots = this.m_AliquotAndStainOrderView.GetSelectedAliquots();
            if (selectedAliquots.Count > 0)
            {
                YellowstonePathology.Business.Test.Model.TestCollection selectedTests = stainsToOrder.GetTestCollection();
                this.GetNonStainTestsToOrder(selectedTests);

                if (selectedTests.Count > 0)
                {
                    if (this.HandleRecutComment(selectedTests) == true)
                    {
                        this.HandleOrderingTests(selectedAliquots, selectedTests);

                        this.m_StainAcknowledgementTaskOrderVisitor.TaskOrderDetailComment = this.m_PanelOrderComment;
                        this.m_AccessionOrder.TakeATrip(this.m_StainAcknowledgementTaskOrderVisitor);

                        this.ClearCheckBoxes();

                        this.m_AliquotAndStainOrderView.Refresh(false, this.m_PanelSetOrder);
                        this.NotifyPropertyChanged("AliquotAndStainOrderView");

                        this.m_PanelOrderComment = null;
                        this.NotifyPropertyChanged("PanelOrderComment");

                        this.m_RecutComment = null;
                        this.NotifyPropertyChanged("RecutComment");
                    }
                }
                else
                {
                    MessageBox.Show("There are no tests selected.");
                }
            }
            else
            {
                MessageBox.Show("There are no aliquots selected.");
            }
        }
예제 #21
0
 public YellowstonePathology.Business.Test.Model.TestCollection GetSelectedTests()
 {
     YellowstonePathology.Business.Test.Model.TestCollection testCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
     YellowstonePathology.Business.Test.Model.TestCollection result         = new YellowstonePathology.Business.Test.Model.TestCollection();
     foreach (XElement element in this.m_OrderItemElementList)
     {
         if (element.Element("ItemType").Value == "Test")
         {
             if (element.Element("Order").Value == "True")
             {
                 int testId = Convert.ToInt32(element.Element("Id").Value);
                 YellowstonePathology.Business.Test.Model.Test test = testCollection.GetTest(testId);
                 string testOrderComment = element.Element("Comment").Value;
                 test.OrderComment = testOrderComment;
                 result.Add(test);
             }
         }
     }
     return(result);
 }
예제 #22
0
 public YellowstonePathology.Business.Test.Model.TestCollection GetSelectedTests()
 {
     YellowstonePathology.Business.Test.Model.TestCollection testCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
     YellowstonePathology.Business.Test.Model.TestCollection result = new YellowstonePathology.Business.Test.Model.TestCollection();
     foreach (XElement element in this.m_OrderItemElementList)
     {
         if (element.Element("ItemType").Value == "Test")
         {
             if (element.Element("Order").Value == "True")
             {
                 int testId = Convert.ToInt32(element.Element("Id").Value);
                 YellowstonePathology.Business.Test.Model.Test test = testCollection.GetTest(testId);
                 string testOrderComment = element.Element("Comment").Value;
                 test.OrderComment = testOrderComment;
                 result.Add(test);
             }
         }
     }
     return result;
 }
예제 #23
0
        public YellowstonePathology.Business.Test.Model.TestOrderCollection GetBillableSinglePlexIHCTestOrders()
        {
            YellowstonePathology.Business.Test.Model.TestOrderCollection result            = new TestOrderCollection();
            YellowstonePathology.Business.Test.Model.TestCollection      ihcTestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetIHCTests();

            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in this)
            {
                if (testOrder.OrderedAsDual == false)
                {
                    if (testOrder.NoCharge == false)
                    {
                        if (ihcTestCollection.Exists(testOrder.TestId) == true)
                        {
                            result.Add(testOrder);
                        }
                    }
                }
            }

            return(result);
        }
예제 #24
0
        public PrintBlockPage(YellowstonePathology.Business.User.SystemIdentity systemIdentity,
                              YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
                              YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder)
        {
            this.m_SystemIdentity = systemIdentity;
            this.m_AccessionOrder = accessionOrder;

            this.m_SpecimenOrder = specimenOrder;

            this.SetReportNoToUse();

            this.m_CaseNotesDocument      = YellowstonePathology.Business.Gateway.XmlGateway.GetOrderComments(this.m_AccessionOrder.MasterAccessionNo);
            this.m_DocumentViewer         = new DocumentWorkspace();
            this.m_CaseDocumentCollection = new YellowstonePathology.Business.Document.CaseDocumentCollection(this.m_AccessionOrder, this.m_ReportNoToUse);

            this.m_GrossBlockManagementView = new Business.View.GrossBlockManagementView(this.m_AccessionOrder, this.m_CaseNotesDocument, this.m_SpecimenOrder);
            this.SetupSpecimenView();

            this.m_BarcodeScanPort = YellowstonePathology.Business.BarcodeScanning.BarcodeScanPort.Instance;

            this.m_TestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            this.m_HandETest      = this.m_TestCollection.GetTest(49);
            this.m_IronTest       = this.m_TestCollection.GetTest(115);
            this.m_HPyloriTest    = this.m_TestCollection.GetTest(107);
            this.m_FrozenTest     = this.m_TestCollection.GetTest(45);
            this.Aliquots         = 1;

            this.m_ListBoxBlocksMouseDownTimer          = new System.Windows.Threading.DispatcherTimer();
            this.m_ListBoxBlocksMouseDownTimer.Interval = new TimeSpan(0, 0, 0, 0, 750);
            this.m_ListBoxBlocksMouseDownTimer.Tick    += new EventHandler(ListBoxBlocksMouseDownTimer_Tick);

            InitializeComponent();
            DataContext = this;

            this.DocumentViewer.Content = this.m_DocumentViewer;

            Loaded   += new RoutedEventHandler(PrintBlockPage_Loaded);
            Unloaded += new RoutedEventHandler(PrintBlockPage_Unloaded);
        }
예제 #25
0
        public PrintBlockPage(YellowstonePathology.Business.User.SystemIdentity systemIdentity,
			YellowstonePathology.Business.Test.AccessionOrder accessionOrder,            
			YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder)
        {
            this.m_SystemIdentity = systemIdentity;
            this.m_AccessionOrder = accessionOrder;

            this.m_SpecimenOrder = specimenOrder;

            this.SetReportNoToUse();

            this.m_CaseNotesDocument = YellowstonePathology.Business.Gateway.XmlGateway.GetOrderComments(this.m_AccessionOrder.MasterAccessionNo);
            this.m_DocumentViewer = new DocumentWorkspace();
            this.m_CaseDocumentCollection = new YellowstonePathology.Business.Document.CaseDocumentCollection(this.m_AccessionOrder, this.m_ReportNoToUse);

            this.m_GrossBlockManagementView = new Business.View.GrossBlockManagementView(this.m_AccessionOrder, this.m_CaseNotesDocument, this.m_SpecimenOrder);
            this.SetupSpecimenView();

            this.m_BarcodeScanPort = YellowstonePathology.Business.BarcodeScanning.BarcodeScanPort.Instance;

            this.m_TestCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            this.m_HandETest = this.m_TestCollection.GetTest(49);
            this.m_IronTest = this.m_TestCollection.GetTest(115);
            this.m_HPyloriTest = this.m_TestCollection.GetTest(107);
            this.m_FrozenTest = this.m_TestCollection.GetTest(45);
            this.Aliquots = 1;

            this.m_ListBoxBlocksMouseDownTimer = new System.Windows.Threading.DispatcherTimer();
            this.m_ListBoxBlocksMouseDownTimer.Interval = new TimeSpan(0, 0, 0, 0, 750);
            this.m_ListBoxBlocksMouseDownTimer.Tick += new EventHandler(ListBoxBlocksMouseDownTimer_Tick);

            InitializeComponent();
            DataContext = this;

            this.DocumentViewer.Content = this.m_DocumentViewer;

            Loaded += new RoutedEventHandler(PrintBlockPage_Loaded);
            Unloaded += new RoutedEventHandler(PrintBlockPage_Unloaded);
        }
        public AliquotAndStainOrderPage(YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
                                        YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder)
        {
            this.m_AllTests       = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            this.m_AccessionOrder = accessionOrder;
            this.m_PanelSetOrder  = panelSetOrder;

            this.m_EmbeddingInstructionList = new Business.Specimen.Model.EmbeddingInstructionList();

            this.m_AliquotAndStainOrderView = new AliquotAndStainOrderView(accessionOrder, panelSetOrder);

            this.m_PrintMate      = new Business.Common.PrintMate();
            this.m_PageHeaderText = this.m_AccessionOrder.MasterAccessionNo + ": " + this.m_AccessionOrder.PFirstName + " " + this.m_AccessionOrder.PLastName;

            this.m_StainAcknowledgementTaskOrderVisitor = new Business.Visitor.StainAcknowledgementTaskOrderVisitor(this.m_PanelSetOrder);

            InitializeComponent();

            this.DataContext = this;
            this.Loaded     += new RoutedEventHandler(StainOrderPage_Loaded);
            Unloaded        += AliquotAndStainOrderPage_Unloaded;
        }
        public AliquotAndStainOrderPage(YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
			YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder)
        {
            this.m_AllTests = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            this.m_AccessionOrder = accessionOrder;
            this.m_PanelSetOrder = panelSetOrder;

            this.m_EmbeddingInstructionList = new Business.Specimen.Model.EmbeddingInstructionList();

            this.m_AliquotAndStainOrderView = new AliquotAndStainOrderView(accessionOrder, panelSetOrder);

            this.m_PrintMate = new Business.Common.PrintMate();
            this.m_PageHeaderText = this.m_AccessionOrder.MasterAccessionNo + ": " + this.m_AccessionOrder.PFirstName + " " + this.m_AccessionOrder.PLastName;

            this.m_StainAcknowledgementTaskOrderVisitor = new Business.Visitor.StainAcknowledgementTaskOrderVisitor(this.m_PanelSetOrder);

            InitializeComponent();

            this.DataContext = this;
            this.Loaded += new RoutedEventHandler(StainOrderPage_Loaded);
            Unloaded += AliquotAndStainOrderPage_Unloaded;
        }
        private void ButtonDelete_Click(object sender, RoutedEventArgs e)
        {
            List <string> selectedSlideOrderIds = this.m_AliquotAndStainOrderView.GetSelectedSlideOrderIds();

            foreach (string slideOrderId in selectedSlideOrderIds)
            {
                YellowstonePathology.Business.Slide.Model.SlideOrder          slideOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSlideOrder(slideOrderId);
                YellowstonePathology.Business.Visitor.RemoveSlideOrderVisitor removeSlideOrderVisitor = new Business.Visitor.RemoveSlideOrderVisitor(slideOrder);
                this.m_AccessionOrder.TakeATrip(removeSlideOrderVisitor);
            }

            YellowstonePathology.Business.Test.Model.TestOrderCollection selectedTestOrders = this.m_AliquotAndStainOrderView.GetSelectedTestOrders();
            YellowstonePathology.Business.Test.Model.TestCollection      allTests           = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in selectedTestOrders)
            {
                YellowstonePathology.Business.Visitor.RemoveTestOrderVisitor removeTestOrderVisitor = new Business.Visitor.RemoveTestOrderVisitor(testOrder.TestOrderId);
                this.m_AccessionOrder.TakeATrip(removeTestOrderVisitor);

                YellowstonePathology.Business.Test.Model.Test test = allTests.GetTest(testOrder.TestId);
                if (test.NeedsAcknowledgement == true)
                {
                    this.m_StainAcknowledgementTaskOrderVisitor.RemoveTestOrder(testOrder);
                }
            }
            this.m_AccessionOrder.TakeATrip(this.m_StainAcknowledgementTaskOrderVisitor);

            YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots = this.m_AliquotAndStainOrderView.GetSelectedAliquots();
            foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in selectedAliquots)
            {
                YellowstonePathology.Business.Visitor.RemoveAliquotOrderVisitor removeAliquotOrderVisitor = new Business.Visitor.RemoveAliquotOrderVisitor(aliquotOrder);
                this.m_AccessionOrder.TakeATrip(removeAliquotOrderVisitor);
                this.m_AccessionOrder.SpecimenOrderCollection.SetAliquotRequestCount();
            }

            //YellowstonePathology.Business.Persistence.DocumentGateway.Instance.SubmitChanges(this.m_AccessionOrder, false);
            this.m_AliquotAndStainOrderView.Refresh(true, this.m_PanelSetOrder);
            this.NotifyPropertyChanged("AliquotAndStainOrderView");
        }
예제 #29
0
        public List <YellowstonePathology.Business.Test.Model.DualStain> GetSelectedDualStains()
        {
            YellowstonePathology.Business.Test.Model.TestCollection   testCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            List <YellowstonePathology.Business.Test.Model.DualStain> result         = new List <YellowstonePathology.Business.Test.Model.DualStain>();

            YellowstonePathology.Business.Test.Model.DualStainCollection dualStainCollection = YellowstonePathology.Business.Test.Model.DualStainCollection.GetAll();

            foreach (XElement element in this.m_OrderItemElementList)
            {
                if (element.Element("ItemType").Value == "DualStain")
                {
                    if (element.Element("Order").Value == "True")
                    {
                        int testId = Convert.ToInt32(element.Element("Id").Value);
                        YellowstonePathology.Business.Test.Model.DualStain dualStain = dualStainCollection.Get(testId);
                        string testOrderComment = element.Element("Comment").Value;
                        dualStain.OrderComment = testOrderComment;
                        result.Add(dualStain);
                    }
                }
            }
            return(result);
        }
예제 #30
0
        private void ButtonOrder_Click(object sender, RoutedEventArgs e)
        {
            ((MainWindow)Application.Current.MainWindow).MoveKeyboardInputToNext();

            YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots = this.m_AliquotAndStainOrderView.GetSelectedAliquots();
            if (selectedAliquots.Count > 0)
            {
                YellowstonePathology.Business.Test.Model.TestCollection   selectedTests      = this.m_OrderItemView.GetSelectedTests();
                List <YellowstonePathology.Business.Test.Model.DualStain> selectedDualStains = this.m_OrderItemView.GetSelectedDualStains();

                if (selectedTests.Count > 0 || selectedDualStains.Count > 0)
                {
                    this.HandleOrderingTests(selectedAliquots, selectedTests);
                    this.HandleOrderingDualStains(selectedAliquots, selectedDualStains);

                    this.m_StainAcknowledgementTaskOrderVisitor.TaskOrderDetailComment = this.m_PanelOrderComment;
                    this.m_AccessionOrder.TakeATrip(this.m_StainAcknowledgementTaskOrderVisitor);

                    this.m_OrderItemView.ClearSelectedItems();
                    this.NotifyPropertyChanged("OrderItemView");

                    this.m_AliquotAndStainOrderView.Refresh(false, this.m_PanelSetOrder);
                    this.NotifyPropertyChanged("AliquotAndStainOrderView");

                    this.m_PanelOrderComment = null;
                    this.NotifyPropertyChanged("PanelOrderComment");
                }
                else
                {
                    MessageBox.Show("There are no tests selected.");
                }
            }
            else
            {
                MessageBox.Show("There are no aliquots selected.");
            }
        }
예제 #31
0
 public Panel()
 {
     this.m_TestCollection = new YellowstonePathology.Business.Test.Model.TestCollection();
     this.m_AcknowledgeOnOrder = false;
     this.m_PanelOrderClassName = typeof(YellowstonePathology.Business.Test.PanelOrder).AssemblyQualifiedName;
 }
예제 #32
0
        public override void SetPanelSetOrderCPTCodes()
        {
            if (this.IsOkToSet() == true)
            {
                this.SetERPRPQRSCodes();

                YellowstonePathology.Business.Test.Model.TestCollection testCollection = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
                foreach (StainSpecimen stainSpecimen in this.m_StainSpecimenCollection)
                {
                    foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in stainSpecimen.TestOrderCollection)
                    {
                        YellowstonePathology.Business.Test.Model.Test test = testCollection.GetTest(testOrder.TestId);
                        if (test.IsBillable == true)
                        {
                            if (this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.SystemGeneratedReferenceIdExists(testOrder.TestOrderId) == false)
                            {
                                string codeableType = test.GetCodeableType(testOrder.OrderedAsDual);
                                YellowstonePathology.Business.Test.PanelSetOrderCPTCode panelSetOrderCPTCode = this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.GetNextItem(this.m_PanelSetOrder.ReportNo);
                                panelSetOrderCPTCode.Quantity            = 1;
                                panelSetOrderCPTCode.CodeableType        = codeableType;
                                panelSetOrderCPTCode.CodeableDescription = "Specimen " + stainSpecimen.SpecimenOrder.SpecimenNumber + ": " + testOrder.TestName;
                                panelSetOrderCPTCode.EntryType           = YellowstonePathology.Business.Billing.Model.PanelSetOrderCPTCodeEntryType.SystemGenerated;
                                panelSetOrderCPTCode.SpecimenOrderId     = stainSpecimen.SpecimenOrder.SpecimenOrderId;
                                panelSetOrderCPTCode.ClientId            = this.m_AccessionOrder.ClientId;
                                panelSetOrderCPTCode.ReferenceId         = testOrder.TestOrderId;


                                if (this.m_PanelSetOrder.PanelSetId != 31 && this.m_PanelSetOrder.PanelSetId != 201)  //Not technical only
                                {
                                    YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder) this.m_PanelSetOrder;
                                    if (panelSetOrderSurgical.SurgicalSpecimenCollection.HasStainResult(testOrder.TestOrderId) == true)
                                    {
                                        YellowstonePathology.Business.SpecialStain.StainResultItem stainResult = panelSetOrderSurgical.SurgicalSpecimenCollection.GetStainResult(testOrder.TestOrderId);
                                        YellowstonePathology.Business.Billing.Model.CptCode        cptCode     = null;

                                        if (stainResult.IsGraded == true)
                                        {
                                            cptCode = test.GetGradedCptCode(false);
                                            panelSetOrderCPTCode.CPTCode  = cptCode.Code;
                                            panelSetOrderCPTCode.CodeType = cptCode.CodeType.ToString();
                                        }
                                        else
                                        {
                                            cptCode = test.GetCptCode(false);
                                            panelSetOrderCPTCode.CPTCode  = cptCode.Code;
                                            panelSetOrderCPTCode.CodeType = cptCode.CodeType.ToString();
                                        }
                                    }
                                    else
                                    {
                                        panelSetOrderCPTCode.CPTCode = test.GetCptCode(false).Code;
                                    }
                                }
                                else //Is technical only
                                {
                                    YellowstonePathology.Business.Billing.Model.CptCode cptCode = test.GetCptCode(true);
                                    panelSetOrderCPTCode.CPTCode  = cptCode.Code;
                                    panelSetOrderCPTCode.CodeType = cptCode.CodeType.ToString();
                                }

                                this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.Add(panelSetOrderCPTCode);
                            }
                        }
                    }
                }
            }
        }
예제 #33
0
 public Panel()
 {
     this.m_TestCollection      = new YellowstonePathology.Business.Test.Model.TestCollection();
     this.m_AcknowledgeOnOrder  = false;
     this.m_PanelOrderClassName = typeof(YellowstonePathology.Business.Test.PanelOrder).AssemblyQualifiedName;
 }
예제 #34
0
        private void HandleOrderingTests(YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots, YellowstonePathology.Business.Test.Model.TestCollection selectedTests)
        {
            foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in selectedAliquots)
            {
                foreach (YellowstonePathology.Business.Test.Model.Test test in selectedTests)
                {
                    bool orderAsDual        = false;
                    bool acknowledgeOnOrder = false;

                    YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitorTest = new Business.Visitor.OrderTestVisitor(this.m_PanelSetOrder.ReportNo, test, test.OrderComment, this.m_PanelOrderComment, orderAsDual, aliquotOrder, acknowledgeOnOrder, false, this.m_AccessionOrder.TaskOrderCollection);
                    this.m_AccessionOrder.TakeATrip(orderTestVisitorTest);
                    this.m_StainAcknowledgementTaskOrderVisitor.AddTestOrder(orderTestVisitorTest.TestOrder);
                }
            }
        }