Exemplo n.º 1
0
 private void ButtonNewScan_Click(object sender, RoutedEventArgs e)
 {
     YellowstonePathology.Business.BarcodeScanning.Barcode barcode = new Business.BarcodeScanning.Barcode();
     barcode.ID          = "19-22362.1A1";
     barcode.IsValidated = true;
     this.HistologySlideScanReceived(barcode);
 }
Exemplo n.º 2
0
        private void BarcodeScanPort_HistologySlideScanReceived(Business.BarcodeScanning.Barcode barcode)
        {
            this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal,
                                   new Action(
                                       delegate()
            {
                if (this.m_AliquotOrder.SlideOrderCollection.Exists(barcode.ID) == true)
                {
                    YellowstonePathology.Business.Slide.Model.SlideOrder slideOrder    = this.m_AliquotOrder.SlideOrderCollection.Get(barcode.ID);
                    YellowstonePathology.Business.Facility.Model.Facility thisFacility = Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.FacilityId);
                    string thisLocation = YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.HostName;

                    this.AddMaterialTrackingLog(slideOrder, thisFacility, thisLocation);
                    slideOrder.SetLocation(thisFacility, thisLocation);

                    if (slideOrder.Validated == false)
                    {
                        slideOrder.Validate(this.m_SystemIdentity);
                        if (this.m_AliquotOrder.SlideOrderCollection.IsLastSlide(barcode.ID) == true)
                        {
                            this.Finished(this, new YellowstonePathology.UI.CustomEventArgs.MasterAccessionNoReturnEventArgs(this.m_AccessionOrder.MasterAccessionNo));
                        }
                    }
                }
                else
                {
                    MessageBox.Show("This slide does not belong to the current block");
                }
            }));
        }
Exemplo n.º 3
0
 private void BarcodeScanPort_ThinPrepSlideScanReceived(Business.BarcodeScanning.Barcode barcode)
 {
     this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate()
     {
         this.UseThisAliquotOrderId(this, barcode.ID);
     }
                                                                                                                ));
 }
Exemplo n.º 4
0
 private void ButtonScanId_Click(object sender, RoutedEventArgs e)
 {
     Business.BarcodeScanning.Barcode barcode = new Business.BarcodeScanning.Barcode();
     //barcode.ID = "19-20106.1A";
     //barcode.ID = "19-20106.1B";
     barcode.ID = "19-23403.1A";
     this.HistologyBlockScanReceived(barcode);
 }
Exemplo n.º 5
0
 private void BarcodeScanPort_HistologyBlockScanReceived(Business.BarcodeScanning.Barcode barcode)
 {
     this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate()
     {
         this.HandleBlockScanReceived(barcode.ID);
     }
                                                                                                                ));
 }
 private void BarcodeScanPort_SecurityBadgeScanReceived(Business.BarcodeScanning.Barcode barcode)
 {
     this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate()
     {
         int scannedUserId = Convert.ToInt32(barcode.ID);
         this.m_BarcodeScanPort.SecurityBadgeScanReceived -= BarcodeScanPort_SecurityBadgeScanReceived;
         this.AuthentificationSuccessful(this, new EventArgs());
     }
                                                                                                                ));
 }
 private void BarcodeScanPort_SecurityBadgeScanReceived(Business.BarcodeScanning.Barcode barcode)
 {
     this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate()
     {
         Business.User.SystemIdentity.Instance.BarcodeScanPort_SecurityBadgeScanReceived(barcode);
         this.m_BarcodeScanPort.SecurityBadgeScanReceived -= BarcodeScanPort_SecurityBadgeScanReceived;
         this.AuthentificationSuccessful(this, new EventArgs());
     }
                                                                                                                ));
 }
Exemplo n.º 8
0
 private void BarcodeScanPort_HistologyBlockScanReceived(Business.BarcodeScanning.Barcode barcode)
 {
     this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate()
     {
         if (this.AliquotOrderSelected != null)
         {
             this.AliquotOrderSelected(this, new CustomEventArgs.BarcodeReturnEventArgs(barcode));
         }
     }
                                                                                                                ));
 }
Exemplo n.º 9
0
        private void BarcodeScanPort_ClientScanReceived(Business.BarcodeScanning.Barcode barcode)
        {
            this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate()
            {
                int clientId  = Convert.ToInt32(barcode.ID);
                this.m_Client = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientByClientId(clientId);
                this.m_Client.ClientLocationCollection.SetCurrentLocationToMedicalRecordsOrFirst();

                UI.Navigation.PageNavigationReturnEventArgs args = new UI.Navigation.PageNavigationReturnEventArgs(UI.Navigation.PageNavigationDirectionEnum.Next, this.m_Client);
                this.Return(this, args);
            }
                                                                                                                       ));
        }
