private void ButtonPrintLabels_Click(object sender, RoutedEventArgs e)
        {
            this.m_AliquotAndStainOrderView.SetEmbeddingComments();
            YellowstonePathology.Business.Test.AliquotOrderCollection     selectedAliquots    = this.m_AliquotAndStainOrderView.GetSelectedAliquots();
            YellowstonePathology.Business.Label.Model.AliquotOrderPrinter aliquotOrderPrinter = new Business.Label.Model.AliquotOrderPrinter(selectedAliquots, this.m_AccessionOrder);

            if (this.m_AccessionOrder.SpecimenOrderCollection.HasBlocks() == true && string.IsNullOrEmpty(this.m_AccessionOrder.CassetteColor))
            {
                MessageBox.Show("You must select the Cassette Color before printing.");
                return;
            }

            if (this.m_AccessionOrder.SpecimenOrderCollection.HasCellBlocks() == true && string.IsNullOrEmpty(this.m_AccessionOrder.CassetteColor))
            {
                MessageBox.Show("You must select the Cassette Color before printing.");
                return;
            }

            aliquotOrderPrinter.Print();
            this.m_AliquotAndStainOrderView.SetAliquotChecks(false);

            this.PrintSelectedSlides();

            MessageBox.Show("The selected items have been submitted to the printer.");
        }
Beispiel #2
0
 public BlockLabelPrinter(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
 {
     this.m_BlockLabelQueue = new Queue <Business.Label.Model.HistologyBlockPaperZPLLabel>();
     foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in aliquotOrderCollection)
     {
         if (aliquotOrder.IsBlock() == true)
         {
             if (aliquotOrder.LabelType == YellowstonePathology.Business.Specimen.Model.AliquotLabelType.PaperLabel == true)
             {
                 YellowstonePathology.Business.OrderIdParser orderIdParser = new OrderIdParser(accessionOrder.MasterAccessionNo);
                 if (orderIdParser.IsLegacyMasterAccessionNo == false)
                 {
                     string initials = Business.Helper.PatientHelper.GetPatientInitials(accessionOrder.PFirstName, accessionOrder.PLastName);
                     Business.Label.Model.HistologyBlockPaperZPLLabel blockLabel = new Business.Label.Model.HistologyBlockPaperZPLLabel(aliquotOrder.AliquotOrderId, accessionOrder.PLastName, accessionOrder.PFirstName, aliquotOrder.Label, accessionOrder.MasterAccessionNo);
                     this.m_BlockLabelQueue.Enqueue(blockLabel);
                     aliquotOrder.Printed = true;
                 }
                 else
                 {
                     string reportNo = accessionOrder.PanelSetOrderCollection[0].ReportNo;
                     string initials = Business.Helper.PatientHelper.GetPatientInitials(accessionOrder.PFirstName, accessionOrder.PLastName);
                     Business.Label.Model.HistologyBlockPaperZPLLabel blockLabel = new Business.Label.Model.HistologyBlockPaperZPLLabel(aliquotOrder.AliquotOrderId, accessionOrder.PFirstName, accessionOrder.PLastName, aliquotOrder.Label, reportNo);
                     this.m_BlockLabelQueue.Enqueue(blockLabel);
                     aliquotOrder.Printed = true;
                 }
             }
         }
     }
 }
