예제 #1
0
        public EGFRToALKReflexAnalysisElementResult(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, int panelSetId)
        {
            YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
            this.m_PanelSet = panelSetCollection.GetPanelSet(panelSetId);

            this.m_TestAbbreviation = this.m_PanelSet.Abbreviation;
            if (accessionOrder.PanelSetOrderCollection.Exists(panelSetId) == true)
            {
                this.m_Ordered = true;
                this.m_Status  = EGFRToALKReflexAnalysisElementStatusEnum.Ordered;

                this.m_PanelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetId);
                this.m_Final         = this.m_PanelSetOrder.Final;

                if (this.m_PanelSetOrder.Accepted == true)
                {
                    this.m_Status = EGFRToALKReflexAnalysisElementStatusEnum.Accepted;
                }
                if (this.m_PanelSetOrder.Final == true)
                {
                    this.m_Status = EGFRToALKReflexAnalysisElementStatusEnum.Final;
                }
            }
            else
            {
                this.m_Ordered = false;
                this.m_Final   = false;
                this.m_Status  = EGFRToALKReflexAnalysisElementStatusEnum.NotOrdered;
            }
        }
예제 #2
0
        private void BuildPanelSetOrder(Test.AccessionOrder accessionOrder, XElement accessionOrderElement)
        {
            YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();

            List <XElement> panelSetOrderElements = (from psoc in accessionOrderElement.Elements("PanelSetOrderCollection")
                                                     select psoc).ToList <XElement>();

            foreach (XElement panelSetOrderElement in panelSetOrderElements.Elements("PanelSetOrder"))
            {
                int    panelSetId = Convert.ToInt32(panelSetOrderElement.Element("PanelSetId").Value);
                string reportNo   = panelSetOrderElement.Element("ReportNo").Value;

                YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet = panelSetCollection.GetPanelSet(panelSetId);
                Test.PanelSetOrder panelSetOrder = Test.PanelSetOrderFactory.CreatePanelSetOrder(panelSet);
                YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(panelSetOrderElement, panelSetOrder);
                xmlPropertyWriter.Write();

                YellowstonePathology.Business.Builder.PanelSetOrderBuilder builder = YellowstonePathology.Business.Builder.PanelSetOrderBuilderFactory.GetBuilder(panelSetId);
                builder.Build(panelSetOrder, panelSetOrderElement);
                this.SetOrderedOnDescription(panelSetOrder, accessionOrder);
                BuildAmendment(panelSetOrder, panelSetOrderElement);
                BuildPanelSetOrderCPTCode(panelSetOrder, panelSetOrderElement);
                BuildPanelSetOrderCPTCodeBill(panelSetOrder, panelSetOrderElement);
                BuildTestOrderReportDistribution(panelSetOrder, panelSetOrderElement);
                BuildTestOrderReportDistributionLog(panelSetOrder, panelSetOrderElement);
                BuildPanelOrder(panelSetOrder, panelSetOrderElement);
                BuildSurgicalSpecific(accessionOrder, panelSetOrder, panelSetOrderElement);
                accessionOrder.PanelSetOrderCollection.Add(panelSetOrder);
            }
        }
예제 #3
0
        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.Billing.Model.CptCodeCollection     cptCodeCollection = YellowstonePathology.Business.Billing.Model.CptCodeCollection.GetAll();
                YellowstonePathology.Business.Test.PanelSetOrderCPTCodeCollection panelSetOrderCPTCodeSummaryCollection = this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.GetSummaryCollection();

                foreach (YellowstonePathology.Business.Test.PanelSetOrderCPTCode panelSetOrderCPTCode in panelSetOrderCPTCodeSummaryCollection)
                {
                    YellowstonePathology.Business.Billing.Model.CptCode cptCode = cptCodeCollection.GetCptCode(panelSetOrderCPTCode.CPTCode);
                    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);
        }