Exemplo n.º 10
0
 private void ButtonNewScan_Click(object sender, RoutedEventArgs e)
 {
     if (this.idx >= this.m_SlideOrderIds.Count)
     {
         MessageBox.Show("end of list");
     }
     else
     {
         YellowstonePathology.Business.BarcodeScanning.Barcode barcode = new Business.BarcodeScanning.Barcode();
         barcode.ID          = this.m_SlideOrderIds[idx];
         barcode.IsValidated = true;
         this.HistologySlideScanReceived(barcode);
         this.idx++;
     }
 }
Exemplo n.º 11
0
 private void BarcodeScanPort_HistologySlideScanReceived(Business.BarcodeScanning.Barcode barcode)
 {
     /*
      * this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate ()
      * {
      *  this.m_BarcodeScanPort.HistologySlideScanReceived -= BarcodeScanPort_HistologySlideScanReceived;
      *  this.m_LoginUI.GetAccessionOrderBySlideOrderId(barcode.ID);
      *  if (this.ListViewAccessionOrders.Items.Count > 0)
      *  {
      *      this.ListViewAccessionOrders.SelectedItem = this.ListViewAccessionOrders.Items[0];
      *  }
      *  this.m_BarcodeScanPort.ContainerScanReceived += ContainerScanReceived;
      * }
      * ));
      */
 }
Exemplo n.º 12
0
 private void BarcodeScanPort_ThinPrepSlideScanReceived(Business.BarcodeScanning.Barcode barcode)
 {
     this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal,
                            new Action(
                                delegate()
     {
         if (barcode.IsValidated == true)
         {
             this.ChangeListing(barcode.ID);
         }
         else
         {
             MessageBox.Show("The scanner did not read the barcode correctly.  Please try again.", "Invalid Scan", MessageBoxButton.OK, MessageBoxImage.Exclamation);
         }
     }));
 }
Exemplo n.º 13
0
 private void BarcodeScanPort_HistologySlideScanReceived(Business.BarcodeScanning.Barcode barcode)
 {
     this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal,
                            new Action(
                                delegate()
     {
         if (barcode.IsValidated == true)
         {
             MessageBox.Show("Got a Histology Slide Scan");
         }
         else
         {
             System.Windows.MessageBox.Show("The scan did not result in a valid case, please try again.", "Invalid Scan", MessageBoxButton.OK, MessageBoxImage.Exclamation);
         }
     }));
 }
Exemplo n.º 14
0
 private void BarcodeScanPort_ThinPrepSlideScanReceived(Business.BarcodeScanning.Barcode barcode)
 {
     this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal,
                            new Action(
                                delegate()
     {
         if (barcode.IsValidated == true)
         {
             this.Save(false);
             this.DoAliquotOrderIdSearch(barcode.ID, 15);
         }
         else
         {
             System.Windows.MessageBox.Show("The scan did not result in a valid case, please try again.", "Invalid Scan", MessageBoxButton.OK, MessageBoxImage.Exclamation);
         }
     }));
 }