Beispiel #3
0
        public void Print(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            List <Cassette> cassettes = new List <Cassette>();

            foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in aliquotOrderCollection)
            {
                if (aliquotOrder.IsBlock() == true)
                {
                    if (aliquotOrder.LabelType == YellowstonePathology.Business.Specimen.Model.AliquotLabelType.DirectPrint == true)
                    {
                        Cassette cassette = this.GetCassette();
                        cassette.FromAliquotOrder(aliquotOrder, accessionOrder);

                        CarouselColumn column = this.m_Carousel.GetColumn(accessionOrder.CassetteColor);
                        string         line   = cassette.GetLine(column.PrinterCode);

                        string fileName = System.IO.Path.Combine(column.PrinterPath, System.Guid.NewGuid().ToString() + cassette.GetFileExtension());

                        try
                        {
                            using (System.IO.StreamWriter file = new System.IO.StreamWriter(fileName))
                            {
                                file.Write(line + "\r\n");
                                aliquotOrder.Printed = true;
                            }
                        }
                        catch (Exception e)
                        {
                            System.Windows.MessageBox.Show(fileName + ": " + e.Message, "Cassette Printer Location.", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Exclamation);
                        }
                    }
                }
            }
        }
 public AliquotOrderSelectionPage(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
 {
     this.m_AliquotOrderCollection = aliquotOrderCollection;
     this.m_AccessionOrder = accessionOrder;
     InitializeComponent();
     DataContext = this;
 }
        private void BarcodeScanPort_ContainerScanReceived(Business.BarcodeScanning.ContainerBarcode containerBarcode)
        {
            this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate()
            {
                YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullSpecimenOrderByContainerId(containerBarcode.ToString(), this);
                foreach (Business.Test.AliquotOrder aliquotOrder in specimenOrder.AliquotOrderCollection)
                {
                    if (aliquotOrder.Status == "Hold")
                    {
                        aliquotOrder.Status = null;
                    }
                    else
                    {
                        aliquotOrder.Status = "Hold";
                    }
                }

                YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Push(this);
                this.m_AliquotOrderHoldCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetAliquotOrderHoldCollection();
                this.NotifyPropertyChanged("AliquotOrderHoldCollection");

                this.m_ScanCount = "Block Count: " + this.m_EmbeddingScanCollection.Count.ToString();
                this.NotifyPropertyChanged("ScanCount");
            }
                                                                                                                       ));
        }
 public AliquotOrderSelectionPage(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
 {
     this.m_AliquotOrderCollection = aliquotOrderCollection;
     this.m_AccessionOrder         = accessionOrder;
     InitializeComponent();
     DataContext = this;
 }
Beispiel #7
0
 private void PrintBlocks()
 {
     YellowstonePathology.Business.Test.AliquotOrderCollection blocksToPrintCollection = this.m_SpecimenOrder.AliquotOrderCollection.GetUnPrintedBlocks();
     Business.Label.Model.CassettePrinterCollection            printers = new Business.Label.Model.CassettePrinterCollection();
     Business.Label.Model.CassettePrinter printer = printers.GetPrinter(Business.User.UserPreferenceInstance.Instance.UserPreference.CassettePrinter);
     printer.Print(blocksToPrintCollection, this.m_AccessionOrder);
     this.GrossBlockManagementView = new Business.View.GrossBlockManagementView(this.m_AccessionOrder, this.m_CaseNotesDocument, this.m_SpecimenOrder);
 }
        private void ShowAliquotOrderSelectionPage()
        {
            YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrdersThatHaveTestOrders();
            AliquotOrderSelectionPage aliquotOrderSelectionPage = new AliquotOrderSelectionPage(aliquotOrderCollection, this.m_AccessionOrder);

            aliquotOrderSelectionPage.AliquotOrderSelected += new AliquotOrderSelectionPage.AliquotOrderSelectedEventHandler(AliquotOrderSelectionPage_AliquotOrderSelected);
            aliquotOrderSelectionPage.Back += new AliquotOrderSelectionPage.BackEventHandler(AliquotOrderSelectionPage_Back);
            this.m_CuttingWorkspaceWindow.PageNavigator.Navigate(aliquotOrderSelectionPage);
        }
        public AliquotOrderPrinter(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            this.m_AliquotOrderCollection = aliquotOrderCollection;
            this.m_AccessionOrder = accessionOrder;

            this.m_BlockLabelPrinter = new BlockLabelPrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);
            this.m_CassettePrinter = new CassettePrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);
            this.m_SlideLabelPrinter = new SlideLabelPrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);
            this.m_SpecimenLabelPrinter = new SpecimenLabelPrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);
        }
        public AliquotOrderPrinter(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            this.m_AliquotOrderCollection = aliquotOrderCollection;
            this.m_AccessionOrder         = accessionOrder;

            this.m_BlockLabelPrinter    = new BlockLabelPrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);
            this.m_CassettePrinter      = new CassettePrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);
            this.m_SlideLabelPrinter    = new SlideLabelPrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);
            this.m_SpecimenLabelPrinter = new SpecimenLabelPrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);
        }