예제 #5
0
        public static bool IsAutopsyTechnicalOnly(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, string reportNo)
        {
            bool result = false;

            YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo);
            YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
            YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);

            if (panelSet is YellowstonePathology.Business.Test.TechnicalOnly.TechnicalOnlyTest == true)
            {
                if (accessionOrder.ClientId == 1520) //Montana Department of Justice Forensic Science Division
                {
                    result = true;
                }
            }
            return(result);
        }
        private void ButtonShowSelectSpecimenDialog_Click(object sender, RoutedEventArgs e)
        {
            YellowstonePathology.Business.Interface.IOrderTarget            orderTarget        = this.m_AccessionOrder.SpecimenOrderCollection.GetOrderTarget(this.m_PanelSetOrder.OrderedOnId);
            YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
            YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(this.m_PanelSetOrder.PanelSetId);
            YellowstonePathology.Business.Test.TestOrderInfo testOrderInfo = new Business.Test.TestOrderInfo(panelSet, orderTarget, false);

            if (panelSet.HasNoOrderTarget == false)
            {
                Login.Receiving.SpecimenSelectionPage specimenSelectionPage = new Login.Receiving.SpecimenSelectionPage(this.m_AccessionOrder, testOrderInfo);
                specimenSelectionPage.Back           += new Login.Receiving.SpecimenSelectionPage.BackEventHandler(SpecimenSelectionPage_Back);
                specimenSelectionPage.TargetSelected += new Login.Receiving.SpecimenSelectionPage.TargetSelectedEventHandler(OrderTargetSelectionPage_TargetSelected);

                this.m_LoginPageWindow = new Login.Receiving.LoginPageWindow();
                this.m_LoginPageWindow.PageNavigator.Navigate(specimenSelectionPage);
                this.m_LoginPageWindow.ShowDialog();
            }
        }
예제 #7
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);
        }
예제 #8
0
        public static bool IsAutopsyTechnicalOnly(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, string reportNo)
        {
            bool result = false;

            YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo);
            YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
            YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);

            if (panelSet is YellowstonePathology.Business.Test.AutopsyTechnicalOnly.AutopsyTechnicalOnlyTest == true)
            {
                result = true;
            }
            return(result);
        }
예제 #9
0
        public override void SetPanelSetOrderCPTCodes()
        {
            if (this.IsOkToSet() == 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);
                YellowstonePathology.Business.Specimen.Model.SpecimenOrder      specimenOrder      = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(this.m_PanelSetOrder.OrderedOnId);

                foreach (YellowstonePathology.Business.Billing.Model.PanelSetCptCode panelSetCptCode in panelSet.PanelSetCptCodeCollection)
                {
                    if (panelSetCptCode.CptCode.IsBillable == true)
                    {
                        if (this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.Exists(panelSetCptCode.CptCode.Code, panelSetCptCode.Quantity) == false)
                        {
                            YellowstonePathology.Business.Test.PanelSetOrderCPTCode panelSetOrderCPTCode = this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.GetNextItem(this.m_PanelSetOrder.ReportNo);
                            panelSetOrderCPTCode.Quantity            = panelSetCptCode.Quantity;
                            panelSetOrderCPTCode.CPTCode             = panelSetCptCode.CptCode.Code;
                            panelSetOrderCPTCode.CodeType            = panelSetCptCode.CptCode.CodeType.ToString();
                            panelSetOrderCPTCode.Modifier            = null;
                            panelSetOrderCPTCode.CodeableDescription = "Specimen " + specimenOrder.SpecimenNumber + ": " + this.m_PanelSetOrder.PanelSetName;
                            panelSetOrderCPTCode.CodeableType        = "BillableTest";
                            panelSetOrderCPTCode.EntryType           = YellowstonePathology.Business.Billing.Model.PanelSetOrderCPTCodeEntryType.SystemGenerated;
                            panelSetOrderCPTCode.SpecimenOrderId     = specimenOrder.SpecimenOrderId;
                            panelSetOrderCPTCode.ClientId            = this.m_AccessionOrder.ClientId;
                            this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.Add(panelSetOrderCPTCode);
                        }
                    }
                }
            }
        }
예제 #10
0
        private void ButtonShowSelectSpecimenDialog_Click(object sender, RoutedEventArgs e)
        {
            if (this.m_FlowUI.PanelSetOrderLeukemiaLymphoma != null)
            {
                this.Save(false);
                YellowstonePathology.Business.Interface.IOrderTarget            orderTarget        = this.m_FlowUI.AccessionOrder.SpecimenOrderCollection.GetOrderTarget(this.m_FlowUI.PanelSetOrderLeukemiaLymphoma.OrderedOnId);
                YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(this.m_FlowUI.PanelSetOrderLeukemiaLymphoma.PanelSetId);
                YellowstonePathology.Business.Test.TestOrderInfo testOrderInfo         = new Business.Test.TestOrderInfo(panelSet, orderTarget, false);
                Login.Receiving.SpecimenSelectionPage            specimenSelectionPage = new Login.Receiving.SpecimenSelectionPage(this.m_FlowUI.AccessionOrder, testOrderInfo);
                specimenSelectionPage.Back           += new Login.Receiving.SpecimenSelectionPage.BackEventHandler(SpecimenSelectionPage_Back);
                specimenSelectionPage.TargetSelected += new Login.Receiving.SpecimenSelectionPage.TargetSelectedEventHandler(OrderTargetSelectionPage_TargetSelected);

                this.m_LoginPageWindow = new Login.LoginPageWindow();
                this.m_LoginPageWindow.PageNavigator.Navigate(specimenSelectionPage);
                this.m_LoginPageWindow.ShowDialog();
                //this.m_FlowUI.GetAccessionOrder(this.m_FlowUI.PanelSetOrderLeukemiaLymphoma.ReportNo, this.m_FlowUI.AccessionOrder.MasterAccessionNo);
            }
        }
