Exemplo n.º 1
0
        private void ListBoxSlides_MouseUp(object sender, MouseButtonEventArgs e)
        {
            this.m_ListBoxSlidesMouseDownTimer.Stop();
            if (this.ListBoxSlideOrderCollection.SelectedItems.Count != 0)
            {
                YellowstonePathology.Business.Slide.Model.SlideOrder slideOrder = (YellowstonePathology.Business.Slide.Model.SlideOrder) this.ListBoxSlideOrderCollection.SelectedItem;
                if (slideOrder.Status == YellowstonePathology.Business.Slide.Model.SlideStatusEnum.Created.ToString())
                {
                    if (slideOrder.LabelType == YellowstonePathology.Business.Slide.Model.SlideLabelTypeEnum.DirectPrint.ToString())
                    {
                        this.PrintSlide(slideOrder);
                        slideOrder.Status  = YellowstonePathology.Business.Slide.Model.SlideStatusEnum.Printed.ToString();
                        slideOrder.Printed = true;
                    }
                    else if (slideOrder.LabelType == YellowstonePathology.Business.Slide.Model.SlideLabelTypeEnum.PaperLabel.ToString())
                    {
                        slideOrder.Status  = YellowstonePathology.Business.Slide.Model.SlideStatusEnum.Printed.ToString();
                        slideOrder.Printed = true;

                        YellowstonePathology.Business.Label.Model.HistologySlidePaperLabel histologySlidePaperLabel = new Business.Label.Model.HistologySlidePaperLabel(slideOrder.SlideOrderId, slideOrder.ReportNo, slideOrder.Label, slideOrder.PatientLastName, slideOrder.TestAbbreviation, slideOrder.AccessioningFacility);
                        this.m_HistologySlidePaperLabelPrinter.Queue.Enqueue(histologySlidePaperLabel);
                        this.ShowTestOrderSelectionPage(this, new CustomEventArgs.AliquotOrderReturnEventArgs(this.m_AliquotOrder));
                    }
                }
                else if (slideOrder.Status == YellowstonePathology.Business.Slide.Model.SlideStatusEnum.ClientAccessioned.ToString())
                {
                    MessageBox.Show("This is a client accessioned slide and cannot be printed.");
                }

                Business.HL7View.VentanaStainOrder ventanaStainOrder = new Business.HL7View.VentanaStainOrder();
                ventanaStainOrder.HandleOrder(this.m_AccessionOrder, slideOrder);
                this.NotifyPropertyChanged(string.Empty);
            }
        }
Exemplo n.º 2
0
        public void PrintLabels(Business.Test.AccessionOrder accessionOrder, Business.Test.AliquotOrder aliquotOrder)
        {
            Business.Test.Model.Test kappa  = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("360"); // KappaByISH();
            Business.Test.Model.Test lambda = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("361"); // LambdaByISH();
            Business.Test.Model.Test u6     = YellowstonePathology.Business.Test.Model.TestCollectionInstance.GetClone("383"); // U6();

            //add test order that need to be ordered automatically
            if (accessionOrder.PanelSetOrderCollection.DoesStainOrderExist(kappa.TestId) == true && accessionOrder.PanelSetOrderCollection.DoesStainOrderExist(lambda.TestId) == true)
            {
                if (accessionOrder.PanelSetOrderCollection.DoesStainOrderExist(u6.TestId) == false)
                {
                    Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrderByTestId(kappa.TestId);
                    YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(panelSetOrder.ReportNo, u6, null, null, false, aliquotOrder, false, false, accessionOrder.TaskOrderCollection);
                    accessionOrder.TakeATrip(orderTestVisitor);
                    this.Add(new TestOrderPanelSetOrderView(panelSetOrder, orderTestVisitor.TestOrder));
                }
            }

            //add slides and print.
            foreach (TestOrderPanelSetOrderView item in this)
            {
                Business.Test.Model.TestOrder testOrder = accessionOrder.PanelSetOrderCollection.GetTestOrderByTestOrderId(item.TestOrderId);
                if (testOrder.SlideOrderCollection.Count == 0)
                {
                    YellowstonePathology.Business.Visitor.AddSlideOrderVisitor addSlideOrderVisitor = new Business.Visitor.AddSlideOrderVisitor(aliquotOrder, testOrder);
                    accessionOrder.TakeATrip(addSlideOrderVisitor);

                    Business.HL7View.VentanaStainOrder ventanaStainOrder = new Business.HL7View.VentanaStainOrder();
                    ventanaStainOrder.HandleOrder(accessionOrder, addSlideOrderVisitor.NewSlideOrder);
                }
            }
        }
Exemplo n.º 3
0
        private void SlideOptionsPage_PrintPaperLabel(object sender, CustomEventArgs.SlideOrderReturnEventArgs eventArgs)
        {
            Business.HL7View.VentanaStainOrder ventanaStainOrder = new Business.HL7View.VentanaStainOrder();
            ventanaStainOrder.HandleOrder(this.m_AccessionOrder, eventArgs.SlideOrder);

            this.PrintPaperLabel(eventArgs.SlideOrder);
            this.m_PageNavigator.Navigate(this);
        }
        private void MenuItemShowVentanaOrder_Click(object sender, RoutedEventArgs e)
        {
            MenuItem menuItem = (MenuItem)sender;
            XElement xElement = XElement.Parse(menuItem.Tag.ToString());

            Business.HL7View.VentanaStainOrder ventanaStainOrder = new Business.HL7View.VentanaStainOrder();
            string testOrderId  = xElement.Element("TestOrderId").Value;
            string slideOrderId = xElement.Element("SlideOrder").Element("SlideOrderId").Value;
            string result       = ventanaStainOrder.Build(this.m_AccessionOrder, testOrderId, slideOrderId);

            MessageBox.Show(result);
        }
        private void MenuItemSendVentanaOrder_Click(object sender, RoutedEventArgs e)
        {
            MenuItem menuItem = (MenuItem)sender;
            XElement xElement = XElement.Parse(menuItem.Tag.ToString());

            string slideOrderId = xElement.Element("SlideOrderId").Value;

            Business.OrderIdParser orderIdParser = new Business.OrderIdParser(slideOrderId);

            Business.Test.AccessionOrder       ao         = Business.Persistence.DocumentGateway.Instance.GetAccessionOrderByMasterAccessionNo(orderIdParser.MasterAccessionNo);
            Business.Slide.Model.SlideOrder    slideOrder = ao.SpecimenOrderCollection.GetSlideOrder(slideOrderId);
            Business.HL7View.VentanaStainOrder vo         = new Business.HL7View.VentanaStainOrder();
            vo.HandleOrder(ao, slideOrder);

            MessageBox.Show("The order has been sent.");
        }