public MaterialBatchPage(YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingBatch materialTrackingBatch,
			YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingLogCollection materialTrackingLogCollection,
            bool backButtonVisible, bool nextButtonVisible, bool finishButtonVisible, 
			bool useMasterAccessionNo, string masterAccessionNo, YellowstonePathology.UI.Navigation.PageNavigator pageNavigator)
        {
            this.m_FacilityCollection = YellowstonePathology.Business.Facility.Model.FacilityCollection.GetAllFacilities();
            this.m_LocationCollection = YellowstonePathology.Business.Facility.Model.LocationCollection.GetAllLocations();

            this.m_PageNavigator = pageNavigator;

            this.m_MaterialTrackingBatch = materialTrackingBatch;
            this.m_MaterialTrackingLogCollection = materialTrackingLogCollection;

            this.m_UserMasterAccessionNo = useMasterAccessionNo;
            this.m_MasterAccessionNo = masterAccessionNo;

            if (this.m_UserMasterAccessionNo == true)
            {
                this.m_MaterialTrackingLogViewCollection = YellowstonePathology.Business.Gateway.SlideAccessionGateway.GetMaterialTrackingLogViewCollectionByBatchIdMasterAccessionNo(this.m_MaterialTrackingBatch.MaterialTrackingBatchId, masterAccessionNo);
            }
            else
            {
                this.m_MaterialTrackingLogViewCollection = YellowstonePathology.Business.Gateway.SlideAccessionGateway.GetMaterialTrackingLogViewCollectionByBatchId(this.m_MaterialTrackingBatch.MaterialTrackingBatchId);
            }

            this.m_BackButtonVisible = backButtonVisible;
            this.m_NextButtonVisible = nextButtonVisible;
            this.m_FinishButtonVisible = finishButtonVisible;

            InitializeComponent();
            DataContext = this;

            Loaded += new RoutedEventHandler(MaterialBatchPage_Loaded);
            Unloaded += new RoutedEventHandler(MaterialBatchPage_Unloaded);
        }
Beispiel #2
0
        private YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingLog AddMaterialTrackingLogScan(string materialId, string materialType, string materialTrackingBatchId)
        {
            YellowstonePathology.Business.Facility.Model.FacilityCollection facilityCollection = Business.Facility.Model.FacilityCollection.GetAllFacilities();
            YellowstonePathology.Business.Facility.Model.LocationCollection locationCollection = 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);

            string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();

            YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingLog materialTrackingLog = new Business.MaterialTracking.Model.MaterialTrackingLog(objectId, materialId, materialTrackingBatchId, thisFacility.FacilityId, thisFacility.FacilityName, thisLocation.LocationId, thisLocation.Description, materialType);
            YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(materialTrackingLog, this.m_PageNavigator.PrimaryMonitorWindow);
            this.m_MaterialTrackingLogCollection.Add(materialTrackingLog);
            return(materialTrackingLog);
        }
Beispiel #3
0
        private void AddMaterialTrackingLog(YellowstonePathology.Business.Slide.Model.SlideOrder slideOrder)
        {
            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);
            string scanLocation = "Slide Scanned At " + YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.HostName;

            string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();

            YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingLog materialTrackingLog = new Business.MaterialTracking.Model.MaterialTrackingLog(objectId, slideOrder.SlideOrderId, null, thisFacility.FacilityId, thisFacility.FacilityName,
                                                                                                                                                                   thisLocation.LocationId, thisLocation.Description, "Slide Scan", scanLocation, "SlideOrder", this.m_AccessionOrder.MasterAccessionNo, slideOrder.Label, slideOrder.ClientAccessioned);

            YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(materialTrackingLog, Window.GetWindow(this));
            this.m_MaterialTrackingLogCollection.Insert(0, materialTrackingLog);
        }
        public UserPreferences()
        {
            this.m_MolecularLabelFormatCollection = YellowstonePathology.Business.Label.Model.LabelFormatCollection.GetMolecularLabelCollection();
            this.m_UserPreference = YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference;

            this.m_FacilityCollection = Business.Facility.Model.FacilityCollection.GetAllFacilities();
            this.m_LocationCollection = new Business.Facility.Model.LocationCollection();

            System.Printing.LocalPrintServer printServer = new System.Printing.LocalPrintServer();
            this.m_PrintQueueCollection = printServer.GetPrintQueues(new[] { System.Printing.EnumeratedPrintQueueTypes.Local, System.Printing.EnumeratedPrintQueueTypes.Connections });

            this.m_ApplicationVersion = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.GetApplicationVersion(this);

            InitializeComponent();

            this.DataContext = this;
            this.Loaded += new RoutedEventHandler(UserPreferences_Loaded);
            this.Closing += UserPreferences_Closing;
        }
        public UserPreferences()
        {
            this.m_MolecularLabelFormatCollection = YellowstonePathology.Business.Label.Model.LabelFormatCollection.GetMolecularLabelCollection();
            this.m_UserPreference = YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference;

            this.m_FacilityCollection = Business.Facility.Model.FacilityCollection.GetAllFacilities();
            this.m_LocationCollection = new Business.Facility.Model.LocationCollection();

            System.Printing.LocalPrintServer printServer = new System.Printing.LocalPrintServer();
            this.m_PrintQueueCollection = printServer.GetPrintQueues(new[] { System.Printing.EnumeratedPrintQueueTypes.Local, System.Printing.EnumeratedPrintQueueTypes.Connections });

            this.m_ApplicationVersion     = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.GetApplicationVersion(this);
            this.m_ProcessorRunCollection = Business.Surgical.ProcessorRunCollection.GetAll(true);

            InitializeComponent();

            this.DataContext = this;
            this.Loaded     += new RoutedEventHandler(UserPreferences_Loaded);
            this.Closing    += UserPreferences_Closing;
        }
        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);
                }
            }));
        }
 private void ComboBoxFacility_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.ComboBoxFacility.SelectedItem != null)
     {
         YellowstonePathology.Business.Facility.Model.Facility facility = (YellowstonePathology.Business.Facility.Model.Facility)this.ComboBoxFacility.SelectedItem;
         this.m_LocationCollection = facility.Locations;
         this.NotifyPropertyChanged("LocationCollection");
     }
 }