Example #1
0
        public LabUI(YellowstonePathology.Business.User.SystemIdentity systemIdentity, System.Windows.Controls.TabItem writer)
        {
            this.m_SystemIdentity = systemIdentity;
            this.m_Writer = writer;

            this.m_SearchEngine = new Business.Test.SearchEngine();
            this.m_MedTechUsers = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetUsersByRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.MedTech, true);
            this.m_LogUsers = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetUsersByRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.Log, true);

            this.m_PanelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetMolecularLabPanelSets();

            this.m_DigeneImportFileList = new YellowstonePathology.Business.FileList();

            this.m_AcknowledgeOrders = new YellowstonePathology.Business.Domain.XElementFromSql();
            this.m_PanelOrderIds = string.Empty;
            this.m_HasDataError = false;

            this.m_PathologistSearch = new YellowstonePathology.Business.Search.PathologistSearch(this.m_Writer);

            this.m_PathologistUsers = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetUsersByRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.Pathologist, true);

            this.m_FieldEnabler = new YellowstonePathology.Business.Common.FieldEnabler();

            this.m_PanelSetCaseTypeCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetPanelSetCaseTypeCollection();
        }
        public AccessionOrderPage(YellowstonePathology.Business.Test.AccessionOrder accessionOrder,             
            YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder,        
            PageNavigationModeEnum pageNavigationMode)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_PageNavigationMode = pageNavigationMode;

            this.m_ClientOrder = clientOrder;

            if (YellowstonePathology.Business.User.SystemIdentity.Instance.User.IsUserInRole(Business.User.SystemUserRoleDescriptionEnum.Pathologist) == true)
            {
                this.m_PanelSetCollectionView = Business.PanelSet.Model.PanelSetCollection.GetPathologistPanelSets();
            }
            else
            {
                this.m_PanelSetCollectionView = Business.PanelSet.Model.PanelSetCollection.GetHistologyPanelSets();
            }

            this.m_FacilityCollection = Business.Facility.Model.FacilityCollection.GetAllFacilities();
            this.m_CaseTypeList = new OrderPageCaseTypeList();
            this.m_OrderAsResearchTesting = false;

            InitializeComponent();

            this.SetButtonVisibility();
            DataContext = this;

            this.Loaded += new RoutedEventHandler(AccessionOrderPage_Loaded);
        }
        public PathologistSearch(object writer)
        {
            this.m_Writer = writer;

            this.m_FinalDates = new List<string>();
            this.m_FinalDates.Add("Not Final");
            this.m_FinalDates.Add("Final Today");
            this.m_FinalDates.Add("Final Yesterday");
            this.m_FinalDates.Add("Final Last 7 Days");
            this.m_FinalDates.Add("Final Last 30 Days");

            this.m_Pathologists = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetPathologistUsers();
            YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.AddAllToUserList(this.m_Pathologists, true);
            this.m_Pathologists[0].UserId = -1;
            YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.AddUnassignedToUserList(this.m_Pathologists, true);

            this.m_PanelSets = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();

            this.m_PathologistCaseTypes = this.m_PanelSets.GetPathologistsCaseTypes();
            this.m_SelectedCaseType = "All Case Types";

            this.m_Results = new YellowstonePathology.Business.Search.PathologistSearchResultCollection();

            this.m_SelectedPanelSetId = 0;
            this.m_SelectedPathologistId = -1;
            if (YellowstonePathology.Business.User.SystemIdentity.Instance.User.IsUserInRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.Pathologist))
            {
                this.m_SelectedPathologistId = YellowstonePathology.Business.User.SystemIdentity.Instance.User.UserId;
            }

            m_SearchValue = string.Empty;
        }
        public OrderSelectionPage(YellowstonePathology.Business.Facility.Model.Facility facility)
        {
            this.m_PanelSetCollectionView = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetByFacility(facility);
            this.m_FacilityCollection = Business.Facility.Model.FacilityCollection.GetAllFacilities();

            InitializeComponent();

            this.DataContext = this;
        }
        public OrderTypePage(YellowstonePathology.Business.ClientOrder.Model.ClientOrder baseClientOrder)
        {
            this.m_BaseClientOrder = baseClientOrder;
            this.m_ObjectTracker = new Business.Persistence.ObjectTracker();
            this.m_PanelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetYPIOrderTypes();

            InitializeComponent();

            this.DataContext = this;
            this.Loaded += new RoutedEventHandler(OrderTypePage_Loaded);
        }