Beispiel #11
0
        public SpecimenOrder(string specimenOrderId, string objectId, string masterAccessionNo)
        {
            this.m_SpecimenOrderId = specimenOrderId;
            this.m_ObjectId = objectId;
            this.m_MasterAccessionNo = masterAccessionNo;
            this.AccessionTime = DateTime.Now;
            this.Accepted = true;

            this.m_AliquotOrderCollection = new YellowstonePathology.Business.Test.AliquotOrderCollection();
            this.m_PeerReviewTestOrders = new List<YellowstonePathology.Business.Test.Model.TestOrder>();
        }
Beispiel #12
0
        public SpecimenOrder(string specimenOrderId, string objectId, string masterAccessionNo)
        {
            this.m_SpecimenOrderId   = specimenOrderId;
            this.m_ObjectId          = objectId;
            this.m_MasterAccessionNo = masterAccessionNo;
            this.AccessionTime       = DateTime.Now;
            this.Accepted            = true;

            this.m_AliquotOrderCollection = new YellowstonePathology.Business.Test.AliquotOrderCollection();
            this.m_PeerReviewTestOrders   = new List <YellowstonePathology.Business.Test.Model.TestOrder>();
        }
        private void PrintBlocks()
        {
            YellowstonePathology.Business.Test.AliquotOrderCollection blocksToPrintCollection = this.m_SpecimenOrder.AliquotOrderCollection.GetUnPrintedBlocks();
            YellowstonePathology.Business.Label.Model.CassettePrinter cassettePrinter         = new Business.Label.Model.CassettePrinter(blocksToPrintCollection, this.m_AccessionOrder);
            if (cassettePrinter.HasItemsToPrint() == true)
            {
                cassettePrinter.Print();
            }

            this.GrossBlockManagementView = new Business.View.GrossBlockManagementView(this.m_AccessionOrder, this.m_CaseNotesDocument, this.m_SpecimenOrder);
        }
        private void PrintBlock()
        {
            YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical();
            if (panelSetOrder == null)
            {
                panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection[0];
            }

            this.m_AliquotOrder.Printed = false;
            YellowstonePathology.Business.Test.AliquotOrderCollection     blocksToPrintCollection = this.m_SpecimenOrder.AliquotOrderCollection.GetUnPrintedBlocks();
            YellowstonePathology.Business.Label.Model.AliquotOrderPrinter aliquotOrderPrinter     = new Business.Label.Model.AliquotOrderPrinter(blocksToPrintCollection, this.m_AccessionOrder);
            aliquotOrderPrinter.Print();
        }
        private void ButtonRefresh_Click(object sender, RoutedEventArgs e)
        {
            this.m_EmbeddingScanCollection = Business.BarcodeScanning.EmbeddingScanCollection.GetByScanDate(this.m_WorkDate);
            this.m_StatusMessage           = "Status: OK";
            this.m_ScanCount = "Block Count: " + this.m_EmbeddingScanCollection.Count.ToString();

            this.m_AliquotOrderHoldCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetAliquotOrderHoldCollection();
            this.m_EmbeddingNotScannedList    = Business.Gateway.AccessionOrderGateway.GetEmbeddingNotScannedCollection(this.GetWorkingAccessionDate());
            this.m_EmbeddingBreastCaseList    = Business.Gateway.AccessionOrderGateway.GetEmbeddingBreastCasesCollection();
            this.m_EmbeddingAutopsyList       = Business.Gateway.AccessionOrderGateway.GetEmbeddingAutopsyUnverifiedList();
            this.CalculateEstimatedFixationDuration();

            this.NotifyPropertyChanged(string.Empty);
        }
 public SpecimenLabelPrinter(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
 {
     this.m_SpecimenLabelQueue = new Queue <SpecimenLabel>();
     foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in aliquotOrderCollection)
     {
         if (aliquotOrder.IsSpecimen() == true)
         {
             SpecimenLabel specimenLabel = new SpecimenLabel();
             specimenLabel.FromAliquotOrder(aliquotOrder.AliquotOrderId, aliquotOrder.Label, accessionOrder.MasterAccessionNo, accessionOrder.PLastName, accessionOrder.PFirstName);
             this.m_SpecimenLabelQueue.Enqueue(specimenLabel);
             aliquotOrder.Printed = true;
         }
     }
 }
        public AliquotOrderPrinter(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            this.m_AliquotOrderCollection = aliquotOrderCollection;
            this.m_AccessionOrder         = accessionOrder;

            this.m_BlockLabelPrinter = new BlockLabelPrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);

            Business.Label.Model.CassettePrinterCollection cassettePrinterCollection = new CassettePrinterCollection();
            this.m_CassettePrinter = cassettePrinterCollection.GetPrinter(Business.User.UserPreferenceInstance.Instance.UserPreference.CassettePrinter);

            this.m_SlideLabelPrinter    = new SlideLabelPrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);
            this.m_SpecimenLabelPrinter = new SpecimenLabelPrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);
            this.m_AliquotLabelPrinter  = new AliquotLabelPrinter(this.m_AliquotOrderCollection, this.m_AccessionOrder);
        }