예제 #11
0
        private void HyperLinkSendEmail_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(this.m_PanelSetOrder.AdditionalTestingEmailAddress) == false)
            {
                if (string.IsNullOrEmpty(this.m_PanelSetOrder.AdditionalTestingEmailMessage) == false)
                {
                    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 subject = "Additional Testing has been ordered: " + panelSet.PanelSetName;

                    System.Net.Mail.MailAddress from = new System.Net.Mail.MailAddress("*****@*****.**");
                    System.Net.Mail.MailAddress to   = new System.Net.Mail.MailAddress("*****@*****.**");

                    System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(from, to);
                    message.Subject = subject;
                    message.Body    = this.m_PanelSetOrder.AdditionalTestingEmailMessage;

                    this.m_PanelSetOrder.AdditionalTestingEmailSent     = true;
                    this.m_PanelSetOrder.TimeAdditionalTestingEmailSent = DateTime.Now;
                    this.m_PanelSetOrder.AdditionalTestingEmailSentBy   = YellowstonePathology.Business.User.SystemIdentity.Instance.User.UserName;

                    this.NotifyPropertyChanged(string.Empty);

                    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);
                }
                else
                {
                    MessageBox.Show("The Email may not be sent without a message.", "Missing Message", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                }
            }
            else
            {
                MessageBox.Show("The Email may not be sent without an address.", "Missing Address", MessageBoxButton.OK, MessageBoxImage.Exclamation);
            }
        }
        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);
        }
예제 #13
0
        private void TileSpecimenSelection_MouseUp(object sender, MouseButtonEventArgs e)
        {
            YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection  = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
            YellowstonePathology.Business.Test.PanelSetOrder              panelSetOrder         = this.m_LoginUI.AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_LoginUI.ReportNo);
            YellowstonePathology.Business.PanelSet.Model.PanelSet         panelSet              = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);
            YellowstonePathology.Business.Test.TestOrderInfo              testOrderInfo         = new Business.Test.TestOrderInfo(panelSet, null, true);
            YellowstonePathology.UI.Login.Receiving.SpecimenSelectionPage specimenSelectionPage = new Receiving.SpecimenSelectionPage(this.m_LoginUI.AccessionOrder, testOrderInfo);

            this.m_LoginPageWindow = new LoginPageWindow();
            this.m_LoginPageWindow.Show();
            specimenSelectionPage.TargetSelected += new Receiving.SpecimenSelectionPage.TargetSelectedEventHandler(SpecimenSelectionPage_TargetSelected);
            this.m_LoginPageWindow.PageNavigator.Navigate(specimenSelectionPage);
        }
        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);
        }
예제 #15
0
        public override void PostGlobal(string billTo, string billBy)
        {
            if (this.IsOkToPost() == true)
            {
                YellowstonePathology.Business.PanelSet.Model.PanelSetCollection    allPanelSets = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                YellowstonePathology.Business.PanelSet.Model.PanelSetMolecularTest panelSet     = (YellowstonePathology.Business.PanelSet.Model.PanelSetMolecularTest)allPanelSets.GetPanelSet(this.m_PanelSetOrder.PanelSetId);

                if (panelSet.HasSplitCPTCode == true)
                {
                    YellowstonePathology.Business.Test.PanelSetOrderCPTCodeCollection panelSetOrderCPTCodeSummaryCollection = this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.GetSummaryCollection();
                    foreach (YellowstonePathology.Business.Test.PanelSetOrderCPTCode panelSetOrderCPTCode in panelSetOrderCPTCodeSummaryCollection)
                    {
                        YellowstonePathology.Business.Test.PanelSetOrderCPTCodeBill item = this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection.GetNextItem(this.m_PanelSetOrder.ReportNo);
                        item.FromPanelSetOrderCPTCode(panelSetOrderCPTCode);
                        item.BillTo = billTo;
                        item.BillBy = billBy;
                        this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection.Add(item);

                        YellowstonePathology.Business.Test.PanelSetOrderCPTCodeBill bill26 = this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection.GetNextItem(this.m_PanelSetOrder.ReportNo);
                        bill26.FromPanelSetOrderCPTCode(panelSetOrderCPTCode);
                        bill26.BillTo   = billTo;
                        bill26.BillBy   = YellowstonePathology.Business.Facility.Model.FacilityCollection.GetBillBy(m_PanelSetOrder.ProfessionalComponentBillingFacilityId, this.m_PanelSetOrder.TechnicalComponentBillingFacilityId, "Global", billTo);
                        bill26.Modifier = "26";
                        this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection.Add(bill26);
                    }
                }
                else
                {
                    base.PostGlobal(billTo, billBy);
                }
            }
        }