Example #6
0
        public FlowUI(object writer)
        {
            this.m_Writer = writer;
            this.m_FlowLogSearch = new FlowLogSearch();

            this.m_SystemIdentity = YellowstonePathology.Business.User.SystemIdentity.Instance;
            if (this.m_SystemIdentity.User.IsUserInRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.Pathologist))
            {
                this.m_FlowLogSearch.SetByLeukemiaNotFinal();
            }
            else
            {
                this.m_FlowLogSearch.SetByAccessionMonth(DateTime.Now);
            }

            this.m_PathologistUsers = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetUsersByRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.Pathologist, true);
            this.m_MedTechUsers = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetUsersByRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.MedTech, true);

            this.m_FlowPanelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetFlowPanelSets(false);

            this.m_FlowComment = new FlowComment();
            this.m_FlowComment.FlowCommentCollection.SetFillCommandAll();
            this.m_FlowComment.FlowCommentCollection.Fill();

            this.m_Marker = new Marker();
            this.m_Marker.MarkerCollection.SetFillCommandAll();
            this.m_Marker.MarkerCollection.Fill();

            this.m_FlowCaseValidation = new FlowCaseValidation();

            this.m_ICDCodeList = new YellowstonePathology.Business.Billing.ICDCodeList();
            this.m_ICDCodeList.SetFillCommandByFlowCodes();
            this.m_ICDCodeList.Fill();

            this.m_FlowPanelList = new FlowPanelList();
            this.m_FlowPanelList.SetFillCommandByAll();
            this.m_FlowPanelList.Fill();

            this.m_FacilityCollection = YellowstonePathology.Business.Facility.Model.FacilityCollection.GetAllFacilities();

            this.m_CaseDocumentCollection = new Document.CaseDocumentCollection();
            this.m_PatientHistoryList = new YellowstonePathology.Business.Patient.Model.PatientHistoryList();
            this.m_PanelSets = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();

            this.Search();
        }
        public AccessionOrderPage(ClientOrderReceivingHandler clientOrderReceivingHandler, PageNavigationModeEnum pageNavigationMode)
        {
            this.m_AccessionOrder = clientOrderReceivingHandler.AccessionOrder;
            this.m_PageNavigationMode = pageNavigationMode;

            this.m_ClientOrder = clientOrderReceivingHandler.ClientOrder;

            this.m_PanelSetCollectionView = Business.PanelSet.Model.PanelSetCollection.GetHistologyPanelSets();
            this.m_FacilityCollection = YellowstonePathology.Business.Facility.Model.FacilityCollection.GetAllFacilities();

            this.m_CaseTypeList = new OrderPageCaseTypeList();

            InitializeComponent();

            this.SetButtonVisibility();
            DataContext = this;

            this.Loaded += new RoutedEventHandler(AccessionOrderPage_Loaded);
        }
        private bool IsOKToFinal()
        {
            bool result = true;

            YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
            YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(this.m_PanelSetOrder.PanelSetId);

            if (panelSet != null && panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.YPIDatabase)
            {
                result = false;
                MessageBox.Show("This report cannot be finalized here.");
            }

            if (this.HasCaseBeenPublished() == false && panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.PublishedDocument)
            {
                result = false;
                MessageBox.Show("This report cannot be finalized until it has been published.");
            }

            return(result);
        }
        private void MenuItemBuildPanelSetCollection_Click(object sender, RoutedEventArgs e)
        {
            MongoDatabase mongoDatabase = YellowstonePathology.Business.Mongo.MongoTestServer.Instance.LIS;

            mongoDatabase.DropCollection("PanelSet");

            MongoCollection mongoPanelSetCollection = mongoDatabase.GetCollection <BsonDocument>("PanelSet");

            YellowstonePathology.Business.PanelSet.Model.PanelSetCollection psCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
            foreach (YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet in psCollection)
            {
                panelSet.ObjectId = BsonObjectId.GenerateNewId().ToString();
                YellowstonePathology.Business.Test.PanelSetOrder          panelSetOrder            = YellowstonePathology.Business.Test.PanelSetOrderFactory.CreatePanelSetOrder(panelSet);
                YellowstonePathology.Business.Persistence.PersistentClass persistentClassAttribute = (YellowstonePathology.Business.Persistence.PersistentClass)panelSetOrder.GetType().GetCustomAttributes(typeof(YellowstonePathology.Business.Persistence.PersistentClass), false).Single();
                string assemblyQualifiedName = panelSetOrder.GetType().AssemblyQualifiedName;
                panelSet.PanelSetOrderClassName = assemblyQualifiedName;
                panelSet.PanelSetOrderTableName = persistentClassAttribute.StorageName;

                BsonDocument bsonDocument = YellowstonePathology.Business.Mongo.BSONBuilder.Build(panelSet);
                mongoPanelSetCollection.Insert(bsonDocument);
            }
        }
        public SearchSelectionPage(LoginUIV2 loginUI)
        {
            this.m_LoginUI = loginUI;
            this.m_AccessionDate = DateTime.Today;
            this.m_PanelSetFinalDate = DateTime.Today;
            this.m_PostDate = DateTime.Today;

            TimeSpan oneMonth = new TimeSpan(30,0,0,0,0);
            this.m_HPyloriStartDate = DateTime.Today.Subtract(oneMonth);
            this.m_HPyloriEndDate = DateTime.Today;

            this.m_KeyWordStartDate = DateTime.Today.AddDays(-30);
            this.m_KeyWordEndDate = DateTime.Today;

            this.m_TestStartDate = DateTime.Today.AddMonths(-1);
            this.m_TestEndDate = DateTime.Today;
            this.m_PanelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();

            InitializeComponent();

            DataContext = this;
        }
        public SearchSelectionPage(LoginUIV2 loginUI)
        {
            this.m_LoginUI           = loginUI;
            this.m_AccessionDate     = DateTime.Today;
            this.m_PanelSetFinalDate = DateTime.Today;
            this.m_PostDate          = DateTime.Today;

            TimeSpan oneMonth = new TimeSpan(30, 0, 0, 0, 0);

            this.m_HPyloriStartDate = DateTime.Today.Subtract(oneMonth);
            this.m_HPyloriEndDate   = DateTime.Today;

            this.m_KeyWordStartDate = DateTime.Today.AddDays(-30);
            this.m_KeyWordEndDate   = DateTime.Today;

            this.m_TestStartDate      = DateTime.Today.AddMonths(-1);
            this.m_TestEndDate        = DateTime.Today;
            this.m_PanelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();

            InitializeComponent();

            DataContext = this;
        }