Beispiel #18
0
        public void FromAliquotOrderItemCollection(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, string reportNo, string PatientInitials, string cassetteColor, bool printRequested)
        {
            foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in aliquotOrderCollection)
            {
                if (aliquotOrder.IsBlock())
                {
                    this.Add(aliquotOrder, reportNo, PatientInitials, cassetteColor);
                }
            }

            if (printRequested == true)
            {
                this.SetPrintRequested(true);
            }
        }
 public YellowstonePathology.Business.Test.AliquotOrderCollection GetAliquotOrdersThatHaveTestOrders()
 {
     YellowstonePathology.Business.Test.AliquotOrderCollection result = new YellowstonePathology.Business.Test.AliquotOrderCollection();
     foreach (YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder in this)
     {
         foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in specimenOrder.AliquotOrderCollection)
         {
             if (aliquotOrder.TestOrderCollection.Count > 0)
             {
                 result.Add(aliquotOrder);
             }
         }
     }
     return(result);
 }
        private void AddIC()
        {
            YellowstonePathology.Business.Test.Model.Test iCTest = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests().GetTest(194);
            string patientInitials = YellowstonePathology.Business.Helper.PatientHelper.GetPatientInitials(this.m_AccessionOrder.PFirstName, this.m_AccessionOrder.PLastName);

            YellowstonePathology.Business.Test.AliquotOrder        aliquotOrder     = this.m_SpecimenOrder.AliquotOrderCollection.AddBlock(this.m_SpecimenOrder, YellowstonePathology.Business.Specimen.Model.AliquotLabelType.DirectPrint, this.m_AccessionOrder.AccessionDate.Value);
            YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(this.m_AccessionOrder.PanelSetOrderCollection[0].ReportNo, iCTest, iCTest.OrderComment, null, false, this.m_AliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection);
            this.m_AccessionOrder.TakeATrip(orderTestVisitor);

            YellowstonePathology.Business.Common.BlockCollection      blockCollection         = new Business.Common.BlockCollection();
            YellowstonePathology.Business.Test.AliquotOrderCollection blocksToPrintCollection = this.m_SpecimenOrder.AliquotOrderCollection.GetUnPrintedBlocks();
            blockCollection.FromAliquotOrderItemCollection(blocksToPrintCollection, this.m_AccessionOrder.PanelSetOrderCollection[0].ReportNo, patientInitials, this.m_AccessionOrder.PrintMateColumnNumber, true);
            YellowstonePathology.Business.Common.PrintMate.Print(blockCollection);
            blocksToPrintCollection.SetPrinted();
        }