예제 #16
0
        public static BillableObject GetStandardBillableObject(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, string reportNo)
        {
            BillableObject result = null;

            YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo);
            YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
            YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);

            if (panelSetOrder is YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder == true)
            {
                result = new BillableObjectSurgicalPathology(accessionOrder, reportNo);
            }
            else if (panelSetOrder is YellowstonePathology.Business.Test.ThinPrepPap.PanelSetOrderCytology == true)
            {
                if (accessionOrder.PrimaryInsurance == "Medicare")
                {
                    result = new BillableObjectThinPrepPapMedicare(accessionOrder, reportNo);
                }
                else
                {
                    result = new BillableObjectThinPrepPap(accessionOrder, reportNo);
                }
            }
            else if (panelSet is YellowstonePathology.Business.PanelSet.Model.PanelSetMolecularTest == true)
            {
                result = new BillableObjectInHouseMolecular(accessionOrder, reportNo);
            }
            else if (panelSet is YellowstonePathology.Business.Test.KRASStandardReflex.KRASStandardReflexTest == true)
            {
                result = new BillableObjectKRASWithBRAFReflex(accessionOrder, reportNo);
            }
            else if (panelSet is YellowstonePathology.Business.Test.LLP.LeukemiaLymphomaTest == true)
            {
                result = new BillableObjectLeukemiaLymphoma(accessionOrder, reportNo);
            }
            else if (panelSet is YellowstonePathology.Business.Test.TechnicalOnly.TechnicalOnlyTest == true || panelSet is YellowstonePathology.Business.Test.IHCQC.IHCQCTest == true)
            {
                result = new BillableObjectTechnicalOnly(accessionOrder, reportNo);
            }
            else
            {
                result = new BillableObject(accessionOrder, reportNo);
            }

            return(result);
        }
예제 #17
0
        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.PanelSetMolecularTest panelSet     = (YellowstonePathology.Business.PanelSet.Model.PanelSetMolecularTest)allPanelSets.GetPanelSet(this.m_PanelSetOrder.PanelSetId);

                YellowstonePathology.Business.Billing.Model.CptCodeCollection     cptCodeCollection = YellowstonePathology.Business.Billing.Model.CptCodeCollection.GetAll();
                YellowstonePathology.Business.Test.PanelSetOrderCPTCodeCollection panelSetOrderCPTCodeSummaryCollection = this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.GetSummaryCollection();

                if (panelSet.HasSplitCPTCode == true)
                {
                    foreach (YellowstonePathology.Business.Test.PanelSetOrderCPTCode panelSetOrderCPTCode in panelSetOrderCPTCodeSummaryCollection)
                    {
                        YellowstonePathology.Business.Billing.Model.CptCode cptCode = cptCodeCollection.GetCptCode(panelSetOrderCPTCode.CPTCode);
                        if (cptCode.HasTechnicalComponent == true)
                        {
                            YellowstonePathology.Business.Test.PanelSetOrderCPTCodeBill item = this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection.GetNextItem(this.m_PanelSetOrder.ReportNo);
                            item.FromPanelSetOrderCPTCode(panelSetOrderCPTCode);
                            item.BillTo   = billTo;
                            item.BillBy   = billBy;
                            item.Modifier = null;
                            this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection.Add(item);
                        }
                    }
                }
                else
                {
                    base.PostTechnical(billTo, billBy);
                }
            }
        }
예제 #18
0
        private bool HandleAddEPICDistribution(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            bool result = true;

            if (panelSetOrder.TestOrderReportDistributionCollection.DistributionTypeExists(YellowstonePathology.Business.ReportDistribution.Model.DistributionType.EPIC) == 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)
                {
                    this.AddTestOrderReportDistribution(panelSetOrder, accessionOrder.PhysicianId, accessionOrder.PhysicianName, accessionOrder.ClientId, accessionOrder.ClientName, YellowstonePathology.Business.ReportDistribution.Model.DistributionType.EPIC, this.FaxNumber);
                }
                else
                {
                    this.HandleAddFaxDistribution(panelSetOrder);
                }
            }
            return(result);
        }
        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);
        }
예제 #20
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);
        }
예제 #21
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));
        }