Example #12
0
        private bool HandleAddAthenaDistribution(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            bool result = true;

            if (panelSetOrder.TestOrderReportDistributionCollection.DistributionTypeExists(YellowstonePathology.Business.ReportDistribution.Model.DistributionType.ATHENA) == false)
            {
                YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);
                if (panelSet.ResultDocumentSource == YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum.YPIDatabase)
                {
                    YellowstonePathology.Business.Client.Model.ClientGroupClientCollection cmmcGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId("3");
                    if (cmmcGroup.ClientIdExists(this.ClientId) == true)
                    {
                        this.AddTestOrderReportDistribution(panelSetOrder, this.m_PhysicianId, this.m_PhysicianName, this.m_ClientId, this.m_ClientName, YellowstonePathology.Business.ReportDistribution.Model.DistributionType.ATHENA, this.FaxNumber);
                    }
                }
                else
                {
                    this.HandleAddFaxDistribution(panelSetOrder);
                }
            }
            return(result);
        }
        public override void PostTechnical(string billTo, string billBy)
        {
            if (this.IsOkToPost() == true)
            {
                YellowstonePathology.Business.PanelSet.Model.PanelSetCollection allPanelSets = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet     = allPanelSets.GetPanelSet(this.m_PanelSetOrder.PanelSetId);

                YellowstonePathology.Business.Test.PanelSetOrderCPTCodeCollection panelSetOrderCPTCodeSummaryCollection = this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.GetSummaryCollection();

                foreach (YellowstonePathology.Business.Test.PanelSetOrderCPTCode panelSetOrderCPTCode in panelSetOrderCPTCodeSummaryCollection)
                {
                    YellowstonePathology.Business.Billing.Model.CptCode cptCode = Store.AppDataStore.Instance.CPTCodeCollection.GetClone(panelSetOrderCPTCode.CPTCode, panelSetOrderCPTCode.Modifier);
                    if (cptCode.HasTechnicalComponent == true)
                    {
                        YellowstonePathology.Business.Test.PanelSetOrderCPTCodeBill item = this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection.GetNextItem(this.m_PanelSetOrder.ReportNo);
                        item.FromPanelSetOrderCPTCode(panelSetOrderCPTCode);
                        item.BillTo   = "Client";
                        item.BillBy   = "YPIBLGS";
                        item.Modifier = cptCode.GetModifier(YellowstonePathology.Business.Billing.Model.BillingComponentEnum.Technical);
                        this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection.Add(item);
                    }
                }
            }
        }
        private void PublishNext()
        {
            List <YellowstonePathology.Business.Test.PanelSetOrderView> caseList = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetNextCasesToPublish();

            int maxProcessCount = 2;

            if (caseList.Count >= 10)
            {
                maxProcessCount = 10;
            }

            int processCount = 0;

            foreach (YellowstonePathology.Business.Test.PanelSetOrderView view in caseList)
            {
                YellowstonePathology.Business.Test.AccessionOrder accessionOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(view.MasterAccessionNo, this);
                YellowstonePathology.Business.Test.PanelSetOrder  panelSetOrder  = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(view.ReportNo);

                if (panelSetOrder.PanelSetId == 116)
                {
                    this.HandleWHP(accessionOrder, panelSetOrder);
                }

                YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);

                YellowstonePathology.Business.Interface.ICaseDocument caseDocument  = YellowstonePathology.Business.Document.DocumentFactory.GetDocument(accessionOrder, panelSetOrder, Business.Document.ReportSaveModeEnum.Normal);
                YellowstonePathology.Business.OrderIdParser           orderIdParser = new YellowstonePathology.Business.OrderIdParser(panelSetOrder.ReportNo);

                if (panelSetOrder.HoldDistribution == false)
                {
                    if (this.TryDelete(panelSetOrder, caseDocument, orderIdParser) == true)
                    {
                        if (this.TryPublish(caseDocument, accessionOrder, panelSetOrder) == true)
                        {
                            if (panelSetOrder.Distribute == true)
                            {
                                foreach (YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution testOrderReportDistribution in panelSetOrder.TestOrderReportDistributionCollection)
                                {
                                    if (testOrderReportDistribution.Distributed == false)
                                    {
                                        YellowstonePathology.Business.ReportDistribution.Model.DistributionResult distributionResult = this.Distribute(testOrderReportDistribution, accessionOrder, panelSetOrder);
                                        if (distributionResult.IsComplete == true)
                                        {
                                            testOrderReportDistribution.TimeOfLastDistribution    = DateTime.Now;
                                            testOrderReportDistribution.ScheduledDistributionTime = null;
                                            testOrderReportDistribution.Distributed = true;

                                            string testOrderReportDistributionLogId = Guid.NewGuid().ToString();
                                            string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
                                            YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionLog testOrderReportDistributionLog = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionLog(testOrderReportDistributionLogId, objectId);
                                            testOrderReportDistributionLog.FromTestOrderReportDistribution(testOrderReportDistribution);
                                            testOrderReportDistributionLog.TimeDistributed = DateTime.Now;
                                            panelSetOrder.TestOrderReportDistributionLogCollection.Add(testOrderReportDistributionLog);

                                            this.m_ReportDistributionLogEntryCollection.AddEntry("INFO", "Publish Next", testOrderReportDistribution.DistributionType, panelSetOrder.ReportNo, panelSetOrder.MasterAccessionNo,
                                                                                                 testOrderReportDistribution.PhysicianName, testOrderReportDistribution.ClientName, "TestOrderReportDistribution Distributed");
                                        }
                                        else
                                        {
                                            testOrderReportDistribution.ScheduledDistributionTime = DateTime.Now.AddMinutes(30);
                                            testOrderReportDistribution.Rescheduled        = true;
                                            testOrderReportDistribution.RescheduledMessage = distributionResult.Message;

                                            this.m_ReportDistributionLogEntryCollection.AddEntry("ERROR", "Publish Next", testOrderReportDistribution.DistributionType, panelSetOrder.ReportNo, panelSetOrder.MasterAccessionNo,
                                                                                                 testOrderReportDistribution.PhysicianName, testOrderReportDistribution.ClientName, distributionResult.Message);

                                            System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage("*****@*****.**", "*****@*****.**", System.Windows.Forms.SystemInformation.UserName, distributionResult.Message);
                                            System.Net.Mail.SmtpClient  client  = new System.Net.Mail.SmtpClient("10.1.2.111");

                                            Uri uri = new Uri("http://tempuri.org/");
                                            System.Net.ICredentials      credentials = System.Net.CredentialCache.DefaultCredentials;
                                            System.Net.NetworkCredential credential  = credentials.GetCredential(uri, "Basic");

                                            client.Credentials = credential;
                                            client.Send(message);
                                        }
                                    }
                                }
                            }

                            panelSetOrder.Published            = true;
                            panelSetOrder.TimeLastPublished    = DateTime.Now;
                            panelSetOrder.ScheduledPublishTime = null;

                            Business.Persistence.DocumentGateway.Instance.Save();
                        }
                    }

                    processCount += 1;
                    if (processCount == maxProcessCount)
                    {
                        break;
                    }
                }
            }

            YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Push(this);
        }
        private bool HandleAddEPICDistribution(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            bool result = true;

            if (panelSetOrder.TestOrderReportDistributionCollection.Exists(YellowstonePathology.Business.ReportDistribution.Model.DistributionType.EPIC) == false)
            {
                List <int> clientGroupIds = new List <int>();
                clientGroupIds.Add(1);
                clientGroupIds.Add(2);

                YellowstonePathology.Business.Client.Model.ClientGroupClientCollection stVincentAndHRHGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId(clientGroupIds);
                if (stVincentAndHRHGroup.ClientIdExists(accessionOrder.ClientId) == true)
                {
                    if (string.IsNullOrEmpty(accessionOrder.SvhAccount) == true || string.IsNullOrEmpty(accessionOrder.SvhMedicalRecord) == true)
                    {
                        this.HandleAddFaxDistribution(panelSetOrder);
                    }
                    else
                    {
                        YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                        YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);
                        if (panelSet.ResultDocumentSource == YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum.YPIDatabase)
                        {
                            this.AddTestOrderReportDistribution(panelSetOrder, accessionOrder.PhysicianId, accessionOrder.PhysicianName, accessionOrder.ClientId, accessionOrder.ClientName, YellowstonePathology.Business.ReportDistribution.Model.DistributionType.EPIC, this.FaxNumber, this.LongDistance);
                        }
                        else
                        {
                            this.HandleAddFaxDistribution(panelSetOrder);
                        }
                    }
                }
                else
                {
                    this.HandleAddFaxDistribution(panelSetOrder);
                }
            }
            return(result);
        }
 private void ListBoxFacilities_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.ListBoxFacilities.SelectedItem != null)
     {
         YellowstonePathology.Business.Facility.Model.Facility facility = (YellowstonePathology.Business.Facility.Model.Facility)this.ListBoxFacilities.SelectedItem;
         this.m_PanelSetCollectionView = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetByFacility(facility);
         this.NotifyPropertyChanged("PanelSetCollectionView");
     }
 }
        private YellowstonePathology.Business.Rules.MethodResult CanAddEpicDistribution(YellowstonePathology.Business.Client.Model.PhysicianClientDistributionListItem physicianClientDistribution)
        {
            YellowstonePathology.Business.Rules.MethodResult result = new Business.Rules.MethodResult();
            result.Success = true;
            if (this.m_PanelSetOrder.TestOrderReportDistributionCollection.DistributionTypeExists(YellowstonePathology.Business.ReportDistribution.Model.DistributionType.EPIC) == false)
            {
                List <string> clientGroupIds = new List <string>();
                clientGroupIds.Add("1");
                clientGroupIds.Add("2");

                YellowstonePathology.Business.Client.Model.ClientGroupClientCollection stVincentAndHRHGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId(clientGroupIds);
                if (stVincentAndHRHGroup.ClientIdExists(this.m_AccessionOrder.ClientId) == true)
                {
                    if (string.IsNullOrEmpty(this.m_AccessionOrder.SvhAccount) == true || string.IsNullOrEmpty(this.m_AccessionOrder.SvhMedicalRecord) == true)
                    {
                        result.Success = false;
                        result.Message = "Unable to add an EPIC distribution as the MRN or Account No is missing.";
                    }
                    else
                    {
                        YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                        YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(this.m_PanelSetOrder.PanelSetId);
                        if (panelSet.ResultDocumentSource != YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum.YPIDatabase)
                        {
                            YellowstonePathology.Business.Client.Model.Client client = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientByClientId(physicianClientDistribution.ClientId);
                            physicianClientDistribution.DistributionType = client.AlternateDistributionType;
                            result.Success = true;
                        }
                    }
                }
            }
            else
            {
                result.Success = false;
                result.Message = "Only one EPIC distribution is needed.";
            }
            return(result);
        }
        private void ListBoxCaseTypes_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (this.ListBoxCaseTypes.SelectedItem != null)
            {
                string caseType = (string)this.ListBoxCaseTypes.SelectedItem;
                switch(caseType)
                {
                    case "Histology":
                        this.m_PanelSetCollectionView = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetHistologyPanelSets();
                        break;
                    case "Flow Cytometry":
                        this.m_PanelSetCollectionView =  YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetByCaseType("Flow Cytometry");
                        break;
                    case "Molecular Genetics":
                        this.m_PanelSetCollectionView = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetByCaseType("Molecular");
                        break;
                    case "FISH":
                        this.m_PanelSetCollectionView = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetByCaseType("FISH");
                        break;
                    case "Neogenomics":
                        YellowstonePathology.Business.Facility.Model.NeogenomicsIrvine neo = new Business.Facility.Model.NeogenomicsIrvine();
                        this.m_PanelSetCollectionView = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetByFacility(neo);
                        break;
                    case "ARUP":
                        YellowstonePathology.Business.Facility.Model.ARUP arup = new Business.Facility.Model.ARUP();
                        this.m_PanelSetCollectionView = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetByFacility(arup);
                        break;
                    case "Reflex Testing":
                        this.m_PanelSetCollectionView = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetReflexTestingPanelSets();
                        break;
                    case "Pathologist":
                        this.m_PanelSetCollectionView = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetPathologistPanelSets();
                        break;
                    case "All Orders":
                        this.m_PanelSetCollectionView = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAllActive();
                        break;
                }

                this.NotifyPropertyChanged("PanelSetCollectionView");
            }
        }