Beispiel #21
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);
                }
            }
        }
        private void ContextMenuRemoveHold_Click(object sender, RoutedEventArgs e)
        {
            this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate()
            {
                if (this.ListViewHoldList.SelectedItem != null)
                {
                    YellowstonePathology.Business.Test.AliquotOrder aliquotOrder   = (YellowstonePathology.Business.Test.AliquotOrder) this.ListViewHoldList.SelectedItem;
                    YellowstonePathology.Business.Test.AliquotOrder dbAliquotOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAliquotOrder(aliquotOrder.AliquotOrderId, this);
                    dbAliquotOrder.Status = "Created";

                    YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Push(this);
                    this.m_AliquotOrderHoldCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetAliquotOrderHoldCollection();
                    this.NotifyPropertyChanged("AliquotOrderHoldCollection");
                }
            }
                                                                                                                            ));
        }
Beispiel #23
0
        private void HandleMasterAccessionNoFound(string masterAccessionNo)
        {
            this.m_AccessionOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(masterAccessionNo, m_CuttingWorkspaceWindow);

            if (this.m_AccessionOrder.IsLockAquiredByMe == true)
            {
                YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrdersThatHaveTestOrders();
                AliquotOrderSelectionPage aliquotOrderSelectionPage = new AliquotOrderSelectionPage(aliquotOrderCollection, this.m_AccessionOrder);
                aliquotOrderSelectionPage.AliquotOrderSelected += new AliquotOrderSelectionPage.AliquotOrderSelectedEventHandler(AliquotOrderSelectionPage_AliquotOrderSelected);
                aliquotOrderSelectionPage.Back += new AliquotOrderSelectionPage.BackEventHandler(AliquotOrderSelectionPage_Back);
                this.m_CuttingWorkspaceWindow.PageNavigator.Navigate(aliquotOrderSelectionPage);
            }
            else
            {
                this.ShowCaseLockedPage(this.m_AccessionOrder);
            }
        }
        private void ButtonPutBlockOnHold_Click(object sender, RoutedEventArgs e)
        {
            YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots = this.m_AliquotAndStainOrderView.GetSelectedAliquots();
            foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in selectedAliquots)
            {
                if (aliquotOrder.Status == "Hold")
                {
                    aliquotOrder.Status = "Created";
                }
                else
                {
                    aliquotOrder.Status = "Hold";
                }
            }

            this.m_AliquotAndStainOrderView.Refresh(true, this.m_PanelSetOrder);
            this.NotifyPropertyChanged("AliquotAndStainOrderView");
        }
        private void PrintBlock()
        {
            YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical();
            if (panelSetOrder == null)
            {
                panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection[0];
            }

            //YellowstonePathology.Business.Test.AliquotOrderCollection blocksToPrintCollection = this.m_SpecimenOrder.AliquotOrderCollection.GetUnPrintedBlocks();
            //YellowstonePathology.Business.Label.Model.AliquotOrderPrinter aliquotOrderPrinter = new Business.Label.Model.AliquotOrderPrinter(blocksToPrintCollection, this.m_AccessionOrder);
            //aliquotOrderPrinter.Print();

            this.m_AliquotOrder.Printed = false;
            YellowstonePathology.Business.Test.AliquotOrderCollection blocksToPrintCollection = this.m_SpecimenOrder.AliquotOrderCollection.GetUnPrintedBlocks();
            Business.Label.Model.CassettePrinterCollection            printers = new Business.Label.Model.CassettePrinterCollection();
            Business.Label.Model.CassettePrinter printer = printers.GetPrinter(Business.User.UserPreferenceInstance.Instance.UserPreference.CassettePrinter);
            printer.Print(blocksToPrintCollection, this.m_AccessionOrder);
        }