Exemplo n.º 15
0
 private void BarcodeScanPort_HistologyBlockScanReceived(Business.BarcodeScanning.Barcode barcode)
 {
     this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal,
                            new Action(
                                delegate()
     {
         if (this.m_MaterialTrackingLogViewCollection.MaterialIdExists(barcode.ID) == false)
         {
             YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingLog materialTrackingLog         = this.AddMaterialTrackingLogScan(barcode.ID, "Aliquot", this.m_MaterialTrackingBatch.MaterialTrackingBatchId);
             YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingLogView materialTrackingLogView = new Business.MaterialTracking.Model.MaterialTrackingLogView();
             materialTrackingLogView.FromScannedItemView(materialTrackingLog);
             this.m_MaterialTrackingLogViewCollection.Add(materialTrackingLogView);
             this.NotifyPropertyChanged("MaterialCount");
         }
         else
         {
             this.SelectMaterialTrackingLogView(barcode.ID);
         }
     }));
 }
        private void BarcodeScanPort_ThinPrepSlideScanReceived(Business.BarcodeScanning.Barcode barcode)
        {
            this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal,
                                   new Action(
                                       delegate()
            {
                if (barcode.IsValidated == true)
                {
                    if (this.m_SpecimenOrder.AliquotOrderCollection.Exists(barcode.ID) == true)
                    {
                        YellowstonePathology.Business.Facility.Model.FacilityCollection facilityCollection = Business.Facility.Model.FacilityCollection.GetAllFacilities();
                        YellowstonePathology.Business.Facility.Model.LocationCollection locationCollection = YellowstonePathology.Business.Facility.Model.LocationCollection.GetAllLocations();
                        YellowstonePathology.Business.Facility.Model.Facility thisFacility = facilityCollection.GetByFacilityId(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.FacilityId);
                        YellowstonePathology.Business.Facility.Model.Location thisLocation = locationCollection.GetLocation(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.LocationId);

                        YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_SpecimenOrder.AliquotOrderCollection.GetByAliquotOrderId(barcode.ID);
                        aliquotOrder.Validate();

                        string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
                        YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingLog materialTrackingLog = new Business.MaterialTracking.Model.MaterialTrackingLog(objectId, barcode.ID, null, thisFacility.FacilityId, thisFacility.FacilityName,
                                                                                                                                                                               thisLocation.LocationId, thisLocation.Description, "Slide Scanned", "Slide scanned at cytology aliquoting", "Aliquot", this.m_AccessionOrder.MasterAccessionNo, aliquotOrder.Label, aliquotOrder.ClientAccessioned);
                        YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(materialTrackingLog, Window.GetWindow(this));

                        if (this.m_SpecimenOrder.AliquotOrderCollection.HasUnvalidatedItems() == false)
                        {
                            this.Finished(this, new EventArgs());
                        }
                    }
                    else
                    {
                        System.Windows.MessageBox.Show("The aliquot scanned does not appear to belong to this specimen.");
                    }
                }
                else
                {
                    System.Windows.MessageBox.Show("The scanner did not read the label correctly.", "Scan not successful.", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                }
            }));
        }
Exemplo n.º 17
0
 private void BarcodeScanPort_ThinPrepSlideScanReceived(Business.BarcodeScanning.Barcode barcode)
 {
     this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal,
                            new Action(
                                delegate()
     {
         YellowstonePathology.UI.MainWindow mainWindow = Application.Current.MainWindow as YellowstonePathology.UI.MainWindow;
         if (((TabItem)mainWindow.TabControlLeftWorkspace.SelectedItem).Tag.ToString() == "Cytology")
         {
             if (barcode.IsValidated == true)
             {
                 if (this.m_CytologyUI.SetAccessionOrderByAliquotOrderId(barcode.ID))
                 {
                     this.m_CytologyResultsWorkspace.ReportNo = this.m_CytologyUI.PanelSetOrderCytology.ReportNo;
                 }
             }
             else
             {
                 System.Windows.MessageBox.Show("The scanner did not read the label correctly.", "Scan not successful.", MessageBoxButton.OK, MessageBoxImage.Exclamation);
             }
         }
     }));
 }
Exemplo n.º 18
0
        private void BarcodeScanPort_ClientScanReceived(Business.BarcodeScanning.Barcode barcode)
        {
            this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate()
            {
                int clientId  = Convert.ToInt32(barcode.ID);
                this.m_Client = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientByClientId(clientId);
                if (this.m_Client.ClientLocationCollection.Count > 0)
                {
                    this.m_Client.ClientLocationCollection.SetCurrentLocationToMedicalRecordsOrFirst();

                    bool useRequisition      = false;
                    List <object> returnData = new List <object>();
                    returnData.Add(this.m_Client);
                    returnData.Add(useRequisition);
                    UI.Navigation.PageNavigationReturnEventArgs args = new UI.Navigation.PageNavigationReturnEventArgs(UI.Navigation.PageNavigationDirectionEnum.Next, returnData);
                    this.Return(this, args);
                }
                else
                {
                    MessageBox.Show("This client does not have a location entered.  Please tell Sid.", "No Locations", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                }
            }
                                                                                                                       ));
        }
Exemplo n.º 19
0
 public BarcodeReturnEventArgs(Business.BarcodeScanning.Barcode barcode)
 {
     this.m_Barcode = barcode;
 }
Exemplo n.º 20
0
 private void ButtonEnterAliquotOrderId_Click(object sender, RoutedEventArgs e)
 {
     Business.BarcodeScanning.Barcode block = new Business.BarcodeScanning.Barcode();
     block.ID = "18-7486.1A";
     this.HistologyBlockScanReceived(block);
 }
Exemplo n.º 21
0
 public BarcodeReturnEventArgs(Business.BarcodeScanning.Barcode barcode)
 {
     this.m_Barcode = barcode;
 }
Exemplo n.º 22
0
 private void ButtonAutoScan_Click(object sender, RoutedEventArgs e)
 {
     Business.BarcodeScanning.Barcode bc = new Business.BarcodeScanning.Barcode();
     bc.ID = "5001";
     this.BarcodeScanPort_SecurityBadgeScanReceived(bc);
 }