Example #19
0
        private bool HandleAddMEDITECHDistribution(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            bool result = true;

            if (panelSetOrder.TestOrderReportDistributionCollection.DistributionTypeExists(YellowstonePathology.Business.ReportDistribution.Model.DistributionType.MEDITECH) == false)
            {
                YellowstonePathology.Business.Client.Model.ClientGroupClientCollection westParkHospitalGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId("36");
                if (westParkHospitalGroup.ClientIdExists(accessionOrder.ClientId) == true)
                {
                    if (string.IsNullOrEmpty(accessionOrder.SvhAccount) == true || string.IsNullOrEmpty(accessionOrder.SvhMedicalRecord) == true)
                    {
                        this.HandleAddFaxDistribution(panelSetOrder);
                    }
                    else
                    {
                        YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                        YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);
                        if (panelSet.ResultDocumentSource == YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum.YPIDatabase)
                        {
                            this.AddTestOrderReportDistribution(panelSetOrder, accessionOrder.PhysicianId, accessionOrder.PhysicianName, accessionOrder.ClientId, accessionOrder.ClientName, YellowstonePathology.Business.ReportDistribution.Model.DistributionType.MEDITECH, this.FaxNumber);
                        }
                        else
                        {
                            this.HandleAddFaxDistribution(panelSetOrder);
                        }
                    }
                }
                else
                {
                    this.HandleAddFaxDistribution(panelSetOrder);
                }
            }
            return(result);
        }