Beispiel #26
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.");
            }
        }
Beispiel #27
0
        private void HandleOrderingDualStains(YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots, List <YellowstonePathology.Business.Test.Model.DualStain> selectedDualStains)
        {
            foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in selectedAliquots)
            {
                foreach (YellowstonePathology.Business.Test.Model.DualStain dualStain in selectedDualStains)
                {
                    bool orderAsDual        = true;
                    bool acknowledgeOnOrder = false;

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

                    YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitorSecondTest = new Business.Visitor.OrderTestVisitor(this.m_PanelSetOrder.ReportNo, dualStain.SecondTest, dualStain.SecondTest.OrderComment, this.m_PanelOrderComment, orderAsDual, aliquotOrder, acknowledgeOnOrder, false, this.m_AccessionOrder.TaskOrderCollection);
                    this.m_AccessionOrder.TakeATrip(orderTestVisitorSecondTest);
                    this.m_StainAcknowledgementTaskOrderVisitor.AddTestOrder(orderTestVisitorSecondTest.TestOrder);
                }
            }
        }
        private void EmbeddingDialog_Loaded(object sender, RoutedEventArgs e)
        {
            this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate()
            {
                this.m_BarcodeScanPort.HistologyBlockScanReceived += this.HistologyBlockScanReceived;
                this.m_BarcodeScanPort.ContainerScanReceived      += BarcodeScanPort_ContainerScanReceived;

                this.m_AliquotOrderHoldCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetAliquotOrderHoldCollection();
                this.m_ProcessorRunCollection     = YellowstonePathology.Business.Surgical.ProcessorRunCollection.GetAll();

                this.m_EmbeddingNotScannedList = Business.Gateway.AccessionOrderGateway.GetEmbeddingNotScannedCollection(this.GetWorkingAccessionDate());
                this.m_EmbeddingBreastCaseList = Business.Gateway.AccessionOrderGateway.GetEmbeddingBreastCasesCollection();
                this.m_EmbeddingAutopsyList    = Business.Gateway.AccessionOrderGateway.GetEmbeddingAutopsyUnverifiedList();
                this.CalculateEstimatedFixationDuration();

                this.NotifyPropertyChanged(string.Empty);
            }
                                                                                                                            ));
        }
        private void OrderTestOnSelectedAliquots(YellowstonePathology.Business.Test.Model.Test test, bool orderedAsDual)
        {
            YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots = this.m_AliquotAndStainOrderView.GetSelectedAliquots();
            foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in selectedAliquots)
            {
                YellowstonePathology.Business.Visitor.OrderTestVisitor orderTestVisitor = new Business.Visitor.OrderTestVisitor(this.m_PanelSetOrder.ReportNo, test, test.OrderComment, null, orderedAsDual, aliquotOrder, false, false, this.m_AccessionOrder.TaskOrderCollection);
                this.m_AccessionOrder.TakeATrip(orderTestVisitor);

                if ((aliquotOrder.AliquotType == "Block" ||
                     aliquotOrder.AliquotType == "FrozenBlock" ||
                     aliquotOrder.AliquotType == "CellBlock"))
                {
                    YellowstonePathology.Business.Visitor.AddSlideOrderVisitor addSlideOrderVisitor = new Business.Visitor.AddSlideOrderVisitor(aliquotOrder, orderTestVisitor.TestOrder);
                    this.m_AccessionOrder.TakeATrip(addSlideOrderVisitor);
                }

                if (test.NeedsAcknowledgement == true)
                {
                    this.m_StainAcknowledgementTaskOrderVisitor.AddTestOrder(orderTestVisitor.TestOrder);
                }
            }
        }
        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");
        }
Beispiel #31
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.");
            }
        }
        private void ButtonPrintLabels_Click(object sender, RoutedEventArgs e)
        {
            //this.Save(false);

            YellowstonePathology.Business.Test.AliquotOrderCollection     selectedAliquots    = this.m_AliquotAndStainOrderView.GetSelectedAliquots();
            YellowstonePathology.Business.Label.Model.AliquotOrderPrinter aliquotOrderPrinter = new Business.Label.Model.AliquotOrderPrinter(selectedAliquots, this.m_AccessionOrder);

            if (aliquotOrderPrinter.HasCassettesToPrint() == true)
            {
                if (this.m_AccessionOrder.PrintMateColumnNumber == 0)
                {
                    MessageBox.Show("You must select the Cassette Color before printing.");
                    return;
                }
            }

            aliquotOrderPrinter.Print();
            //YellowstonePathology.Business.Persistence.DocumentGateway.Instance.SubmitChanges(this.m_AccessionOrder, false);
            this.m_AliquotAndStainOrderView.SetAliquotChecks(false);

            this.PrintSelectedSlides();

            MessageBox.Show("The selected items have been submitted to the printer.");
        }
 public CodyCassetteColorAudit(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.AliquotOrderCollection aliquotCollection)
 {
     this.m_AccessionOrder = accessionOrder;
     this.m_AliquotCollection = aliquotCollection;
 }
 public virtual void Visit(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection)
 {
 }
 public HasColorForDirectPrintBlocksAudit(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.AliquotOrderCollection aliquotCollection)
 {
     this.m_AccessionOrder = accessionOrder;
     this.m_AliquotCollection = aliquotCollection;
 }