Example #20
0
        protected void SetAccessionNode()
        {
            string assignedTo = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetSystemUserById(this.m_PanelSetOrder.AssignedToId).DisplayName;

            YellowstonePathology.Business.Facility.Model.FacilityCollection facilityCollection = YellowstonePathology.Business.Facility.Model.FacilityCollection.GetAllFacilities();
            YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
            YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(this.m_PanelSetOrder.PanelSetId);

            string professionalComponentFacilityName = string.Empty;
            string professionalComponentFacilityCLIA = string.Empty;
            string technicalComponentFacilityName    = string.Empty;
            string technicalComponentFacilityCLIA    = string.Empty;

            if (panelSet.HasProfessionalComponent == true)
            {
                YellowstonePathology.Business.Facility.Model.Facility professionalComponentFacility = facilityCollection.GetByFacilityId(this.m_PanelSetOrder.ProfessionalComponentFacilityId);
                professionalComponentFacilityName = professionalComponentFacility.FacilityName;
                professionalComponentFacilityCLIA = professionalComponentFacility.CLIALicense.LicenseNumber;
            }

            if (panelSet.HasTechnicalComponent == true)
            {
                YellowstonePathology.Business.Facility.Model.Facility technicalComponentFacility = facilityCollection.GetByFacilityId(this.m_PanelSetOrder.TechnicalComponentFacilityId);
                technicalComponentFacilityName = technicalComponentFacility.FacilityName;
                technicalComponentFacilityCLIA = technicalComponentFacility.CLIALicense.LicenseNumber;
            }

            this.Add(new XElement("MasterAccessionNo", this.m_AccessionOrder.MasterAccessionNo),
                     new XElement("PanelSetName", this.m_PanelSetOrder.PanelSetName),
                     new XElement("ReportNo", this.m_ReportNo),
                     new XElement("PrimaryInsurance", this.m_AccessionOrder.PrimaryInsurance),
                     new XElement("SecondaryInsurance", this.m_AccessionOrder.SecondaryInsurance),
                     new XElement("FeeSchedule", this.m_AccessionOrder.FeeSchedule),
                     new XElement("PatientType", this.m_AccessionOrder.PatientType),
                     new XElement("PatientFirstName", this.m_AccessionOrder.PFirstName),
                     new XElement("PatientLastName", this.m_AccessionOrder.PLastName),
                     new XElement("PatientMiddleInitial", this.m_AccessionOrder.PMiddleInitial),
                     new XElement("PatientSuffix", this.m_AccessionOrder.PSuffix),
                     new XElement("PatientRace", this.m_AccessionOrder.PRace),
                     new XElement("PatientGender", this.m_AccessionOrder.PSex),
                     new XElement("PatientBirthdate", Helper.DateTimeExtensions.DateStringFromNullable(this.m_AccessionOrder.PBirthdate)),
                     new XElement("PatientMaritalStatus", this.m_AccessionOrder.PMaritalStatus),
                     new XElement("PatientPhoneNumberBusiness", this.m_AccessionOrder.PPhoneNumberBusiness),
                     new XElement("PatientPhoneNumberHome", this.m_AccessionOrder.PPhoneNumberHome),
                     new XElement("PatientAddress1", this.m_AccessionOrder.PAddress1),
                     new XElement("PatientAddress2", this.m_AccessionOrder.PAddress2),
                     new XElement("PatientCity", this.m_AccessionOrder.PCity),
                     new XElement("PatientState", this.m_AccessionOrder.PState),
                     new XElement("PatientZip", this.m_AccessionOrder.PZipCode),
                     new XElement("PatientInsurancePlan1", this.m_AccessionOrder.InsurancePlan1),
                     new XElement("PatientInsurancePlan2", this.m_AccessionOrder.InsurancePlan2),
                     new XElement("ClientId", this.m_AccessionOrder.ClientId),
                     new XElement("ClientName", this.m_AccessionOrder.ClientName),
                     new XElement("ProviderName", this.m_AccessionOrder.PhysicianName),
                     new XElement("ProviderNPI", this.m_ProviderNPI),
                     new XElement("AssignedTo", assignedTo),
                     new XElement("DateOfService", Helper.DateTimeExtensions.DateStringFromNullable(this.m_AccessionOrder.CollectionDate)),
                     new XElement("FinalDate", Helper.DateTimeExtensions.DateStringFromNullable(this.m_PanelSetOrder.FinalDate)),
                     new XElement("TechnicalComponentFacilityCLIA", technicalComponentFacilityCLIA),
                     new XElement("TechnicalComponentFacilityName", technicalComponentFacilityName),
                     new XElement("ProfessionalComponentFacilityCLIA", professionalComponentFacilityCLIA),
                     new XElement("ProfessionalComponentFacilityName", professionalComponentFacilityName));
        }