Beispiel #36
0
 public SpecimenOrder()
 {
     this.m_AliquotOrderCollection = new YellowstonePathology.Business.Test.AliquotOrderCollection();
     this.m_PeerReviewTestOrders = new List<YellowstonePathology.Business.Test.Model.TestOrder>();
 }
 public SlideLabelPrinter(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
 {
     this.m_AliquotOrderCollection = aliquotOrderCollection;
     this.m_AccessionOrder = accessionOrder;
     this.Initialize();
 }
        private void EmbeddingDialog_Loaded(object sender, RoutedEventArgs e)
        {
            this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate ()
            {
                this.m_BarcodeScanPort.HistologyBlockScanReceived += this.HistologyBlockScanReceived;
                this.m_BarcodeScanPort.ContainerScanReceived += BarcodeScanPort_ContainerScanReceived;

                this.m_AliquotOrderHoldCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetAliquotOrderHoldCollection();
                this.m_ProcessorRunCollection = YellowstonePathology.Business.Surgical.ProcessorRunCollection.GetAll();

                this.m_EmbeddingNotScannedList = Business.Gateway.AccessionOrderGateway.GetEmbeddingNotScannedCollection(this.GetWorkingAccessionDate());
                this.m_EmbeddingBreastCaseList = Business.Gateway.AccessionOrderGateway.GetEmbeddingBreastCasesCollection();

                this.NotifyPropertyChanged(string.Empty);
            }
            ));
        }
        private void ContextMenuRemoveHold_Click(object sender, RoutedEventArgs e)
        {
            this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate ()
            {
                if(this.ListViewHoldList.SelectedItem != null)
                {
                    YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = (YellowstonePathology.Business.Test.AliquotOrder)this.ListViewHoldList.SelectedItem;
                    YellowstonePathology.Business.Test.AliquotOrder dbAliquotOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAliquotOrder(aliquotOrder.AliquotOrderId, this);
                    dbAliquotOrder.Status = null;

                    YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Push(this);
                    this.m_AliquotOrderHoldCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetAliquotOrderHoldCollection();
                    this.NotifyPropertyChanged("AliquotOrderHoldCollection");
                }
            }
            ));
        }
        private void ButtonRefresh_Click(object sender, RoutedEventArgs e)
        {
            this.m_EmbeddingScanCollection = Business.BarcodeScanning.EmbeddingScanCollection.GetByScanDate(this.m_WorkDate);
            this.m_StatusMessage = "Status: OK";
            this.m_ScanCount = "Block Count: " + this.m_EmbeddingScanCollection.Count.ToString();

            this.m_AliquotOrderHoldCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetAliquotOrderHoldCollection();
            this.m_EmbeddingNotScannedList = Business.Gateway.AccessionOrderGateway.GetEmbeddingNotScannedCollection(this.GetWorkingAccessionDate());
            this.m_EmbeddingBreastCaseList = Business.Gateway.AccessionOrderGateway.GetEmbeddingBreastCasesCollection();

            this.NotifyPropertyChanged(string.Empty);
        }
        private void Bgw_DoWork(object sender, DoWorkEventArgs e)
        {
            YellowstonePathology.Business.Surgical.ProcessorRunCollection processorRunCollection = Business.Surgical.ProcessorRunCollection.GetAll();

            foreach (YellowstonePathology.Business.BarcodeScanning.EmbeddingScan embeddingScan in this.ListViewEmbeddingScans.Items)
            {
                this.m_BackgroundWorker.ReportProgress(0, embeddingScan.AliquotOrderId);

                if (embeddingScan.Updated == false)
                {
                    YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAliquotOrder(embeddingScan.AliquotOrderId, this);
                    aliquotOrder.EmbeddingVerify(YellowstonePathology.Business.User.SystemIdentity.Instance.User);

                    Business.ParseSpecimenOrderIdResult parseSpecimenOrderIdResult = aliquotOrder.ParseSpecimenOrderIdFromBlock();
                    if (parseSpecimenOrderIdResult.ParsedSuccessfully == true)
                    {
                        YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullSpecimenOrder(parseSpecimenOrderIdResult.SpecimenOrderId, this);
                        if(specimenOrder.ProcessorStartTime.HasValue == false)
                        {
                            specimenOrder.ProcessorStartTime = embeddingScan.ProcessorStartTime;
                            specimenOrder.ProcessorFixationTime = Convert.ToInt32(embeddingScan.ProcessorFixationDuration.Value.TotalMinutes);
                            specimenOrder.SetFixationEndTime();
                            specimenOrder.SetFixationDuration();
                        }
                        else if(specimenOrder.ProcessorStartTime.HasValue == true)
                        {
                            if(Business.Helper.DateTimeExtensions.IsDateToday(specimenOrder.ProcessorStartTime.Value) || Business.Helper.DateTimeExtensions.IsDateYesterday(specimenOrder.ProcessorStartTime.Value))
                            {
                                specimenOrder.ProcessorStartTime = embeddingScan.ProcessorStartTime;
                                specimenOrder.ProcessorFixationTime = Convert.ToInt32(embeddingScan.ProcessorFixationDuration.Value.TotalMinutes);
                                specimenOrder.SetFixationEndTime();
                                specimenOrder.SetFixationDuration();
                            }
                        }
                    }
                    else
                    {
                        MessageBox.Show("Unable to parse the Block Id. Please tell Sid.");
                    }

                    YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Save();
                    this.m_AliquotOrderHoldCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetAliquotOrderHoldCollection();
                    embeddingScan.Updated = true;
                    this.m_EmbeddingScanCollection.UpdateStatus(embeddingScan);
                }
            }
        }
        private void BarcodeScanPort_ContainerScanReceived(Business.BarcodeScanning.ContainerBarcode containerBarcode)
        {
            this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate ()
            {
                YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullSpecimenOrderByContainerId(containerBarcode.ToString(), this);
                foreach(Business.Test.AliquotOrder aliquotOrder in specimenOrder.AliquotOrderCollection)
                {
                    if(aliquotOrder.Status == "Hold")
                    {
                        aliquotOrder.Status = null;
                    }
                    else
                    {
                        aliquotOrder.Status = "Hold";
                    }
                }

                YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Push(this);
                this.m_AliquotOrderHoldCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetAliquotOrderHoldCollection();
                this.NotifyPropertyChanged("AliquotOrderHoldCollection");

                this.m_ScanCount = "Block Count: " + this.m_EmbeddingScanCollection.Count.ToString();
                this.NotifyPropertyChanged("ScanCount");
            }
            ));
        }